Homemade imax b6 on arduino. Charger imax b6

The Imax B6 device was purchased by me for $ 12.23. The seller sent it at my request by Hong Kong post, for which I had to pay a little extra, but it was worth it, delivery is faster than through logistics companies. I ordered, during the delivery process it was tracked by both Hong Kong post and Russian post. To the post office IMAX B6 got only 12 days from the date of payment.

Instructions and settings during operation

The charger-balancing device was purchased to service numerous batteries and batteries of various types that I operate.

According to the description, the charging-balancing device is capable of serving NICD, NIMN, LIion, LIpol, Pb battery, but in practice it copes well with relatively new types of batteries - NIZN.

Appearance

The charging process is carried out in the "AUTO" or manual mode. In the "AUTO" mode, only the maximum current is set, the charger during the cycle changes according to a pre-programmed algorithm for each type of elements, while in manual mode the set current remains unchanged throughout the entire cycle.

You can test the actual capacity of the elements. Power supply from an external source with a voltage of 12-18 volts. Management is carried out by only four metal buttons. In the settings, you can save 5 device operation programs to memory, or set a new operating mode before connecting the battery.

It is possible to turn off the charging process when a certain temperature on the battery is reached (when a temperature sensor is not included in the kit), after some time has passed (up to 4 hours or do not control the time), when a certain charge current is reached, the sound signal is turned on / off.

During operation, the liquid crystal display shows information about the operating mode, battery voltage, charging / discharging current.

My device is powered by a laptop power supply. During operation, the first thing I did was redo the output cords, since those included in the kit are not applicable, there are no such connectors (except for crocodiles). This is perhaps the only thing that I did not like, but maybe only me.

I made cords specifically for the equipment that I charge (mainly children's toys) and adapted them to battery compartments for charging 1-3 AA, AAA batteries.


Click to enlarge

In the NICD training mode, NIMN managed to restore, although not completely, the performance of 4 of the 12 elements. The balancing program is necessary when using several LIion, LIpol batteries connected in series, I have not used it, I can’t say anything.

Nizn

Charging NIZN cells in Imax B6 is not provided, but it is possible. The voltage of these elements is 1.6 V, which is slightly higher than the voltage of NICD, NIMN (1.2 V). The charging algorithm is identical. To connect, I use a battery compartment for 2 AA batteries, set the voltage to 3.6 V (3 cells) in the device. Charges, does not swear.

car batteries

Use as a charger for lead-acid batteries…

I have been charging and charging a child's electric car with two 6 volt batteries, in winter I charged a car battery with a current of 5 a. Notification about errors is very convenient, not some code that needs to be looked for in the table, but a text message, however, in good English.

Also, in winter, in the cold, I helped the regular generator of my Priora a little, charging the car battery in the garage. I don’t have heating in my garage, but Imax withstood the cold very well and didn’t act up.

Review

In general, very satisfied. I already wrote about NIZN batteries above and this is also a big plus! Looks good from the outside, but didn't take it apart. It has been working without failures and breakdowns for several months now, and in capable hands it generally provides a whole range of possibilities! All error messages, the end of the work cycle and other messages are accompanied by an audible signal.

Where can I buy

You can buy on the Aliexpress website at. Please note: you should only buy the original iMax B6 product, for which we look at the product title. If it says "ORIGINAL", then everything is fine. The fact is that the very rules of Aliexpress for sellers and stores prohibit them from selling a fake with an indication of originality, thereby deceiving buyers.

In case of violation of this rule, they will pay a large fine or even lose their account with all unpaid funds. So the sellers of fakes just usually do not write anything about the origin of products, but the sellers of original products will definitely note this in the title and description!


Comparison of original and fake

Video review

I bought a relatively cheap universal amateur device for charging most common types of batteries. Unfortunately, the device turned out to be unsuitable for its intended use, although it was completely fixed. The problem is in the poor or incorrect implementation of literally all of its functions.

I will not analyze the details of the Imax B6 itself, the user manual is available on the network, and charging is so popular that you can easily find many reviews on it. I will describe only the features of this fake.

Chased for cheapness, got the corresponding result. Although now you can easily get exactly the same thing for 30-40 bucks, the Chinese have mastered this type of fake well. Its recipe is simple - put your own Nuvoton brand microcontroller, sometimes interrupted by Atmel, and file a firmware there that looks as close as possible to the original. The problem is that this program is only visually (on the menu) similar to the original one, while the implementation of the functions is disgusting.

Let's look at the device from all sides and look inside.










Perhaps in the far left corner there should be a chip responsible for connecting to the computer. It's funny that instead of the tracks, this whole place is left as a single polygon, but they forgot to remove the silkscreen with the mask. The option with communication with a computer is not provided here initially. The microcontroller is under the display.

Nickel discharge (NiCd, NiMh)

When nickel is discharged, the voltage is measured under load. I don't know about the rest, but my even good (but old) batteries have quite high internal resistance. As a result, when discharging with a high current, the process may not even start due to a strong subsidence of the battery voltage. In principle, this is normal. In this mode, you can select the discharge voltage, compensate for this drawdown.

Lithium Discharge (Li-Ion, Li-Po, Li-Fe)

The programs for all types of lithium are identical, only the threshold voltages differ, upon reaching which the discharge stops. This voltage cannot be set manually, it depends on the set charge voltage, which is also hardcoded and depends only on the selected battery type.

For lithium, the program reduces the current at the end, but due to some problems with measurements, it cannot complete the process, it sucks out the last drops for hours, and the lower threshold is very often ignored. The charger can easily drive the voltage below a safe level, damaging lithium batteries.

When a battery assembly is connected, only a part of the cells can be severely discharged, the device does not take into account the possibility of such an outcome, the balancing connection is not used to assess the state of individual cells. You can quickly ruin an expensive one even when discharged to a safe level of the entire assembly. In the only attempt to fully discharge the assembly to measure its capacity, the spread of cell voltages at the end of the discharge turned out to be 2.5-3.6 V, with a safe level of about 3 V.

After overdischarging, the charger itself can no longer charge the battery back, giving a "low voltage" error.

The original Imax B6 has a discharge power limit of 5W, here this limit is raised to about 7-8W. This is probably why the device gets very hot when the batteries are discharged, there is no fan inside, all cooling is done by transferring heat to the case. But I did not hold the original B6 in my hands, it may have the same problems at 5 watts.

Nickel charging

The manufacturer claims charging with high currents, 1-2 C up to 5 A. But in this fake, in most cases, you can risk putting only 0.2 A. If you set a larger value, then with a high probability the device will consider that several cells are connected in series and will supply an increased voltage, which leads to damage to the batteries. Moreover, excessive voltage will not be applied immediately, but after a small recharging and re-evaluation, i.e. you can connect the battery, see that everything seems to be in order, leave to do other things and return to the burnt house.

End of charge by Delta Peak is implemented incorrectly, or not implemented at all, due to which the battery often turns out to be undercharged. Even when starting the program, errors like “short circuit”, “insufficient voltage” and “overvoltage” come out, you have to restart several times until it works.

Lithium charging (normal, fast, storage)

Charging a lithium battery is usually divided into two stages. On the first one, charging is carried out with a constant current of a given value, here charging can give out up to 5 A, and there are no problems with this. At the second stage, the battery is recharged by a voltage source.

And this, second, stage for some reason works very slowly, sometimes dragging out the process for hours, I did not find the reasons for this. It probably has something to do with the erroneous end voltage for some batteries. If you charge a 4.2-V bank to 4.1 V, then charging always takes place within an acceptable time frame.

The device has three separate charging programs - normal, fast and storage. No significant differences between them in this version of the B6 was found. The storage mode in the original charge should bring the battery up to 3.85 V, discharging or charging it, here this mode always simply charges the battery to the maximum, but in the options of this mode there is a limitation from the original program - the charge current cannot be more than 1 A. In general draining the battery for storage is a bad idea. And you can charge up to 100%, although the level of 3.85 V is probably more preferable, it is not for nothing that the batteries come from the factory charged to about this voltage.

Lithium charging with balancing

Even more nonsense happens when charging with a balancing cable connected. Fake B6 really knows how to balance cells, but only if one of the cells does not exceed the maximum allowable value, for example, due to charging in another charger with b about higher final charging voltage. In this case, this “B6” starts to slow down, probably due to the fact that it simply does not know how to discharge a recharged cell in such cases, which is why the balancing process simply stops. Solution to the problem: discharge the entire battery a little, then start balancing again.

Balancing here ends when the voltage difference reaches no more than 0.01 V, for example, after balancing the 4S assembly at 16.8 V (4.2 V per cell), the voltage of all cells will be in the range of 4.19-4.20 V. Correction: if the battery, wires or contacts are in poor condition, then you can end up with a much larger spread.

As in the case of charging a single cell, reducing the charging voltage to 4.1 V significantly speeds up the process.

Some more features

Work with lead batteries has not been tested. This function was originally made on the principle “if only it was”, and I’m not going to spoil expensive batteries for the test, especially given the tendency of this charge to discharge the battery below a safe threshold, which is important for lead, as well as for lithium.

The voltage displayed on the display during charging or discharging has little to do with the voltage on the battery. This is some kind of internal estimated value, which is not interesting to the user. If, on the basis of such incomprehensible values, the capacitance is measured, then this function, consider, is not there either. Perhaps the problem is in bad wires and contacts.

The power supply is not included, you need a 11-18 V unit with a return of at least 50 watts. If you want to take a model with a power supply, look for B6AC. I used a 16V/4.5A (72W) power adapter from an old laptop and it worked great. The kit includes wires with crocodiles for power from a car battery.

The original B6 can be connected to a computer using. In this fake, there is no such function and the corresponding menu item. I also had high hopes for this feature. Also, unlike the original, this fake does not have a calibration function.

Sometimes letters from previous messages remain on the screen.

Original Imax B6

Since all the functions of the original B6 are copied in this fake as accurately as possible, you can get some impression of the original device.

The charger has non-switchable protection against short circuit, low and high voltage. In practical use, this protection only interferes, being only a weak implementation of protection against a fool running, for example, a program for lithium on nickel. With problem batteries, the protections also make things more difficult, such as having to keep another charger on hand to recharge the cans to an acceptable level if they were over-discharged. But there is also a useful type of protection - stop when the circuit is broken, and it also works for all inputs of the balancing connectors.

Switching between types of lithium is done as a user setting, for which you need to go through the entire menu of the device. Very uncomfortable. Also, when working with lithium, there is no way to indicate the charge and discharge levels yourself. There is no possibility of charging up to 4.35 V.

For the price of the original B6, there could be a much more advanced display here. A monochrome display of two lines of 16 characters in such a complex device looks simply ridiculous. The firmware of the device also does not shine with information content, it gives mostly useless information.

findings

I didn’t use the device for long, but I already realized that only 1-2 of all programs can be used, and even then only if there is no normal device at hand and there is a lot of free time.

Since this type of counterfeit based on the Nuvoton chip is already very popular, there is a chance that alternative firmware will come up for it, as was done with the original B6 and more accurate copies. The main thing is that the hardware allows you to do all the things that the original device does.

What did I want from this charge? A little bit of everything and in working order: fast nickel charging, balancing charging, capacity meter, PC connection, storage charging function. Of all this, I received only charging with balancing, and even that with a significant limitation and a very long operating time. A fake is not even worth the $19 spent on it.

I'm not really worried about the fact that instead of a well-known microcontroller, some little-known other is installed, as long as it works, but alas, this is not so. Perhaps the alternative microcontroller is worse in performance, and it is impossible to write a program similar to the original one, but it is more likely that some particular programmer is to blame. In general, the replacement looks more interesting, at least with higher accuracy of the ADC (12 bits versus 10 for the ATmega32 for the original), but there are no exact data yet, the datasheet could not be found even on the manufacturer's website, the ADC data was taken from the general description of the M051 series.

Of all the functions, only charging with balancing turned out to be really useful, but only if you charge batteries up to 4.1 V (select LiIo lithium type in the settings). I will charge it. For this battery, I first planned to buy a separate 1 A balancing charger, which would cost me about $ 12. This charger, taking into account a partial refund during a dispute with the seller, cost me even less, and the charging current here can be up to 3.3 A (for battery assemblies with lower voltage up to 5 A).

If you want to try to find the original charger, try searching for the keywords "genuine imax b6" and "original imax b6". After the purchase, it is better to open it and make sure that there is an Atmel microcontroller inside, and you need to check not only the marking, it can be broken, but also the pinout of the chip. (I'm not sure that all originals of all years of release will have the same microcontroller) It is better to take it on eBay, where they fight hard against counterfeit goods. I took a lot on AliExpress with a large number of orders and a bunch of positive reviews, I bought it.

Update October 5, 2015

In one of the photos above, you can see that the power and balancing connectors are crooked. If this does not cause problems with power ones, then balancing ones can be accidentally inserted not completely, so I decided to fix them. The balancing connectors are soldered to a separate small board, which is inserted into the main slot and soldered to it there. To correct the position of the connectors, I had to strongly pull the board out of the slot, which reduced the soldering area on the reverse side, which somewhat reduced the strength of the connection. The very principle of such a fixation seems very unreliable, you can damage the solder mount with frequent use of the connectors.

I also had to completely remove the main board from the case, and a couple more problems immediately appeared. In contrast to the upper side, the back of the board is all stained with flux residues, which had to be washed off. Power transistors are pressed against the case through a gasket and a layer of thermal paste. The problem is that the thermal paste was already all dry, I had to clean everything off and lubricate it again.

During assembly, the protective film was not removed from the screen. It looks very clumsy (see photo above), as it is glued not to the screen itself, but to its frame. I removed this film and put a new one, but only on the surface of the screen. The film here will definitely not be superfluous, since the device can be operated in the field.

I charge a lithium-polymer assembly with a voltage limit of 4.2 V with a balance of up to 4.1 V (Li-Ion mode). So the process is completed quite quickly, although the battery is not fully charged. Up to 4.1 V I also charge my other batteries. Due to the relatively large charging current, this charger does it faster than the old ones, trying to finish the battery up to 4.25 V, regardless of its capabilities.

Checked the work on a lead-acid car battery. Charging behaves about as inadequately as in the case of nickel. For example, I charged a half-discharged battery, the final voltage showed something like 13.8 V. For my battery, this voltage will not even cause the electrolyte to boil. Having connected an already almost charged battery, the charger showed that it would finish the battery up to 14.5 V (I don’t remember exactly). Not critical, but you already have to monitor the bubbles. Then I connected the charger again, and the final voltage rose to 15.5 V (approximately), the current voltage also increased, to approximately 14.5 V (I don’t remember exactly again), which led to the boiling of the electrolyte. In general, you can charge, but only under supervision, as is the case with any conventional car charger, there are no advantages here. The maximum charge current is 4.2 A, not enough.

Truly they say: laziness is the engine of progress! So I, the thought stirred my head, to automate the process of measuring and training acid batteries. After all, who, in their right mind, will, in our age of smart microcircuits, pore over a battery with multimeters and a stopwatch? Surely, many people know the "folk" charger Imax B6. On Habré there is about him (and not even one). Below I will write what I did with it and why.

Accuracy

In the beginning, my goal was to increase the discharge capacity in order to measure my UPS batteries and, in the long run, train them without risking premature aging (me, not batteries). I drove the device in disassembled form.

Inside it is generously stuffed with many differential amplifiers, a multiplexer, a high efficiency buck-boost regulator, it has a good package, and you can find open source code on the web. very good firmware. With a charging current of up to 5 amperes, it can even charge car batteries at 50A / h (current 0.1C). With all this wealth, as current sensors, ordinary 1 W resistors are used here, which, among other things, operate at the limit of their power, which means that their resistance significantly floats under load. Can such a measuring device be trusted? Having blown and touched these “sensors” with my hands, the doubts are gone - I want to convert them to shunts from manganin!

Manganin (there is also Constantan) is a special alloy for shunts, which practically do not change their resistance from heating. But its resistance is an order of magnitude less than the replaceable resistors. Also, the device circuit uses operational amplifiers to amplify the voltage from the sensor to readable values ​​by the microcontroller (I believe the upper limit of digitization is the reference voltage from TL431, about 2.495 volts).

My refinement is to solder shunts instead of resistors, and compensate for the difference in levels by changing the gain of the operational amplifiers on the LM2904: DA2:1 and DA1:1 (see diagram).

Scheme



To remake, we need: the original device itself (I describe the remake of the original), manganin shunts (I took from Chinese multimeters), ISP programmer, cheali-charger firmware (for calibration), Atmel Studio for its assembly (optional), eXtreme Burner AVR for its firmware and experience in creating bricks for successful atmega firmware (All links are at the end of the article).
And also: the ability to solder SMD and an irresistible desire to restore justice.

I never studied circuit design and amateur radio in general, so making such changes to a working device like this on the go was lazily scary. And then multisim came to the rescue! It is possible in it, without touching the soldering iron: to implement the idea, debug it, correct errors and understand whether it will work at all. In this example, I modeled a piece of circuit, with an operational amplifier, for a circuit that provides a charge mode:

Resistor R77 creates negative feedback. Together with R70 they form a divider that sets the gain, which can be calculated something like this (R77+R70)/R70 = gain. My shunt turned out to be about 6.5 mOhm, which at a current of 5 A will amount to a voltage drop of 32.5 mV, and we need to get 1.96 V in order to comply with the logic of the circuit and the expectations of its developer. I took the 1 kΩ and 57 kΩ resistors as R70 and R77 respectively. According to the simulator, it turned out 1.88 volts at the output, which is quite acceptable. I also threw out the resistors R55 and R7 as reducing linearity, they are not used in the photo (perhaps this is a mistake), and the shunt itself was connected with dedicated wires to the bottom of R70, C18, and the top of the shunt directly to the "+" input of the op-amp.

Extra tracks are trimmed, including on the reverse side of the board. It is important to solder the wires well so that they do not fall off, over time, from the shunt or board, because not only the ADC of the microcontroller is powered from this sensor, but also the current feedback of the switching regulator, which, if the signal fails, can switch to the maximum mode and ditch.

The circuit for the discharge mode is not fundamentally different, but since I put the VT7 field device on a radiator and increase the discharge power to the limit of the field device (94W according to the datasheet), I would like to set the maximum discharge current more.

As a result, I got: R50 - a shunt of 5.7 mOhm, R8 and R14 - 430 Ohm and 22 kOhm, respectively, which gives the required 1.5 volts at the output with a current through the shunt of 5 A. However, I experimented with a large current - maximum 5.555 A came out, so I sewed a limit of up to 5.5 A into the firmware (in the file “cheali-charger\src\hardware\atmega32\targets\imaxB6-original\HardwareConfig.h”).

Along the way, a problem got out - the charger refused to recognize that it was calibrated (i discharge). This is due to the fact that not the MAX_DISCHARGE_I macro definition in the "HardwareConfig.h" file is used for verification, but the second calibration point is used to check the first one (the points are described in the "GlobalConfig.h" file). I did not delve into these subtleties of the intricacies of the code and simply cut out this check in the checkAll () function in the "Calibrate.cpp" file.

As a result of alterations, we got a device that provided an acceptable linearity of measurements in the range from 100mA to 5A and which could be called measuring, if not for one thing: since I left a powerful discharge field device inside the case (despite improved cooling), heating the board it still introduces distortion into the measurement result, and the measurements "float" a little towards underestimation ... I'm not sure who exactly is to blame for this: the error amplifier or the ADC of the microcontroller. In any case, IMHO, it is worth taking this field device outside the case and providing it with sufficient cooling there (up to 94W or replacing it with another suitable N-channel one).

Firmware

I didn't want to write about it, but they forced me to.

A little about my cooling refinement

Polevik VT7, in a new place, is glued to hot glue, and its heat sink is soldered to a copper plate:

I decided to make cooling from an unnecessary radiator on a heat pipe from the motherboard. The photo shows a suitable pressure plate and a transistor pad, along the perimeter of which an insulating plastic is laid - just in case. The heel from the soldering iron tip is soldered directly to the board, to the common wire - it will play the role of an additional heat sink from the converter:

The assembled design will not prevent the device from standing on legs:

Firmware ready:

I tested this modification in passive cooling mode: discharging a 6V Pb battery for 20 minutes at a maximum current of 5.5A. The power was displayed 30 ... 31W. The temperature on the heat pipe, according to the thermocouple, reached 91 ° C, the case also became hot and, at some point, the screen began to turn purple. Of course, I immediately aborted the test. The screen could not return to normal for a long time, but then it was released.

Now it is already obvious that a remote load unit with a detachable connection would be the best solution: there are no restrictions on the size of the radiator and fan, and the charging itself would turn out to be more compact and light (discharge is not needed in the field).

I hope that this article will help beginners to be bolder in experiments on helpless pieces of iron.
Comments and additions are welcome.

A warning: the described modifications, if not used properly, can damage the components of the charger, turn it into an irreversible "brick", as well as lead to a decrease in the reliability of the device and create a risk of fire. The author disclaims any responsibility for any damages, including wasted time.

Links

Alternative cheali-charger firmware: https://github.com/stawel/cheali-charger (Her review on youtube: once , two).
To compile the firmware: Atmel Studio and CMake
Flasher: eXtreme Burner AVR
ISP programmer:

If you are into electronics, you may have a smart charger Imax B6 (mini). The kit does not include balancing connectors and a box for installing batteries. Of course, craftsmen begin to make them with their own hands from improvised materials or ready-made purchased spare parts. Some people do it better, some don't. In this post I will tell you in detail, I will show you how to do it.

To make it I needed:

1. Box 2×18650;

2. Box 4×18650;


3. Balance connectors 2s 3s 4s 5s 6s;

4. Wires AWG18;

5. Probes bananas;

6. Screw terminal blocks 2EDG-5.08-4P + 2EDGV-5.08-4P - 2 pcs.;

7. Foil fiberglass.

And so, it is necessary to make a printed circuit board

Made in Sprint Layout, . Download printed circuit board, lay6 format

After etching the board, we assemble and solder everything.

Below in the photo, the connector is connected to 5 five cans. We will not use the sixth compartment of the holder, since we are charging 5 batteries.

Connection diagram to the balancing connector Imax B6

It doesn't matter what kind of charger you have, the original is not the original, they all have five sockets for balancing up to 6 lithium batteries. To connect to a balancing socket, connect all banks in series, then the 1st wire (red) of the connector goes to the plus of the assembly, and the last wire to the minus of the assembly, the connections between the banks go to the intermediate wires of the connector. On the ( + ) the first jar and ( ) last, you need to solder the banana probes. The connection diagram for the maximum number of batteries is shown below.

In this example, we see the maximum connection of batteries, 6 pieces. To connect five, four ... we do the same, do not forget to observe the polarity.

In IMAX B6: Schematic and PCB

So I made a diagram and a printout of the charger. Basically, I rested on the design of the scheme, the signet turned out to be so-so. True, the quality of the wiring and the original does not shine. I am not very interested in the original wiring, because I am considering reworking the entire signet.

There are slight differences from the original, because I was too lazy to draw from. I did not draw the USB port, and quartz. I have been sitting on PIC24 for a long time, where quartz is usually not needed.

I ask for help in passing the normative control according to GOST in the design of the scheme (pdf, p-cad2006). Where are the jambs (except that the numbering of the components is out of order)? I spent a lot of time on the design, literally redrawing each component from its library. It turned out beautifully, but I want even more beautiful. For comparison, someone's IMAX B6 circuit. There is no need to control the standards in the post, the pictures may have an old version.

Here is another signet (also P-CAD 2006)

There is also no list of elements yet, almost all the denominations are on the diagram.

And now I will tell you how the circuit works. She is very interesting.

1. Power reverse polarity protection

The protection is made on an N-channel MOSFET transistor. This solution allows for almost zero voltage drop compared to diode protection. For example, at a current of 3A 12V, the diode would get quite hot, more than a watt.
This circuit has a small drawback: for increased voltage, more than 20V, the resistor R6 must be replaced with a 10-volt zener diode.

2. DC-DC converter
The charger requires a regulated power supply to operate. A source capable of making both 2V and 25V from 12 V. Here is his diagram:


The converter is controlled by three lines:
1) The DCDC/ON_OFF line is the prohibition of the converter operation. By applying 5V to the line, both VT26 (key for STEP-UP mode) and VT27 (key for STEP-DOWN mode) are turned off.
2) Dual purpose STEPDOWN_FREQ line: in STEP-UP mode, this line must be 5V, otherwise the L1 coil will not receive power, in step-down, this line must have a frequency. By adjusting the duty cycle, we change the output voltage.
3) SETDISCURR_STEPUPFREQ line. In boost mode on this PWM line, in buck mode - 0V
Additionally, short circuit protection is implemented along the battery line: if the charging current is exceeded, VT8 will work, and the power from the converter will be removed, the VT26 transistor will open. How exactly it works, I did not figure it out, you can study the circuit yourself.

Question to the audience: what do R114+R115+C20 do?

Power MOSFET switches VT26 and VT27 are controlled by a push-pull emitter follower: VT13-VT14 and VT17-VT18.

The frequency of the converter is 31250 kHz.

This converter cannot be turned on without a minimum load, which is R128. Moreover, in my version of charging, it is soldered, it is soldered on top of other elements - a mistake by the developers.

3. Turn on the battery

None of the battery leads are directly connected to ground. This applies to both power circuits and the balancing connector. The plus of the battery is connected to the DC-DC converter, the minus to the charging transistor. By turning on the Charge transistor, as well as adjusting the voltage on DC-DC, the required charging current is set.

4. Foolproof battery reverse polarity protection


The charge switch is controlled by DA4.2, and the charge goes only when the battery is connected correctly. The controller, with the transistor VT9, can also prohibit the charge.

5: Discharge circuit


The discharge circuit is built on a VT24 transistor and two opamps. To turn on the discharge, you need to open VT12. VT24 - bit transistor. It is he who dissipates heat during discharge. It is driven by two operational amplifiers.
By sending a meander to the input of two RC chains,


the controller generates voltage on In + DA3.2:

DA3.2 is an integrator circuit (low pass filter). It will increase the output voltage (and at the gate of the VT24 discharge transistor), and hence the discharge current, until the voltage at the In + and In- terminals (red circuits) is equal. A reference signal is supplied to In+ from the controller, to In- a signal from the feedback circuit on DA3.1. Result - the current gradually increases to the nominal
Brown wire - discharge inhibition. If it has 5 volts, the discharge is prohibited.
The blue line can be used to control the actual discharge current.

6. Scheme for balancing and measuring cell voltage


How, for example, to measure the voltage of the sixth cell? The voltage of BAL6 and BAL5 from the sixth cell is fed to the differential amplifier DA1.1, which subtracts 21V from the 25V to the sixth cell to the fifth. The output is 4V.
The lower cells are measured without the participation of a differential amplifier, a divider. I will especially note that even the "ground" (BAL0) is measured.
The output is switched by the HEF4051BT multiplexer to the controller. Without a multiplexer - in any way, there will not be enough legs.

The balancing circuit is made on two transistors. With regard to the sixth cell, these are VT22 and VT23. VT22 is a digital transistor, resistors are already built into it, and it is connected directly to the controller output. If the microcontroller notices that some cell has been recharged, it will stop charging, turn on the circuit corresponding to the recharged cell, and a current of about 200mA will run through the resistors. As soon as the cell is slightly discharged, the charge of the entire battery is switched on again.

7. Digital circuits


The controller measures the voltage on the plus and minus of the battery. If a polarity reversal occurs, a warning will be displayed on the screen.
For some reason, the indicator backlight is powered by a transistor, the indicator itself is turned on in 4-bit mode.
Another interesting thing is the TL431 reference voltage source.

Another question for the audience about quartz: is quartz really required for ATMEGA?