Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: dingbatca on March 10, 2008, 02:25:05 PM

Title: Any one know how to build a cheap linear encoder?
Post by: dingbatca on March 10, 2008, 02:25:05 PM
Any one know how to build a cheap linear encoder?  Just looking for a simple cheap way to build up a linear encoder.  Ideas?
Title: Re: Any one know how to build a cheap linear encoder?
Post by: jimpinder on March 10, 2008, 03:59:36 PM
There are many ways to build a linear encoder - but if you are talking, as I am sure you are, of something that can measure movement to, say, half a thousanth of an inch, I would have thought it in the realms of "too hard" for the average person. I don't know how the ones I have seen even work, but I would imagine some sort of wire matrix laid along the measuring distance. The machinery to lay down such a thing to that accuracy must be specialised.

A simple way, (without me thinking too much) would be to have a "stepper" motor connected to the moving part, so that it rotates, and some sort of "computer" counting the pulses it gives out. If it were free running, as on some of these sepcialist "fifth wheel" measuring devices it would be accurate.

Another way would be a disc which spins as the part moves - with a number of slots in it - and , of course, some form, probably an optical, counter.

The best linear encoders I ever saw were on the coal mine winding gear at the local pit. This was a worm drive on the winding engine moving a marker. When this lined up with a chalk mark on the wall the "driver" knew the cage was accurately aligned. (There were two marks - one to wind with men in, and one to wind with coal tubs in - the latter stretched the cable further). The distance involved was between 200 and 500 meters. Most miners would only "travel" with a driver they knew.
Title: Re: Any one know how to build a cheap linear encoder?
Post by: cjmerlin on March 10, 2008, 04:16:12 PM
Hi, What resolution would you expect from a home made encoder perhaps 0.1mm at best.  Are you good at electronics?

If yes then 2 ideas could be,

Using a wheel and optical sensor on a computer mouse. You could print lines on a clear film and use the optical sensor with a bit of electronics.

Or you could hook the mouse wheel to a toothed cog with a toothed belt laid out flat.

Using the clear film idea will probably be the most accurate but you may need a laser printer to give the best result.

Or wait for an encoder to come up on e-bay.


Hope this helps
Title: Re: Any one know how to build a cheap linear encoder?
Post by: dingbatca on March 10, 2008, 04:33:48 PM
Looking for something around 0.2mm (0.01in), or better.   Not bad with electronics and can build up any basic circuit, and cut then needed PCB board.  How about using the sensor from an optical/laser mouse?
Title: Re: Any one know how to build a cheap linear encoder?
Post by: Whacko on March 10, 2008, 06:16:53 PM
Depends on the lenght. You can hack an inkjet printer. It has a high resolution film strip with lines and a sensor. But there is also a method to increase the accuracy of a home made linear encoder. But this will also be limited by lenght. Then you can use ferromagnetic strip from an old audio cassette, with spans of lenght. This can give you four channels. You need to pre record an accurate frequency on the tape, the whole lenght will give you about 500 meters. Then you can use the tape head with it's preamp for the signal. I've done this years ago to prove a pointless point to a hapless fellow!

W hacko...
Title: Re: Any one know how to build a cheap linear encoder?
Post by: dingbatca on March 10, 2008, 06:29:15 PM
Looking for a max distance of 48in.  So, I would have to hack apart a big printer/plotter.
Title: Re: Any one know how to build a cheap linear encoder?
Post by: Whacko on March 10, 2008, 06:32:37 PM
Why does it have to be linear?

Whacko
Title: Re: Any one know how to build a cheap linear encoder?
Post by: dingbatca on March 10, 2008, 06:42:36 PM
I am not fussy.  But, I know that my lead screws can shift a little and I miss steps.  So what ever I use, I would like it to be independent of the drive system.
http://www.batbuilds.com/~adam/cnc_rev5/wing/img_7156_resized.jpg
Title: Re: Any one know how to build a cheap linear encoder?
Post by: vmax549 on March 10, 2008, 10:04:37 PM
SO just attach the encoders on the lead screws?????  (;-) TP
Title: Re: Any one know how to build a cheap linear encoder?
Post by: Whacko on March 11, 2008, 12:22:54 AM
If you have play in the lead screw and you use servo drives with the loop closed in the drive, you must be carefull of resonant feedback using direct coupled encoders. This is because the play in the lead screw can account for some encoder counts which the motors do not have direct control of.
I suppose a walk through the local scrap dealer might yield something too. You'de be amazed at what people chuck! Lots of equipment use linear encoders, like plotters and automation equipment.
The link you provided don't look like a 48" application, the inkjet hack could work on that, or are you building an upscaled model?

