Go Down

Topic: DC motor direction as input (Read 1 time) previous topic - next topic

replay

thanks! so one lead from the motor goes into analog input and the other goes to ground?

and these are zener diodes? i made a quick sketch in fritzing (attached) to draw out the circuit

kf2qd

Depending on the voltage the motor outputs -

Hook up one side of the motor to a voltage divider so the motor is at 2.5V, and connect the other to an analog input.

The analog pin will now read 512~ when not turning. a reading above 512 indicates rotation in one direction, and a reading less that 512 means rotation  in the other direction. Depending on how fast it can be rotated the voltage should stay within bounds. Might still want a cap to smooth out the signal to the analog input.

You want to use a high speed motor - in building Brushless motors for model planes they call this KV which is the constant for Volts per Thousand RPM. A motor with a lower KV will also produce more voltage at a lower RPM. rotating it by hand should not yield very high RPMs on the motor shaft.

Grumpy_Mike

Quote
and these are zener diodes

No just normal rectifier diodes.

Quote
so one lead from the motor goes into analog input and the other goes to ground?

Yes.

replay


Go Up