MOTOR Driver CIRCUIT - with only SINGLE Arduino PIn

Has anybody seen a Motor Driver Circuit - driven by a single Arduino Pin ?

I have put together a Simple Circuit to do this, and wanted to post it.

Ie: 1 Arduino Pin for 1 Motor, 8 Arduino Pins for 8 Motors, etc …

This method uses the INPUT Pin Mode as an Output - No Voltage.
This yields 3 States per Arduino PIN : HIGH , LOW , NOVOLT.
So for a PIN :

  • Outputing HIGH yields turns Motor CC ,
  • Outputing LOW yields turns Motor CCW ,
  • Setting the Pin to Input / No Voltage yields turns OFF the Motor.

The attached Circuit is Tested.


The circuit modifies the H-Bridge.
It squeezes the High and Low Voltage from High Half and Low Half for ON and OFF to extremes of the Voltage Range, ie: 4V-5V is HIGH , while 0V-1V is HIGH to turn the FETs on.
This creates a Voltage Window , from 1V-4V , where NO FET is enabled or turned ON.
So, I created a 3 State / 3 Signal Output Line / PIN from the Arduino.

Code Example:


#define MTR_P 8 // - attach Motor Driver Circuit to Arduino PIN 8

int C = 0;

void setup()
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps

Serial.print("Motor DIR [+/-/0] > ");

void loop()
if (Serial.available() > 0)
C =;

if(C == ‘0’)
if(C == ‘+’)
if(C == ‘-’)
Serial.println(" -?");

Serial.print("\rMotor DIR [+/-/0] > ");



I am currently using this circuit to build Animal Robots - using my 3D Printer.

Just as a reference , below is the example WebPage where I am using this Circuit:

I think you made a design error there.
The two top fets are used as source followers, and don't get saturated.
Could be very unhealthy for those small fets.

A H-bridge should be made with two N-channel fets and two P-channel fets.

Seems like a good point.
I was thinking about a P-Fet.

But, I know that the FETs saturate with Low Resistance in series.
This circuit - to be Active - is designed to Enable a top/bottom pair of FETs Enabled/saturated - so that the Bottom FET pulls the Top FET to GND (or close enough - maybe 20 ohms).

I believe this is generally workable in many Power FET H-Bridges.
I use this with many High-wattage Motors also (10W-10W) with IRF540 , IRF3205 , etc - using N-FET for both Top and Bottom FETs.
I have not had any problems with this.

And, this tests as working.

The source of the top fet is at least Vgt (gate threshold voltage) lower than the gate.
That could be 2-3volt, depending on the fet.

  1. The motor gets less than 5volt
  2. The fet gets hot from that voltdrop times motor current.

So far, I am happy with the circuit results.

I ordered P-Mosfet Bss84 and am waiting on them to try out.
Maybe I will see more Motor Power with these.

The BSS84 has an absolute max drain current of 130mA.
Not really suitable for a motor.

There are dual mosfet chips (smd) with a P-channel and N-channel power fet available.

This diagram might help to get you started.
In HIGH is out LOW.
In LOW is out HIGH,
Floating input is both fets off.

You need a second circuit like this for the other motor terminal.
Because the circuit inverts, the IN of the second circuit can be driven by the OUT of the first circuit.

Don’t forget kickback diodes if the mosfets don’t already have them.

Thanks for the circuit !
I will try it out.

So far, I don't need it yet.

I want the 2-4V High Output from Arduino - to drive the circuit even though its VSource is 9V.
Which seems to work so far.

330k gate resistors? Not usable for PWM then, you'll get switching times of 70us or so with the 2N7000,
much more for larger MOSFETs.

2n7000 to switch a motor? Its only rated at 200mA... Its also not logic-level...

You circuit appears to hold the FETs in the forbidden zone (not fully off, not fully on) when the
pin is floating.

Not my idea of robust - might be possible to get away with this for a really small motor, but
its likely to just pop MOSFETs left right and centre if scaled up to high power levels.

I agree this circuit is not for Power Mosfets.
Actually I am using the common TT Geared Motors off of Ebay for $1.50.
Runs at about 150-180mA. Seems to work great.

I found a slight adjustment to the circuit to allow the Arduino with 4V High to drive the circuit using a 9V Battery.

Just tested it tonight.
Arduino and circuit seems to be rotating the Motor at about 1x per Second - with good torque.
I will try driving PWM out tomorrow.


The previously suggested circuit would also solve this problem, I think.

