Offline
Newbie
Karma: 0
Posts: 6
|
 |
« on: February 12, 2013, 02:44:07 am » |
Most (all?) tutorials on driving a DC motor (with an Arduino) connect the motor between the power source (battery) and the transistor's collector pin. The transistor's base pin is connected to an Arduino output pin and the emitter is usually connected to Ground. There is also a diode that is connected in parrallel to the collector and emitter of the transistor. Something like this (without the diode): Battery (+) --------> Motor ----> Collector Pin | Base Pin <------ Pin 9 | (-) Emitter Pin ----> GND GND
My question is: Can I connect the motor to the Emitter Pin and then to GND? In other words, the Battery connect to the Collector Pin. When the base is activated, current will flow from the collector to the emitter into the motor. Is this sound? Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 9
Posts: 1001
|
 |
« Reply #1 on: February 12, 2013, 04:25:58 am » |
Yes, that's also good. But if the output of the Arduino is only 4.5V and the Vbe (voltage drop from base to emitter) of the transistor is 0.7, and the voltage drop over the resistor is 1V, the motor gets only 2.8V.
You also can't use a 12V motor.
|
|
|
|
« Last Edit: February 12, 2013, 08:07:52 am by Krodal »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #2 on: February 12, 2013, 12:20:37 pm » |
Thank you for the reply. Sorry, I don't understand why the motor would only receive 2.8V? The motor is being powered by a battery (external power source). I understand that if I put a resistor between the Arduino output pin and the base lead (of the transistor) then only 2.8V may reach the base, but that shouldn't impact how much voltage reaches the motor, right? I was under the impression that the transistor can drive a larger load (from collector to emitter to motor) using a small load (Arduino output pin to resistor to base lead of the transistor).
|
|
|
|
« Last Edit: February 12, 2013, 12:23:08 pm by awawda »
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 9
Posts: 1001
|
 |
« Reply #3 on: February 12, 2013, 01:31:31 pm » |
If the motor is connected to the emitter (and ground), the voltage could be that low. Also, if you use a battery for the motor, it is best to connect the motor to the collector (and battery plus).
You can try for yourself, and measure the voltages. But use a resistor of about 1k at the output of the Arduino. That way the Arduino output is protected in case you connect something wrong.
|
|
|
|
|
Logged
|
|
|
|
|
Lost Wages
Offline
Full Member
Karma: 11
Posts: 103
|
 |
« Reply #4 on: February 12, 2013, 01:48:34 pm » |
Here's my two pence...
If you need the motor to be attached to GND (so that the voltage across the motor can be easily measured, for instance) you can use a PNP transistor to drive the motor.
It is best to drive the motor with the collector as it approximates a current source.
I would use an opto-coupler (such as the 4n35) to isolate the 5V Arduino from the motor.
Take a look at the attached schematic.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 247
Posts: 16526
Available for Design & Build services
|
 |
« Reply #5 on: February 12, 2013, 02:20:29 pm » |
NPN sinking PNP base is sufficient isolation. Opto is overkill.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 6
|
 |
« Reply #6 on: February 12, 2013, 02:25:29 pm » |
Thanks a lot. I don't have any specific reason why I need to connect the motor to the emitter (instead of the collector). I was curious whether or not it would work. I didn't realize that there would be such a big drop in voltage from the collector to the emitter?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 247
Posts: 16526
Available for Design & Build services
|
 |
« Reply #7 on: February 12, 2013, 02:36:15 pm » |
It depends on the transistor. If you use a PNP transistor, it likes to act as a current source. However, the base has to be pulled up to the source voltage to turn it off, and the base gets pulled low to turn it on. NPN likes to act as a current sink, and the base only goes about 0.7V above the emitter to turn it on, and is independent of the voltage on the collector. The voltage drop across the collector-emitter varies by part, from as low as 0.3V for low voltage/current parts to >1V for high voltage/current parts. If you want really low voltage across the transistor, consider a Logic Level, N-channel, low Rds (like 0.03ohm or 30milliOhm) MOSFET to sink current to ground. For example http://www.digikey.com/product-detail/en/NTD5867NL-1G/NTD5867NL-1GOS-ND/2401422Example: Ohms law V = IR, with 3A of current and 0.039 ohm, the voltage drop will be just 0.117V.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 9
Posts: 836
|
 |
« Reply #8 on: February 23, 2013, 03:35:10 am » |
The main problem with your approach, is that you have to have a different ground potential for the arduino and your power circuit, and then you have to go down the path of isolation. You can do it the other way, but it is more complication. If you want to learn more about it, look at how the drivers for three phase brushless motors work.
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #9 on: February 23, 2013, 03:39:28 am » |
This transistor tutorial might help....
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
0
Offline
Tesla Member
Karma: 71
Posts: 6624
Arduino rocks
|
 |
« Reply #10 on: February 23, 2013, 05:05:56 pm » |
The reason for connecting the motor to the collector is _nothing_ to do with it being a current source.
When you use a transistor in a switching circuit it is not in the linear region and it is not even remotely like a current source.
The reason the common-emitter circuit is invariably used is to reduce power dissipation in the transistor. To get the lowest heat wasted in the transistor you must saturate it - which brings the collector-emitter voltage down to between 0 and 0.2V or so typically. [thus making it a rather good _voltage_ source]
The emitter follower circuit _cannot_ saturate without running the base circuit from a higher voltage than the collector. You get at least 0.7 to 1.1V across the collector-emitter terminals, thus wasting many times more heat in the device. In practice the voltage drop on the base resistor makes this worse.
The common-emitter configuration is _trivial_ to saturate, just pass enough current into the base. Some modern transistors can saturate down to a few 10's of millivolts with a reasonably large load BTW.
|
|
|
|
« Last Edit: February 23, 2013, 05:08:58 pm by MarkT »
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #11 on: February 24, 2013, 01:09:30 am » |
Not Getting why mine is not working or where i'm doing wrong....
Well one thing you're doing wrong is piggy-backing on this thread... maybe you should start a new one and delete the posts in this thread. Mayb e then you'll get a response?
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #12 on: February 24, 2013, 01:32:17 am » |
Sorry i'll try to put in new thread....
Thanks for advise and reading that site for more knowledge so that i can find out ways myself as much as possible with me.
Sorry again for wrong way of getting help.
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #13 on: February 24, 2013, 01:35:49 am » |
Sorry again for wrong way of getting help. It's just that you're more likely to get more response if your question isn't jumbled up in the middle of something else...
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
|