Pages: [1]   Go Down
Author Topic: Testing to see if a shaft is turning  (Read 322 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I wonder if someone can offer a newbie some guidance here - I have a small DC motor connected to a shaft which has a black/white encoder disk and a simple IR emitter/detector - I want to use the signal from the IR pair to stop the motor if the shaft stops turning.  I've got the wiring sorted and have tried playing with the pulsein command and can see the signal but I can't think of the simplest way to link this to the motor kill?  Any help appreciated!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25802
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just check a timer periodically, if you haven't seen a disk transition in the period, trigger the kill.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Measure the voltage applied to the motor (analogRead() - resistor divider etc) .

OK you are not sure it is turning but it should be smiley
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: