Transistor Use issue

Thanks, so yeah, I meant that I used the pin with the ~ line (6) and also, I connected it the way you told me, (collector to one side of the motor, emitter to ground, and other side of motor to positive on the battery).

It still doesn't do anything. I'm not sure then if it might be the transistor that is malfunctioning. For the schematics, I don't know how to draw schematics on here.

Btw, I've copied exact circuits from others explaining it, but it still doesn't work.

You still have failed to explain the stall current rating of the motor and the specification of the transistor. You would need a 220 Ohm resistor, not a 10k.

You still haven't said what transistor you're using or what motor you have and how much current it needs or what type of "9V supply" it is. Unfortunately, in electronics as in much else details matter.

My guess is the transistor you're using is not up to the job, but with no details a guess is the best I can do.

Steve

DannyIsOnFire14:
For the schematics, I don't know how to draw schematics on here.

There is no facility, on this forum, to draw a schematic. You need to use a tool such as:

Here's a link to an excellent tutorial on Eagle CAD: Using EAGLE: Schematic - SparkFun Learn

And one for DipTrace: https://www.engineersgarage.com/contribution/tutorial-pcb-designing-using-diptrace-software

I find DipTrace the easier to use, but Eagle CAD is far more complete and versatile. Both have limited Free versions, with plenty of power for hobby level stuff. They are limited, but if you stay within those limitations, you can draw a schematic, convert it into a PCB, and export Gerber files that can be used to get the thing fabricated!

Once you get a schematic drawn, and have created a photo file of it, follow these instructions: https://forum.arduino.cc/index.php?topic=364156.msg3749026#msg3749026

DannyIsOnFire14:
Btw, I've copied exact circuits from others explaining it, but it still doesn't work.

The circuit you copied might seem to apply to your case, but because there are a lot of different motors out there, and the circuit needed to drive one motor, might be inadequate, or completely wrong, for a different motor, copying a circuit, with no knowledge of what is going on, will only work if you get lucky.

We need both a schematic and a photograph of your attempt at making the schematic in real life. And as others have said the part number of the transistor you have used.

Try replacing the motor with an LED and resistor as a test.

DannyIsOnFire14:
I've tried for a very long time to try to get a transistor to act as a switch in order to control a motor with a 9v battery (external power supply). I've watched many tutorials and have read countless articles on it.
My circuit doesn't work though. To make sure I have it right, I know that a small current on the base of the transistor makes a higher current flow from the collector to the emitter. What I did was connect analog pin 6 to a 10k ohm resistor which was connected to the base of the transistor**. The collector side of the transistor I connected the positive side of the external Power supply. Finally the emitter was connected to one side of the motor and the other side of the motor connected to ground.** I put common ground on everything and made a simple sketch which sent PWM signals to pin 6 (the control pin).

Any feedback would be appreciated, as I'm just learning this. Thanks

What is the type and part number of your transistor?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

I think this is how you should connect your motor.

Tom.. :slight_smile:

Tom i think OP is taking about servo motor. In your circuit you are missing signal wire.

In any case if its just to control motor on/off or sending pwm via signal wire you can use my circuit just use the corresponding block of the circuit. U might need to change transistors in the circuit for higher stall current than 1.25A which i used. Schematic and board files are available u will need eagle cad to view them or may be someone can export image and attach here. Circuit is tested for 1.3khz. Inputs 3.3/5v 0.1ma to output over 1A current for control side.

Later will try to attach picture of schematic.

Link GitHub - ioprojecton/servo-driver: Low current servo driver

Update: picture exported and attached

surepic:
Tom i think OP is taking about servo motor. In your circuit you are missing signal wire.

Well, that is funny as there is absolutely nothing in the OP that would imply that! :astonished:

Servo motors - of the RC model type - generally do not require buffering of the control wire.

Ive seen rc “servo” motors but after disassembly i found it not to be a servo its just dc motor with servo mechanism inside. No fine angle control which servo motors are used for.

If OP was talking about servo motor or just dc motor only OP knows we can only assume if it is or isnt. May be im wrong.

Ive seen rc "servo" motors but after disassembly i found it not to be a servo its just dc motor with servo mechanism inside.

Then they were not RC servo motors.

Is Link or model number to that servo available?

Hi,
Can you post a picture of your project please, so we can see your component layout?

Thanks.. Tom... :slight_smile:

DannyIsOnFire14:
Thanks, so yeah, I meant that I used the pin with the ~ line (6) and also, I connected it the way you told me, (collector to one side of the motor, emitter to ground, and other side of motor to positive on the battery).

It still doesn't do anything. I'm not sure then if it might be the transistor that is malfunctioning. For the schematics, I don't know how to draw schematics on here.

Btw, I've copied exact circuits from others explaining it, but it still doesn't work.

TomGeorge:
What is the type and part number of your transistor?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

