Maker Pro
Maker Pro

Problems with transistor on test circuit (beginner)

It is kind of soothing to see that even more capable heads than mine struggle with this topic :)

I tried out my cirquit with a new transistor. The power source I used has measured outputs 3.3V and 4.7V.
When I plugged the base (with the 10ohm resistor) into 3.3V the motor got an input of 2.6V.
When I plugged the base (with resistor) into 4.7V the motor got an input of 3.9V.

I also tried the cirquit of cjdelphi (thx :) ) except out of lazyness I kept the 10ohm resistor. No matter what voltage the base got the motor ran on 4V! (actually about 40mV difference, but my multimeter surely isn't that precise).

So great it runs :D thx for your help!!!

Why does it make a difference if i put the motor on the emitter or the collector?
 
Your circuit is a pass transistor circuit, ok for example you have a 78l05, anything over 100ma of current could kill it, but you don't have a 7805 (1amp)

You feed the 5v regulated source into the base, collector takes a higher voltage say 7v , the transistor spits out 5v (minus 0.6v)on it's emitter (what ever is on base) now you can supply max rated of that transistor / psu (eg 3amps using a tip31)

The circuit i made simply accepts .6+v as a switch, under full saturation the motor gets 5v from the rail, the transistor begins to conduct and path is made to ground (5v and gnd-.6v)
 
Ah okay! So why do I get a reading of 4V over the motor instead of the 4.7V input? Is the npn not fully saturated?
 

hevans1944

Hop - AC8NS
Ah okay! So why do I get a reading of 4V over the motor instead of the 4.7V input? Is the npn not fully saturated?
Are you still trying to use the motor connected to the emitter? If so, it will never have a voltage across it greater than the base drive voltage minus the base-emitter forward-biased junction voltage drop. The transistor will never be saturated with the motor in the emitter lead. You must move the motor to the collector circuit and ground the emitter to saturate the transistor. You must then also limit the base current to a safe value by increasing the 10 Ω resistor to 1000 Ω or more, no matter how lazy you are.

Howsabout you just stick a 5 V relay coil between the +5 V rail and the transistor collector, diode across the coil for back-emf protection, ground the transistor emitter, and increase R1 to 1000 ohms. Use the relay contacts to turn the motor on an off. Or, if the motor doesn't already have one terminal permanently and irrevocably connected to ground, put the motor where the relay coil would go... as recommended by @cjdelphi with his funky simulator post #8, where an 80 ohm resistor serves as a stand-in for the motor the sim doesn't appear to have.

Why does it make a difference if i put the motor on the emitter or the collector?
Clearly you don't know DS about transistors, but fortunately we are here to educate you. Start by reading this resource and the discussion thread.
 
No the motor is now connected to the collector, as proposed by various users and as described in the cirquit from cjdelphi. If you read my previous posts you'll know that I now use the setup from cjdelphi. I don't want to use a relay also I think for this the transistor should be sufficient. What would be better with a relay? Ill take your advice about the resistor tho.

Clearly you don't know DS about transistors

True. Ill read the post.
 
Last edited:

hevans1944

Hop - AC8NS
No the motor is now connected to the collector, as proposed by various users and as described in the cirquit from cjdelphi. If you read my previous posts you'll know that I now use the setup from cjdelphi. I don't want to use a relay also I think for this the transistor should be sufficient. What would be better with a relay? Ill take your advice about the resistor tho.



True. Ill read the post.
I read your posts, but wasn't sure if you had moved the motor to the collector and had increased the value of the base resistor. Both are necessary and sufficient to operate the motor from a Raspberry Pi output.

The only reasons I can think of to use (or need) a relay is (1) if one of the motor leads is grounded and you therefore can't attach the motor between the +5 V rail and the collector of the 2N2222 transistor or (2) the motor draws more current than the transistor can safely provide. Since you have already moved the motor to the collector, clearly (1) is not applicable. It is unlikely that (2) is applicable either because you have operated the motor for awhile without burning anything up.

The increased value for the base resistor is essential to limit the base current in the forward-biased base-emitter junction. This base current is what will drive the transistor into saturation, resulting in just a few tenths of a volt drop from collector to emitter. But if you try to drive the base from a voltage source using too small a value of base bias resistor (10 Ω is waaaay too small) the base-emitter junction will dissipate too much power and will melt. Helps to have a goodly supply of inexpensive transistors on hand to play with.:D

It will take you a few days (maybe weeks) to read through all the comments of the BJT resource thread, and it may be (will be) confusing until you do some independent research, but I think it is a good place to start. Best way to learn about transistors IMHO is to do what you are doing now: experiment, measure, and keep notes of what works and what doesn't work. Add on the theory as you go and as your understanding increases. If you get stuck trying to understand a concept, come back here with questions and someone will try to answer them. It helps to have an inexpensive multi-meter to measure voltages, currents, and (out of circuit) resistances. Simple algebra will solve most problems so, if you don't already know, learn how to use Ohm's Law and Kirchoff's Laws to predict how circuits will behave.

Hop
 
How much current does the motor draw?

The correct connection of the transistor should allow for saturation and a drop of 0.2 to 0.3V. If you are getting more than this, the motor is probably trying to draw more current than the 2N2222 can source, which is about 600mA. Or possibly your power source cannot supply the necessary current.

Bob
 
@BobK
the motor draws a measured 60mA at 5V. So neither the power source nor the npn should be a problem. Maybe I just did something wrong with the multimeter or wrote it down incorrectly. I have some time today and will get back to it.

@hevans
thx for the help, I now use a 1k resistor as proposed :)
 
@BobK
The measured voltage is likely just the voltage after the voltage drop caused by the motor itself :rolleyes:. So it was just me being stupid with the multimeter.

Thanks again for your help everyone :D its not all hooked up with raspberry pi and a script that turns the motor on and off with the push of a button!
 
To fully saturate the transistor, you should have a base current of about 1/10th of the collector current. So, if the motor takes 60mA you should have a base current of 6mA.

You are driving the base with 3.3V and the base emitter junction will drop about 0.7V, so the voltage across your base resistor is 3.3-0.7 = 2.6V.

To get 6mA at 2.6V, you Ohm's law:

V = I * R

2.6 = 0.006 R

R = 2.6 / 0.006 = 430Ω

Your 1K may be too big to saturate the transistor. I would go down to a 390Ω.

Bob
 
Top