Indiana, US
Offline
Newbie
Karma: 0
Posts: 39
*_+
|
 |
« on: January 26, 2009, 12:49:28 pm » |
If i'm not mistaken motors can work both ways and output electricity as well as receive it.
if so, is there a way to connect a small dc motor (from a cheap rc car) and read the values that are output by turning the gear?
thnx
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #1 on: January 26, 2009, 12:54:16 pm » |
If it is a permanent magnet DC motor then yes it can act like a generator and generate a DC voltage that could be read by the Arduino analog input pins.
However you would have to make sure that the generated voltage could not raise above 5vdc or below 0 volts (no negative voltages allowed). A simple series resistor between the motor output and the analog input pin would probably protect for both cases.
Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26031
Solder is electric glue
|
 |
« Reply #2 on: January 27, 2009, 11:08:25 am » |
Note it's also AC out of a motor so you would need a diode to rectify it and a capacitor to smooth it. Then the reading would be proportional to how fast you are turning the motor.
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Newbie
Karma: 0
Posts: 39
*_+
|
 |
« Reply #3 on: January 27, 2009, 12:50:44 pm » |
how do i find out what my diode, resistor and capacitor need to be? maybe just finding something with a hall sensor would be easier
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26031
Solder is electric glue
|
 |
« Reply #4 on: January 27, 2009, 01:25:15 pm » |
maybe just finding something with a hall sensor would be easier NO! how do i find out what my diode, resistor and capacitor need to be? Diode 1N4001, resistor 1K capacitor 1uF
|
|
|
|
« Last Edit: January 27, 2009, 01:25:31 pm by Grumpy_Mike »
|
Logged
|
|
|
|
|
Bristol, UK
Offline
Edison Member
Karma: 0
Posts: 1197
Exhibitor at UK Maker Faire
|
 |
« Reply #5 on: January 27, 2009, 01:46:47 pm » |
Note it's also AC out of a motor It's a DC motor, so it'll work as a DC generator, surely?
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #6 on: January 27, 2009, 02:08:23 pm » |
Yes, a permanent magnet DC motor will generate pulsating DC voltages only, not AC voltages, as the commutator routes current flow to one direction only. The amount of the DC ripple voltage would depend on the number of commutator windings.
Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26031
Solder is electric glue
|
 |
« Reply #7 on: January 27, 2009, 02:24:04 pm » |
It's a DC motor, so it'll work as a DC generator, surely? and when you turn it the other way : 
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 59
he's not a real doctor
|
 |
« Reply #8 on: January 27, 2009, 10:28:41 pm » |
You could do a diode bridge (4 diodes - see wikipedia). That would give the same voltage either direction, but no indication of which direction.
So (check me guys) couldnt you 1) voltage limit with a 5 volt zener to ground from each side of the motor. seems like a good idea anyway. 2) use a diode bridge to an analog pin. 3) detect direction by running each zener protected side of the motor directly to a digital pin. Of course it would only show direction when the voltage reached logic high.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #9 on: January 28, 2009, 02:32:39 am » |
"and when you turn it the other way " If will still be DC, just of the opposite polarity  Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 283
Posts: 15443
Measurement changes behavior
|
 |
« Reply #10 on: January 28, 2009, 02:41:09 am » |
You could do a diode bridge (4 diodes - see wikipedia). That would give the same voltage either direction, but no indication of which direction. Yes that would work, however you would not get any reading until the speed generated a voltage above a two diode forward voltage drop = 1.4vdc. That's a pretty large loss of information.So (check me guys) couldnt you 1) voltage limit with a 5 volt zener to ground from each side of the motor. seems like a good idea anyway. Not really, one side of the motor has to wire to ground so why would you put a zener from ground to ground 2) use a diode bridge to an analog pin. 3) detect direction by running each zener protected side of the motor directly to a digital pin. Of course it would only show direction when the voltage reached logic high. I think you first have to spin the motor to the maximum speed you think it will be subjected to and read the maximum DC voltage generated with a DVM meter to find out what values we are looking at. Also is the application such that the motor can or will spin in both directions?
Lefty
|
|
|
|
« Last Edit: January 28, 2009, 02:42:18 am by retrolefty »
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26031
Solder is electric glue
|
 |
« Reply #11 on: January 28, 2009, 03:38:06 am » |
If will still be DC, just of the opposite polarity ;D Sorry I always thought that was what AC was, just DC changing polarity but what do I know? The real answer is if you want to detect direction just have two half wave rectified circuits feeding into different inputs. You have three states to detect, still , moving clockwise and moving anti clockwise. Therefore you can't detect that in less than two logic inputs. As for over voltage protection please see:- http://www.thebox.myzen.co.uk/Tutorial/Protection.html
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 59
he's not a real doctor
|
 |
« Reply #12 on: January 28, 2009, 09:45:15 pm » |
Thanks for the voltage protecton tutorial.
You are right about the second zener. I got my wires crossed....
|
|
|
|
|
Logged
|
|
|
|
|
|