Explanation needed

Thread Starter

PlayaSlaya

Joined Jun 22, 2009
16
Hi, im busy designing a battery charger sytem for my university project. While researching i came across this "intelligent" battery charging circuit (attached) and i understand essentially how it operates except for the LM317 and BJT connection to the PWM output of the microcontroller. Can anyone please explain how this aspect of the circuit works?

Thanks in advance.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
The LM317 regulator has a parameter called Vref. Vref is the voltage on the OUT terminal, referenced from the ADJ terminal.

Nominally, Vref is 1.25v. However, it may be as low as 1.2v or as high as 1.3v, and still be within specifications.

The regulator attempts to keep Vref constant by sourcing current from the OUT terminal.
If Vref is the nominal 1.25v, and the output resistor is 1 Ohm, then it will require 1.25A through the resistor in order for there to be a 1.25v difference between the ADJ and OUT terminals.

There is a small amount of current that is sourced from the ADJ terminal (Iadj); nominally 50uA, but can be as high as 100uA. It is so small that in this circuit, it is of little consequence.

There is a 1k resistor between the junction of the load & 1 Ohm resistor, and the ADJ terminal. If the transistor is off, the voltage at ADJ will be close to the voltage at the junction of the load and the 1 Ohm resistor, with a small error induced by Iadj, and the regulator will source current to the battery.

If the transistor is ON, the ADJ terminal will be pulled to nearly 0v. In this situation, the OUT terminal of the regulator is lower than the battery terminal, so the 1N5404 diode is reverse biased. There is now 1001 Ohms between the OUT terminal and the ADJ terminal.

It only requires about 1.25mA to maintain the 1.25V across that 1001 Ohms; the regulator is basically shut down.
 

Thread Starter

PlayaSlaya

Joined Jun 22, 2009
16
Thanks alot, i understamd that part now. But, just to clarify, does the pulse width modulation effectively control the percentage of current that is being sent to charge the battery?
 

SgtWookie

Joined Jul 17, 2007
22,230
hey sgt
what about the program in the PIC
What about it?

If the PWM output is high, the transistor will be ON, so the regulator will be in shutdown.

If the PWM output is low, the transistor will be OFF, so the regulator will be supplying 1.25A current to the battery.
 
Top