150V 45A MPPT - roll your own
| Author | Message | ||||
| poida Guru Joined: 02/02/2017 Location: AustraliaPosts: 1483 |
here is the code I use for the ebike charger. As usual, PWM is on pin D9 I have a potentiometer for setting output voltage and a pot for setting max output current. The code will drive a serial LCD (20x4) and show the input volts and thermistor temporature (I put it on the heatsink) the set Volts and amps, the measured volts and amps and a Watt.hour total of the charge. Reading the code will show which analog inputs are what. D4 is the 9600 baud output going to one of my "serial" LCDs I played with PID control for a while but I use the simple bang/bang control. PID is used with the charge regulator I made for my Ducati 900 and it runs similar code but not this. Put good RC low pass filters on all analog inputs and locate them close to the Nano's pins. Pin D5 is used to drive a heatsink fan motor. I have it set to run when over 60 C is reached. Use a 10K NTC thermistor You will need to determine the calibration factors yourself. ps1-v3.zip |
||||