I think this is how you should connect your motor.

Tom.. :slight_smile:

Make sure you do not forget to use a 1n4001 diode (Flyback) connected as shown in the diagram of the earlyer post (D1) otherwise your transistor will die very quickly from the voltage created by the motors coils when turning off.

Also a 10K base resistor will not turn on the transistor. a 1K or a little lower is a good choice.

150 or 220 ohm base resistor, don't bother with 1k. You want as much base current as the Arduino pin can safely produce - transistors as switches need a base current that's 5 to 10% of the load current.

MarkT:
150 or 220 ohm base resistor, don't bother with 1k. You want as much base current as the Arduino pin can safely produce - transistors as switches need a base current that's 5 to 10% of the load current.

A 220 Ohm resistor is needed when lower HFE transistors are used. Dont get me wrong, it will work but why push the arduino output to the limit ?
On the other hand most diagrams recommend a 1K base resistor. 1k base resistor will work just fine on high HFE transistors such as the BC337 or the 2N2222. Darlington transistors are also good choice.
You can always measure the Base-Emitter, Base-Collector and Collector-emitter voltages to verify that the transistor is fully on and fully off. You want to use the transistor in saturation mode and in cutoff mode, not in the active region in between.

HellasT:
A 220 Ohm resistor is needed when lower HFE transistors are used. Don't get me wrong, it will work but why push the Arduino output to the limit ?

What limit? 4.35 V over 220 Ohm is 20 mA, a common current used to illuminate LEDs brightly. Nowhere near the absolute maximum rating which I do not even mean to cite - since doing so tends to lead foolish people to fantasise that is an acceptable target to use. :astonished:

HellasT:
On the other hand most diagrams recommend a 1K base resistor. 1k base resistor will work just fine on high HFE transistors such as the BC337 or the 2N2222. Darlington transistors are also good choice.

So you didn't read MarkT's explanation?

(I have to chuckle here. "most diagrams" - on "Instructables" perchance? :roll_eyes: )

HellasT:
You can always measure the Base-Emitter, Base-Collector and Collector-emitter voltages to verify that the transistor is fully on and fully off. You want to use the transistor in saturation mode and in cutoff mode, not in the active region in between.

Oh, so you do have some knowledge about "saturation mode" in which Hfe is irrelevant, so why do you talk about "high HFE transistors"? Mark has explained that you need at least 5% of the collector current, that is, a gain of 20 at best for saturation.

So your 1k resistor feeding 4.35 mA to the transistor base can hold it in saturation for no more than 87 mA.

Paul__B:
...
So your 1k resistor feeding 4.35 mA to the transistor base can hold it in saturation for no more than 87 mA.

if for example we wanted to 'limit' the ICE, might using a "high(ish)" resistor be the way to go ?

let's say we wanted to "hold back" the motor from going full blast - or would that be better acheived by using a lower PWM duty cycle and not use the transistor in the 'active region' unnecessarily.

I'm noticing that the OP has not spoken since entry #3... so there is a lot of speculation here.

BabyGeezer:
if for example we wanted to 'limit' the ICE, might using a "high(ish)" resistor be the way to go ?

Yes, it might be a way to limit the collector current. :roll_eyes:

Once the transistor comes out of saturation, as MarkT explains, the collector voltage rises to something above the base voltage, about 0.7 V, so the power dissipation of the transistor is 0.7 times the collector current. For a BC337 without heatsink, this is 625 mW so you are strictly limited to less than one Amp. For a 2N2222 it is 500 mW and 670 mA and in any case you were limited to 800 mA.

But since the Hfe is quite variable, limiting collector current by fixing base current is a bad idea in the first place. :astonished:

BabyGeezer:
if for example we wanted to 'limit' the ICE, might using a "high(ish)" resistor be the way to go ?

let's say we wanted to "hold back" the motor from going full blast - or would that be better acheived by using a lower PWM duty cycle and not use the transistor in the 'active region' unnecessarily.

In most cases, when using a transistor for switching [whether a BiPolar, or a MOSFET, BTW], the goal is to keep the transistor in saturation, and out of the active region -- or, right on the edge of the active region & saturation, for faster switching. Most switching bi-polar transistor datasheets recommend biasing the transistor at a ß of, typically, 10 [though I've seen slightly higher, such as 15 or 20]. The point of that is to drive the Collector-Emitter voltage down, and achieve a trade off between drive current and low power dissipation.

Using the transistor active region to regulate power, is called a "Class-A" configuration -- and in some cases is a viable solution. But, it's the most inefficient way to do it, and only makes sense in low-power applications, or where very low distortion [i.e. linear transfer] & low noise are design goals [or a cheap and dirty design]. More often, especially when anything more than, say, a 1/2 watt, or so, of power is involved, PWM is the way to go. And, usually, a MOSFET does a better job.