Close
0%
0%

Hybrid Disk Encoder

More than 100K CPR, lasercut, Arduino, cheap and easy to make, absolute position? Could it be? Yep.

Similar projects worth following
This encoder is based on the Haddington Dynamic Analog / Digital Hybrid encoders used on the Dexter robot arm:
https://github.com/HaddingtonDynamics/Dexter/wiki/Encoders
many of the goals of this project won't make sense without understanding it.

There are some changes:

- Laser cut: To avoid the need for correction in the FPGA, laser cut parts or PCBs vs 3D printing.

- Simple Electronics: NO FPGA! Just a Pi Pico (Arduino code, Uno is slower) PWM out through 15k resistors to 220uF gnd filter caps to LTE-4206 940nm IR emitters. ADC inputs from 1M trim pots (Bourn 3386 105) divider to ground with center tap to LTR-4206E to +3.3V rail.

- The analog reading is an "absolute" position in a slot. With Single Track Grey Codes we can find the slot

There is too much. See the project at:
https://github.com/JamesNewton/HybridDiskEncoder

  • An eye shaped mask for round eyes

    James Newton12/17/2024 at 22:53 0 comments

    If you hold up a card with a square cut into it in front of a wall before the setting sun, you get a square-shaped shadow on the wall. Now if you move the card away from the wall you might expect to get a fuzzy square, but what you actually get is a circle. The sun projects, its shape, a circle, through anything which is relatively small, held a distance from the backdrop. You can see that same circular shadow with a triangle or a rectangle or any other shape. There's a great Veritasium video about this. 

    But only if it's held a little distance from the wall. If you want a precise mask that is not fuzzy you have to hold it right against the wall.

    We want to pass a square-ish slot over a mask and get a sine wave. If the mask is a square, what we get is actually more like a triangle. If the mask is a circle we get something closer to a sine. But the actual correct shape to produce a sine wave when passing a rectangular slot over the mask, is the shape of a human eye.


    See the issue for the proof. 

    https://github.com/JamesNewton/HybridDiskEncoder/issues/3

    We are combining the sine and cosine waves to form a circle, plotting the cosine on the x-axis and the sine on the y-axis, then drawing a line from the current point on that plot to the center, and taking the angle of that line to calculate the motion from one-sided slot to the other. If the length of that line varies, the advancement of the angle will not be consistent. We need the plot to be as circular as possible to maintain that constant distance. And that means using the correct mask to produce a sine, and cosine, wave.

  • Decoding STGC Absolute Positions

    James Newton12/17/2024 at 06:45 0 comments

    Updated the STGC explorer to generate C code for the lookup of the reading back into a position, and moved it to github. 

    https://jamesnewton.github.io/massmind/techref/stgc_explorer.html

  • Working! Added Quadrature Decoding for tests

    James Newton12/17/2024 at 06:42 0 comments

    Working quite well. VERY sensitive to any motion, with good range. 

    I added quadrature decoding to the existing slots. Keep in mind, just because we read them analog, doesn't mean we can't read them digital as well. Works amazingly well. e.g. I haven't been able to get it to error by moving the joint at human speeds, which should be fine for a robot. https://github.com/JamesNewton/HybridDiskEncoder/commit/ff9be278474bbda9fe5d8952b3499ce4081b4d2c

  • 2nd track for Single Track Grey Code

    James Newton12/17/2024 at 06:39 0 comments

    Yes, yes, the CAD I'm using is :cough: Javascript. OpenJSCAD is like OpenSCAD but with a good language. Added code to make the disks (will generate STLs for printing or DXF for cutting, and I can make it do SVG as well if needed). I probably want to move the STGC track to reflective rather than trasmissive. We need the transmissive (slots) for the analog reading because it increases the bandwidth. But the STGC reading is just on / off, not analog, so reflective should work, and avoids the need to have a light source on one side and a sensor on the other.

    https://github.com/JamesNewton/HybridDiskEncoder/blob/master/stgc_wheel.jscad

    Image

  • IR LED under digital control, verified by cell phone.

    James Newton12/17/2024 at 06:32 0 comments

    Turns out my cell phone can see IR pretty well... Digital control of encoder LED brightness up and running.

    Image

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates