Encoder Guidance
Hi All...
I'm reviving my 'bot, Orville. He was built with the MSR1 control board, the 7.2 volt motor and wheel kit and the big caster wheel. He was ==fast== but mostly uncontrollable, with the dings in the drywall to prove it.
Today's mail brought me a set of Pololu motors with built in quadrature encoders. These guys: http://www.pololu.com/catalog/product/1447. At 131:1 they are a little slower than I'd like, but I'd also like to have a little control over the beast.
Now, I have only the vaguest idea how encoders function and was wondering if someone could point me to a tutorial, how-to, etc... on making these things work?
Many thanks for any guidance!!!!
Amanda
I'm reviving my 'bot, Orville. He was built with the MSR1 control board, the 7.2 volt motor and wheel kit and the big caster wheel. He was ==fast== but mostly uncontrollable, with the dings in the drywall to prove it.
Today's mail brought me a set of Pololu motors with built in quadrature encoders. These guys: http://www.pololu.com/catalog/product/1447. At 131:1 they are a little slower than I'd like, but I'd also like to have a little control over the beast.
Now, I have only the vaguest idea how encoders function and was wondering if someone could point me to a tutorial, how-to, etc... on making these things work?
Many thanks for any guidance!!!!
Amanda
Comments
http://www.ni.com/white-paper/7109/en
http://letsmakerobots.com/node/24031
http://www.robotoid.com/appnotes/circuits-quad-encoding.html
I figure if I bury you with lots of technical QE reading, you'll have less time to surf Ebay and beat erco's lowest price postings. You're beating me at my own game!
I set up the motors this morning, running each motor on 6 volts and the hall sensors on 6 to 12 volts. On the 'scope, I got the two out of phase square waves at 5 volts.
The next step is connecting the hall sensor outputs to the propeller, but I'm unsure of how to interface the 5 volt signal to the prop input pins.
(The output of the sensors was 5v regardless of Vin) <-Hmmm, that shouldn't be right. More experimentation is needed!
Ah... I initially used a Homework board to power the Hall sensors and was one pin off. Was supplying the sensors with Vdd instead of Vin. Arghhhhhh!
Experimenting, I found i can use a 19k pulldown resistor to get to 3.0 volts. Is this sufficient or should I look at something more elaborate?
Thanks for any advice.
Amanda
http://forums.parallax.com/showthread.php?118906-Stingray-Motor-Shaft-Encoders&highlight=stingray+encoder
Robert
Good information. I "think" I saw the thread before, but never dug into it. Spent a couple of hours looking at the code and have a better idea of how the encoders work.
My stumbling block before was thinking the motor/encoder worked like a servo. DOH!
I should finish up the mechanical bits this morning and hope to have Orville moving under his own power later in the day.
Had Orville running just a bit ago with power directly to the motors. Pretty slow, but I'm running both motors from a tired 6v battery pack. Traversed the living-room carpet in a (mostly) straight line. I like the lower speed... I don't have to run to catch him before he runs into something.
Thanks again,
Amanda
I have Orville all wired up and rechecked "several" times. I'm using Ray Tracy's Poly-1 code from the link above, however I can't get to work. The issue seems to be the encoder pulse train is running at about 1.5 volts which is below the Prop's threshold.
If I run the bare motor/encoder at 5v, I get a 5v square wave out. When I connect the encoder outputs to the Prop pins, the square wave drops to 1.5 volts. If I connect the encoders to an external supply at about 8 volts, the square wave goes to a little over 2 volts and the code starts to work. Can the Prop pin drop that much voltage? Am I missing something in the way I'm connecting the encoders? (I'm connection the outputs directly to pins 8-11)
Thanks again for any advice!
Amanda
Forgot: Running the board from a 9.6 volt battery pack. The 5v source from the MSR1 ports runs from about 4.98 to 5.03.
In the past when I have ran into these kind of problem's of my device not being able to supply the current needed to force the translator's from output to input, I have bypassed them for which the MSR1 has provision's for. When they are bypassed I would use a series resistor from the 5v device to the Propeller.
Not that I am recommending this but it is another way to use your encoder's with the MSR1.
After some measuring, tweaking, more measuring and more tweaking and maybe a bit of coarse language, I have Orville moving, albeit not quite the way I want. Programming a six-sided figure results in a "square" with 90 degree angles and 6 legs... a square and a half, if you will. BUT!!! The MSR1 is reading the encoders! I just need to twiddle with the constants.
After looking at the waveforms, I decided to power the encoders from Vin, the 9.6v battery potential. If I go up to the motor's rated 12 volts, I may need to look at pull down resistors.
Back to the laboratory!
Amanda