Pages: [1]   Go Down
Author Topic: read output of dc motor  (Read 1079 times)
0 Members and 1 Guest are viewing this topic.
Indiana, US
Offline Offline
Newbie
*
Karma: 0
Posts: 39
*_+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 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 Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Newbie
*
Karma: 0
Posts: 39
*_+
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
maybe just finding something with a hall sensor would be easier

NO!

Quote
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 Offline
Edison Member
*
Karma: 1
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It's a DC motor, so it'll work as a DC generator, surely?

and when you turn it the other way  :smiley
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
he's not a real doctor
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"and when you turn it the other way  "

If will still be DC, just of the opposite polarity  smiley-wink

Lefty
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-wink  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 Offline
Brattain Member
*****
Karma: 626
Posts: 34159
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 Offline
Jr. Member
**
Karma: 0
Posts: 59
he's not a real doctor
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the voltage protecton tutorial.

You are right about the second zener.  I got my wires crossed....
Logged

Pages: [1]   Go Up
Jump to: