Instructables

What is the best way to use the DC motor outputs as analog inputs for a micro controller?

I am trying to connect my RC car to a Genie E18 micro controller, so that I can control some PWM and digital outputs. However, I am not sure how I can detect the voltage of the DC motor with the micro controller. I am a high school student in the UK and the best I can think of is to use a potential divider, would that be sufficient? Thanks, jack

Do you want to detect voltage that the motor generates itself when the car is pushed or do you want to detect the voltage being applied to the motor to make the car move.
5225jackiechanman (author)  mpilchfamily2 years ago
I would like to detect the voltage being applied to the motor and use that value to either increase or decrease the PWM rate.
I'm not familiar with that micro controller but i see it operates at 4.5V to 6V. How many volts is the car able to apply to the motor? If it uses more the 6V then yes you will need to use a voltage divider between the motor and the micro controller to bring the max voltage down to a level the analog input can safely read.
And a LOT of voltage spike supression, motors are EVIL to a microcontroller
5225jackiechanman (author)  steveastrouk2 years ago
Okay, thanks for your responses :) I just thought that it might take a bit more circuitry that a potential divider. The car it's self can run off 3v, so the motors won't receive any more than that (multimeter is unavailable at the moment). I'll let you know how it goes pretty soon :)

Jack
Beware, you can get a LOT more off the motors than the supply voltage.
Why ? Its a fixed quantity, DERIVED from your PWM cycle ?
rickharris2 years ago
Use a potential divider such that the maximum voltage the micro sees is 5 volts.
Why do you want to "detect" it ? Do you just want to know its present ?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!