-
An eye shaped mask for round eyes
12/17/2024 at 22:53 • 0 commentsIf 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
12/17/2024 at 06:45 • 0 commentsUpdated 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
12/17/2024 at 06:42 • 0 commentsWorking 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
12/17/2024 at 06:39 • 0 commentsYes, 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
-
IR LED under digital control, verified by cell phone.
12/17/2024 at 06:32 • 0 commentsTurns out my cell phone can see IR pretty well... Digital control of encoder LED brightness up and running.