Circuit Not working properly unless i add in an ammeter (SOLVED)

Thread Starter

joaobcosta

Joined Dec 18, 2018
6
So I´m trying to control a DC motor with a transistor and Arduino.
I´ve connected the 5V of the arduino to the collector of the transistor (it´s a 2N2222 transistor) , the base to pin 9 of the arduino, which is set to "blink", and the emitter to the motor and finnaly the motor to the ground of the arduino. Also I have a diode in parallel with the motor and I´m sure it is not placed the wrong way. Now when I connect the motor directly to the 5V and ground everything goes as expected. When I try to connect things the way I just said... not so much. Sometimes the motor works for a second or so, others not at all or for just an instant. Altough when I tried to add an ammeter to the circuit in series with the motor, the circuit miraculously started to work, wich made me even more confused. What am I doing wrong?Untitled Sketch_bb.png
 

drc_567

Joined Dec 29, 2008
710
Try placing the motor on the collector side of the NPN transistor, and bias the base to emitter voltage at about 0.7 volts ... 5 V directly into the base may not work. The NPN transistors are low side switching, and PNP transistors are high side switching, with respect to the load.
 
By the way, this is a more practical circuit for your application:

Motor terminal 1 -- 5V/Any voltage source you're using
Collector -- Motor terminal 2
Emitter -- Ground
Arduino digital pin -- 1K resistor -- Base

And keep that diode like that, but be sure not to mess up its polarity.
 

AlbertHall

Joined Jun 4, 2014
8,337
With the input from the Arduino set high measure the voltages on the collector, base, and emitter of the transistor.
 

Thread Starter

joaobcosta

Joined Dec 18, 2018
6
So I tried to connet things the way abraar_sameer and drc_567 said and now it works just fine!! Thank you so much guys for all your help
 
Top