Skip navigation
Did some testing with my encoder concept.
0:00 / 0:20

Did some testing with my encoder concept.

TiManh

@Manh_Ti30122.5K followers

Visit on X
960 likesDownloadOriginal post

66,723 views

Did some testing with my encoder concept. Managed to get the output stable within about ±0.05° jitter (~11.8bit equivalent resolution). Definitely not comparable to industrial encoder, but considering the whole prototype cost around $20, I'm pretty happy with the result.

28 Comments

Comments from the original post on X (Twitter)

  • Engineering Randomness's profile picture

    @EERandomness

    The only difference between your design and "professional" encoders is probably in the firmware. There are dozens of control theory tricks you can use to improve the performance, like characterization, a "PLL", differential auto-gain, an estimator or even a Kalman filter. For magnetic sensors, estimating the axial and radial offset is very important, not just the rotation

    8 likes

  • TiManh's profile picture

    @Manh_Ti3012

    yeah, my firmware is still primitive and simple compare to industrial one thanks for the suggestion, I'll try to implement them and see.

    4 likes

  • Engineering Randomness's profile picture

    @EERandomness

    Prompt for Astra: "Build a real-time fixed point control loop for . It should implement a Kalman filter using the raw ADC values from each hall as input, and also use a pre-calibration LUT for phase and amplitude offsets. A second LUT should be used for stator magnetic field variation compensation. Calculate an auto-gain term based on the max/min hall value over 1 rotation closure. Finally, build an estimator that estimates the speed, angle and acceleration of the stator, compensating for offset, pitch, yaw and roll. At high speeds, use a PLL for accuracy."

    3 likes

  • David Hansen 🇺🇸 🇳🇿's profile picture

    @boxcardavid

    Engineers who’ve worked extensively with magnetic ring encoders

    7 likes

  • David Hansen 🇺🇸 🇳🇿's profile picture

    @boxcardavid

    Awesome. How sensitive is it to air gap changes?

    5 likes

  • Digitelektro's profile picture

    @digitelektro1

    Amazing! I could use it on my satellite dish rotator for position feedback!

    2 likes

  • Tony Fleury (Jackson)'s profile picture

    @tonyaajffleury

    This is awesome! What kind of magnet-sensor separation can this design tolerate, and what magnet size & grade are you using?

    2 likes

  • TiManh's profile picture

    @Manh_Ti3012

    I'm using random 4mm neodymium magnet I bought online. From my testing, as long as you have a strong magnetic field that cover at least 2 sensors at once, it will work.

    7 likes

  • J, 4%'s profile picture

    @J_B_N_P

    Cool. You could also use the concept used by digital calipers. Cheap and precise. Analog and SW might be a bit more challenging though

    1 like

  • TiManh's profile picture

    @Manh_Ti3012

    The problem with this is that they are capacitive and not absolute encoder, maybe need precise mounting too.

    2 likes

  • Bryan Varner's profile picture

    @VarnerRants

    considering some 10 bit encoders go for $32 in bulk quantity, closer to $50 in singles I'd say you're doing great here. Not to mention the 'customization' capable and ability to integrate it into the design rather than bolt on. Nice.

    1 like

  • CK🌻's profile picture

    @ck401uni

    すごい!

    1 like

  • Rivelino Domingo's profile picture

    @DomingoRivelino

    Meus parabéns amigo, um projeto desse facilmente pode ter N utilidades... Com as possibilidades e a tecnologia de hj podermos criar muitas coisas fantásticas, eu tbm tenho muitas ideias mais por hora fica só na parte de projeto mesmo

    1 like

  • Andrew Rabbitt's profile picture

    @GhostOfFrederic

    Cool! I still think variable capacitance rotary encoders are the GOAT. Like

    1 like

  • Stephan -All Input Is Error- Bökelmann's profile picture

    @MaxClerkwell

    This is absolute cool! Thank you for sharing!

    1 like

  • PCBBUY's profile picture

    @PcbBuy

    “Promising results for a $20 prototype! Have you tested how sensitive the readings are to slight misalignment between the PCB and rotor?😀

  • Henk Poley's profile picture

    @HenkPoley

    Is that 11.8 bit = `log(365/0.05)/log(2) - 1` ?

  • ganondorf's profile picture

    @sadieOX360

    The prototype look a bit too big , wht if tou you want to make one like this but of a total radius of 2-3cm ?

  • 𝛼's profile picture

    @deeperflows

    Really neat, well done

  • Sahil H's profile picture

    @sahil_harriram

    How are you calculating angle from the Hall array? Are you interpolating between the nearest sensors, fitting the magnetic field across the whole array or using some kind of calibrated lookup model?