NIMH battery maintenance trickle charger (Part 2)
In this section, I will be discussing the electronic design, and some of the calculations that go into it.
Here is my "first cut" design, as introduced at the end of the previous article. Let's look at the various components and what they do.
- This capacitor is just a high frequency filter capacitor to stabilise the voltage regulator. It is a feature of all the application circuits in the regulators data sheets, and I see no reason to argue with them!
- This is the actual 5v requlator IC. The mode of operation has already been discussed in the previous part.
- This is a 10uF smoothing capacitor, which also helps to stabilise the voltage regulator.
- This is a 100nF "bypass" capacitor that helps to eliminate voltage spikes on the power rails. It is drawn as it is to illustrate that it is as physically close to IC2 as possible, the source of the voltage spikes.
- IC2 is the microcontroller chip I am using to perform the timer function. There are specialised chips available for performing timing functions, like the venerable NE555V timer, but they do not perform well for very long time periods. A microcontroller, in this case a PIC 12F508, is a better choice for a 10 hour timer, and can do other things at the same time, in this instance, flash the LED during fast charging!
- This is a normally open push button switch, used to initiate or cancel the ten hour timer. The input pin is "pulled up" to +5v by an internal pullup resistor in the PIC, so no external resistor is required. Pressing the button makes the voltage on the pin 0v.
This LED is 'on' continuously while on trickle charge, and flashing during the 10 houe fast charge. If the LED is not alight then that will mean the charger is not operating. The 470 ohm resistor is to limit the current, which assuming a 2.1v forward voltage on the LED in this case will be:
(5v - Vfwd)/470 = (5 - 2.1)/470 = 6.1mA
This is low for a LED, but I want to indicate charge, not illuminate the workshop!
- T1 & T2
- I have drawm 2 generic NPN transistors here, but their actual part numbers will depend on various factors, which will be discussed in the next section.
- RA & RB
- These resistors set the current in the 2 operational modes, and the values of them are discussed later.
You will note I have not specified the input voltage at all - this is because it depends on the maximum charge voltage of the battery pack. I would allow 7v plus 1.8v per cell - for instance, for a 4 cell pack then thats 7v + 7.2v = 14.2v. As I said on a previous page, I have "12v" power packs that output more than that at 200mA so that's going to work for me.
Transistors T1 & T2
In the schematic, I have shown the high rate charge current being passed by a darlington pair of transistors. This configuration effectively provides a 'super transistor' with high overall gain. The reason for this, was that my gut feeling was that it would be hard to find a single transistor that would have enough gain at the high(ish) current for the charger, especially if I was going to use parts I had in my parts bin. Generally speaking, the higher current a transistor is designed to switch, the lower its typical gain will be, which means you have to drive the transistor with more base current.
Since the path of current required for the trickle circuit is already passing 50mA, the transistor needs to be able to reliably pass 150mA for hours at a time. The PIC will only drive up to 25mA, which means I need to get a minimum gain of 150/25 = 6 at 150mA collector current, which is actually quite low so there is a chance a single transistor will suffice. It would be nice to be able to use a lower current drive into the transistor too, because that will reduce the chance of the transistor overheating. Another factor is the collector current. The "Headline" rating of a transistor you read on the datasheet is usually the absolute maximum (peak) current, with the continuous maximum current being considerably less (e.g. about half). Most common NPN signal transistors will only manage 100mA, but there are exceptions. I discovered that I had a number of "2N3704" transistors that will manage 300mA continuous into a load, and had a reasonably high gain. These parts are no longer manufacturedi , but fairchild make a part PN100 which is identicle in characteristics, and the datasheets for the 2n3704 tell you to look at the PN100 data! Other "equivalent" transistors for this application would be 2N2222, P2N2222, MPSA06, NTE289A, PN3569, PN3643... Failing these, any of the NPN darlingtons capable of passing 300mA continuous would work.
The quoted gain of a transistor, "Hfe", is measured at a known current, typically a low one compared to the maximum current possible. I have taken the liberty of including to the left a copy of the graph from the PN100 data sheet showing gain against collector current. Bearing in mind the maximum current of 300mA continuous, you can see the gain maintains a respectable 200-300 until it nose-dives around 200mA. It still manages a gain of 50 well past its continuous rating at 400mA, so it would seem this part is ideal in this application and I won't need the darlington configuration. W00t!
The other graph (on the right) shows that at 150mA the voltage between collector and emitter will be about 0.15 volts (a low drop) and therefore the power being dissipated in the transistor will be 0.15V x 0.15A = 0.0225 or 22.5mW. Therefore we are well within the rated 600mW. Given the stated thermal resistamce of 200 deg.C per watt, that means a temperature rise of 4.5 degrees which means the transistor will register as barely warm.
Therefore we have shown that the 2N3704 / PN100 fits the required characteristics of:
- High enough current handling capacity
- Enough gain at expected load current
- Its not going to overheat at this load.
I didn't check the voltage ratings, but at 5v we are well below the maximum voltage ratings of even the weediest signal transistor. 
Resistors RA and RB.
After all that excitement we can look at the resistors that set the current. Starting with RB, this has to pass all the current not being passed by the other components to acheive a trickle current of 50mA. Since the transistor is switched off we won't be driving any current through there, and the PIC will be using virtually no current, so the only additional current is the 6mA through the LED. Therefore RB has to pass 44mA, meaning its resistance is:
RB = 5v / 44mA = 5 / 0.044 = 113.6 ohms.
The nearest standard resistor value to that is 120 ohms, so that will do.
When the transistor is switched on, we want to pass an extra 150mA. The LED will be flashing, which will reduce its average current, but we will be passing extra current from the PIC into the base of the transistor. While the two factors don't cancel out exactly, the difference is too small to bother with.
According to the data sheet, the voltage across the base-emitter junction when the collector current is ~150mA is about 0.7v. Therefore the base current will be:
Ib = (5v - 0.7v) / 1000 ohms = 4.3/1000 = 4.3 mA.
We have already worked out that the gain is still in excess of 200 with this transistor, and the collector current will be < 4.3 x 200 (far less), so the transistor will be saturated and therefore, as determined before from the data sheet, the voltage across the collector/emitter terminals will be 0.15 v. So we need a resistor of value:
RA = (5v - 0.15) / 150mA = 4.85/.15 = 32.3 ohms.
The nearest standard value is 33 ohms.
The result is a revised schematic, neatly drawn below!
See the next part where I run through the software that lies in the belly of the beast (well, the PIC - its more a pussycat than a beast!)
|||They are no longer manufactured, but they are still available from many retailers. Those that no longer stock them seem to have the PN100 anyway.|
|||Other than, maybe, some specialist UHF devices, if you want to be terminally pedantic.|
Version 1 published Sept. 16, 2012, 11 p.m.