This article is best viewed on a Desktop Computer
If you own a repair shop, and you’ve ever found yourself with a need to charge an iPhone battery, you probably have one (or more) of these Kaisi Test Fixtures.
Unfortunately there’s some fairly substantial issues with these boards, that most people are unaware of:
Lack of Current/Voltage Regulation
The board has nothing specifically designed to limit the current or voltage provided to the Cell. Lithium Batteries should be charged in 3 stages (as explained here).
Precharge – Where cells below a certain voltage are given minimal current.
Constant Current – Where the cell is given a fixed current
Constant Voltage – Where the cell is provided the maximum charge voltage for the remainder of the charge cycle.
The Kaisi board cannot regulate any of these conditions. The only “regulation” on the board is a shottky diode (d3), that “gets hot” limiting the current flow, and resulting in a voltage drop.
An Original TI Gas Gauge IC will terminate charge when the Voltage exceeds a preprogrammed value, but its a bad idea to rely on it. The termination of charge is really a fault mode, and not designed to be a feature. You also can’t be sure the Gas Gauge IC you have is Original, and hasn’t been programmed with an incorrect termination voltage.
There is also nothing preventing you from charging the cell too rapidly, and causing damage that could potentially result in fire. For example, nothing prevents you from feeding many amps into a cell that has been deeply discharged, and having it explode on your desk.
The current and voltage measurements provided by the 7 Segment Displays are fairly inaccurate. VR1 and VR2 were placed on the board to adjust these readings, but there is still no way to calibrate them from the minimum to maximum range. In addition to this, the readings reflect the voltage and current between the USB and PACK, rather than the current and voltage of the cell itself. The readings are provided by 2X generic looking 7 Segment Display drivers (IC2 and IC3), in conjuction with a Current Sense resistor (R16), and a diode (D3) whos job appears to be to get hot.
There’s no “Testing”
These boards are often marketed as battery testers. Beyond a rough voltage/current measurement, there’s nothing about this board that “tests” your batteries. The HDQ bus is connected to a trace that makes a round trip to all of the connectors, but its sole function is to recover the battery from a fault mode with a button. You simply cannot “test” a battery with this board, regardless of how a supplier markets it.
But there is good news…
As many are aware, we have been working on an Open-Source Solution to Battery Testing, with a far more advanced feature set that anything currently offered. Unfortunately, its still not ready. This is due to complexity of programming, and the limited resources available. The hold up is in writing and debugging C++. Large amounts of the code have been written however, and we hope to have some exciting news soon.
In the meantime though, everyone with one of these Kaisi Fixtures actually has half of the tools required to gather useful, semi-accurate information NOW. In addition, the boards can be made far safer with little effort.
We have decided to hack up some small sections of the code we have, add support for a 6 digit, 7 segment display, and give everyone whos eagerly waiting a project.
So here it is.
Kaisi Test Fixture Mod
A DIY modification to the otherwise troublesome Kaisi Board.
The project is really just a sneak peak into what is to come. It was never intended to be anything more than an unsophisticated hack. While it mostly consists of soldering some wires, drilling some holes, and glue, there’s a fair bit of time involved in the process, and the outcome is a fairly functional, but fairly ugly unit.
We didn’t feel right offering the process as a service. The reality is, we wouldn’t want to pay someone for the time involved for a hack job.
Due to the volume of requests we had, we decided to throw a kit together with a PCB to replace those ugly wires. The PCB/kit provides a little bit more functionality than the original project, looks a lot prettier, and can be used as a standalone unit.
To modify your Kaisi Test Fixture, you will need the following:
You’ll need some code to run on your Arduino board. Click the image to the left to download the zip file that contains everything you need.
You will also need a copy of the Arduino IDE to upload the sketch to your board. We used version 1.8.3.
We suggest getting your hands on one that has a, FT232RL / PL2303 Serial-USB IC, rather than a CH340. All will likely work just fine, but the CH340 is prone to certain issues. In either case, it never hurts to buy some spares.
These are available in an abundance, for super cheap. They don’t always come as expected (you’ll see more about that below), so we advise buying multiple of them too. There are versions of these available that include a DW01, used for protection. You don’t want one of these, as they are designed to protect the cell from deep discharge, and isolate it from the boards output, which we have no use for.
Specifically, you will need 1x 100 ohm, and 8x 270 ohm. These values could be changed a little. The 100 ohm resistor protects the Arduinos GPIO from a short, and the 270 ohm resistors limit the current on the 7 segment displays leds. We probably could have used as low as 180 ohm and made the displays brighter, but we decided to play it safe and limit the current to around 12mA, which is still quite visible.
The datasheet for the KYX-2381BS suggests a forward voltage of 1.7-2.0V, and a continuous forward current of 20mA. We measured 1.687V forward voltage on all segments/digits in our displays, so at 5V, 270 Ohm gives us about 12.3mA. We were quite comfortable with this, but the brightness was slightly lower than before the mod, so the specific resistors you choose to use are up to you. We do advise howere to calculate the resistors based on the specific forward voltage of your displays, as yours may not be the same as ours.
We used some 0402 resistors because we already had an abundance of them, but through hole resistors would have worked fine too, and the leads would have doubled as some rigid wire.
If you do use surface mount resistors, you may or may not also want a 3.3K resistor for an optional step later.
We used 0.1mm enamel coated wire, as well as some random wire from our wire pile we felt would be able to handle a few amps.
Theres some things we need to “stick”. You could use a variety of adhesives or even tapes. Your best bet is to scroll through the guide to see what it gets used for, and decide from there.
Obviously, you won’t be soldering a great deal without a soldering iron.
Hot Air Rework
You could get away with not having one of these, but it makes much lighter work for removing unwanted components.
To pick up those pesky unwanted components.
We’ll need to make a couple of holes, so you’ll need a drill, and some drill bits.
Ideally, if you have experience soldering really small things, you will breeze through this project without a great deal of frustration. YMMV.
Read this entire guide before you start.
Sometimes its useful to be a few steps ahead, as it will prevent you from those “oh, so THATS why they did that” encounters.
Once you have skimmed through the steps, Test your Kaisi Fixture.
Make sure all the Segments/Digits light up, the connectors are all intact, and everything looks good. If you have a few of these kicking about your shop, its not unusual to have one or more with some form of damage. It would be a shame to finish this project, only to find some of your connectors are damaged and need replacing, or parts of your displays don’t work.
Some important notes:
- Your Kaisi test fixture may vary slightly from the one used in this guide, as there are different revisions. Double check every step before you proceed, and remember to use your brain. Some steps may need to be changed as you go. We accept NO LIABILITY for any issues you may encounter. Remember, measure twice, measure again, have someone else measure for sanity, and cut once.
- This project/mod can be applied to almost any board. You are not limited to the Kaisi board in the guide. The minimum requirements are an Arduino, the project files, and a connection to the batterys HDQ interface. You don’t “need” a 7 segment display, or even a TP4056 to obtain battery data via serial.
- With the above in mind, you can even add your own 7 segment displays to a board that doesn’t have them, and mount everything on protoboard. We encourage you to get creative, and share your creativity with us!
- We know people are going to ask, inform us, or argue – How is this worth my time? More importantly, how is this any different to the data obtained via 3u Tools, or one of the other stand-alone battery testers?
Basically, 3u Tools and similar software displays what the battery is reporting. It doesn’t interpret the data for you. It won’t grade your battery based on multiple variables. It won’t check a range of data to confirm that it matches the expected data for the device. In addition, the battery testers available that report what is “original” are not open source. Exactly how they determine information is kept secret. One thing we can tell you for certain, it’s usually wrong. You can read more about that here.
Once uploaded, you can open the Serial Monitor, and set the Speed to 115200.
Confirm the Arduino is operating as expected by monitoring the Serial Output.
We will be reusing it, so try to keep the adhesive intact and dirt free.
Some heat on the PCB may help release the adhesive.
IC2 and IC3 are the 7 segment display drivers, which we will be replacing with our Arduino.
D3 provides BATT+ with USB power, which we need to isolate.
This hole must be big enough for your Arduinos reset button, so the exact size will vary.
This will cut through the trace between Battery and Voltage regulators for the previously removed 7 Segment Display drivers.
Next, drill a hole next to the anode pad of D3. We technically could use the 5V+ pin from above, but the Kaisi Board has a PTC fuse (R1), and it’s not a bad idea to utilise it. Drilling a hole here will give us a place to route a wire later on.
1 – You can remove the USB port from your Arduino Nano, and later reroute the USB Data pairs to the Kaisi’s Micro USB port.
We decided this would look nicer, and that Micro USB cables are much more common than Mini USB cables these days, so we opted for this route.
2 – You can drill/cut a hole in the Kaisi Ficture where IC3 was previously located (depending on version), allowing the Arduinos Mini USB port to protrude through.
3 – Remove the Arduino’s USB Port, and do nothing further. You will lose your ability to obtain Data via Serial, or upload an updated Sketch if one is provided.
For this model of Arduino, that exposed copper sits uncomfortably close to the Reset trace leg of the button.
To avoid a short, resulting in the Arduino being stuck in a reset state, we covered both the exposed copper, and the buttons leg with some 5 minute epoxy and let it set.
Much to the displeasure of some AVR fanatics (sorry, we’re not even sorry), we decided to use 5 minute epoxy on the ATmega328P itself. While they spit their coffee out and shake their fists, we’ll show you how that looks.
The specific place on the Ground trace you expose, may depend on the width of your TP4056 board (they arent always the same size).
While you are at it, Scratch away the end of the HDQ/SWI trace.
Tin these 3 exposed areas with Solder.
Ensure that a Green or Blue LED illuminates, and not a Red one. This is the Fully Charged LED, and it’s not uncommon for them to be backwards. If it is, swap them over using hot air, or grab another TP4056 board and test again.
This isn’t too important. The LED’s won’t be all that visible through the PCB substrate, and it won’t effect the function of the board.
It’s always a good idea to test modules such as this before you solder them though, and make sure none of the magic smoke escapes.
With a soldering iron and tweezers, carefully lift the CS leg of the TP4056 from the board.
Now solder a wire to it, ensuring is has good connection, and is not connected to the board at all.
Be very careful to solder the BATT end, and not the INPUT end of the TP4056 board. This will require some fairly large blobs of solder. You might not get it right the first time.
There should be a gap between the components on the TP4056 board, and the Kaisi Board. It doesnt need to be much, but we don’t want the capacitors end caps to rub through and short against the Kaisi Boards ground plane. You can use a business card or a few pieces of paper as a spacer, to get an even narrow gap.
Soldering the TP4056 board like this serves multiple purposes. It provides good connection to the battery, a secure, low profile mounting method, and finally a heatsink.
The TP4056 IC itself has an exposed pad underneath it, which dissipates the heat into the boards Ground plane. By having a solid connection between the two ground planes, the heat dissipation is in turn slightly better.
This will give the Arduino the ability to enable/disable charging.
Because we used 0402 resistors, we soldered one side of the resistor first, and then soldered the wire to it.
If you are using through hole resistors, you dont need the wire, as you can just use the resistors legs.
We need to connect the 7 Segment Displays, starting with the segments.
The two displays need to have each segment connected in parallell, turning them into one 6 digit display.
Each segment needs a resistor to limit current. As stated earlier, we used 270 ohm.
Again because we used 0402 resistors, we soldered all 8 of them at once on one side, and then soldered the wires individually. In case you are curious, the 8th segment is for the decimal point.
If you are using through-hole resistors, you can solder them on as you go. Just make sure to keep the resistor between the Arduino and the segment pair, and use the leg of the resistor to connect the segments in parallel. Be careful to leave a gap between the legs. It may look like we are letting all of our wires touch, but they are enamel coated.
Starting with the bottom row, solder all of the segments as pictured.
Now do the same for the 3 segments on the top row.
Finally, the individual digits need to be connected. These dont need current limiting resistors.
Next, feed the wire through the hole you made earlier.
Trim the excess and solder the other end of the wire to the IN+ pad of the TP4056. This provides the TP4056 with power. The IN- does not need to be connected, as its directly connected to BAT-, which we already soldered to ground.
Solder a short length of wire from the IN+ pad, to the 5V pin of the Arduino. This provides power to our Arduino.
Finally, Solder a wire from one of the Arduinos GND pins, to one of the Kaisi Boards Ground connections. We used the 5V- hole because it was close by.
After a final close inspection, ensuring everything is connected correctly, connect a Micro USB cable and check the devices function. You should be able to read the displays, and obtain data from batteries. You will notice when the current/voltage mode rolls around, that the current is now measured in milliamps, rather than amps.
Any battery connected with a reported State Of Charge of less than 50%, will be charged using the TP4056. If the battery is above 50% SOC, the TP4056 will be disabled.
This behaviour can be changed in the Arduino sketch, but its worth pointing out that the TP4056 can only charge the cell to 4.2V. Therfore in the case of most iPhone Batteries (that can charge up to 4.35v), charging will be terminated at about 80%.
This is actually ideal in most cases anyway, because Lithium cells degrade less in storage with about 50% charge. If you plan to put them back into your inventory, you really dont want them fully charged, or flat.
The data provided including the voltage/current measurement, is now actually reported by the Gas Gauge IC itself. If no HDQ data is detected, the TP4056 will default to ON. This will recover any cells in a fault/flat state automatically, and still allow you to charge cells with no gas gauge (although, you probably wont wan’t to use them).
If you decided to reroute the USB data pins as we did, you’ll have to solder a couple of wires to the DM and DP pins on the USB Serial IC. Refer to the schematics for your particular IC for a pinout.
It’s worth noting that USB specifications generally suggest resistors for line termination. If your board has them, you should solder your wires there instead. If it doesn’t, it wouldnt be a bad idea to add some according to the datasheet of your USB-serial IC. Our Arduino Nano board didn’t have any, and we opted against adding them. With that said the PL2303 datasheet suggested 27 ohm resistors be placed as close to pin 15 and 16 as possible.
We made our DP wire longer to identify it at the other end. It may not have been necessary, but we also twisted the data pair together. This should help prevent crosstalk with our other wires.
The twisted pair was fed under the other wires, and through the hole in the corner of the Kaisi board, close to the Micro USB port.
After soldering the 2 wires to the corresponding pins on our Micro USB port, it was time for one more test to confirm USB communication.
Step 19 (Optional)
On our board, R6 was a 1K resistor. On others its a 2K. Both seem to be uncomfortably bright, so we grabbed a 3.3K from our 0402 resistors and replaced R6 with it. It’s a little small, but we made it work.
Theres no visual feedback for HDQ data, but some of our TP4056 boards had a Blue LED on them.
We decided to steal one, and the resistor next to it, and solder them between the legs of S1.
Now we get a nice flashing Blue LED during HDQ communication.
Do your best to mark the foam where the Arduino and TP4056 are located.
We advise cutting these out with a blade, but we burned a cavity into ours with an old soldering iron to accommodate the parts we added.
This creates toxic smoke, sets off smoke detectors, annoys the local fire brigade, and can make you blind. So, if you try something similar, you do so at your own risk. Remember, we told you not to.
Make sure you leave room for your wires ect, especially those that might be a little tight.
If you recall, we told you earlier to leave some slack on the wires. We didn’t, and in placing the foam back ended up breaking a couple.
If you wanted, you could leave the foam off, and use rubber feet instead. Or, you could encase the wires in epoxy or conformal coating to protect them.
The choice is yours.
That’s all there is to it! You now have a real battery tester, with predictable, transparent results.
The tester can provide a range of information on the 7 segment display, depending on the programming. Extended information can be read via Serial, using the Arduino Serial Monitor, or your preferred software. The Current/Voltage is now provided by the Gas Gauge IC, is far more accurate, and supports bidirectional current sensing.
The battery can be charged to a safe storage level, without anywhere near risk of overcharging, cell damage, or fires. (We still don’t suggest leaving a charging cell unattended, ever)
The mod has nowhere near the level of usability or features as the CommBatt units that are under development. However, your Kaisi Test Fixture now has substantially more usability than before, and more transparency than any other tester available. And you made it yourself!
We hate the thought of adding to e-waste, so we hope this will bring new life to the Kaisi Test Fixtures. Now when CommBatt is released, you have one less tool in your arsenal that was made redundant.
Finally, some transparent iPhone Battery Testing to stir up the industry.