Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: abdulhafiz7794 on April 02, 2014, 01:08:56 PM

Title: how to work with MOC 7811 Encoder in arduino 2560 to control dc motor
Post by: abdulhafiz7794 on April 02, 2014, 01:08:56 PM
Hi all,
     I am trying to control the angle of rotation of dc motor using encoder. I have used the attachinterrupt function to get the input from the sensor, and the change in input is taken as count of the angle. The problem is its not detecting the input properly. while checking the input voltage of the sensor is around 0.79V.
please tell me what am i doing wrong, is there any other way to control?

Any kind of help is appreciated. Thanks.
Title: Re: how to work with MOC 7811 Encoder in arduino 2560 to control dc motor
Post by: jwatte on April 02, 2014, 07:42:41 PM
If the encoder only swings 0.79 volt, you will not get good readings from the Arduino that way.
Try conditioning the signal with a properly calibrated Schmitt trigger, perhaps?