Driving a Small Pager Motor with Arduino and External Power

Hey guys, newbie question:

I'm trying to drive a tiny "pager motor" with my Uno - and I can use some guidance:

I have an output pin on my Uno connected to the Base of a 2N3904 and I raise hi, hoping to short the Emitter & Collector which would power my motor, which is connected to a different power source than the Arduino. I also remembered to ground the transistor and the Uno.

The problem is that it only works for 200-300ms, after which the motor stops working.

Using an osciloscope, I noticed that though my sketch raises the pin hi, I only see a +1 Volt raise on the pin, instead of the +5 that its supposed to give me.

My knowledge of electronics is rather limited, based on what I've picked up here and there along the way... but I do have decent equipment. Would appreciate some guidance. Thanks in advance.

Best, /F

You need a resistor between the Arduino output pin and the base of the transistor. The emitter of the transistor needs to be connected to ground with the motor connected from the collector to a positive supply. You also need a diode with its anode on the collector and cathode to the positive supply.

A transistor is not the same as a relay, it requires a small current in the base to enable a bigger current in the collector. The base - emitter is a diode (inside the Tr) so your circuit was the same as connecting a diode to ground from your output. This would draw excessive current from the output and possibly cause damage. That is why the R is put in series.

The diode across the coil as suggested above is to suppress the reverse voltage generated when the motor is turned off. This voltage can damage your Arduino.


Thank you both for the reply.

Is there a specific resistance or would any resistor do?

Also, could you point me to how one would calculate the resistance - for future reference?

That’d be wonderful as well.

Thanks again.


Depends on the transistor, for small transistors, 10k is usually safe. You are simply trying to fully turn it on without excessive base current.


Also, could you point me to how one would calculate the resistance - for future reference?

You have to look in the data sheet of the transistor and you have to know the current you are switching. That will tell you the base current you need. Then use ohms law to find out what resistor will limit the base current to that value. This is the very minimum so then half the resistor value and then round up to the next highest standard value.

For the 2N3904 the data sheet says the base emitter saturation voltage is a maximum of 0.95V when the collector current is 50mA and the base current is 5mA. So you need a resistor that passes 5mA when it has a voltage of 5 - 0.95V = 4.05V across it.
That gives a resistor of 810R so a resistor of 470R will do.

Better still use a logic level gate mosfet. The gate needs to be fully on or the resistance of the drain/source is not at its least so causes heat.

My favourite small mosfet is NTD5867NL. It works with 5v on the gate and handles a few amps with ease. They are cheap. I bought mine from RS Components.

There are others but make sure they are fully on at 5v on the gate.