Magnetic rotary encoder vs stepper motor accuracy

Поділитися
Вставка
  • Опубліковано 23 вер 2024
  • Testing some AS5600 magnetic encoders to see how accurate they are by rotating a magnet in front of them using stepper motors. The sensors are quite precise, but getting that magnet centered enough to get accurate readings is difficult. Yet at the same time, the magnetic encoder was able to measure step and microstep angle erros of the stepper motor.
    Also showing how to interface the AS5600 to a Raspberry Pi. More on that on my github:
    github.com/Mat...

КОМЕНТАРІ • 343

  • @osmia
    @osmia 6 місяців тому +578

    Luvvin how you're introducing the Lego for more accuracy

    • @Koushakur
      @Koushakur 6 місяців тому +45

      There's some legit engineering that goes into Lego, that they're able to mass-produce them to the very precise measurements required to lock into each other reliably is seriously impressive

    • @LazloNQ
      @LazloNQ 6 місяців тому +7

      Back in the 1980s he built a working Lego engine.

    • @ZeedijkMike
      @ZeedijkMike 6 місяців тому +5

      I only have one word "Danish Quality" - Oh wait that was two words, but I stand by them 🙂

    • @leonordin3052
      @leonordin3052 5 місяців тому +2

      Can you measure some lego for me? With micrometer❤?​@@Koushakur

    • @wobblysauce
      @wobblysauce 5 місяців тому +2

      The great thing about it, the uniform parts.

  • @lukahrastovec5022
    @lukahrastovec5022 6 місяців тому +329

    I work for RLS, where we design and manufacture high-resolution magnetic encoders. It seems you're heading in the right direction, but what you need to do is perform FFT analysis over the accuracy plot. This will reveal the harmonic components of your signal (accuracy). The DC component will represent the offset (+ latency) between your reference and the DUT (encoder). The first harmonic represents the eccentricity of the magnet, and so on...

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  6 місяців тому +85

      yes, fft would have been nice, would have a few low frequency peaks for eccentricity and manetic encoder errors and some high frequency peaks for step and microstep errors. But just showing it in time domain, I think, is more helpful for unerstanding.

    • @Peter_Enis
      @Peter_Enis 6 місяців тому +7

      Does the sending of the data induce a magnetic field as wel (radiosignal)?? Would utp-cable be more stable?

    • @ericwazhung
      @ericwazhung 6 місяців тому +12

      ​@@matthiasrandomstuff2221"unerstanding" may be my new favorite word... essentially "removal of error in one's [prior] understanding."
      Great work, here, with this vid, and so many others. I hope they bring much unerstanding to this world.

    • @lvb3575
      @lvb3575 6 місяців тому +2

      Why are the RLS linear position sensors so expensive :( I am building a core-less linear actuator at home but I need position sensing to correctly commutate the currents. But the price of the linear incremental encoders are quite high haha

    • @lukahrastovec5022
      @lukahrastovec5022 6 місяців тому +5

      @@Peter_Enis Induced magnetic fields are way too small. The magnet was probably 4×4mm, and the magnetic field of the magnet is approximately 100mT.

  • @nokbeen3654
    @nokbeen3654 5 місяців тому +143

    Matthias is a true scientist. Creates hypothesis, experiments, learns and writes it down. He’s even enjoying being wrong in his theories, because that enables him to learn more!
    Oh how I love that he’s gone from excellent wood worker, to science and research, just to become even better at woodworking!

    • @thomasrussell4674
      @thomasrussell4674 5 місяців тому

      That's science! Beautiful process!

    • @danamyrocket
      @danamyrocket 5 місяців тому +7

      He’s a true engineer. He is can use the principles of science to expand his knowledge and understanding. Engineers take those principles and apply them to to the identification, definition, and characterization of problems, synthesize potential alternative solutions, apply scientific analysis to select the optimal solution, apply best practices in the detailed design, planning, implementation, sustainment, and eventual decommissioning of solutions.
      To borrow and adapt an expression used by every non-commissioned military officer ever:
      “Do NOT call me a scientist goddamnit! I’m an engineer. I WORK for a living!”

    • @MucaroBoricua
      @MucaroBoricua 5 місяців тому +3

      He's an engineer.

  • @waxyjim
    @waxyjim 6 місяців тому +60

    If this guy was my teacher in high school I would’ve focused on Computer Science and done a Masters. Amazing content and execution. Thank you.

    • @sdspivey
      @sdspivey 6 місяців тому +7

      It isn't too late.

    • @fifty-plus
      @fifty-plus 5 місяців тому +6

      You don't need a degree to work in computer science.

    • @xuan5306
      @xuan5306 5 місяців тому

      no, you will be addicted in wood working instead:)

    • @youtubelisk
      @youtubelisk 5 місяців тому +1

      If it wouldn't rain as much, I would run more and be in better shape.

    • @TP-hc4qi
      @TP-hc4qi 5 місяців тому +2

      I think he's inspiring more engineers than computer scientists.

  • @KerryBenton
    @KerryBenton 6 місяців тому +38

    Love it. Anytime Lego can be used for (relatively) high precision tooling in a benchtop environment, it makes me happy.

    • @harrytsang1501
      @harrytsang1501 5 місяців тому +3

      I have even used it for silicone casting because you can take away the box piece by piece without destroying the workpiece

  • @MrBacanudo
    @MrBacanudo 5 місяців тому +32

    The error graphs from 2:55 and forward are just textbook encoder eccentricity examples, usually caused by misalignments between encoder and target.
    As many pointed out, the center of magnetic encoders are sometimes not in the chip's center. A decent PCB design might fix that by putting the magnetic center at the center of the PCB, instead of just aligning the chip's center.
    But, even then, due to manufacturing tolerances in the entire chain, you may end up with eccentricity. Thankfully, this can be removed by software through calibration. Many of these magnetic encoders come with a built-in function that you can trigger, but not necessarily all. One possibility is doing your own calibration on the controller side, as eccentricity errors have fairly low frequency, compared to microstepping and cogging errors.
    Ben Katz has a very good blog post on doing such a calibration, though for BLDCs that will run FOC. For steppers, you'd essentially just have to low-pass filter your eccentricity graph, and apply it to your measurement through a lookup table.
    (That would be where running the FFT on that plotted data would help, as the employee from RLS cited: it would help you determine a good cutoff frequency for the filter. Also, because the motor is periodic, you don't need a windowing function, and there should be zero spectral leakage. Perfect FFTs are my jam!)

    • @jaro6985
      @jaro6985 5 місяців тому +2

      In this case the sensor center is the IC center. edit: some are some aren't.

    • @OleBrouer
      @OleBrouer 5 місяців тому

      @@jaro6985I’m pretty sure it’s not in the center. I own multiple AS5600L (same chip and form factor but you can change the I2C address) and after designing my own PCB for it and thus really studying the technical documentation I can with certainty say that those don’t have the center of the sensor in the center of the IC (which is really annoying and unnecessary). It’s off by roughly 0.16mm

    • @jaro6985
      @jaro6985 5 місяців тому +2

      @@OleBrouer you are correct for AS5600 but not for AS5047. 5600 is offset by 0.172mm. thanks for that.

  • @kenmercer2721
    @kenmercer2721 5 місяців тому +19

    I have checked a micro stepping stepper motor by attaching a laser pointer and drawing dots on a wall. The accuracy is affected by the linearity of the DAC's in the driver (probably very good) and the linearity of the magnetic fields which is probably related to the shape of the stepper motor's "teeth" (probably not so good).
    As a toolmaker in a past life and, more recently, an electronics engineer, I'd be using a dividing head to make gears, with a stepper motor to drive it.
    Love your stuff, particularly your systematic approach!

  • @Aeidotronics
    @Aeidotronics 6 місяців тому +28

    You had me at LEGO. Oh wait, that was the end.

  • @Clark-Mills
    @Clark-Mills 6 місяців тому +21

    Fun presentation and coffee points for the lego finale! :)

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  6 місяців тому +20

      Thank you!
      I don't drink cofee, but lets just say that pays for another one or two of those sensors.

  • @oBuLLzEyEo1013
    @oBuLLzEyEo1013 6 місяців тому +103

    I just like to witness genius...

    • @r1m.dog78
      @r1m.dog78 6 місяців тому +5

      Anyone who thinks logically and has the desire to learn can do everything (and more) shown in this video.

    • @BruceChastain
      @BruceChastain 6 місяців тому

      I think the same thing

    • @oBuLLzEyEo1013
      @oBuLLzEyEo1013 5 місяців тому

      @@r1m.dog78 I have very severe Dyslexia and Dyscalculia. It ain't happening...

    • @adacovsk
      @adacovsk 5 місяців тому

      just an engineer

    • @BruceChastain
      @BruceChastain 5 місяців тому +3

      @@adacovskthat is true, but I've worked with engineers my whole career and I think he's very very good engineer.

  • @Spiderelectron
    @Spiderelectron 6 місяців тому +23

    Those magnetic sensors are really good. Depending on the exact part number, you can also use them to emulate a quadrature encoder, and at start-up it will output exactly the right number of pulses for the starting position.

  • @solocupp6120
    @solocupp6120 5 місяців тому +17

    Get this man a 3d printer!

  • @steveminard6441
    @steveminard6441 6 місяців тому +14

    I ran across this same issue. We were driving a furnace loader with a stepper motor and battling with resonance. It turned out that the stepper motor position was not linear when micro-stepped. Our drive used two ROMs, one for cosine and one for sine to control the current going to each phase of the stepper motor. I created an adjusted version to correct the error. The motors ran smoother but the first step away from the pole was not very predictable. I only corrected for position under no load, we planned to also adjust detent torque, but ran out of time.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +10

      maybe its a good thing I can't tweak the microstep ramps in the controllers I have. That would be endless futzing around!

    • @GeekDetour
      @GeekDetour 5 місяців тому +2

      That’s exactly right: microstepping is a “guess”. The only really trustable position is on full steps. I read a few articles about the drivers that allow for microstepping calibration table, they point that when the load changes, the response curve from the motor is affected.

  • @69dblcab
    @69dblcab 6 місяців тому +2

    Matthias as a compliment. "you are too smart" Thank you for sharing your world with us. I miss your previous location and adventures, but life moves ever forward.

  • @LikeFactoryMade
    @LikeFactoryMade 6 місяців тому +4

    Daaamn, you are good. I wish so much I'd have time to learn so much stuff as you know.
    I've been a subscriber for over 10 years now and I am still impressed by how wide your knowledge is.

  • @ivprojects8143
    @ivprojects8143 5 місяців тому +7

    I really like those AS5600 encoders and have used them in a lot of my projects. Like you noticed, the alignment of the magnet matters a lot. Also, the distance from the magnet to the chip matters. If I remember correctly the spec sheet calls out a distance of 0.5mm from the magnet to the top of the IC package. Great video!

    • @cooperised
      @cooperised 5 місяців тому +4

      Yes, I came here to point this out - the correct positioning is not in the centre of the IC.

    • @jaro6985
      @jaro6985 5 місяців тому +1

      @@cooperised the correct positioning is the center of the IC. Airgap depends on magnet strength and size.

    • @cooperised
      @cooperised 5 місяців тому +1

      @@jaro6985 Absolutely not universally true, though it may be for some devices of course. Check the datasheet for the specific device you're using. Some are marked with a dot to show the optimal centre of rotation.

  • @nathaniellangston5130
    @nathaniellangston5130 4 місяці тому +1

    This is a really great video, I have magnetic encoders built into the Odrive but I've always stuck to the CUI AMT212B encoders because I've been skeptical of magnetic encoders in VERY high precision applications I typically mess with them at. But this video actually shows a really great example of I think quite reasonable achievable accuracy given very high concentricity between the encoder and magnet. I very much like the way you visualized the encoder values in the rotary configuration as well as the linear application. Fantastic!

  • @teenflon
    @teenflon 6 місяців тому +10

    I learn much more from you than my engineering professor! 🤣

  • @RoyvanLierop
    @RoyvanLierop 5 місяців тому

    Car manufacturers use magnetic angle sensors to determine wheel angle rotation. They have a main gear and some smaller satellite gears which are being measured. By choosing a smart divider between those gears one can use Verniers principle to calculate multiple rotations with the accuracy of the smallest gear.

  • @eh42
    @eh42 6 місяців тому +6

    Never too old to 'play' with Lego. Love it!

  • @willjackson6407
    @willjackson6407 5 місяців тому +3

    This is really interesting and nicely visualised 😊

  • @galacticdragon9841
    @galacticdragon9841 5 місяців тому +10

    I have worked with these encoders in FRC, and when you use a precisely machined part, you can get about a half a tenth of a degree of error but when they are even just 2-3 mms off, their accuracy goes down so much they aren’t worth using at all. The distance of the magnet to the encoder also matters to the mm. I bet if you had a lathe and made a shaft for the magnet to go into and attach it to a motor, you would have way more accuracy to less than a tenth of a degree.

    • @RhysMogg
      @RhysMogg 5 місяців тому +4

      It's a 12 bit encoder. It's resolution is only 0.09 degrees, so you're not going to get better than that.

  • @noonespecial9131
    @noonespecial9131 6 місяців тому +40

    The lego build is hilarious 😂

  • @raffy141
    @raffy141 4 місяці тому

    This is actually also really neat to find good stepper motors for 3D printers with more accuracy.

  • @RickRolling-tc7vb
    @RickRolling-tc7vb 6 місяців тому +3

    The lego had me laughing, thank you! Good stuff once again; now I have to go and see what Scott was doing. Good luck with your gear cutting, I have faith in your ability to work it out.

  • @1kreature
    @1kreature 5 місяців тому +3

    A heavy flywheel and some bearings and drive the magnet around this way. Then you can let it coast slowly to a halt and look at the noise from the magnetic encoder itself seeing how you reduce the other noise to bearing rumble and inertia.

  • @noahwinslow3252
    @noahwinslow3252 5 місяців тому +1

    I appreciate that all your graphics are ascii :D

  • @johnwalker1471
    @johnwalker1471 5 місяців тому +3

    I get similar results in my tests. The magnetic position vs step position is good up to about 800 s/rev. Another source of error is the drivers, with different varieties having different microstepping accuracy. I was going to do a test of stepper vs magnetic and optical encoders. That fell apart when I took the back off a $10 aliexpress optical encoder. It wasn’t an optical encoder at all but was a magnetic encoder.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +1

      it would be hard to make an optical encoder with enough resolution to test microstep accuracy

    • @johnwalker1471
      @johnwalker1471 5 місяців тому +2

      The encoder I have is 600 ppr or 2400 Quadrature transitions. I have it geared up about 4:1 so close to 10000 quadrature transitions per stepper revolution. I put the project aside when I found out it was magnetic.

    • @sircompo
      @sircompo 5 місяців тому

      Just checked an optical rotary encoder I purchased from AliExpress recently. Things weren't looking good when I realised it didn't actually say "optical" on the device or packaging, but was relieved to find it did actually use an optical mechanism, and even had an O-ring sealing the casing.
      Hopefully I didn't introduce any dust in the couple of seconds it took for me to peek inside.

    • @johnwalker1471
      @johnwalker1471 5 місяців тому

      @@sircompoDo you have a link for your encoder?

  • @Don.Challenger
    @Don.Challenger 5 місяців тому +1

    Jeez, Matthias, that's getting to be real fun (shh, and educational).

  • @AdamEarl2
    @AdamEarl2 5 місяців тому +2

    At my work we make precision gears, and work in the sub-micron range for some tolerances. Every fraction of error matters!!

  • @mingyangpan7822
    @mingyangpan7822 4 місяці тому

    used as5600 for my final uni project. 3d printed a bracket to mount it nicely on the back of stepper, and used a kaman filter for any measurement noises. works pretty nice

  • @SuperDavidEF
    @SuperDavidEF 5 місяців тому +2

    If you're getting 0.3 degrees of error, would a gear reduction help with that? Like, turn the stepper motor 10 steps to get a single step on the other end of the reduction. Would that give you a 0.03 degree error on the other end?

  • @xymaryai8283
    @xymaryai8283 6 місяців тому +1

    more of this! its very responsive, would love to see it keep up in a high speed control loop scenario

  • @clockworkspiral
    @clockworkspiral 5 місяців тому

    oh, yeah, these hall effect sensors are quite impressive; we deal with quite a few arcade games which use magnetic encoders for sensing analog inputs in place of potentiometers and you can almost always notice immediately because of how much more stable and precise the inputs are
    only issue with those tends to come when the magnet is mounted strangely or somehow gets rotated off from whatever axis it was placed in as a reference direction, because measuring something like up or down gets harder when the magnet you expect to be exactly level in exactly one direction gets spun 120 degrees out of axis :P

  • @kasuha
    @kasuha 5 місяців тому +2

    Funny how you switched from measuring accuracy of that detector using your stepper motor to measuring accuracy of your stepper motor using that detector.

  • @remberto2008
    @remberto2008 5 місяців тому

    if you are planning on cutting gears, then using a stepper motor to drive a turn table is a good solution. Turn tables have a significant gear reduction (worm gear) commonly 90:1. So the actual angle error of the turn table would improve the accuracy of 0.3 degrees on the stepper to 0.3/90 deg, Your program would need to keep track of the actual number of turns as well as steps of the stepper motor, as well as the gear ratio of the turn table.
    If your plan was to cut gears with out a turn table you may also run into hold in place issues, unless you have a very strong motor.

  • @csomyy
    @csomyy 5 місяців тому

    No words! Matthias is just as good as ever! True scientist!

  • @LarsSveen
    @LarsSveen 6 місяців тому +5

    Glad to hear someone saying "eye squared see" instead of "eye two see" -- that drives me nuts.

  • @GeekDetour
    @GeekDetour 5 місяців тому

    VERY cool video! Yeah - most people assume microstepping goes perfectly. It is not linear. You can only trust the correct position of full steps. What happens between full steps varies a lot between each motor. I read that Trinamic has more expensive drivers that allow you to calibrate a microstepping curve… but I never had one to play with.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +1

      Half steps are also accurate, but anything in between might be off.

    • @kalinkaata
      @kalinkaata 5 місяців тому

      @@matthiasrandomstuff2221 I suggest you check this encoder > MPS MA630. It has an internal memory for calibration data, but you can achieve more accurate positioning with chepaer magnetic encoders too (MA302) , if you calibrate them and record calibration data into memory. Calibration involves very slow rotation of the shaft in microstep mode ( to allow settling down between steps ), and recording the difference between commanded position vs. encoder readout. Then compensate for that during your control loop. Also, when powering on a stepper, it will be in unknown position that may be anywhere between two poles, so you should energize the windings first to lock the rotor in a fixed position before starting any calibration. Othervise you will have random offset to your data ranging +- half step. Very high accuracy can be achieved with this method.

  • @ChristopherMcAvaney
    @ChristopherMcAvaney 5 місяців тому

    So cool. I love how you use ASCII graphics to represent the data.

  • @LoialOtter
    @LoialOtter 4 місяці тому

    The big thing is if the error is repeatable or not and where you're accurate sensing is from. If you can use both a magnetic sensor and incremental encoder on the same motor you can use one to calibrate the other and remove any of the repeatable errors. This is one of the ways we're dealing with position errors found in resolvers at work.
    Also, you should try tuning your drive current and take note of how much it affects your microstepping position accuracy. I expect there's a certain amount of offsets within each full step and the quality of the stepper as well as how well the current is tuned for said motor will make a difference.

  • @umutk5614
    @umutk5614 5 місяців тому

    Thank you for this amazing video Matthias. I enjoyed every moment and gave me lots of ideas.

  • @iamtimsson
    @iamtimsson 5 місяців тому +1

    bro
    brilliant
    your knowledge an applications of graphs and console programs is beautiful

  • @alucard87
    @alucard87 6 місяців тому +5

    now i want to do a project with magnets and hall effect encoders

  • @Zeksait
    @Zeksait 2 місяці тому

    I really like the process of learning and the way you think. I want the same

  • @pdk7415
    @pdk7415 5 місяців тому

    “Why don’t just plot that on a cartisian plane sort of as a vector”, exactly what I was thinking while watching this video sitting on my toilet

  • @ChaotikmindSrc
    @ChaotikmindSrc 5 місяців тому +2

    Without taking into account the positioning of the magnet or sensor, there is another variable here,
    the stepper drivers are really not that accurate as you may think, they tends to have deviation from the ideal position,
    in my field of work we do much higher microstepping that on these drivers (let's call it "continuous" microstepping), then, in the calibration phase, correction are made for each microstepping step, to verify the angle is actually right, once that is done, you ensure a VERY precise angle for the voltages provided to the coils.
    You just ends up with a big voltage correction table that smooth it all.
    Problem is here to have a very precise reference, but even without an ideal one, you can still improve the system.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +2

      my whole point was that micrstepping of the drivers isn’t accurately matched to the motor characteristics

    • @ChaotikmindSrc
      @ChaotikmindSrc 5 місяців тому

      @@matthiasrandomstuff2221Right, and even if that was the case, each stepper from the same manufacturer is slightly different.
      For example each DC motor we use, from very reputable sources, are recalibrated in house, same issue

  • @mvadu
    @mvadu 6 місяців тому

    I have one of those encoder boards in post. I now know how to get started. Thank you Mathias!

  • @aljaz55
    @aljaz55 5 місяців тому +1

    Encoder designer here :) It is funny to watch using stepper motor as a reference for the encoder performance measurement. Right here you created the chicken & egg problem. TBH, your measurement of +/- 0.15 deg of error are quite spot on for a regular magnetic encoder or big stepper motor. Good job. Let me know if you need some other encoder types to continue playing with this technology :)

  • @hellNo116
    @hellNo116 5 місяців тому

    I always forget how accurate are Legos. That last demo was my favourite just for that

  • @justRD1
    @justRD1 5 місяців тому

    If you introduce a gearbox between your stepper motor and rotary table you can reduce the micro stepping error to a value in arcseconds. My tilting rotary table has a 90:1 gearbox on it.

  • @akaHarvesteR
    @akaHarvesteR 5 місяців тому

    This is amazing stuff! Btw, I think you could still manage to do a dividing head with one, if you gear it down enough so the motor is doing more steps per degree on the head.
    Ofc, that adds in backlash, but as long as you end every move to a new position with a move in one fixed direction, it should cancel out.
    You'd also need a way to lock the head after moves... Really what I'm saying is that I'd love to watch a build video of you doing that 😉

  • @KingJellyfishII
    @KingJellyfishII 5 місяців тому

    I love your custom wooden parts for things like this. reminds me of before i had a 3D printer, I'd also carve little parts out of wood. very cool but also very time consuming

  • @philipashmore
    @philipashmore 5 місяців тому

    Fun stuff! You also have to consider the distance between the magnet and the encoder. There's a sweet spot where the sensitivity is best.

  • @analoghardwaretops3976
    @analoghardwaretops3976 5 місяців тому +2

    Even the mounted magnet one can see the magnet wobble in the holder mounted on the shaft......
    ideally even the motor shaft when in rotation is machined with a fine cut for "truness" before mounting the magnet holder.....similarly the holder is then machined..lastly the magnet is mounted...
    This is normally the setup procedure for extremely accurate alignments...
    Make sure of a really good fit (mating) btwn. shaft & hole & not an interference type fit...magnet face must also run true else it may contribute to errors due to magnetic field strength variation 😊

  • @sodium.carbide
    @sodium.carbide 6 місяців тому

    watching thru the years, and seeing some evolution.. awesome..

  • @benliebhaber7099
    @benliebhaber7099 5 місяців тому

    Blown away by Mattias yet again .. 🤯

  • @artursmihelsons415
    @artursmihelsons415 6 місяців тому

    Excellent video video and great sensor tests! Looks like these sensors can be used in lots of different projects..

  • @phrozenwun
    @phrozenwun 6 місяців тому

    Just put an additional angular encoder on a worm-drive or other low backlash gear reduction attached to the rotary divider. The primary encoder gives absolute orientation, the other gives high precision relative angular values. Just a thought to help feed the algorithm.

  • @davros517
    @davros517 5 місяців тому

    I've been watching him for years and apart from his woodwork stuff I do no understand a word that he say's..........and that's honesty !

  • @Peter-898
    @Peter-898 5 місяців тому +1

    Great video! I'd be curious to see what your results are with higher quality magnetic encoders like the AS5047P or MT6701. The AS5600 is kind of the runt of magnetic encoders, its meant to be a replacement for analog potentiometers instead of an encoder for control applications. It also has effectively 10 bit resolution instead of the claimed 12 bit resolution if you factor in the noise from it, but other sensors intended for motor control can have much higher resolutions and tend to perform much better in dynamic applications, as people from the SimpleFOC library community have found.

  • @ra-medadrianreinhard6057
    @ra-medadrianreinhard6057 5 місяців тому +1

    Nic z tego nie rozumiem ale uwielbiam oglądać Twoje filmy 😊

  • @kmcrafting4837
    @kmcrafting4837 6 місяців тому +1

    Makerbase makes an addon unit for converting dumb steppers to closed loop. Fully contained addition, fairly inexpensive too.
    MakerBase ServoXXD
    Insert stepper size in mm for XX

  • @Potts1966
    @Potts1966 6 місяців тому

    Great video, thanks. I'd not considered these sensors before, but they look amazing.

  • @MCsCreations
    @MCsCreations 6 місяців тому +2

    Matthias, you drew the jellyfish UFO there! 😂
    But really interesting how it works indeed!!!
    Stay safe there with your family! 🖖😊

  • @stevenebstein3391
    @stevenebstein3391 5 місяців тому +1

    Matthias, some of what you are observing is the inherent accuracy of the stepper motor construction, which I assume has to do with the accuracy of the effective angle of the windings with respect to the rotation axis. According to a supplier we use for our products, Lin Engineering, the industry standard is 1.5% accuracy for a 200 step (1.8 degree) motor, but they say their motors are 0.4% accurate for a 200 step motor. So this accuracy, like any engineering specification, is a parameter of the motor and one you can improve with a better (and probably more expensive) motor. You are probably also observing some of the encoder's inherent accuracy.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому

      1.5% of what? On its own this is unitless number which doesn't apply to anything.

    • @jaro6985
      @jaro6985 5 місяців тому

      @@matthiasrandomstuff2221 1.5% step accuracy. So if the motor has 200 steps, 1.8 degrees per step, the full step location will be within 1.5% of 1.8 degrees (0.03 degrees) of the true position. Typical cheap stepper motors would have 5% step accuracy, or 0.09 degrees max error.

  • @AiOinc1
    @AiOinc1 5 місяців тому +1

    I'm glad you made such a good demonstration of just how sluggish python is with this

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +5

      Not really. Limited by I2C and console mostly. Python on its own would have iterated much faster.

  • @jmhannnon
    @jmhannnon 6 місяців тому

    Very useful information. I have been thinking about using the magnetic encoders for a project.

  • @DJacKnifeAlpha
    @DJacKnifeAlpha 6 місяців тому

    Love the lego bit at the end! Super cool!!

  • @Avrohomperl
    @Avrohomperl 5 місяців тому

    It's pretty unbelievable really how little of this video I understood.

  • @SoHeeLee-zt8jk
    @SoHeeLee-zt8jk 5 місяців тому

    Pure engineering wizardry

  • @InductorMan
    @InductorMan 5 місяців тому

    Hey Matthias, if you're looking for good accuracy for you dividing head project I can recommend the AMT series of capacitive encoders from CUI. I retrofitted my telescope with AMT112S encoders, and with the 0.35 degree field of view I usually use, I always find my target object within half a radius of the center of the field of view, so they really do live up to the 0.2 degree specification they promise.
    They are capacitive encoders with a captured but floating rotor. This obviously makes them less easy to install than the magnetic encoders (and they are definitely less cheap), but they are not position critical: even if the body of the encoder ends up misaligned to the rotor or the rotor has some radial runout (within reason, ~0.5mm allowable error), they still report correctly. My home-brew telescope retrofit was by no means perfectly accurate. If you want to mount them to a stepper as intended, they are actually very easy to use since that's what the included brackets are designed for.
    The AMT112S is quadrature output and produces up to 16384 positions per rev (4096 quadrature cycles per rev), but I only used this model because of the limitations of the firmware I wanted to use and the size I had available for mounting: there are more convenient versions that have SPI or UART position output (AMT21 series).
    There is a larger version that has slightly higher resolution, and also a larger 0.1" pitch connector (the small connector on the AMT112S was hard to obtain and assemble). But this is an older model and actually has worse overall stated accuracy, not sure how good they are.

  • @superxpro12
    @superxpro12 5 місяців тому

    Make sure you magnetically decouple the rotor of the stepper from the magnet at the tip of the shaft. The rotor will induce some magnetics onto the sense magnet. And since youre conducting sensitivty tests, this effect could be non negligible. You can get rubber couplings to do this

  • @Luftbubblan
    @Luftbubblan 5 місяців тому

    Steppers seems like fun to play with. In my case i wan't to try track the movement of the stars. Also requires good precision.

  • @sbellock5
    @sbellock5 6 місяців тому

    I understand exactly none of this, will never have any use for it, still watch the whole thing every time.

  • @davelowe1977
    @davelowe1977 6 місяців тому +1

    Presumably the angular error is reduced if geared down.

  • @darthjeder
    @darthjeder 5 місяців тому

    Some time ago i ordered some encoders (MagAlpha MA730),some magnets and a flux detector card... The data sheet recommended diametral magnetized ring magnets. Since they did not have the right size i ordered some similar magnets to experiment.
    What i noticed with the flux detector card is that the ring magnets have a very clear line through the center where diametral disc magnets have an almost homogeneous magnet field around the middle...

  • @AnotherBrokenToaster
    @AnotherBrokenToaster 6 місяців тому

    Love your videos, super interesting and straight to the point! I got PTSD seeing that wobble on the adapter holding the magnet hahaha. I was making a rotating platform with a nema17 for calibrating some angle measurement equipment and absolutely could not get the concentricity to be decent using 3d printed adapters.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  6 місяців тому

      I figured the lego would get me close enough, but no. Problem is, there's a fraction of a millimeter of play with the lego shaft in the lego holes, and that was enough to throw thigns off. If you can get consistent to a range of 2 degrees with one of those thingys, you are doing pretty good.

    • @gominosensei2008
      @gominosensei2008 5 місяців тому

      ​​@@matthiasrandomstuff2221in astronomy, where those errors matter a lot, they use 2 motors torquing in opposite directions and move by adjusting the difference in torque between the two. Completely eliminates backlash and vibrations in at least one direction, possibly both, depending on where exactly you place the two actuators in the chain

  • @electronics.unmessed
    @electronics.unmessed 6 місяців тому

    Nice! Very comprehensive. Thanks for sharing!

  • @fabiena1787
    @fabiena1787 5 місяців тому

    This was fun, and I subscribed. Thank you.

  • @nicholasstalberg7949
    @nicholasstalberg7949 5 місяців тому

    I was originally attracted by the woodwork magic but have stayed for everything else, and of course, the woodwork.
    I have learned so much from you over the years, keep up the good work!

  • @guillaumeemualliug8220
    @guillaumeemualliug8220 5 місяців тому

    At 4'05'' the subs display "0.5" while you're saying "0.15"
    Other than that, love your work, keep it up, cheers and thank you 😊

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +1

      oops, fixed. I actually go over the auto captions to fix stuff, but just trusted that it got the number right there, cause I wasn't actually listening to the video while I did that.

  • @JPGuay
    @JPGuay 6 місяців тому

    You will always amaze me !

  • @TP-hc4qi
    @TP-hc4qi 5 місяців тому

    You're videos are fasinating. Your mind is great at exploring a new thing in a very quantitative way! (e.g. I heard this, how can I prove or disprove it experimentally? My experiment has a lot of error, what are the source(s) of error? How can I eliminate, reduce or measure the error(s)?) Ridiculously cool!

    • @tennicktenstyl
      @tennicktenstyl 5 місяців тому

      that's literally the basics of the scientific method.

    • @TP-hc4qi
      @TP-hc4qi 5 місяців тому

      @@tennicktenstyl I know! And so many science UA-cam personalities don't use it at all! I had almost forgotten it. . . until I got here!

  • @WatchWesWork
    @WatchWesWork 5 місяців тому

    You should play around with some industrial servos. 31 and even 32 bit optical absolute encoders are available from Fanuc and Renishaw and other big players. 2 - 4 billion counts per revolution, accuracy of .0000001 degrees, I think that's 1/8 of an arcsecond. Unfortunately, the bit rates are so high, they use proprietary serial position outputs instead of raw encoder counts.

  • @109joiner
    @109joiner 5 місяців тому

    I didn’t understand any of this but still I watch.

  • @fredio54
    @fredio54 5 місяців тому

    Solution, use a set of gears to reduce to a tolerance you're happy with and ensure those gears are the zero backlash preloaded type.

  • @virtualmarc2383
    @virtualmarc2383 6 місяців тому +2

    My plan is to drive my indexing plate with a stepper motor via a worm gear the gear ratio should make stepper motor error insignificant

    • @analoghardwaretops3976
      @analoghardwaretops3976 5 місяців тому

      And you know the accuracy/error/eccentricity of that indexing plate???.. & also what about the backlash error of worm wheel/worm gear?? is it provided by the manufacturer...

    • @virtualmarc2383
      @virtualmarc2383 5 місяців тому

      ​@@analoghardwaretops3976I promise not to use it for working on the space shuttle

  • @ShafaqIftikhar-pw9ld
    @ShafaqIftikhar-pw9ld 6 місяців тому

    ABSOLUTELY BEAUTIFUL!!!! THANKYOU FOR THE UPLOAD ❤❤❤

  • @skatastic57
    @skatastic57 5 місяців тому +1

    This is all new to me so I expect this idea to be wrong but what if you attach the encoder to a big gear and then that drives a small gear, does that mitigate the inaccuracy?

  • @MakerTutor101
    @MakerTutor101 5 місяців тому

    Thanks for sharing

  • @johnbofarullguix1499
    @johnbofarullguix1499 5 місяців тому

    1. You need to firmly fix both motor and sensor to same frame reference :
    Your initial measurements were made with (loose) motor on table, and sensor hanging in front of the rotor (sensor also loose on table) but motor and sensor were not static from one another, let me explain: that 0.3° vibration could be the motor rattling on the table while the sensor also picking up vibration from the table, but motor and sensor holding gadget did not have a joining beam that would cancel out vibrations through the table on one another. You seem to have fixed that with the Lego frame. But again Lego bits do not have screws and bolts, are not metal, and you need a a heavy frame, with at least 2 opposite arms, grabbing both motor and sensor, to cancel out vibrations from one on the other. A heavy common reference frame is far better at cancelling relative vibrations than Lego pieces.
    2. Use data to calibrate :
    Once you have a static reference with a solid frame holding both motor and sensor that cancels relative vibrations, now you can calibrate, because now you should get the same graph every time.
    With motor and sensor on same table but loose relative to one another you were surely getting different graphs every time. Now do 1 measurement, build a calibration table, and apply the errors to return correct measurements.
    Viel Spaß

  • @GeroSchkowski
    @GeroSchkowski 6 місяців тому +1

    Very cool, thank you for sharing this.

  • @MrDehicka
    @MrDehicka 6 місяців тому

    It is a cogging torque. Stepper has 50 poles and every 4 steps rotor and stator are alighed creating a cogging force. You can feel it when rotaing the shaft by hand.

  • @imqqmi
    @imqqmi 5 місяців тому

    Would the spread be reduced if you use gear reduction like 1:10? You probably don't need the speed for cutting threads and closed loop steppers have speed to spare anyway. Really like seeing you play with this stuff :)

  • @jatag100
    @jatag100 5 місяців тому

    So much fun! Thank you. Would you please post the stepper motor model or link?

  • @bqdavis1
    @bqdavis1 5 місяців тому +1

    I usually don't write a comment just to say I liked a video. But this is an exception. I liked the video.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  5 місяців тому +1

      its an exception that you liked this video? Hmmm...

    • @bqdavis1
      @bqdavis1 5 місяців тому

      @@matthiasrandomstuff2221 Not an exception in liking your videos. In fact I can't recall not liking one. An exception in commenting that I liked it. I need to get in the habit.

  • @MikePerreman
    @MikePerreman 6 місяців тому +1

    Lol, I have a few of these modules that I've 3D printed mounts for... I never realized they were essentially Lego compatible

  • @xistic1
    @xistic1 5 місяців тому +1

    Could you significantly gear down the the motor to the rotational position you are targeting to reduce the error in positioning? i.e. one full turn of the motor turns the part 1/8 a turn would reduce the error from 0.3% to 0.0375%. Or am I smoking crack?

    • @EdFrench_uk
      @EdFrench_uk 5 місяців тому +1

      This is good, but don't forget you'll get a little bit of periodicity from the gear engagement.

  • @manuelpena3988
    @manuelpena3988 6 місяців тому

    So satisfiying to see the end