![]() It always works when you measure it statically.on will be 5v and off will be <1v.but when I try to hook it up to the arduino pin, the interrupt trips as if it's counting diode noise or just static. I have tried commercial reflective IR sensor/led packages bounced off a white card attached to the motor shaft, I have tried a reed switch and a magnet that spins around once per revolution, and I have tried multiple IR break-beam approaches. I've literally been working for weeks trying to get an encoder to work. The motor is hooked up to the arduino through a monophonic audio cord and 3.5mm jack/plug as a connector and the encoder is hooked up using a separate stereo audio cord and plug as a connector. I'm not sure if it's electrical interference with the PWM or what. When tested with a voltmeter, the encoders always seem to work, however, when attempting to actually use them hooked up to the interrupt pin, they fail epicly. Everything is just completely noisy and impossible to debounce. I want to encode its rotation, so I have tried a string of different encoding schemes and nothing works. I have a gearhead motor about 2 feet from my arduino, that I'm driving with PWM. ![]() I have this application that is driving me bonkers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |