I've got a stock LM317 based bench PSU (1.5-18V, 1A max) which I could do with modifying to be controlled and monitored by a PIC micro.
Where I'm stumbling at is the best way to adjust the "control" pin of the 317 from the PIC. I've considered using a digital pot to replace the existing one, but the voltage/current range is probably too much for the dS-pots I have, or using a simple R-2R DAC from the PIC just driving a transistor connected between the control pin and ground (might be tricky to set up and a little restrictive in control range - I'm aiming for around 20mv steps if possible).
Also, any suggestions on the most effective (and accurate) way of converting the voltage drop across the 1 ohm resistor on the +positive+ output of the regulator into a 0-5V anaogue signal to be fed back to the PIC chip would be welcome!
For reference, there is a constant 24V supply available that is independent of the regulator's own input supply, which I will use for running these bits of the circuit (with appropriate regulation of course) - so the PIC can even crowbar protect the supply if needed.
I think the target is becoming obvious here - use a PIC to control and monitor a PSU - presets for different tasks like battery charging etc, and feedback via USB to a PC running a VB data logging application.
PS - For once, I don't need help on programming the PIC or which one to use etc etc!!! And having now found this forum, I'm not here just to ask questions either!
Cheers all!
Where I'm stumbling at is the best way to adjust the "control" pin of the 317 from the PIC. I've considered using a digital pot to replace the existing one, but the voltage/current range is probably too much for the dS-pots I have, or using a simple R-2R DAC from the PIC just driving a transistor connected between the control pin and ground (might be tricky to set up and a little restrictive in control range - I'm aiming for around 20mv steps if possible).
Also, any suggestions on the most effective (and accurate) way of converting the voltage drop across the 1 ohm resistor on the +positive+ output of the regulator into a 0-5V anaogue signal to be fed back to the PIC chip would be welcome!
For reference, there is a constant 24V supply available that is independent of the regulator's own input supply, which I will use for running these bits of the circuit (with appropriate regulation of course) - so the PIC can even crowbar protect the supply if needed.
I think the target is becoming obvious here - use a PIC to control and monitor a PSU - presets for different tasks like battery charging etc, and feedback via USB to a PC running a VB data logging application.
PS - For once, I don't need help on programming the PIC or which one to use etc etc!!! And having now found this forum, I'm not here just to ask questions either!
Cheers all!