machine#designs_in_progess: CNC: encoders EncodersHomemade encoder designs, commercial encoder recommendations, salvaged encoder stories You can print an optical encoder disk on transparency film using an ordinary $100 laser printer. A two inch disk looks fine at 600dpi with up to around 256 lines. Kinkos has 1200dpi printers available for about $1 per page. I doubt photocopying an inkjet printout would work. a python script that uses the cairo library to draw an encoder in svg, pdf, or postscript. more straightforward and easier to understand than raw postscript. example output of draw_encoder.py: scan of one of the discs after being printed at 600 dpi: an experiment with making gray-code absolute encoders. unfortunately pukiwiki can't figure out how to give .ps files the right mime type, so you have to save this to disk and then open with a postscript viewer such as kghostview to see the pattern. open the file with a text editor to see the source code. if you line up two encoders, one with 359 lines and one with 360 lines, there will be a moire effect: an apparent change in light/dark that travels around the perimeter of the disc once per degree of relative rotation. this concept can be used to make a highly accurate encoder out of relatively normal materials such as two led's and two sensors placed around the disc. *CHEAP-ENC V1.0pseudo-random code absolute encoder Phydbleep hand-wrote this post-script file for a homemade optical semi-random tach/position encoder ring. Phydbleep: I added 3 sync rings (45, 90 and 180 degree) and a ring for a tach pickup.. The sheet has 720/360/180/and 90 division tach rings. Make sure the person on the printer knows WTH they are doing... Conversion to pdf is OK, but a trip into Photoshop at the standard 72x72 # Try importing it at 2450x2450 and it might work.. It might also eat all the memory and crash the machine.. The details on the fine detail... And why it's so important. Number the rings counting in.. 1 = PWM, 2= Tach, 3/4/5 are sync.. Read 1 @ 3 o-clock, Read 2 & 4 @ 12, Read 3 & 5 @ 6. The 128 pixel strip is actually reading the pwm code from the outer ring. You can read the shaft position from a cold powerup without jogging the shaft this way. I'm encoding the position right there and shooting it to a data aggregator @ 3Mbit/sec.. The encoder/aggregator will have .5 farad caps for brown-out protection. If the power dies, the machine will coast to a stop and the encoders/aggregator will have enough time to store current position/angle. Still to do.. Bonding the encoder to a transparent stabilizing substrate and mounting it to the shaft.. Links: more quadrature from mouse stuff |