Ok here is the 'circuit' with some missing values!
Basic opperation goes like this; the first LM317 is used to create a contant voltage, this is chosen using a digial (i2c or spi) potentiometer and a PIC microcontroller. The minimum voltage out is 1.25V, so i have put a diode in series to get a voltage drop to allow for lower voltages. This is the first 'problem', which value of diode will work. I know the voltage drop changes with temp, but the output voltage after the diode is checked using a ADC on the PIC and so i can adjust to get the correct value. But the diode should be able to handle up to 0.5A.
Next is another LM317 which is used as a constant current source, now i want 4 different charging rates, 8mA, 27mA, 150mA and 300mA. The resistors are to be 0.5W Metal film type (the largest calculated power on the resistor is 400mW, but to get the resistance from standard resistor values i need to put 2 8.2ohm resistors in [edit]parallel[/edit]).
So to choose the output current i am using PNP transistors. A) will this work, B) is there a better way and c) and components you can advise?
There will also be current sensing and battery voltage sensing to make sure things are going ok.
Further more, this circuit should prevent the battery from powering the circuit, but i would like a discharge option...
perhaps at 20 - 30mA?
REgards
- Martyn
Basic opperation goes like this; the first LM317 is used to create a contant voltage, this is chosen using a digial (i2c or spi) potentiometer and a PIC microcontroller. The minimum voltage out is 1.25V, so i have put a diode in series to get a voltage drop to allow for lower voltages. This is the first 'problem', which value of diode will work. I know the voltage drop changes with temp, but the output voltage after the diode is checked using a ADC on the PIC and so i can adjust to get the correct value. But the diode should be able to handle up to 0.5A.
Next is another LM317 which is used as a constant current source, now i want 4 different charging rates, 8mA, 27mA, 150mA and 300mA. The resistors are to be 0.5W Metal film type (the largest calculated power on the resistor is 400mW, but to get the resistance from standard resistor values i need to put 2 8.2ohm resistors in [edit]parallel[/edit]).
So to choose the output current i am using PNP transistors. A) will this work, B) is there a better way and c) and components you can advise?
There will also be current sensing and battery voltage sensing to make sure things are going ok.
Further more, this circuit should prevent the battery from powering the circuit, but i would like a discharge option...
perhaps at 20 - 30mA?
REgards
- Martyn