Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« on: January 08, 2013, 05:36:32 am » |
i connected an rc car which runs on 9.6 v batteries to just ONE of the motors(back wheels)
the problem is, when the battery is fully charged , the transistor passes too much current, and the motor coninues to run even at analogWrite(pin,0)
how can i understand what type of transistor to use to power a 9 volt motor with the 5v arduino ?
|
|
|
|
« Last Edit: January 08, 2013, 10:14:04 am by harshvardhan »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 9
Posts: 1000
|
 |
« Reply #1 on: January 08, 2013, 06:12:35 am » |
Can you post a schematic ? Or tell us which transistor you use now and how it is connected.
The analogWrite() function with PWM value of '0' should result into the motor not running. So something might be connected wrong.
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #2 on: January 08, 2013, 06:20:56 am » |
Hi harshvardhan,
Do you mean analogWrite? analogRead won't control the transistor. Also, the analog output is accomplished using PWM, which simulates analog using pulses. It won't actually control the current to the transistor base, but will "stutter" the current to the motor, making it run faster or slower.
We'll need some additional information.
1) What type of transistor are you using? 2) How is it connected (schematic)? 3) Let us see the code. Paste it in a reply, select it, and press the # button above to format it in a code block.
Pat.
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« Reply #3 on: January 08, 2013, 10:17:47 am » |
http://bildr.org/2011/03/high-power-control-with-arduino-and-tip120/its the same schematic and same code but i have not used any resistor, nor the dioide(in the motor) instead of TIP120 , i used TIP122 also, can u tell me why it doesnt even slow down with the TIP127? i'm running a 9 v motor , with aprroz 9.6 v batteries
|
|
|
|
« Last Edit: January 08, 2013, 10:24:36 am by harshvardhan »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 9
Posts: 1000
|
 |
« Reply #4 on: January 08, 2013, 10:54:02 am » |
Using the TIP120 or TIP122 is no problem. But you should have used used the resistor and the diode, as in the example. Something might already be broken.
If your Arduino seems to be working, the output to the transistor might be blown. So use another output pin and use the resistor and the diode. And use also a new transistor.
Edit: the TIP127 is a PNP, we don't want that. TIP120 or TIP122 is NPP and is okay.
|
|
|
|
« Last Edit: January 08, 2013, 02:19:14 pm by Krodal »
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #5 on: January 08, 2013, 11:06:58 am » |
Some thoughts...
Try disconnecting the control wire from the Arduino and connect the base lead (with a 1k or 2.2k resistor) to the Arduino 5v to see if the transistor is working. Also, double check the wiring- you might have the transistor connected backwards.
1. Always use a diode across the motor to protect your transistors and the Arduino from reverse high voltage spikes. 2. Always use a resistor between the Arduino and the transistor base to protect the transistor.
The 127 is a Darlington PNP transistor. It's a different type - don't use that; you need an NPN like the 120, 121, or 122.
If its wired correctly, you might have a faulty transistor, or damaged it somehow.
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« Reply #6 on: January 09, 2013, 03:52:09 am » |
i dont think theres any prob with the transistor (the motor SLOWS down and speeds up)
but the motor doesnt STOP even if i take the base pin out, the motor continues to run , but slowly
i think i means there is little current still going through the transistor i tried using 3 TIP122 transistors, same results.
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #7 on: January 09, 2013, 06:29:03 am » |
Here's a thought:
Darlington transistors have much larger gain factors than other transistor types. The -122 has a gain of 1000+ as opposed to a 2N2222 that has a gain closer to 100. Buy a pack of small transistors from Radio Shack, or somewhere similar, and try it again. Pick up some diodes and 1k resistors too when you are there!
What you might be experiencing is the transistor amplifying noise. Disconnect the base lead again, but connect it to ground. That should stop the motor. If not, there is a different problem.
Pat.
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« Reply #8 on: January 09, 2013, 07:06:53 am » |
i have the 2N3904
will that do?
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #9 on: January 09, 2013, 07:35:06 am » |
It should be fine. Try the "grounding" experiment I mentioned in my last post, first. I'd like to see what happens- it may explain things.
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« Reply #10 on: January 09, 2013, 07:53:00 am » |
thank you  will try that btw , can you tell me why the diode is placed parallel to the motor? i mean, wouldnt it be better if it had been placed, on the outout pin?
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #11 on: January 09, 2013, 08:07:13 am » |
Diodes are placed backwards across the leads of inductive devices to short circuit their reverse voltage spikes when they turn off.
The electric coil develops a strong magnetic field when it is energized. When turned off, the magnetic field converts back to electricity with a reverse polarity to what generated it. This reverse voltage can damage the electronics and needs to be stopped. The backwards diode short circuits this reverse voltage back into the coil and not to the electronics.
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« Reply #12 on: January 09, 2013, 09:45:35 am » |
ok, i used a 3904
the transistor got too hot and burnt my finger . is it because im not using a resistor?
it was even smoking
and the funny thing is, the motor stopped with TIP122(that means everything worked), for sometime, but i dunno what happened; after a while, it was back to the same problem .
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #13 on: January 09, 2013, 11:51:05 am » |
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 68
|
 |
« Reply #14 on: January 09, 2013, 11:27:07 pm » |
i cant tell you the motor ratings because im using an rc car(the chasis and the motors, after ripping the circuitry apart )
but i guess the TIP122 is rated much more than my motor.
|
|
|
|
|
Logged
|
|
|
|
|
|