Whacko
Title: Re: Any one know how to build a cheap linear encoder?
Post by: dingbatca on March 11, 2008, 03:44:59 AM
My CNC is stepper based. But that does not matter, I have play in the lead screws.  I can not attach the encoders to the lead screws as they will not pickup the play. So how about using encoders with a pulley on the far side of my CNC and a big cable loops that is mounted to the  cutting table? So when the table moves the mounted section goes with it, causing the loop to shift.  I just pick up the rotation count at one end.  I can use the brains out of a wheel mouse and a little bit of circuitry. What you think?
Title: Re: Any one know how to build a cheap linear encoder?
Post by: jimpinder on March 11, 2008, 04:11:34 AM
I think that would do the trick - a couple of pulleys one at either end, with a belt. Fix your "mouse counter" to one of the pulleys.
If you could somehow "spring" the mouse counter so that was actually turned by friction off the belt, you would get very good resolution.

My first thought was to just attach the mouse wheel to the spindle of one of the pulleys, but you woud then need small pulleys to get anything like the resolution you are looking for.

Carrying one from that - why do we need the pulleys - mount the "mouse" on the table and have it sprung onto a small track on the frame of the lathe/mill - either use a friction contact, or a length of fine toothed rack material which is available at most engineering outlets. In my catalogue this goes down to 1mm teeth spacing, I dont know how many slots in a mouse wheel, but that should give you the resolution you are looking for.
Title: Re: Any one know how to build a cheap linear encoder?
Post by: dingbatca on March 11, 2008, 04:20:51 AM
Well, I think I am going to go with that, regardless of belt or friction, the device is the same.  What does mach 3 want for inputs from an encoder?
Title: Re: Any one know how to build a cheap linear encoder?
Post by: BluePinnacle on March 11, 2008, 05:35:15 AM
1 - adjust out the play where you can
2 - If you're using mach3, use software backlash compensation.

Why not cut a spiral on an aluminium drum, fit a clock spring and a length of steel bowden cable to it and use linear motion to drive a rotary encoder? these can be had for comparatively little, compared to linear encoders at least.
Title: Re: Any one know how to build a cheap linear encoder?
Post by: rustyolddog on March 13, 2008, 11:48:29 AM
Why not some surplus rotary encoders with a rack & pinion configuration? Put a gear on the rotary encoder and mount it in a fixed position, attach a piece of gear rack to the table. SDP has anti backlash gears. Or you could simply put a pulley on the encoder, put a single loop of stainless fishing leader around the pulley and attach each end to the table. Think old radio dial. A sping in the system would keep tension on the wire to prevent slippage. The pulley diameter would determine your resolution. Elegantly simple.
Title: Re: Any one know how to build a cheap linear encoder?
Post by: BluePinnacle on March 13, 2008, 02:07:58 PM
i had some thoughts about the wire - it would be prone to expansion and creep if the temperature changed. I saw a heater with a length of wire as a thermostat today, it's not a new idea but it got me thinking. Of course if your workshop is blessed with a steady temperature you may well be ok. Best way is to try it out :)
Title: Re: Any one know how to build a cheap linear encoder?
Post by: Whacko on March 13, 2008, 06:53:12 PM
If you are in the states, check out www.usdigital.com , they have cheap encoders and you can buy online. They used to call themselves the 10$ encoder company. If you mount a rack with a small pitch and have a small pinion on the encoder you should get better than 0.1 mm resolution. The encoders are good and is used by a well known Canadian CNC controller manufacturer (Linatrol) on the Lynx controllers. I have sold quite a few (Then Mach3 came along) of these controllers with the said encoders, and they have been working for years without a problem.

Whacko encoded