Electronic – Why the transistor switched when base was grounded

batteriesmicrocontrollertransistorsvoltage

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:

schematic

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.

Best Answer

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.

schematic

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.