Re: How to calculate current in R2 with an LM317
Careful almost all Digipots are only good to 5V max, so the LM317 max. output voltage would be 6.25V as R2 can see 5V max. There are HV ones.
Some Arduino's MCU has a DAC output. Most PWM solutions are an extra op-amp, not too complex.
MCU-controlled battery charging is a bit risky, if your code crashes or hangs you want it to be safe.
You can setup the Vreg hardware to output the highest safe voltage possible and then use the MCU to only lower that with software control.
Careful almost all Digipots are only good to 5V max, so the LM317 max. output voltage would be 6.25V as R2 can see 5V max. There are HV ones.
Some Arduino's MCU has a DAC output. Most PWM solutions are an extra op-amp, not too complex.
MCU-controlled battery charging is a bit risky, if your code crashes or hangs you want it to be safe.
You can setup the Vreg hardware to output the highest safe voltage possible and then use the MCU to only lower that with software control.
Comment