I have a 7S lithium 18650 Battery Bank (28.7V total, 4.1 each) and an Arduino Uno to control the solar charge. Pin10 as the PWM into a BJT (2n3904) that triggers the gate of a MOSFET (IRF640N) that connects or disconnects the ground from solar cells.
So far so good, PWM regulates charging when 0 and no charge when 255 and all in between those values.
But my Problem start after all that before:
When it reaches 28.7 the charging method (PWM = 0 which is máximum charge) turns into PWM variable, and doesn't stop charging fast enough.
Cheking the Voltage values of the GATE of the MOSFET:
- pwm-pulse = 0, maximum charge , Gate Voltage = 12.5 V
- pwm-pulse = 255, minimum charge, Gate Voltage = 0 V
So you would soy "evething's right!" but no.. if pwm 212 I get 2,06V on Mosfet-Gate and if pwm 172 I get 4,03V on Mosfet-Gate.
How should I simulate/adjust/make a curve for the MOSFET to stop charging or work faster and really make use of the pwm instead of just turning the MOSFET on and off
NOTE: I used a Voltage divider with 100K y 18K to read on A0