As I stated earlier, I use the H-Bridge circuit with many High-wattage Motors (10W-50W) with IRF540 , IRF3205 , etc - using only N-FET for both Top and Bottom FETs.

These Mosfets have resistance like 0.05 ohms, with the Motor of about another 1 ohm.
So, Vgs is not an issue here either.

Although, I do use a CMOS NAND gate as a buffer to translate the Arduino 4V High to a 12V Motor Voltage for the Power N-Fets.

And, the Motors successfully rotate with the High Torque as I need them.

Final test of the Circuit.

I tested the circuit with varying Voltage Levels input via DIN.
This was tested with the Multimeter in series between the: 9V Bat+ and the circuit Source+.

This was the results from the test :

DIN: Motor: Circuit Source Current (from 9V BAT+):

0V - 0.60V ON turning CCW 150mA

0.70V - 2.00V OFF 1.0mA - 1.9mA

2.30V - 9V ON turning CW 160mA

With DIN between 0.6V - 0.7V , the Motor would Turn OnCCW / Off ,
while the Current would jump from 150mA (ON when DIN < 0.6V) , to 1.9mA (OFF when DIN > 0.6V and DIN < 2.0V).

With DIN between 2.0V - 2.3V , the Motor would Turn Off / On CW ,
while the Current would again jump from 1.9mA (OFF) , to 160mA (ON).

This seems to fall perfectly within the Arduino Output voltage ranges.
And, the Motor seems to react/drive from my Arduino / Program reasonably.

Also, with using a 150mA+/- Motor , I don’t think 1mA or 2mA is much of a drain for the Battery , nor harmful for the 2n7000 Mosfets at the Floating Midrange Voltage.
If the 1-2mA is a longterm problem , then I can always just add a main Mosfet for powering All of the Motor/Driver Circuits to remove the 1-2mA drain - I would think.

Thinking this through, at 1.5mA Idle compared to the 150mA Motor , with a normal 300mAH-450mAH 9V Battery. This means that the Battery could drive the Motor continuously for 2-3 hours. While the circuit could sit Idle on the Battery for 8-12 days. I also consider that the Arduino: with VReg uses about 60mA , or about 8mA without VReg with just LED. So the Motor and Circuit should not be a problem.

Note: The new circuit adds a 470K Pullup Resistor to allow Lower Voltage levels for the Upper Mosfet that is without a Transistor/Inverter driver. And, modifies the default VREF of 1/2 Vcc (100K+100K) = 4.5V , to 1/6 Vcc (100 + 20K) = 1.5V , the OFF state.

Wawa, I tried your Half-bridge circuit.
It looks like an interesting circuit.

I only see the NPN Collector shift from 9V down to 5.5V with VIN change.
And, I only see PNP Collector shift from 0V to 3.3V with DIN change.

I used a 4.7K pot with & without a 10k resistor for impedence for VIN.
And, 2n3904 and 2n3906 transistors.

Looking at the circuit, I think that there is a problem in the Transistor Vbe Voltages saturating , and in the FET Vgs voltages - if the VIN is Higher Impedence at any voltage levels.

The "Half-Bridge" circuit of reply #8 is nonfunctional, as far as I can tell. It is hard to imagine what Wawa had in mind.

I mentioned a second circuit like it for the other motor terminal.
And a 5volt motor supply.
With mosfets, the motor would get close to the full 5volt.

Good to learn, but a bit silly to build a circuit like that.
There are motor driver chips out there that do it all for you.
If you run out of Arduino pins (including the analogue ones), get a Mega.

I mentioned a second circuit like it for the other motor terminal.

The other half won't work either. Please take a closer look at that circuit. What do you think the NPN/PNP base connection is supposed to be doing?

Ahhh, you don’t think it will work at all…

The NPN transistor.
Switch the emitter to ground (with the Arduino pin).
Base current is provided by the top 10k resistor (4.3volt falls across).
The transistor is conducting, and ~4.5volt falls across the top 1k resistor.
4.5volt to drive the gate of the P-channel fet. It’s on, and out is high.

The PNP has now 0.7volt on the base, and 0volt on the emitter. Reverse driven, so it’s off.

The Arduino pin has to sink the current of the top 1k resistor and the top 10k resistor (~5mA).

If IN is floating, the base of the NPN/PNP is 2.5volt (divider).
No emitter currents, so no collector currents.
Both mosfets are off.

Same story for the PNP transistor as for the NPN, only inverted.

OK, I had not considered that a very low source impedance input would be required for proper operation. Not a circuit I would recommend.