help me understand the operation of these circuit

since it will only be in either on or off state, does that means that the battery will still be charged with 1.25A or it will be charged with the average value?

PWM is full-on or full-off, switching the full voltage or current level, but only for a short amount of time, so
it will only send a limited #of electrons into the battery, on average. However, if you looked at the voltage
across the battery, there will probably be a fair amount of square-wave ripple, basically Ichg * Rbatt.
Smaller batteries have larger Rbatt, so you would likely see more ripple. This might cause a problem
if you were powering a circuit at the same as using the PWM-charger.

Using PWM to change the intensity of an Led works the same way. The actual current waveform through
the Led is a square-wave, but it looks like a continuous light because your eyes "average" out the
variations. Flicker-fusion frequency of human eye is about 25-Hz.

this is a little out of topic but im a little bit confused. Battery are charged based on the current or voltage? or both? regarding this circuit,im using the voltage regulator to regulate the maximum current right? can this circuit be used to charge batteries of different voltage? i got confused because i bump into another circuit that controls both the voltage and current

*nevermind guys..i got it already..there is various method to charge a battery..constant voltage,constant current, taper,trickle, pulsed charging and etc. in this case its using pulsed charging right? thanks anyway to those who helped

,im using the voltage regulator to regulate the maximum current right? can this circuit be used to charge batteries of different voltage?

As mentioned before, the current is either on or off, and when it's on, it's
the full current = 1.25Amp.

However, to be an effective charger, you have to monitor the battery voltage so
you don't overcharge it - or melt it, or heat it up so much that it fails or explodes.
The older Li batteries were fond of exploding.

"Good" battery chargers monitor:

  • amount of time on charge.
  • battery voltage.
  • rate of rise of voltage, and leveling off.
  • temperature.
  • individual cell voltages, if a series pack.
  • gauge charge level by shutting off the charge, applying a load,
    and measuring voltage level.
  • other things.

All in all, battery charging is not the most trivial of operations.

Your charger can charge batteries with different voltages, as long as the
full charge voltage is 3-4 volts below the input voltage applied to the
V.reg.

But as indicated above, you should monitor a few properties, depending
upon battery chemistry. I wouldn't recommend using it for Li.

i constructed the circuit basic charging circuit using lm317,1ohm resistor and the diode to test the function of the charger before connecting it to my arduino. im using 300mAh 8.4v battery to test it and im powering the lm317 using adaptor rated at 12v 0.7A.since im using 1ohm 5W resistor on the output pin,the maximum current that can be produced should be 1.25A but since my adaptor are rated at 0.7A max,the circuit should produce 0.7A of current despite the value of resistor between the output and adj pin right?
but when i try to measure the current,it is around 0.04A only.the voltage are around 10v which is okay but the problem is the low current supplied to the battery. any ideas why?
is it because the high voltage of the output which is around 10v thus limiting the current supplied to the battery?

Previously I said ...

Your charger can charge batteries with different voltages, as long as the
full charge voltage is 3-4 volts below the input voltage applied to the V.reg.

Actually, the value should probably have been 4-5 volts instead of 3-4. You have
a 2V or so drop across the v.reg, another 1.25V across the R, and 1V or so
across the blocking diode. So 12V may be too low to charge 8.4V battery.

Hint: DON'T try to push 1.25A into a battery rated at 300mAh, unless you want
it to overheat and blow up on you.

Hint: go to the internet and learn something about battery charging, BEFORE
proceeding, and pay special attention to what battery chemistry you are using.

Hint: at most, you'd only want to charge that battery at 0.3A max, and then it
will still overheat a lot. They typically recommend charging at less than 1/3 the
Amp-hr rating unless .... you know what you're doing. IE, see the list I gave in
post #7.

Hint: for that battery, you should probably be using a 10ohm R instead of 1ohm.

Last hint: BUY SOME GOGGLES!!!

I see a number of things wrong here.

  1. You say it's a 300mah battery. If that is the case, the you should never charge it faster than about 150ma. 50ma would be more like it.

  2. Your adapter is only .7A. The circuit will try to pass 1.25 amps as long a the load (your battery) will take 1.25 amps (which in this case it won't). So if other things were not wrong, it would badly overload you adapter.

  3. I am assuming the 10v is measured at the output of the LM317 (before the 1 0hm resistor) right? In that case, with the input being only 12V the LM317 is turned on as far as it will go. Subtract from that any voltage drop through the 1 ohm resistor and across the diode, then take into account the NiHM and NiCd cells will float to 1.5v - 1.6v per cell during charge, and you have a situation where you just don't have enough charge voltage to get the job done.

I would;

A) change the 1 ohm resistor to 20-30 ohms. That tiny battery will not be able to take a fast charge.
B) increase you input voltage to something over 16V

this is the basic circuit that i mean.the voltage that i measure is at vout. the total value of r2 and r3 is 1.8k those 2 resistor are to scale down the voltage so that it can be read by arduino. i increase the value of the resistor between output and adj to get a maximum current of 0.3A. the value of vout is 9.8v-ish..this is wayy to high to charge a 8.4 v battery right? since im using only small current to charge the battery,issit ok if i construct another voltage divider to decrease the voltage to about 8.4v? or any other suggestion? 1 have only 2 type of 5w resistor..one is 3.9ohm and another is 1 ohm..even putting both resistor in series does not decrease the value of vout

Use the original circuit and make the changes I suggested.

More on this one.

  1. .3 amp is way too much.
  2. 12V in is not enough
  3. Where is the battery in your circuit? If it is after the diode, then this circuit will not limit anything, except the life of your battery.
  4. This circuit is just wrong!

Here is what to do:

A) go back to the original circuit
B) change the 1 ohm resistor to 20-30 ohms (1/4 watt will do). That tiny battery will not be able to take a fast charge - 50ma-60ma max.
C) increase your input voltage to something over 16V

dude,i doesnt get it why you said that this test circuit is wrong..is it wrong in term of application or in term of the value for the resistor?
i took your advice and change the value of the resistor to 33ohm so that the maximum current that can be drawn from the regulator is 1.25/33 = 0.0379A
then i connect the battery t0 the circuit and measure the current drawn by the battery.
its about 0.03A - 0.04A which is the same as when im using 1ohm resistor across adj and output pin.
my conclusion is that this battery are only capable of drawing 0.03-0.04A of currents only. am i right?
so no fast charging for this battery?

The resistor that sets the current needs to be in series with the diode and the load (battery). Also, 12Vin is just not enough. If you need a circuit. I will have to do that tomorrow.

referring to the datasheet, http://www.ti.com/lit/ds/symlink/lm117.pdf under the typical applcation note,theres an example of 50mA Constant Current Battery Charger. i think this is the basic circuit that peter hayles used in his circuit to construct the charger right? correct me if im wrong but i think my test circuit is correct. its just that the output voltage of the regulator are a bit higher than the voltage of the battery. its gives about 8.8v but the battery voltage is 8.4v so is it safe for me to charge the battery with this voltage?

Yes, it is pretty much what he did, but it is not what is shown in your test circuit. Can you not see that?

The resistor MUST be in series with the load. Yours is not.

Have a look at the attached schematic. Do you see where the 24 ohm resistor is?

The 1K resistor is there to limit current through the transistor and is not a major contributor the the current limiting through the battery.

Can you see the difference between this and your schematic? In your schematic, the 3.9 ohm (wrong value) resistor is NOT in series with the load, so will not do anything to limit current through the load.

The low current you are seeing is because your input voltage is too low. 12V is NOT enough.

my wrong there,i draw it wrong in orcad but yes,in the real test circuit the 33ohm resistor is in series with the load. and i remove r2 and r3 from the circuit to make sure all the current goes to the battery and to remove all other variables. when i turn on the adapter and measure the voltage of the battery,it goes up to 9.5v and then i turn off the adapter because the battery is rated at 8.4v only (dont have any goggles around).
what is wrong?
or i shouldnt remove r2 and r3 from the circuit?
this is the test circuit but without r2 and r3 and the value of r1 is 33ohm

*will try to build the circuit as you suggested this weekend and hook it up to my arduino and re measure everything

No, there is nothing wrong. Under charge the cells will float up to around 1.5V per cell. That would make your battery go as high as 10.5v or more. You should stop charging once it gets to that voltage (or maybe a bit less ~ 10.4V).

But do not use the 3.9 ohm resistor. Use 24 ohms.

And do not use 12V in, use 16V, otherwise the regulator cannot work properly.

thanks for the info. im thinking of using the delta v method to stop the charging process or should i just stop at ~10.4v?
i only have 12v adapter around to power up the regulator. should i make a bridge circuit so that i can power it up directly from the wall outlet?
thinking about adding bridge circuit and another regulator to set the input voltage to ~16v

Well, there is always the chance that the adapter is putting out more than 12v. Most of them do, and many of those only use half wave rectification or do not have a filter capacitor. Put a big (220uF - 1000uF) electrolytic capacitor across the adapter and measure this 'filtered' voltage. Be sure to observe the polarity and the voltage rating of the capacitor. The capacitor should be rated at more than 16v.

The delta V method varies depending on the internal resistance of the battery. It is most effective for large, low impedance batteries like those used in tools. Smaller, high impedance batteries, like those used in cordless phones and other low power electronics tend to float higher while charging and the delta V is not as sharp. Especially if the adapter you are using as a source has a low voltage. Remember, the diode and regulator are going to drop the input voltage by a minimum of 2.5 volts (and another 1.25V across the resistor, if you get things running), leaving you with only about 9.5 if indeed that adapter puts out only 12V. This is not enough to effectively charge your battery.

So, do the test I mentioned above and let us know what the resulting 'filtered' DC voltage of your adapter is.

You really do need at least 16V or this circuit will not work. If you can't get 16V, then I would recommend just using a resistor to limit current and cutting off the charge when the battery gets to 10.4V. The exact value of that resistor will not be known until we know the exact filtered output of your adapter.

Edit: By the way, I do not recommend you using a bridge, or anything else, to rectify the power coming out o the wall. What is the AC supply voltage in Malaysia? 240? Please don't try to power this thing off 240V directly. Very bad things will happen.

sorry for the late reply. quite busy with other projects. anyway, measured the filtered voltage of the adapter using a 1000uF 16v electrolytic capacitor by placing it between the output of the adapter..the value is 12.4v. the same as the unfiltered voltage. its hard to get a 16v adapter here. most of them are either 12v or selectable adapter up to 12v

Then the regulator is wasted. Just replace the regulator and 29 ohm resistor with a transistor and 50 or 60 ohm resistor. Turn off the charge (turn on Q2) when the battery gets to 10.4V

See attached schematic.

thanks.it works like a charm
anyway,im also planning on implementing a discharger with my system so i found this constant current sink

im planning to drain the battery at 100mA and then sending the data through serial comm which will later be analyzed by labview to produce a graph and the actual mAh of the battery.
I got the labview program running OK but cant find those mtp3055. Can anyone suggest other logic level n channel mosfet that is more common and can be applied to this constant current sink circuit?