Magnetic rotary encoder vs stepper motor accuracy

Поділитися
Вставка
  • Опубліковано 28 гру 2024

КОМЕНТАРІ • 346

  • @lukahrastovec5022
    @lukahrastovec5022 9 місяців тому +344

    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  9 місяців тому +90

      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 9 місяців тому +7

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

    • @ericwazhung
      @ericwazhung 9 місяців тому +13

      ​@@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 9 місяців тому +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 9 місяців тому +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.

  • @osmia
    @osmia 9 місяців тому +588

    Luvvin how you're introducing the Lego for more accuracy

    • @Koushakur
      @Koushakur 9 місяців тому +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 9 місяців тому +7

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

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

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

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

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

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

      The great thing about it, the uniform parts.

  • @nokbeen3654
    @nokbeen3654 9 місяців тому +147

    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 9 місяців тому

      That's science! Beautiful process!

    • @danamyrocket
      @danamyrocket 9 місяців тому +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 9 місяців тому +3

      He's an engineer.

  • @waxyjim
    @waxyjim 9 місяців тому +62

    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 9 місяців тому +7

      It isn't too late.

    • @fifty-plus
      @fifty-plus 9 місяців тому +7

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

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

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

    • @youtubelisk
      @youtubelisk 9 місяців тому +2

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

    • @TP-hc4qi
      @TP-hc4qi 9 місяців тому +3

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

  • @kenmercer2721
    @kenmercer2721 9 місяців тому +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!

  • @Clark-Mills
    @Clark-Mills 9 місяців тому +22

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

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

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

    • @Cladisio
      @Cladisio 9 днів тому

      Everyone should drink coffee, health permitting.​@matthiasrandomstuff2221

  • @MrBacanudo
    @MrBacanudo 9 місяців тому +35

    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 9 місяців тому +2

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

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

      @@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 8 місяців тому +2

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

  • @declarehisglory8602
    @declarehisglory8602 22 дні тому

    Mathias... you never cease to amaze...!! Often, we forget how much of an electronics engineer you are!!

  • @KerryBenton
    @KerryBenton 9 місяців тому +39

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

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

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

  • @steveminard6441
    @steveminard6441 9 місяців тому +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  9 місяців тому +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 9 місяців тому +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.

  • @Spiderelectron
    @Spiderelectron 9 місяців тому +24

    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.

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

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

  • @69dblcab
    @69dblcab 9 місяців тому +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.

  • @nathaniellangston5130
    @nathaniellangston5130 7 місяців тому +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!

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

    I just like to witness genius...

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

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

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

      I think the same thing

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

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

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

      just an engineer

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

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

  • @ivprojects8143
    @ivprojects8143 9 місяців тому +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 9 місяців тому +4

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

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

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

    • @cooperised
      @cooperised 9 місяців тому +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.

  • @LikeFactoryMade
    @LikeFactoryMade 9 місяців тому +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.

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

    This is really interesting and nicely visualised 😊

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

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

  • @RickRolling-tc7vb
    @RickRolling-tc7vb 9 місяців тому +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.

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

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

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

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

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

    I appreciate that all your graphics are ascii :D

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

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

  • @aljaz55
    @aljaz55 8 місяців тому +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 :)

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

    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.

  • @johnwalker1471
    @johnwalker1471 9 місяців тому +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  9 місяців тому +1

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

    • @johnwalker1471
      @johnwalker1471 9 місяців тому +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 9 місяців тому

      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 9 місяців тому

      @@sircompoDo you have a link for your encoder?

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

    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  9 місяців тому +1

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

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

      @@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.

  • @mingyangpan7822
    @mingyangpan7822 7 місяців тому

    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

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

    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 !

  • @raffy141
    @raffy141 8 місяців тому

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

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

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

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

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

  • @PureAudioTones
    @PureAudioTones 9 місяців тому

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

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

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

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

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

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

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

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

    Blown away by Mattias yet again .. 🤯

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

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

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

    The lego build is hilarious 😂

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

    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.

  • @galacticdragon9841
    @galacticdragon9841 9 місяців тому +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 9 місяців тому +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.

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

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

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

    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 9 місяців тому

    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.

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

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

  • @1kreature
    @1kreature 9 місяців тому +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.

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

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

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

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

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

    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 😉

  • @solocupp6120
    @solocupp6120 9 місяців тому +19

    Get this man a 3d printer!

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

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

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

    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.

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

    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!

  • @analoghardwaretops3976
    @analoghardwaretops3976 9 місяців тому +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 😊

  • @LoialOtter
    @LoialOtter 8 місяців тому

    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.

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

    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

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

    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  9 місяців тому

      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 9 місяців тому

      ​​@@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

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

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

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

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

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

    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.

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

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

  • @ChaotikmindSrc
    @ChaotikmindSrc 9 місяців тому +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  9 місяців тому +2

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

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

      @@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

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

    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.

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

    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

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

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

  • @KelikakuCoutin
    @KelikakuCoutin 9 місяців тому

    Solid. Clever. Scintillating rhetoric, and by golly if it wasn't informative as well.
    Thanks for the content.
    Keep up the good work.
    בס'ד

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

    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...

  • @bqdavis1
    @bqdavis1 9 місяців тому +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  9 місяців тому +1

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

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

      @@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.

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

    You will always amaze me !

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

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

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

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

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

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

  • @kasuha
    @kasuha 9 місяців тому +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.

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

    “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

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

    This was fun, and I subscribed. Thank you.

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

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

  • @Peter-898
    @Peter-898 9 місяців тому +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.

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

    Nice! Very comprehensive. Thanks for sharing!

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

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

  • @SuperDavidEF
    @SuperDavidEF 9 місяців тому +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?

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

    Very cool, thank you for sharing this.

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

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

  • @stevenebstein3391
    @stevenebstein3391 9 місяців тому +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  9 місяців тому

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

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

      @@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.

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

    Presumably the angular error is reduced if geared down.

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

    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  9 місяців тому +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.

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

    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 9 місяців тому

      that's literally the basics of the scientific method.

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

      @@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!

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

    So satisfiying to see the end

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

    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.

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

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

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

    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 :)

  • @kmcrafting4837
    @kmcrafting4837 9 місяців тому +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

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

    Pure engineering wizardry

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

    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.

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

    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.

  • @meeponinthbit3466
    @meeponinthbit3466 9 місяців тому

    Legos too now!!!! Hells yeah. What's past S teir? Because this channel is there.

  • @anernits
    @anernits 9 місяців тому

    If I remember correctly, you can get the sensor status for errors. One of those is the magnet not being detected. I used it to reject the readings while in this state.

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

      I didn't go for "no magnet error", I just read the magnet field magnitude, as covered in the video.

  • @skatastic57
    @skatastic57 9 місяців тому +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?

  • @c42cly
    @c42cly 8 місяців тому

    Great video very interesting....Could this board be used to make a wind vane direction sensor for a rc sailing boat. ?
    Fitting the magnet to the vane so the wind direction is sensed by the board?

  • @DiThi
    @DiThi 9 місяців тому

    There's a couple of things I would try: storing the error (or trying to predict it in some other way) to compensate for it, and to have the magnet and sensor further away from the motor itself so the magnetic fields are smaller.

    • @conorstewart2214
      @conorstewart2214 9 місяців тому +1

      These magnetic encoders are usually attached to the back shaft of a stepper motor, sometimes just stuck on the shaft even though it is flush. Even other types of magnetic encoder are just mounted directly on the back of motors so moving the magnet and sensor further away likely doesn’t make enough of a difference to matter.

    • @unlost117
      @unlost117 9 місяців тому

      Yes i was wondering if the magnetic fields varying within the motor were affecting the sensor too.

  • @jackwhite3820
    @jackwhite3820 9 місяців тому

    For driving a dividing head with a motor I would argue you want a gear reduction anyway (preferably a worm gear due to it being self-locking), which would increase your angular resolution by the gearing ratio.