I want to make simple UPS with means of arduino, to learn the processes from it, and be able to record and monitor at PC. For the start i want to implement buffered usage charge mode. Logic is simple - when voltage is less than defined(say it battery voltage is less than 13.6V) - then gate should open and connect battery to charger. If voltage is greater then gate should close, disconnecting charger and preventing battery and load from excessive voltages. So, it would do kind of clever PWM. I am asking for a help, i dont know how to connect gate to arduino. If i explained bad please look at illustration:

enter image description here

  • \$\begingroup\$ What did you find when searching on MOSFET control from Arduino? \$\endgroup\$ Sep 5, 2018 at 1:21
  • \$\begingroup\$ @Ale..chenski I've found that it is used in motor control applicaitons, most often it is arranged in H-bridge and is embedded in packages like L298 which is extremely easy to use - you just connect them directly to arduino pins with wire, and proceed to code. \$\endgroup\$
    – user197437
    Sep 5, 2018 at 1:27
  • \$\begingroup\$ Did you look on Arduino forums for P-FET control? \$\endgroup\$ Sep 5, 2018 at 1:29
  • \$\begingroup\$ @Ale..chenski I dont know. What is "P-FET control"? I have a different task from motor control. I have some N-channel mosfets by hand and i want to open and close it, like a relay, thus connecting and disconnecting charger from battery and load to protect it from over voltage. \$\endgroup\$
    – user197437
    Sep 5, 2018 at 1:31
  • \$\begingroup\$ @Ale..chenski I think MOSFET is better switch than bipolar, because its channel resistance is low, and transistor would not heat much and waste energy. My typical charging currents are 7 to 15 amps. But they are not so easy to operate, and i am asking what should i place at that end of wire? \$\endgroup\$
    – user197437
    Sep 5, 2018 at 1:34

1 Answer 1


After night of researching, i seems to figure out correct schematics for this by myself. Haven't tested this yet, but theoretically it should work. Only requires that N-mosfet gate open voltage is below +4 Vgs, and P-mosfet open is near -10 Vgs. Illustration is as following:enter image description here

PS. For mosfet models seems i have to hunt powerful low-Rds models in TO220/247 cases, to diminish heat waste, because 0.2C charge current for 200Ah battery could be 40A. Something like IRF4905 P-FET should fit the task. Charging would require 550-600W charger and for P-FET with Rds=0.02Ohm, Vdrop would yield 0.8V and 30-35W would be dissipated as heat. And any cheap, even low power TO-92 N-FET, that opens somewhere at Vgs +2..+4V to control -10V P-FET's gate from +5V arduino PWM signal.


Your Answer

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