# Why my transistor switched when base was grounded?

I am from a programming background, so I dont quite know the theory, But I want to control a motor from a mictrocontroller. So I used a TIP 122 to do it. My circuit looks a bit like this:

simulate this circuit – Schematic created using CircuitLab

Why did the motor run when I connected the base of the transistor to gnd? also, the motor runs at full speed even if I apply base voltage as low as .2 volts. What is going wrong here ?

I even tried adding a 500ohm resistors to base, but it still doesnt have any change.

-
You probably have the pinout wrong, and the motor is connected base to emitter. I'm surprised it's moving at all with a 1V supply. –  Matt Young Aug 15 '14 at 15:14
my connection is something like this:instructables.com/id/… –  harvey_slash Aug 15 '14 at 15:15
Matt is referring to the transistor: you probably swapped base and collector. –  Vladimir Cravero Aug 15 '14 at 15:17
Tip122 has the base as the leftmost pin, right ?if thats the case, then I am quite sure of that part –  harvey_slash Aug 15 '14 at 15:18
also, could anyone tell me if applying a base voltage of about 2V will make the motor run at full speed ? my motor runs at around 12v at full speed –  harvey_slash Aug 15 '14 at 15:21

You can do this to drive your motor. The 1k resistor must be tuned based on your motor's expected current for a given voltage. Usually you have a spec like 500mA@12V or something of the like.

Basically, to get the 500mA spec, you want collector current of 500mA. The base current is always Ib=Ic/Hfe.

Tip122's Hfe is min 1000, so you get 500µA for Ib. You know on a BJT that Vbe is 1.3V for Tip122 at 500mA (see plot in datasheet). So if you have a GPIOs voltage of Vgpio, you have a voltage of Vgpio-2.5V across R1.

Using Ohm's law you can find out R1 => R1=(Vgpio-Vbe)/(Ic/Hfe).

For a 3.3V Gpio R1=(3.3V-1,3V)/(500µA) = 4K
For a 5V Gpio R1=(5V-1.3V)/(500µA) = 7.4K


Those resistor values are upper bound values to get your full 500mA. You should be using values around those.

simulate this circuit – Schematic created using CircuitLab

Now for your question about what is going on, I can't answer. It is not very clear about what you did and you look like you are mixing thing up a little.

-
why have you written micro ampere? –  harvey_slash Aug 15 '14 at 16:29
because Hfe of transistor is the current gain: a BJT transistor is basically a current amplifier. Hfe defines by how much the base current is amplified, which is the very point of using a transistor to drive loads in the first place. TIP122 is darlington configuration and such configurations have very high gains such as 1000. 500mA/1000 = 500µA. –  Mishyoshi Aug 15 '14 at 16:46
Great. You have intelligently chosen the motor symbol. Technically a speaker is a complex motor. –  Amit Hasan Aug 15 '14 at 16:48
@Amit Hasan I must admit that I hadn't put much though in choosing the speaker, but why not ;) –  Mishyoshi Aug 15 '14 at 16:53
why dont I get the praise too? ;) –  harvey_slash Aug 15 '14 at 17:08