Making your own encoders?
AGCB
Posts: 327
In the various messages I've read about using encoders, I'm unsure as to what kind of encoders people are using.
Are they Bourns or some other brand or are they home printed code wheels and some type of interrupter or reflective unit.
I've used all 3 but would like to know what most people most often use. This would be for a motor shaft or wheel mostly.
Thanks
Aaron
Are they Bourns or some other brand or are they home printed code wheels and some type of interrupter or reflective unit.
I've used all 3 but would like to know what most people most often use. This would be for a motor shaft or wheel mostly.
Thanks
Aaron
Comments
Home printing doesn't always work, especially when using dye-based inkjet inks. The ink doesn't absorb infrared light very well. Works better if you use laser printer toner, or better yet cut vinyl.
For very high resolution an external self-contained encoder is really the only way to go. For the brave with good shop experience, the optics and codewheels for these are available at a reasonable price from US. Digital.
http://en.wikipedia.org/wiki/Rotary_encoder
Thanks for the info Gordon, looked at their site: http://www.usdigital.com/products/encoders/incremental/rotary/disks/DISK-2
I'm planning on making my own encoders with hall-effect sensors. Just received 2mm diam x 1mm thick magnets and a motor with gear reduction. Plan to drill holes in the gear, insert magnets, position hall-effect on proto-board, then read the latched output. I know, I know, lotta work, huh? But fun.
Dom..
-Phil
That was very clever, PhiPi, one of my faves!
If the gears are iron based (you can check) you need only a Hall effect sensor and a magnet *behind* the sensor. This creates a flux that the sensor will read as the gear teeth roll by. Saves you from drilling out a gear and gluing on magnets. Worth checking if the gear is ferrite-based.
If the motor doesn't have enough reduction, you can add an additional stage using inexpensive metal and high strength plastic (and composite) gears. Traxxas and other makers of R/C parts have several to choose from, in standard pitches. To reduce weight the gears often have the holes already in them. You could use those for a nice optical encoder system.
OMG! That is so simple. A FIXED magnet causing a change in flux as the moving gear teeth cut through the magnetic field. I will definitely try that. I have several hall sensors: 45g, 95g, 150g, 260g, both latched and unlatched, to experiment with. They're the 3 pin TO-92 really flat 2mm thick package. My guess is the hall sensor would need to be pretty sensitive to pick up the gear teeth. It might be limited in position in order to work reliably. Since the sensors have a logic 1/0 the sensitivity is already fixed and I'd need to change position to determine the safe operating range.
Previously I did try to magnetize the gear but the field was weak and I was concerned the magnetism would diminish with time. So I bought 50 neodymium magnets for $4 instead. Drilled the gear with a 5/64" and the hole size came out to 2.00mm. Very nice. Note to self: use lots of high pressure air to blow away all filings before test fitting the magnets.
A while back I thought about using the teeth as part of an optical encoder but thought the grease might plug it up. However using your idea above with the fixed magnet, holes in the gear might make the change in flux more dramatic, ie more easily detected. Much fun ahead experimenting.
Thanks,
Dom..
ran across this from Pololu: http://www.pololu.com/product/2598 using some kinda magnet on the motor shaft.
Thanks,
Dom..
Those encoders online are out of my comfortable price range except for maybe a special project.
Thanks again
Aaron
http://www.ebay.com/itm/171122637698
paypal was telling me I just bought 20. . . So what am I supposed to do with 50 lasers, 20 solar panels, 25 IR detectors and, now, 20 rotary encoders. I believe erco spelled backwards is hoarder...:D Actually thanks for the hot ebay tips.
Dom..
Yes, JK...
@Dom - Welcome the Forums and being erco's latest victim. We've all ordered stuff that he put us on too!
I just sent $115 to your paypal account. That was that $1 per item wasn't it or, hmm let me re-read that? DARN!!!
1) It works
2) the hall-effect sensor must be perpendicular to the N-S field for maximum sensitivity
3) a 45 Gauss HE works fine. Using the 2mm neodymium magnets up to a distance of about 5mm works, but too close cause other problems
4) The 2 magnets must have poles opposite each other to flip the latched HE
5) A non-latched HE produces pulses, not a symmetrical waveform
6) Drilling the holes precisely opposite each other is important. Any offset will produce a corresponding non-symmetry in the encoder duty cycle
7) Putting the HE very close to the magnets causes random pulses within the duty cycle. Random pulses were also produced when touching the rough surface of the gear face
8) I couldn't find a spot on the gear perimeter close to the teeth that would produce a pulse even though the gear is ferromagnetic. Ferromagnetic gears will tend to hold on to the majority of the magnetic field. What's left over makes it to the HE.
9) The pickup is more sensitive on the top of the gear than the bottom due to the countersink shoulder absorbing more of the magnetic field
10) Probably, if the top of the magnet is flush or higher than the gear face, it will have more range
11) A non-ferromagnetic (like brass or plastic) gear will allow more of the magnetic field to escape and reach out further to the HE.
Photo 1. Drilled through with a 1/16" then countersunk with a 5/64". This gave me a perfect 2.00mm. Once the magnets were in two points near the top edge were peened to hold the magnet in-- no glue required. BTW I should have tested BOTH magnets with the HE for polarity Before inserting them. When it didn't work the first time with the HE, I had to pound out one magnet to flip it the other way.
Photo 2. I scribed the drill lines with an exacto knife and steel rule. Then marked the other points and measured the distance of each along the diameter to be sure they are equal, then used the tip of a jewelers file to create an indent. Be sure to 100% clean all filings off the gear and every nook and cranny-- these magnets will find every one you miss -- lots of compressed air works best. When taking the magnets out of the package I scratched the surface of both before inserting. Still got it wrong the first time.
Photo 3. This is the back of the gear showing the magnet up against the countersink shoulder. The drill press had chatter but once it started a hole the tip of the bit settle down to make a pretty accurate hole. The gear metal was surprisingly soft, like a cold rolled steel. That made it easier.
Photo 4. This was my test setup that allowed me to measure various HEs, at a variety of distances and orientations. I plan to file a slot in the bottom of the plastic housing and use a small protoPCB to mount the HE. The HE will slip through the slot, under the gear. The magnetics are not as strong on the back side. Plan B might be to use that brass gear instead to get a higher pulse rate. Currently the output shaft is 7rpm, the HE cycle time is 160ms, so the brass gear would have been a better choice.
If direction indication is needed I believe 2 HEs next to each other could feed a D latch. The output should tell you the direction.
I think this gives me enough hands on experience to select from a large variety of motors and put an encoder in it. The cost is minimal and gives me a much wider selection of form factors, built in gear reductions, torques, and operating voltages. An off the shelf motor with encoder runs about 5X to 10X more, however the quality is much higher than the typical motors I get off ebay from China.
Dom..
I keep hoping to replace the pots inside servos with some sort of encoder. I've got this to work reasonably well with some optical encoders but my attempt to place a 12-bit magnetic encoder inside a servo, it didn't work very well.
Erco got me hooked on Hamamatsu P5587 sensors but they're discontinued. I'd like to find a good replacement. I'm thinking something like the QRE1113 might work. I'd like to be able to make a PBC as small as the one shown in the photo below with a currently available sensor.
Parallax sells some nice motors with encoders.
I have four of these I plan to use with Mecanum wheels.
Pololu sells a bunch of different motors with encoders. I've used their 70:1 sets and I think they work great.
I usually buy this sort of stuff from Pololu on their Black Friday sale.
Many of the versions of Dagu's Rover 5 include encoders. I have a couple of Rover 5 based robots and IMO, the encoders on the Rover 5's I have work great.
Dom..
See http://www.ebay.com/itm/4-pcs-Hamamatsu-P5587-Photo-IC-output-digital-Photoreflector-reflective-Sensors-/151463583767?pt=LH_DefaultDomain_0&hash=item2343eee017
and http://www.junun.org/MarkIII/Info.jsp?item=48
Yea, but they're getting expensive. If I'm going to upgrade all the servos in a hexapod to use encoders rather than pots, then I need to find a reasonably priced sensor.