quadrature encoders
gregg A
Posts: 2
Can anyone tell me how to read a quadrature encoder using a BS2?
I cant find a program that works.
I cant find a program that works.
Comments
http://www.seattlerobotics.org/encoder/200311/johnson/Mousebot.html· mousebot
http://www.sxlist.com/techref/io/sensor/pos/enc/quadrature.htm
http://en.wikipedia.org/wiki/Rotary_encoder
http://www.mcmanis.com/chuck/robotics/projects/lab-x3/quadratrak.html
http://zone.ni.com/devzone/cda/tut/p/id/7109· good info
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
www.emesys.com/BS2fsm.htm#twobit
Note that the BASIC Stamp is relatively slow in executing instructions, so it only works for encoders that are moved slowly. The processor has to be fast enough to detect every single state transition.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I ended up using an absolute encoder from usdigital.com.· It works good, but you need an ADC chip to read the voltage (it varies from 0-5volts).· If you get an absolute encoder, I can share my code for tracking it and measuring rollovers (counts).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Keep buying replacement parts and sooner or later you will get it RIGHT!
"DrumCnt" is the number of rotations, and "DrumPos" is the relative position.· I degraded the value to get a range of 0-60.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Keep buying replacement parts and sooner or later you will get it RIGHT!
Robert
lots of good info responses to my question.
"Don't they make dedicated chips for this purpose too?"
Years ago it was not uncommon to see an arrangement·using a 74HC73 (Dual J-K Flip-Flop) and a couple of 4040B's (12-Bit Ripple Counter)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."