I am starting a project where I want to make a simple, Arduino-controlled NiMH battery charger. I imagine several iterations, but the first one will be really simple. It will charge at a constant current of around 0.1C (where C is the battery capacity) and will monitor the voltage and charging current. For the constant current, I will be using a 7805 regulator in constant-current mode (i.e. with PIN 2+3 connected with a resistor and the battery itself connected to PIN 3 and GND), figure 4 here:


For the voltage measurement, I want to charge the battery in cycles of 1 seconds, where after each second I stop the charge for some milliseconds to measure the voltage. The question is how to stop the charge. My thoughts are to use a power MOSFET (n-channel, enhancement mode). I have the following and it appears it should to the job.


The gate of the MOSFET will be controlled by the Arduino. The question is then: Should the MOSFET come "before" the 7805 regulator i.e. so that the regulator would get switched on-off also during the cycle? Or should I put the MOSFET after the regulator, so it is only the power to the battery that gets cycled? Or doesn't it really matter?

Can the 7805 get "worn out" from being cycled so many times as would happen in this application (if the MOSFET is before the 7805)? It would be cycled once every second.


1 Answer 1


It's not a good idea to do the switching after the regulator, since its COM pin will be left floating. The regulator might start to oscillate.

I would suggest putting the MOSFET after the 0.33u capacitor, before the regulator, and adding a 100n capacitor after the MOSFET. This way you won't have current spikes on each pulse to charge the big capacitor, but you'll still have something that filters high-frequency oscillations.

The 7805 won't "wear out". Being cycled every second is a very long interval, and I think it will be fine for the regulator. If you have shorter pulses (10ms or less), you might start having trouble.

  • \$\begingroup\$ Hi Dexter, OK thanks yes that makes sense. By the way, how did you arrive at the 100n value for the capacitor after the MOSFET? Just common sense/experience for this sort of usage? \$\endgroup\$
    – Morty
    Aug 16, 2016 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.