Digital Encoder Interfacing
blittled
Posts: 681
I'm setting up a Boe-Bot with a protoboard and was wondering if there was an object that interfaces with the Boe-Bot Digital Encoder. If not, is there a way to use CTRA/CTRB to count both the positive and negative edges of a pulse? That way I can get 16 counts per revolution. Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
What electronics need - MORE POWER!!!!!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
What electronics need - MORE POWER!!!!!!!
Comments
http://obex.parallax.com/objects/24/
Besides that -·how would counting the edges work?
First of all you have as many positive edges as negative edges (plus/minus 1) by nature of digital signals. But what about the direction? That's where counters can't help you i guess. You really have to analyse the signals for detecting the direction the encoder has been turned in.
I think there exist at least two types of encoders. The one type I found in a mouse I dissassembled (the mouse wheel) gives two signals where both change within one step but with a little timeshift. The encoder I bougth only changes one signal with one step. But for both the signal sequence·looks the same:
Post Edited (MagIO2) : 6/29/2009 12:22:29 PM GMT
agfa
"Rotary sensors with a single output are not encoders and cannot sense direction, but can sense RPM. They are thus called tachometer sensors."
And that's how I understood the word encoder. Ok ... boe-bot is only using a tacho and that can be done by a counter of course. At least one for the right wheel and one for the left. Counting positive AND negative edges increases accuracy. You can have a look at the Propeller App Notes AN001 - it shows how to set up the counters for edge count. Find it in the download section or the sticky.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
What electronics need - MORE POWER!!!!!!!