Alternative to Wheel Encoder?
lardom
Posts: 1,659
I'm road-testing my IR controlled, 3-wheeled robot and I want to sync the wheels. The differentially steered DC motor robot curves toward the right when I pass matching values to the wheels. Two options I can think of are to install encoders or pass an offset value to one of the motors. I want to know if it is possible to sense current from a flyback diode even though I'm using a motor-driver IC.
I'd place a whisker on the wheels if necessary to detect RPM's. I only want the robot to track straight. It's not autonomous and I don't need precision so a simple solution would be great.
I'd place a whisker on the wheels if necessary to detect RPM's. I only want the robot to track straight. It's not autonomous and I don't need precision so a simple solution would be great.
Comments
small motors and balancing current / torque isn't going to cure that.
Also freewheel diode current sensing doesn't work for motors - DC motors
can be pretty resistive in nature (as well as inductive) and its the resistive
current that's most correlated with the load.
Sensing current ripple, however, might be useful as that would follow the armature
segments passing the field gap in the motor - however this isn't simple as noise
and unwanted signals would abound.
If you can use a hall sensor / magnet before the gearing then you'll get reasonable
resolution and a single pulse per motor revolution would be handy.
Encoders can still not sense wheel slip. If you just want straight, a 3rd wheel angle sense could help ?
I did a quick search, and find Amazon have Logitech PS/2 Optical Wheel Mouse @ 8.70
- seems cheap enough to consider for indoor surface tracking ?
Alex
Seriously, since the first editions I've tried to find good uses for PVDF film, and this sounds like a great one. I would think the "snap" is enough mechanically to produce a nice pulse. The integrating electronics (resistor, diode if you use one, etc.) are simple, and cost virtually nothing.
@Gordon - I would be honored!
@Larry - would this help you at all?
Steppers are easy to program. DC motors are tougher and brushless even tougher. I can think of a lot of uses for differential steering and I thought it was time for me to learn to control DC motors.
I thought about using a compass module but the documentation said it had to be level to stay accurate. That meant I needed an accelerometer. Angle sensing is a great idea.
The object uses 4 cogs and 5 counters. Now I'm wondering what it would take to include a camera and an arm!
It's the same problem.
Given two motors, same model and so on, their RPMs won't necessarily track equally given the same DC voltage or the same PWM.
One will have to be part of a PID loop.
Compasses, as well as beacons and other devices, are nice to correct for the natural unbounded error common in all wheel encoder systems. But encoders are the cheapest and easiest way to measure distance of travel, and therefore, approximate location within a space.
The most detailed thing I've ever read on this subject of odometry for ordinary folk with some parts way above my head... (available for free) is this Parallax Document on the BoeBot Encoders by Phil Pilgrim. Lots of good info...http://www.parallax.com/sites/default/files/downloads/28107-ApplyingEncoders-v1.0.pdf
I find it molto interessante that differential drive is the most popular robot configuration. Some advantages, some disadvantages. I've built them, as well as tricycle drive bots (one steered front drive wheel, two trailing free wheels) and I like both equally, depending on the application. The Heathkit HERO & Hero Jr robots used a rather poor incarnation of tricycle drive which never centered consistently, which was maddening. Properly done, it works well and you can get away with a single wheel encoder on tricycle drive (for distance), although you might opt to have a second encoder to read your steering angle.
You need encoders on both wheels of a diff drive bot just to go straight, and read them constantly while running a motor speed feedback loop anytime you are moving. The S2 makes it look easy.
Horses for courses.
Edit: A few interesting bots which deviate from my descriptions above:
Arobot, a 3-wheel bot with a single rear drive wheel (one encoder) and traditional Ackerman steering on the front two wheels. BS2-powered. I bought a used one off Craigslist. There is so much slop in the steering system that I never did much with it. http://www.arrickrobotics.com/arobot/
Big Trak, a 1980-era MB programmable robot toy tank with diff drive and a magnetic clutch which kept both wheels sync'ed to drive straight. Very cool & unique mechanism, worth having one in your collection to study. http://www.theoldrobots.com/smallbot6.html
http://en.wikipedia.org/wiki/Big_Trak
The motor module with clutches was commonly available at surplus outlets for many years after BT production stopped. Pity I wasn't a hoarder back then.
erco, I'm using DC gear motors. What's a CR servo?
Just as it should be! Your bot is looking great! Keep posting and asking good questions.
To be clear for the lurkers, RBB actually has only limited detail on encoders, due to the broad nature of the book. There's little source code, for example, and no math or PID examples. While it can get you started with the concepts, I'd recommend Parallax's white paper for further study. The new Parallax encoders are easily adaptable to the BOE Bot chassis or most other small robot, and Andy presents some nice code to go along with them, suitable for any robot based on a Prop.
Andy did a good writeup here:
http://forums.parallax.com/showthread.php/77656-PID-Control-Intro-with-the-BASIC-Stamp
It's for the Stamp, but basics are there.
http://www.parallax.com/sites/default/files/downloads/122-28176-Process-Control-Text-v1.0.pdf