Go Down

Topic: Transistor Use issue (Read 754 times) previous topic - next topic

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

larryd

#1
May 05, 2019, 11:13 pm Last Edit: May 05, 2019, 11:15 pm by larryd
Show us a good schematic of your circuit.
Show us a good image of your wiring. 
Give links to components. Posting images: 
https://forum.arduino.cc/index.php?topic=519037.0

What motor are you using and what is it's ratings?
What is the rating for the 9v power supply?
What transistor are you using!
10k sounds way too high.





No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Grumpy_Mike

Quote
What I did was connect analog pin 6 to a 10k ohm resistor
Analogue pin 6 is an analogue input not an analogue output.
To get an output pin that will produce PWM in response to an analogWrite call you need to use one of the digital pins that has a ~ by the name.

You should wire the emitter to ground, and the motor to the collector. The other end of the motor should be connected to the motor's supply. A reverse biased diode must be placed across the motor.

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.

Paul__B

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.

slipstick

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

ReverseEMF

#6
May 06, 2019, 07:20 am Last Edit: May 06, 2019, 07:49 am by ReverseEMF
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: https://learn.sparkfun.com/tutorials/using-eagle-schematic/all

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

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.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Grumpy_Mike

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.

TomGeorge

#8
May 06, 2019, 10:57 am Last Edit: May 06, 2019, 10:57 am by TomGeorge
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.. :)
Everything runs on smoke, let the smoke out, it stops running....

surepic

#9
May 06, 2019, 11:58 am Last Edit: May 06, 2019, 12:28 pm by surepic
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   https://github.com/ioprojecton/servo-driver


Update: picture exported and attached

Paul__B

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!  :smiley-eek:

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

surepic

#11
May 06, 2019, 01:13 pm Last Edit: May 06, 2019, 01:15 pm by surepic
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.

Grumpy_Mike

Quote
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.

surepic

Is Link or model number to that servo available?

TomGeorge

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

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up