AS5600 magnetic position encoder - best encoder for stepper motors

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

ความคิดเห็น • 294

  • @JamesTaylor-cu9en
    @JamesTaylor-cu9en ปีที่แล้ว +18

    i have been banging my head against a wall for days and making no progress trying to figure this out through the GitHub for the AS5600 library as well as the Datasheet, but holy shit, this might be the most straightforward and easy to understand tutorial I've ever seen for anything. You are a god and the comments on your code are a thing of beauty.
    I have literally never used an Arduino for anything more then turning on an LED before, let alone I2C protocol but I still understood this perfectly. it is messed up that you don't have more subscribers.

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว +1

      Thank you! I am glad to hear that my code with the comments helped you to understand everything. Unfortunately, it is hard to convince people to subscribe, so growth comes slowly. No worries!

  • @mikel5869
    @mikel5869 2 ปีที่แล้ว +8

    Great video. Despite having worked in electronics and IT most of my life, I still learnt a lot from this presentation. Plenty of detail unlike some examples where buzz words and part numbers are thown out willy-nilly.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Thank you very much! I try my best to provide a detailed and thorough explanation of the gadgets I present so others can learn and benefit from it. I am glad to hear that you learned from my video!

  • @isidoromaich7226
    @isidoromaich7226 3 ปีที่แล้ว +18

    Excellent showing. There are a plethora of encoders out there, linear, rotary, absolute, incremental, optic, capacitive, inductive, magnetic, etc. so certainly is a good thing when someone can teach us and even cover the software. Also, this modules are pretty cheap to be easily adopted.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +3

      Thank you! Yes, there are millions of encoders and each of them have their specific application areas. But I am extremely happy about this specific one because I can improve my stepper motor-related projects by a lot!

  • @thesisdavid
    @thesisdavid 2 ปีที่แล้ว +4

    Great use of this idea in one of my projects. And the explanation of code is out of the world. Best explanation. 48 mins just went like that. Keep coming with more innovative ideas. Thanks!

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Thanks! It is nice to hear that you liked the way I explained the code. Cheers!

    • @flyingmonkey3822
      @flyingmonkey3822 ปีที่แล้ว +1

      Some people think that long videos are unwatchable, but if you are a frustrated novice… it’s SO GOOD

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว +1

      @@flyingmonkey3822 Thank you! It is hard to properly explain these topics in 10 minutes, so instead, I make longer "lecture-like" (45-ish minutes) videos. This way I can cover most of the things and properly explain how I wrote the source code for certain hardware. Also, as TH-cam is not my main source of income, but my hobby, I can afford not to try to please the algorithm and make shorter videos for more engagement. I just do it for my own entertainment and for (hopefully) helping others.

  • @ecofuelbox
    @ecofuelbox 3 ปีที่แล้ว +7

    Very good video.
    AS5600 is a fantastic part. I have used this magnetic encoder for one of my project, and made high precision "potentiometers" with the size of the small rotary encoder 11x11x8mm high and absolutely crazy precision.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +3

      Thank you! Yes, this encoder is fantastic! And as you highlighted, it can be used for other things too, not only on motor shafts. A high-precision rotary encoder is also an excellent device to build using this encoder.

  • @jeanreinis6861
    @jeanreinis6861 3 ปีที่แล้ว +4

    You were right, I had printed the code I had the first time and compared it to the original one you have and it was different. I apologize for my oversight. I recopied the code and it compiled perfectly. Thank you.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      No worries, I am glad you solved the issue! :)

  • @Workshop_UA
    @Workshop_UA 3 ปีที่แล้ว +2

    Дождался, лучшее видео-инструкция по этому модулю, огромное спасибо за труд и код. Проверил, всё работает.
    I waited, the best video instruction for this module, many thanks for the work and code. I checked that everything works.

  • @NikolaBre
    @NikolaBre 2 ปีที่แล้ว +8

    This video is awesome! Excellent explanation, great code and fully understandable to someone who's a amateur Arduino user.
    I have a misalignment issue with my two X axis stepper motors on my DIY CNC router and this will be a perfect way to check their absolute position before and during milling.
    Thank you for sharing your knowledge. I rarely comment, but this deserves praise!
    P.S. Subscribed!

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Thank you very much for the positive feedback! I am really happy to hear that you like my content!

  • @davidemoschetta3776
    @davidemoschetta3776 ปีที่แล้ว +2

    nothing really new but I liked the way you explained all, you gave me more confidence with this sensor.. thanks

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi! It's great to hear that my video gave you more confidence with this sensor! It is a great little device.

  • @kennyamat
    @kennyamat 2 ปีที่แล้ว +4

    You don't know how long I've been looking for a tutorial such as this one. Thank you for your great tutorial

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Glad to help!

    • @Nobody-Nowhere
      @Nobody-Nowhere 2 ปีที่แล้ว +3

      Take care that you solder the DIR pin to either ground or VCC. He did not do it in this video, and it wont work correctly without this. It will randomly change direction, and this will screw up your rotation calculations eventually. This is really important, and a way to create really hard to diagnose random issues if you dont do it.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Yes, this is a good remark! I actually made awareness about this issue in my other AS5600 video where I introduced my own "NEMA17-compatible" AS5600 board. There I emphasize that the DIR should be tied to GND when it is not used.

  • @cientistaanonimo7658
    @cientistaanonimo7658 3 ปีที่แล้ว +4

    I look forward to seeing more videos of you implementing the AS5600 magnetic position encoder in your projects, especially if you are a CNC milling machine.

  • @RickInohio54
    @RickInohio54 11 หลายเดือนก่อน +2

    Hello. Getting ready to learn about the AS5600 in conjunction with a 28BYJ-48 stepper, both of which I have already purchased. I found your video(s) extremely well presented and informative and consequently you have a new subscriber! 😀
    I have the exact same AS5600 pcb as you and have scoured the ‘net high & low but cannot find a schematic for THAT exact pcb (which seems to be one of the most common ones using the AS5600 chip).
    I’ve seen in other places on the ‘net other folks suggesting to make various mods (mostly removing components) for one reason or another but none have actually supplied a detailed schematic of that pcb.
    What lead me to REALLY wanting that schematic was I saw in the Mfg.’s data sheet for the AS5600 chip (page 5, Fig. 13) that for 3.3 Volt Operation pins 1 & 2 (VDD5V & VDD3V3) get jumpered together and a (decoupling?) capacitor’s value is changed from 1µF to 10µF. For 5 Volt Operation, there is no jumper and the capacitor is left at 1µF. There are a couple of asterisked notes regarding the 3.3 Volt Operation and “OTP programming” (which I’ll be honest, I don’t know anything about).
    I checked my AS5600 pcb's and there is a 0Ω resistor (jumper) installed between pins 1 & 2, however there are no visible markings on either C1 or C2 on any of the three AS5600 pcb’s that I bought, thus one of the reasons I’d like to see a schematic.
    I see you’re powering your AS5600 pcb’s with 5 volts and clearly nothing’s exploding. Can you offer a simple explanation what this is all about?
    Any chance you might have, or know (link please) where I might find, a schematic for that specific pcb?
    Thanks, Rick

    • @CuriousScientist
      @CuriousScientist  11 หลายเดือนก่อน

      I haven't reverse engineered this specific PCB, but its schematic seems to follow the schematic in the datasheet. Just a few capacitors and pull-up resistors for the i2c bus. You can just grab a multimeter and reverse engineer the schematics yourself. It is just 7 components.
      I even made my own NEMA17-compatible PCB based on this chip: th-cam.com/video/RIsUvHZVjuU/w-d-xo.html
      If you don't want to burn in a new zero position, then just neglect the asterisk footnotes.
      The chip is 5V compatible, so it is not an issue to use 5 V.

  • @p3d938
    @p3d938 3 ปีที่แล้ว +4

    Thanks for the very clear video! Using coaxial cable for the DATA en CLOCK (I2C) works much better than regular jumper/hookup cable. If you have a lot of jitters, missing characters and unreliable measurements please give it a try. Just some cheap (thin) TV coax will do the work. Ground the shield wires to a metal part of your project. With this setup I have a reliable reading with a margin of 0.10 degrees with a minimal delay.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Hi! Thank you for the nice comment and the useful ideas! Yes, a good pair of cables is absolutely necessary for good signal integrity, especially if you want to carry the signal across a larger distance. And not only the cables, but the connections should also be of a good quality. Wiggly terminals and loose wires can cause a lot of mess. For important projects I nearly always solder the cables and I use good quality cables. But for these demos it would be very expensive to always use professional wires.

    • @p3d938
      @p3d938 3 ปีที่แล้ว

      @@CuriousScientist No complaints from me my man, just a tip for starters. I wasted a day with trying to make the encoder reliable. 10 Meter coax cable 4 Euro. The thick and rigid cables are a pain in the ass in cable management but are essential for reliability. I have no coding qualities but found out that sending raw angle values (1-4096) is more reliable than sending degrees values with a rounding. No jitters at high speed with minimal delay, 5 ms. No complaints, just some findings. Thanx again.

  • @7alfatech860
    @7alfatech860 3 ปีที่แล้ว +2

    Very nice to see this.
    BTW, there is a video on a similar type of encoder on Hackaday. Some of the people commenting there mentioned that the commercial versions are quite expensive.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Thank you! I haven't seen that video and page, but I will check it. I bought these small PCBs for about 2 USD/piece, so it was relatively cheap. In fact, I also designed a PCB myself for this AS5600 encoder chip to fit the back of these stepper motors. But that's for an upcoming video once I receive my packages which are currently stuck at the customs as usual...

    • @7alfatech860
      @7alfatech860 3 ปีที่แล้ว

      @@CuriousScientist BTW, I put a link to your video there

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      @@7alfatech860 Wow, thank you! Thanks for promoting my work, I really appreciate it! I will upload two other, "more advanced" videos on this topic during the next week. They will be hopefully interesting!

  • @colorcircle3153
    @colorcircle3153 2 ปีที่แล้ว +3

    Great video, this detail is amazing! 😃

  • @danielh.8836
    @danielh.8836 3 ปีที่แล้ว +2

    Really good video. Thanks for your good explanation, it helped me a lot!

  • @mohammadalibahrami1253
    @mohammadalibahrami1253 3 ปีที่แล้ว +1

    Awesome, thanks for your comprehensive explanation.

  • @ptexptex3188
    @ptexptex3188 3 ปีที่แล้ว +2

    Really top vidéo and explanation!
    Many thanks...please just continue!

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Thank you! I will keep making these videos. These comments are especially encouraging to continue making videos!

  • @ilenvantev6170
    @ilenvantev6170 3 ปีที่แล้ว +3

    Great video!The shaft is Stainless Steel, that is why it's non-magnetic.Some types of SS are,but I guess this one isn't.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Thanks! If it is stainless and non-magnetic, it is an austenitic stainless steel. If it is stainless and magnetic, it is either ferritic or martensitic stainless. It is probably a 301 or 304, or something similarly cheap. I was just a bit unsure of the origin of the shaft.

    • @익명-n5d
      @익명-n5d 2 ปีที่แล้ว

      That's true. I didn't know the shaft of my nema17 is SS. Therefore, the magnet could not be sticked to the center. I bought 7 AS5600 though... i cannot use them

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Why not put a drop of super glue on the magnet and attach it to the shaft carefully? There won't be any forces acting on the magnet anyway, so the glue would hold it in place perfectly.

    • @익명-n5d
      @익명-n5d 2 ปีที่แล้ว +1

      @@CuriousScientist Thank you for your quick response. I will try to attach it with bond or super glue. Your advice helped me a lot

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      You're welcome! Glad that I could help.

  • @deakjozsef2127
    @deakjozsef2127 2 หลายเดือนก่อน

    Dear, It is a wery good explanation. Thank you for a sharing.
    Today I assembled everithing with Arduino Uno and I connected the Oled SDA-SDA, SCL-SCL and working well.

    • @CuriousScientist
      @CuriousScientist  2 หลายเดือนก่อน +1

      Nice to hear that you got it working. Enjoy!

    • @deakjozsef2127
      @deakjozsef2127 2 หลายเดือนก่อน

      I want to use this to check my cnc X Y Z axis positions . For that I need your support. . Because I use timing belt whell with different diameter, one turn is not 360 degree . How can I compare it?

    • @CuriousScientist
      @CuriousScientist  2 หลายเดือนก่อน +1

      I don't understand. A turn is always 360. Otherwise, it is elementary school mathematics.

    • @deakjozsef2127
      @deakjozsef2127 2 หลายเดือนก่อน

      Dear , yes I know. Sorry for that, I am absolutely beginner. I tray to write it in other way. My machine haw hand wheels and one turn is 2mm liner moving. If I use the moving with stepper motor than one turn is not 2mm because of different timingwheel diameter . My question is how can I reach that the display show the real distance.

    • @CuriousScientist
      @CuriousScientist  2 หลายเดือนก่อน

      No worries. But this is really just basic math, it has nothing to do with coding.
      If one turn is 2 mm, then you also know that 360° is 2 mm. The stepper motor at full step microstepping setting usually does 200 steps/turn. Which is also 360°. So now you know that 360° = 2 mm and 360° = 200 steps. So 200 steps = 2 mm. Then 1 step = 2 mm / 200 steps = 0.01 mm /step. So with each step, you have 10 um linear displacement, assuming there's no backlash or other mechanical issues.

  • @markobanovic6880
    @markobanovic6880 2 หลายเดือนก่อน +1

    Perfect! Thank you!

  • @luciusmessias
    @luciusmessias ปีที่แล้ว

    This video is awesome! Excellent explanation

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว +1

      Thank you! I'm glad to hear that you like the explanation.

  • @bulenttanriyakul3225
    @bulenttanriyakul3225 2 ปีที่แล้ว +4

    This time we need a closed circuit stepper motor board for Nema 23 and Nema 34. But it is affordable. When you try to buy the boards in the market, it exceeds the price of ready closed loop step motors.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      This board is about $2 if I remember correctly. It should be much cheaper than the off the shelf closed loop systems.

  • @QuintJer
    @QuintJer 11 หลายเดือนก่อน +1

    Hello, great video and I appreciate all of the details and your code explanation. Just one question, did you pre program the AS5600 with updated values from the defaults? Thanks again and keep up the great work.

    • @CuriousScientist
      @CuriousScientist  11 หลายเดือนก่อน

      Hi! Thanks! No, I haven't touched the AS5600. I get the raw data from it as-is and then do the calculations on the microcontroller.

  • @ahmedwaly9073
    @ahmedwaly9073 3 ปีที่แล้ว +2

    very helpful, amazing video

  • @malikss55
    @malikss55 5 หลายเดือนก่อน +1

    good tutorial but is it possible to get initial angle of the motor on startup..?

    • @CuriousScientist
      @CuriousScientist  5 หลายเดือนก่อน +1

      Thanks! Sure, just read the encoder.

  • @havehalkow
    @havehalkow 7 หลายเดือนก่อน +2

    It would be also interesting to see how one can read the angular position based on pwm and analog signals with this sensor)

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน +1

      Will do it because I am actually working on my own AS5600 Arduino library.

  • @deeepakkushwah2503
    @deeepakkushwah2503 3 ปีที่แล้ว +1

    We can control and maintain the position of stepper motor using and encoder thank you I am subscriber to your channel

  • @ArcAiN6
    @ArcAiN6 7 หลายเดือนก่อน +1

    just a heads up, but you can further reduce that to 3 pins, as the circuit / chip also supports analog output using VCC, GND, and OUT.
    While tinkering with them on a benchtop, 4 pins is fine, but when you're talking about implimenting these in real world environments, the reduction of even a single pin can be a huge savings in time, cost, and space.
    For instance, in my situation, i'll be using these on a CNC machine for DRO positioning, and when you're talking 5 axis * 4 pins, those drag chains are going to pack up pretty fast.

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      On the other hand, you need a better than 12-bit ADC to confidently resolve the voltage steps. And it also needs to be fast. And while you might save one wire, the signal between the sensor and the MCU is now analog. It is probably more susceptible to noise. Still, it might have its advantages. Otherwise, the manufacturer would not have put it on the chip.

    • @ArcAiN6
      @ArcAiN6 7 หลายเดือนก่อน

      ​@@CuriousScientistsignal noise is easily enough to deal with, and cheaply implemented. In my case, i just used shielded cabling. I did end up going with the i2c interface however. (and yes, weather you're using the PWM or i2c, around motors, and drivers, you really want to limit EMI and crosstalk, so shield cable is always the preferred method)
      I did have to add an I2C multiplexer to the stackup though, as all of the modules i purchased used the same exact I2C bus address, so in order to utelize multiple, the multiplexer was required. I ended up going with a TCA9548A based solution.

  • @sto2779
    @sto2779 ปีที่แล้ว +1

    Excellent explanation.

  • @danielcristina6748
    @danielcristina6748 3 ปีที่แล้ว

    Excellent tuto. tout est très clair et tout fonctionnent
    Merci

  • @keithchadwick8198
    @keithchadwick8198 3 หลายเดือนก่อน

    Absolutely 💯 Amazing 👏 like being I college 😊, thank you for such a brilliant tutorial ❤

    • @CuriousScientist
      @CuriousScientist  3 หลายเดือนก่อน

      Thanks! Glad to hear that you liked it.

  • @malikss55
    @malikss55 5 หลายเดือนก่อน +1

    Thankyou so much it really helped me a lot
    Also subscribed to your patreon
    I am making a diy gimbal using stepper motors
    So on start is it possible to get initial angle from sensor with a reference so that my gimbal can calibrate by getting data from mpu6050

    • @CuriousScientist
      @CuriousScientist  5 หลายเดือนก่อน

      Hi! It is an absolute encoder, so every time you start it, it will give you its absolute position on the 0-360° scale.

  • @theautoexecutive
    @theautoexecutive 7 หลายเดือนก่อน

    Such a great video. Thank you

  • @RobinRastle
    @RobinRastle ปีที่แล้ว +1

    Did you have to drill out the end cap to expose the shaft and accommodate the magnet

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      No! All stepper motors I have met so far had their shafts exposed. In the worst case, there was a sticker over them, but that is easy to remove.

    • @RobinRastle
      @RobinRastle ปีที่แล้ว +1

      Indeed, I found my Nema 17 had an exposed end shaft - surprising really - you'd think that industry would want this sealed to keep contaminants out - like cutting oil, water or machining powder, but there's no gasket on the and end plate anyway. Just a point to consider

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      These stepper motors are not made for harsh environments, so I guess that's why it is left exposed.

  • @-Benito_Swagolini-
    @-Benito_Swagolini- 3 หลายเดือนก่อน +1

    What screws did you use to secure the 3d printed part to the Nema17 and the AS5600 to the part as well

    • @CuriousScientist
      @CuriousScientist  3 หลายเดือนก่อน

      Some long M3 screws. I don't remember the exact length.

  • @noanyobiseniss7462
    @noanyobiseniss7462 8 หลายเดือนก่อน +2

    I am wondering how this compares in high acceleration applications vs the MKS Servo42/Servo57 lineup?

    • @CuriousScientist
      @CuriousScientist  8 หลายเดือนก่อน +1

      I guess, if you put it together with a fast microcontroller and a good driver, it can work well. I haven't tested its absolute ratings, but I might do it in the future.

    • @noanyobiseniss7462
      @noanyobiseniss7462 8 หลายเดือนก่อน +2

      @@CuriousScientist Cool. :)

  • @joaocamiloulhoa4878
    @joaocamiloulhoa4878 3 ปีที่แล้ว +1

    Excellent explanation!! But I still don't understand how to use it with two sensors. I'm pretty new and I don't understand where the pin definition is! How to define them? Don't have a simpler library for newcomers?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Thanks! If you need to use multiple AS5600 sensors, you have to use an i2c multiplexer because these sensors don't have dynamic i2c addresses. I have another video on my channel where I built a milling table and I used two of this sensor. th-cam.com/video/IZ0FyiMYT48/w-d-xo.html
      Otherwise, you can for example use a ADS1115, 16-bit ADC and read the output of the different sensors and convert the analog voltage into degrees.
      Regarding the simplicity, I think you won't find any simpler way of doing it.

    • @joaocamiloulhoa4878
      @joaocamiloulhoa4878 3 ปีที่แล้ว +1

      @@CuriousScientist Thanks for the answer! I'll run some tests here! If I can't use them, I'll try with the CJMCU-103.

  • @sermadreda399
    @sermadreda399 3 ปีที่แล้ว +1

    great video thank you for sharing

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Thank you! I hope you found it useful!

    • @sermadreda399
      @sermadreda399 3 ปีที่แล้ว

      @@CuriousScientist sure it is

  • @rahulrajan
    @rahulrajan 3 ปีที่แล้ว +2

    Awesome video, Please do a Closed-loop FOC control of Stepper motors, I've been trying to learn some code to do that, but will take time. Thank you.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Thanks! Sorry, but I do not make videos on request. I have a lot of projects lined up and I am working on them.

    • @rahulrajan
      @rahulrajan 3 ปีที่แล้ว +1

      @@CuriousScientist understandable, please consider it as a suggestion. Thank you for the videos. 😀

  • @jeanetiennette5742
    @jeanetiennette5742 3 ปีที่แล้ว +1

    Really nice video and very well explained. Looking forward to see more of your videos. One question, can we used the encoder and stepper as a servo - rotate stepper to x degrees with x speed using arduino IDE coding only?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +3

      Thank you! Yes, a closed loop control is possible. I will actually work on it and when it's done, I will publish a video about it with all the resources. I need a few parts to arrive and some free time to work on it.

    • @jeanetiennette5742
      @jeanetiennette5742 3 ปีที่แล้ว +1

      Awesome. That would be great. Thank you

  • @ricardom.6571
    @ricardom.6571 2 ปีที่แล้ว +1

    Hello friend, I think you make a good job, I have a question
    could this sensor be used to obtain the value in centimeters or millimeters in some way? best regards.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Hi and thanks! Of course it can be used like that if you know the mechanism attached to the shaft. What you are asking for is not specific for the sensor. It depends on how you convert the readings. It is up to you how you design the mechanism.

  • @stefanguiton
    @stefanguiton 3 ปีที่แล้ว +2

    Excellent video!

  • @botak333
    @botak333 2 ปีที่แล้ว

    It posible to use magnet diameter 10mm??

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Anything is possible. The question is, will it work? Please read the datasheet for the answer. I have never tried it with magnets larger than 6 mm diameter.

  • @markmaker2488
    @markmaker2488 9 หลายเดือนก่อน +5

    The reason why the magnet didn’t stick to the shaft is because the shaft is made from stainless steel which is non ferrous.

    • @CuriousScientist
      @CuriousScientist  9 หลายเดือนก่อน +2

      A stainless steel could be ferromagnetic, so your statement is not exactly accurate. 😎 If it is stainless and paramagnetic, then it is austenitic steel.

  • @RajahChandrasekhar
    @RajahChandrasekhar 6 หลายเดือนก่อน

    Great explanation

    • @CuriousScientist
      @CuriousScientist  6 หลายเดือนก่อน

      Thank you!

    • @RajahChandrasekhar
      @RajahChandrasekhar 6 หลายเดือนก่อน +1

      ⁠ I ordered the 2 of the 14bit versions today. I am planning to pair it with a Rpi Pico to use as encoders for my dobsonian telescope. In this application, I only need to the angle, no need to count number of turns. This should help in finding targets in the sky based on their altitude and azimuth angles.

    • @CuriousScientist
      @CuriousScientist  6 หลายเดือนก่อน

      I don't remember AS5600 having multiple versions. AFAIK it only exists in 12-bit version. So, the "14-bit version" must be something else then. And yes, if you navigate within a full circle (0-360°), you won't need to count the number of turns.

  • @arminkashani5695
    @arminkashani5695 3 ปีที่แล้ว +1

    Hi there. Thank you for this helpful video! I need to use it underwater as the rotating object is submerged. I've seen some people use nail polish to make it waterproof. I would really appreciate your advice on best practice.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Hi! I am glad that you found it useful! I am not really well-informed in this topic but as far as I know, you can get acrylic or epoxy-based coatings (sometimes in a spray form) that you can use to waterproof the PCB. Just make sure that you already have the cables properly connected. But once again, I might not be the best person to ask for waterproofing the PCB as I do not have too much experience with it.

    • @petruha69
      @petruha69 3 ปีที่แล้ว +2

      Hi Armin! I wouldn't rely on just a lacquer for submerged electronics. Your best bet would be to pot the entire board into some resin or silicone. Just avoid using acetic silicone (the most common sealant in construction) - the one that smells when curing, because it will ruin your PCB while curing. Non-acetic silicone works great, GE Sealant 2 or similar (I have no affiliation with them)

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Thank you!

  • @ismzaxxon
    @ismzaxxon 7 หลายเดือนก่อน

    Awesome. THank you.

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      I hope you found it useful! Cheers!

  • @AlyssaNguyen
    @AlyssaNguyen 2 ปีที่แล้ว

    While listening to you explain how to get a number in degrees, it occurred to me that it may be easier to work in radians. Divide the number by 2048 and multiply by π to get radians. From there, you can convert to degrees if you must. Fiddling around with the 12 bits you're given and turning them into a 4 byte floating point number would be fairly trivial. The float will always be a positive number less than 2, and 2π radians is 360°.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Hey, that's an excellent idea, thank you! Since I want to make a follow up video for this hardware (but based on my own PCB), I will implement the radian-based approach. It sounds smart!

  • @mohamedadam3085
    @mohamedadam3085 2 ปีที่แล้ว

    Thank you for the great detailed explination! I am not very good at coding I am still a beginner, Your code is doing al awesome stuff, but I only need the encoder for one spicific thing, if I asked you to simplify the code to few important lines, would you be able to do that? just the bare minimum that reads the raw angle? Thanks!

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Hi! You just use the code as is and you get the raw angle. I thoroughly explained the whole code, so it shouldn't be too difficult to see how the output is created.

  • @sp27031992
    @sp27031992 3 ปีที่แล้ว +1

    Is it increment or absolute encoder? If i reset the arduino, will it hold last position?

  • @TomSky00
    @TomSky00 9 หลายเดือนก่อน +1

    How did you fix the output jump gap of +-3° at once when close to 0 or 360°?
    this sensor gives an amazingly accurate output, but then it fucks it all up when about to make a full turn, it suddenly jumps 2 to 5° rendering it completely useless for use with the full range of the sensor.

    • @CuriousScientist
      @CuriousScientist  9 หลายเดือนก่อน

      Hi! I haven't noticed such behavior. However, you might want to connect the DIR pin to the ground. Otherwise, you may notice disturbance in the signal.

  • @IkatsukoI
    @IkatsukoI 2 ปีที่แล้ว +1

    Very good job !!

  • @Thomas-ij7ki
    @Thomas-ij7ki 2 ปีที่แล้ว

    Have you made some investigations about temperature drift? How exact are the absolute values if you don't move the magnet over time?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      I haven't, but since it is an absolute encoder, it should not be an issue. Check the datasheet, they should mention about it if it is a known issue.

  • @Nobody-Nowhere
    @Nobody-Nowhere 2 ปีที่แล้ว +2

    You need to solder the DIR pin to either ground or VCC, otherwise you will get random occasional flip flops of the direction.
    This is really important!

    • @Nobody-Nowhere
      @Nobody-Nowhere 2 ปีที่แล้ว +1

      Also, if your module has 3.3v and 5v inputs. And you use 3.3v you need to solder the 3.3v to 5v. On this square white module its done by default. But the modules that have both inputs, needs this. Or you will get random issues in connection.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Good remark about the DIR pin! I have another video where I show my own AS5600 board and there I discuss it, but here, I skipped it.

    • @Nobody-Nowhere
      @Nobody-Nowhere 2 ปีที่แล้ว +1

      @@CuriousScientist Yeah, just spend few days wondering about the weird occasional errors i got. Have been using these on other projects tracking knobs etc, and never came across this issue. But when tracking fast moving motors, it really starts affecting. Really happy i learned this, as the errors would have eventually came up even in slower moving projects. I disregarded the DIR pins as relating to the analog output.
      It seems to be really capable sensor, im tracking up to 25rps with absolutely no issues. It should easily do twice that.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Yes, this is a fantastic sensor and with an i2c multiplexer, you can use multiple of them with a single microcontroller. They are also dirt cheap and have broad area of application if you can write the code for it. I really like this chip.

    • @robguyatt9602
      @robguyatt9602 ปีที่แล้ว +1

      @@Nobody-Nowhere No offense but I am very surprised you did not handle the dir pin appropriately from the very start. The data sheet is very clear on this requirement.

  • @jake_makes_engineering
    @jake_makes_engineering 3 หลายเดือนก่อน +1

    Do you know if this would work to get the position of a linear actuator, if the encoder is measuring the output shaft of the linear actuator's DC motor? I'm trying right now on a linear actuator and it's pretty inaccurate. The same physical position on the actuator will show different positions from the encoder, and I can't figure out why. I thought maybe the shaft was just spinning too fast but it doesn't seem to skip turns except when it reaches the endpoints (I can see the quadrants going 4,3,2,1 or 1,2,3,4). I also connected DIR to gnd but that didn't change anything.

    • @CuriousScientist
      @CuriousScientist  3 หลายเดือนก่อน

      Hi,
      I used it both on DC motors and stepper motors and it was very accurate in both cases. Without knowing where and how you mount the magnet and the encoder, it is hard to say anything.

    • @jake_makes_engineering
      @jake_makes_engineering 3 หลายเดือนก่อน

      @@CuriousScientist I ended up figuring it out, when I added a delay(2) to the loop it became much more accurate. I don’t really understand why though. Any thoughts?

    • @CuriousScientist
      @CuriousScientist  3 หลายเดือนก่อน

      I don't know how your whole code looks like so it's hard to tell.

    • @jake_makes_engineering
      @jake_makes_engineering 3 หลายเดือนก่อน

      @@CuriousScientist I noticed in your loop code there’s a commented out delay(100) where you say the delay can be adjusted for better resolution. Can you explain why adding a delay would improve resolution?

    • @CuriousScientist
      @CuriousScientist  3 หลายเดือนก่อน +1

      I said "better resolution", in quotes. It can happen that the sensor hasn't settled before performing another reading, which could lead to incorrect readings. I noticed that adding a little delay could improve the stability of the readings, so I just added it there. But ultimately, it is up to the user.

  • @depup2404
    @depup2404 2 ปีที่แล้ว

    Nice video! I was wondering if i could do tha same with just a hall effect sensor attached to the arduino to read the position of the shaft

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Thanks! With one single Hall sensor, you won't be able to detect anything movement related (other than the presence or distance of the magnet). In fact, this chip has four Hall sensors inside and they are positioned carefully so they can pick up the change in the magnetic field. Then their signal is converted into the position information that we read out with a microcontroller.

    • @depup2404
      @depup2404 2 ปีที่แล้ว

      @@CuriousScientist oh right! So if i attach 2 sensors parallel to each other would it work?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Could work, but not as good as this chip. This chip is so stupidly cheap, it doesn't worth to make any contraptions to mimic it. I am pretty sure you would lose resolution and precision with a DIY method.

    • @depup2404
      @depup2404 2 ปีที่แล้ว +1

      @@CuriousScientist hmm but its just that its not available here, and if i buy from somewhere else its gonna take weeks, so time really is the problem here.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      I see. I always buy these from AliExpress, I also provided the link for the store I used on my website. It typically arrives in 10-15 days. Of course if you need it urgently it is difficult. It might worth to look around on eBay or Amazon or on your country's own trading website. It is typical that there are people who are importing these things and reselling them on the local trading platforms.

  • @garvasrani8410
    @garvasrani8410 2 ปีที่แล้ว

    amazing video! I have just one question. Do you know any other such encoders offering at least 0.01° / bit resolution? I need need that for 256 steps microstepping. I tried searchnig but to no avail. Thanks!

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Thanks! I have another video on the AS5048A which has a higher resolution, but I think it is still too low for your application. Why do you want to be able to resolve so tiny angular displacement? You could try putting a gearbox between the shaft and the encoder to "magnify" the displacement caused by a step and then calculate backwards using the gear ratio of the gearbox. But I can imagine that the gearbox would not be able to cope with such tiny movements.

    • @garvasrani8410
      @garvasrani8410 2 ปีที่แล้ว

      @@CuriousScientist I want a resolution of 0.01° for a preicise laser based positioning system I am designing for my bachelor thesis. My idea was to use microstepping with feedback to improve accuracy and count the missed steps.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Now I am in front of the computer (I wrote the precious answer from my phone) and 1 minute Googling gave me a positive result. I don't know how you searched, but you should do it better next time.
      Try the AEAT-6600-T16 chip. You can have 0.00549° resolution.

    • @garvasrani8410
      @garvasrani8410 2 ปีที่แล้ว

      @@CuriousScientist Thanks a lot! Can you share what you searched about. I was probably looking in the wrong place 😅

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      I actually just used my brain...
      You said, you need 0.01° resolution. The encoder presented here is 12-bit: 360°/(2^12) = 0.08789°. Too large. Next sensor I mentioned the AS5048A is 14-bit: 360°/(2^14) = 0.02197°. Getting there... So the next step is 16-bit: 360°(2^16) = 0.00549°. This is good enough. Then I just Googled "16 bit magnetic encoder". I hope you won't take it wrong, but if you are working on your bachelor thesis, you should be much better at searching for information.

  • @svd4878
    @svd4878 3 ปีที่แล้ว +1

    Hi i got the same module but analog and PWM output doesn't work and there is no explanation in internet about this trouble : when i use analog output i got in serial 1023 constantly. What do you think about ?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Check the datasheet of the device! The best resource for the device is always its datasheet.

  • @doson79
    @doson79 9 หลายเดือนก่อน +1

    I want to connect to multiple as5600 modules at the same time. How to change i2c address for each as5600 module

    • @CuriousScientist
      @CuriousScientist  9 หลายเดือนก่อน

      Hi! You cannot change its i2c address. But you can use an i2c multiplexer. I have video examples on the exact same issue. Search for "i2c multiplexer" on my channel.

    • @CuriousScientist
      @CuriousScientist  9 หลายเดือนก่อน +1

      This one is one of those: th-cam.com/video/IZ0FyiMYT48/w-d-xo.html

    • @doson79
      @doson79 9 หลายเดือนก่อน

      @@CuriousScientist thanks

  • @luislopezalegria820
    @luislopezalegria820 3 ปีที่แล้ว

    Hello. Thanks for your videos.
    I think this board is powered by 3.3V, why do you use 5v?
    Thanks again.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Hi! You can use both voltages. Read the datasheet...

    • @luislopezalegria820
      @luislopezalegria820 3 ปีที่แล้ว +4

      @@CuriousScientist Hello, thanks for your answer, I have read the datasheet and I have seen that it says that the two voltages can be used, but with different configuration, this board is configured for 3.3v, since the 5v and 3.3v inputs are linked

  • @arcrobotics9982
    @arcrobotics9982 2 ปีที่แล้ว

    Hi sir great video it's really helpful,quick question my sensor keeps jumping in it's readings no matter how i place it (even though i made a 3d printed casing for it and placed it behing the motor)do have any idea how could i fix this problem ? the gap between the sensor and the magnet is aprrox 0.5~1mm

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Hi and thanks! Based on the gap you said, the distance should not be a problem. Is the reading random or just jumping between two adjacent values?

    • @arcrobotics9982
      @arcrobotics9982 2 ปีที่แล้ว

      if u could send ur email ill send u images of the readings thx in advance

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      It's on my website, but keep in mind that I am not a free support service.

    • @bhupiistersingh4097
      @bhupiistersingh4097 2 ปีที่แล้ว +1

      There is a setting to control the hysteresis value, if that helps you but there are other factors contributing to this problem show as below.
      Don't forget to connect GND or VCC to the DIR pin. On some boards, this issue occurs as the pin is kept at floating state.
      Other reason is bad wires picking noise.
      Readings jumping with a value of 0.05 plus or minus is normal.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      @@bhupiistersingh4097 This is a good remark. Actually, on this board, the DIR pin is supposed to be tied to GND if I remember correctly. But otherwise, yes, it is very important to not leave it floating. I made my own custom board with this AS5600 chip and there I highlighted this issue and recommended tying the DIR pin to GND, otherwise, the values will be fluctuating. In this video, I got the values really stable.

  • @easy_3d
    @easy_3d 4 หลายเดือนก่อน +1

    After uploading the program to the board, the oled display is not turning on. When i upload some other oled display code, the display is working and also the display is not working the magnetic encoder. Any suggestions?

    • @CuriousScientist
      @CuriousScientist  4 หลายเดือนก่อน +1

      Hi! Check the address of the display. Maybe it's different from the one I used.

    • @deakjozsef2127
      @deakjozsef2127 2 หลายเดือนก่อน +1

      @@CuriousScientist Dear , I faced with same issue.The solution was for me that I start turn the magnet and the welcome appeared on the screen.

    • @CuriousScientist
      @CuriousScientist  2 หลายเดือนก่อน

      Yes, that could solve the issue because sometimes the encoder doesn't detect the magnet when it is not moving. And the code is written in a way that it does not proceed if the magnet is not found.
      So when you spin the magnet, there's enough change in the magnetic field that the encoder can detect it.
      However, this means that you need to move your magnet closer to the encoder.

  • @marklimbrick
    @marklimbrick 11 หลายเดือนก่อน

    Is this PID or LQR closed loop on 1/16th microsteps?
    That would be really useful, because the torque variation between microsteps prevents 1/16th accuracy even with just the tiny bearing friction. Sometimes shaft doesn't even move at all!

    • @CuriousScientist
      @CuriousScientist  11 หลายเดือนก่อน

      There's no PID in this demo. However, I recently uploaded a PID-based stepper motor controller using this encoder. Check my newest videos.

  • @rasimbot
    @rasimbot ปีที่แล้ว

    Does the motor itself affect the position accuracy? I read in the datasheet of an encoder that magnet should be mounted on a non-magnetic thing and surrounding magnetic things can affect accuracy

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi! As far as I experienced, no, the motor does not interfere with the accuracy. At least the NEMA17 stepper motors are working well with this sensor.

    • @rasimbot
      @rasimbot ปีที่แล้ว +1

      @@CuriousScientist | Thanks

  • @bhagyalakshmibaireddy273
    @bhagyalakshmibaireddy273 9 หลายเดือนก่อน

    Sir could you please explain about raw angel how to calculate raw angel and also explain raw angel calculation done for motor or sensor

    • @CuriousScientist
      @CuriousScientist  9 หลายเดือนก่อน

      Yeah, it is in the video. Watch it!

  • @botak333
    @botak333 2 ปีที่แล้ว

    Hi sir, from this tutorial is posible to move stepper to the own angle? Like a servo ( servo.write(90) ; and the servo go to 90deg) it posible to like that? Please answer

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Hi. Yes it is possible. You know the resolution of your stepper which is typically 1.8°/full step, so you can convert the steps to degrees.

    • @botak333
      @botak333 2 ปีที่แล้ว

      @@CuriousScientist yes my stepper 1.8deg (200step) so wich code to move stepper to the angle? I use as5600 also, if you can can u make a video

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Follow my videos and read what I published and you can figure it out.

    • @botak333
      @botak333 2 ปีที่แล้ว

      @@CuriousScientist yes i still learn from this video but iam new programing sir

  • @Deadshott1025
    @Deadshott1025 3 ปีที่แล้ว

    can we use it to find rpm ? of stepper motor? if not could you please suggest any incremental alternatives

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Yes we can.

    • @Deadshott1025
      @Deadshott1025 3 ปีที่แล้ว

      @@CuriousScientist could you please share any article video or resource on how?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      It is in this video... Check the angular displacement every two seconds and extrapolate it to one minute. Divide the extrapolated value with 360°. It is not difficult.

  • @d.j.peters
    @d.j.peters หลายเดือนก่อน

    What is the name of a proper magnet of this kind ? (Thank you)

    • @CuriousScientist
      @CuriousScientist  หลายเดือนก่อน +1

      I think I mentioned in the video, and I even provided a direct link for it on my website under the parts and tools page. It can't be more obvious........ It is called diametrically magnetized magnet. You can also read the datasheet and see what magnet is needed.

    • @d.j.peters
      @d.j.peters หลายเดือนก่อน +1

      @@CuriousScientist thank you

  • @jwtfpv8957
    @jwtfpv8957 7 หลายเดือนก่อน

    Great video!

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      Glad you enjoyed it, thanks!

  • @Su1tan05
    @Su1tan05 3 ปีที่แล้ว +1

    Hello, could you throw off a 3D model for attaching the encoder to the stepper motor? Thank you for such an informative video!

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      Hi! I uploaded it, you can find it on my website (see description). The reason why I haven't uploaded it from the beginning is that I am not 100% satisfied with the precision of the model. It is a lazy design. It works, but it could be improved. I hope you appreciate it.

    • @Su1tan05
      @Su1tan05 3 ปีที่แล้ว +1

      @@CuriousScientist Thank you very much. I will wait for more videos about this encoder. It would be nice to see the implementation closed loop for control of stepper motor. So that the motor turns at a certain angle and holds the position.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Building a closed loop control based on this AS5600 encoder is actually on my to-do list, but it will take some time as I want to implement a complete library. Something like the accelstepper library, but the library would rely on the angle of the shaft instead of the steps. But because of this, everything has to be reimplemented: speed, acceleration....etc.

    • @Su1tan05
      @Su1tan05 3 ปีที่แล้ว +1

      @@CuriousScientist That sounds cool! I will wait))

  • @2150dalek
    @2150dalek ปีที่แล้ว

    Just joined your patreon website...I sent a mssg on your Patreon group inquiring about your PCB for NEMA 17.

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi and thanks for your support! I saw you message and replied. Cheers!

  • @martintriendl4453
    @martintriendl4453 3 ปีที่แล้ว +2

    Very nice thanks!
    I tried this code and the Seeed-Studio lib... but i always see the same noises!
    There are randomly spikes in the angle signal (i2c connection, about +/-20 degree spikes).
    I already changed AS5600 boards and magnets... but always same.
    Does anyone have the same issue or know the cause?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      You're welcome! I saw that other people are also having some issues with noise or random fluctuations. I will revisit this device again soon and see if there is anything that I can do. So far, I haven't experienced any issues with it. How long is the cable that you use between the microcontroller and the AS5600?

    • @martintriendl4453
      @martintriendl4453 3 ปีที่แล้ว +1

      @@CuriousScientist
      Thanks for your fast reply!
      Im using two of them... one is about 20cm, the other is about 30cm.
      I just get spikes if i rotate the magnet, if it stands the signal is fine.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Hi! Another very helpful viewer recently commented that the DIR pin has to be connected to ground. This solved his issues. Could you try the same and see if it works for you?

    • @martintriendl4453
      @martintriendl4453 3 ปีที่แล้ว +1

      @@CuriousScientist I tried now... but unfortunately its still same.
      I solved it with a software filter atm coz its always the same spikes... not ideal but works for the moment.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      I will keep working on this, but please allow me some time because I have some very interesting projects lined up that I want to publish first. But I will not forget about this as this can affect other people who use my code as well.

  • @AlfieLab.
    @AlfieLab. 2 ปีที่แล้ว

    The magnet encoder as5600 that I bought is missing,
    can it be replaced with a magnet neodymium?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      It is clearly stated in the video and in the datasheet. If it is diametrically magnetised, you can use any magnet. The gap might be adjusted due to the different strengths. But I recommend ordering a proper magnet, they're dirt cheap.

  • @seanboerhout
    @seanboerhout 2 ปีที่แล้ว +1

    Do you have any suggestions for overcoming this sensor's 10-lsb hysteresis? For me it is resulting in a deadband of roughly 5 degrees for 355 - 0 degree turns.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Hmm, I have never heard about or experienced this thing. Could you tell me how to reproduce this thing? Then I will try to think about some solutions or workarounds.

  • @georgefaulk2528
    @georgefaulk2528 3 ปีที่แล้ว

    Is it possible to use a ordinary magnet with poles on each end but place it horizontally to the AS5600 and achieve the same results?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      I don't think so. The magnetic field lines have to go through the sensor perpendicular. If you rotate an ordinary magnet, the lines become parallel.

    • @georgefaulk2528
      @georgefaulk2528 3 ปีที่แล้ว +1

      @@CuriousScientist Thanks for the explanation.

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +1

      You are welcome! There should be a link for the diametrically magnetized magnets in the description of the video. They are not so expensive, it is worth to stock up from them.

    • @georgefaulk2528
      @georgefaulk2528 3 ปีที่แล้ว

      @@CuriousScientist Yes I saw the link, Thank You.

  • @ismzaxxon
    @ismzaxxon 7 หลายเดือนก่อน +1

    I live on a yacht. I want to make a wind direction sensor. Longevity is an issue in past experiments. Wire wound resistor wear out. Timing a magnet that spins has its own issues. I am thinking of using this technology to get wind direction, by mounting the magnet on a wind vane. I will just transmit this data to my receiver unit/display. I hope the units i am buying of Aliexpress are not some cheap magnets that lose magnetism after 4 weeks.

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      This should be hassle-free. Magnets losing their magnetism sounds weird. By any chance, did you heat the magnets up to 3-400°C? Or, were they exposed to any other magnetic fields? These Nd-magnets should sustain their magnetization for quite a long time. But yeah, as you mentioned, if they are some cheap garbage, they might not perform very well.

    • @ismzaxxon
      @ismzaxxon 7 หลายเดือนก่อน +1

      @@CuriousScientist I wrote the message on a phone. The magnets didn't lose power, i was wondering if the Chinese ones did. I did try to get the aliexpress sensor from your affiliate site, but didn't see the link from your site. New sub anyway.

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      They should be fine. I have had a few of these sensors for years and they still work perfectly. Regarding the links I don't know which page you were looking at but both the AS5600 circuit and the magnet separately are shared with a very clear picture under the parts and tools page. I even categorized my links and put the sensor in the "motors and related circuits" category.

    • @ismzaxxon
      @ismzaxxon 7 หลายเดือนก่อน +1

      @@CuriousScientist That is where i went wrong. I only looked in sensors and not the motor section. I just found them.

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน

      No worries! Glad you found them.

  • @qbitsday3438
    @qbitsday3438 2 ปีที่แล้ว

    can we use this encoder for Galvo DIY ?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Sorry, I don't know what Galvo DIY is.

    • @qbitsday3438
      @qbitsday3438 2 ปีที่แล้ว

      @@CuriousScientist Home Made Galvo doesn't have a proper position detector, not sure how to make a position detectors , can this encoder be user, Galvo is used in Laser Progectors and it is expensive ,

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      I have never heard about that thing so I don't know its working principles. This encoder can be used for detecting rotation. For example, you put the magnet on a rotating shaft and you can detect the rotation of it.

    • @qbitsday3438
      @qbitsday3438 2 ปีที่แล้ว +1

      No Worries , thank you for the response !

  • @NurettinOzcelik
    @NurettinOzcelik ปีที่แล้ว

    I want to use this encoder on a DC motor (Rs775). What do you think about this ?

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      It should work just fine.

    • @jake_makes_engineering
      @jake_makes_engineering 3 หลายเดือนก่อน

      Did you end up getting it to work with the DC motor? I'm trying right now on a linear actuator and it's pretty inaccurate. It skips turns and the same physical position on the actuator will show different positions from the encoder.

  • @ancellery6430
    @ancellery6430 3 ปีที่แล้ว

    is it possible to get an analog output?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Definitely! Just make sure that you have an at least 12-bit ADC so you can distinguish every step.

  • @MrManojsoparkar
    @MrManojsoparkar ปีที่แล้ว +1

    Hi sir this is Manoj would u please help in making closed loop stepper motor with STM32 (Blue Pill) & AS5600 for i m not expert in coding.

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      Hi! Sure, you can hire me for such work. My mail address is on my website.

  • @shecterelectric432
    @shecterelectric432 2 ปีที่แล้ว

    Hellow Curious Scientist. I have bought the same hardware as you and I cant make it work. The connections are exactñy the same as yours, but I cant get the screen to run. I have tried with two arduinos nanos and they get kind of warm. Do you have some advice at this? Im getting kind of frustrated. Thanks a lot for the video!

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Hi!
      If they get warm, you might have a short circuit somewhere. Do you use a breadboard or just assemble everything with wires? This is an extremely simple connection, both the display and the AS5600 board are i2c devices, so they go to the same arduino pins. Their power is also common. Does the screen work individually, have you tested it with some simple code?

    • @shecterelectric432
      @shecterelectric432 2 ปีที่แล้ว +1

      ​@@CuriousScientist Thanks for answering! I try to use the screen alone with an arduino uno and it worked perfectly with your code too.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Nice that it works with the Uno. Still it is strange that the Nano did not work because I also used the same microcontroller in the video. Maybe they were faulty already. I had a few Nanos that failed and burned a hole on the chip for no reason.

    • @shecterelectric432
      @shecterelectric432 2 ปีที่แล้ว

      @@CuriousScientist I know its weird I think is a problem of the IDE, cause it doesnt recognize the COM port for the nano and with the uno it does. So I have another issue; the program works but the values oscillate from -56.97 to 56.97, do you have any idea of why this is happening? Thanks a lot for the attention.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      That's an interesting phenomenon. I don't know why it is jumping, but I would check all the cables and connections. I would also check the position of the magnet. I don't remember having similar issues, but hopefully the above tips could solve it.

  • @jeanreinis7843
    @jeanreinis7843 3 ปีที่แล้ว

    I was looking for something like this and ordered the items. When I complied the code I got error on wire not declared. I fixed that and had other errors "not declared", previoustotalAngle, oled, magnetStatus, OLEDTimer, totalAngle, numberofTurns, correctedAngle, quadranMumber, and many others. Any help on this?

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      You probably haven't copied the code properly. Maybe missing a curly bracket "{" somewhere or something like this. I always show the same code that I use on the hardware and as you can see in the video, it works well.

  • @sharanyopramanik1235
    @sharanyopramanik1235 4 หลายเดือนก่อน

    hey, I am getting 0 angles,... any solution?

    • @CuriousScientist
      @CuriousScientist  4 หลายเดือนก่อน

      Hi! It could be many reasons. Check the magnet, check the cables...etc.

  • @rodstartube
    @rodstartube 2 ปีที่แล้ว

    Can it output AB interface?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Whats is an AB interface? Sorry, I am not familiar with this thing. BTW, have you tried reading the datasheet?

    • @rodstartube
      @rodstartube 2 ปีที่แล้ว +1

      @@CuriousScientist AB or ABI stands for "A" channel, "B" channel and "I" channel from incremental quadrature interface, but now I know AS5600 does not support it.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Thanks! Yeah, as I wrote in my other comment, this device doesn't have that kind of output.

  • @antoniojosefernandezespino4455
    @antoniojosefernandezespino4455 3 ปีที่แล้ว

    you blog is down =(

  • @zaelu
    @zaelu 2 ปีที่แล้ว

    and a cubical magnet would not work?

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      Shape does not matter if it is magnetised in the proper way.

    • @zaelu
      @zaelu 2 ปีที่แล้ว +1

      @@CuriousScientist Thanks. This makes hunting for magnets easier! :)

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว +1

      You're welcome! You don't even need to hunt for them, I provided a link for the magnets on my website. Check the Tools section and the link in the description.

    • @zaelu
      @zaelu 2 ปีที่แล้ว +1

      @@CuriousScientist Thank you! I have missed it.

  • @bulenttanriyakul3225
    @bulenttanriyakul3225 2 ปีที่แล้ว

    Every cnc addict uses Nema 23 or Nema 34.
    But the open loop stepper motor often misses steps. It messes things up too. For amateur cnc builders, getting closed loop stepper motors becomes more expensive than building the whole machine.

    • @CuriousScientist
      @CuriousScientist  2 ปีที่แล้ว

      Open loop should not miss steps *if* you size the system properly. Think about the 3d printers that can print with sub-millimeter accuracy. But yes, closed loop could make up for the occasional mistakes.

  • @piyushpanse1020
    @piyushpanse1020 3 ปีที่แล้ว

    I am getting magnet too strong and magnet too weak on 0x0b register 0b - 00110000 how is this possible

  • @ferencszabo3504
    @ferencszabo3504 3 ปีที่แล้ว

    so basically a 16 Mhz AVR cannot read in Real time from the i2c bus of the As5600 ? The whole quadrant thing approximation is a little tedious! For the whole circle i would use a HW interrupt, but the idea of the fine Readings would be lost then !

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว

      Hi! From what speed do you consider the dataflow "real-time"? I haven't tried it yet but I am pretty sure that the 16 MHz MCUs such as the Arduino Nano can handle this easily. You can measure relatively high RPMs with this encoder while still having good angular resolution. Regarding the quadrant thing, it is NOT an approximation, it is an exact method. How else would you measure the completion of a full turn and keep track of the angular displacement at the same time then?

  • @ecofuelbox
    @ecofuelbox 3 ปีที่แล้ว +4

    To avoid OLED flickering you can use faster library (U8Glib or U8G2) and/or increase I2C data transfer speed to 400kHz
    by adding this tow lines to setup fucntion.
    Wire.begin(); // begin I2C
    Wire.setClock(400000); //Set I2C SCL to High Speed Mode of 400kHz

    • @CuriousScientist
      @CuriousScientist  3 ปีที่แล้ว +2

      Thanks, I will check this and implement it in my future projects!

  • @frightrisk7407
    @frightrisk7407 3 ปีที่แล้ว

    You didn't list where we can find magnets that work

  • @denisgrossman9778
    @denisgrossman9778 9 หลายเดือนก่อน

    Ты переусложнил с квадрантами. Тебе надо только разницу проверять между изменениями и следить за переходом 2π->0 или наоборот.

    • @CuriousScientist
      @CuriousScientist  9 หลายเดือนก่อน

      What if the motor changes directions within the 360° circle? Let's say the motor is at 60° and suddenly changes direction and goes to 180° position? If the position is not checked often enough, the system might think that it went 120° in the positive direction while the real displacement was negative 240°. What would be your approach? I really want to improve the code.

  • @ArcAiN6
    @ArcAiN6 7 หลายเดือนก่อน

    now.. to get all of this to translate to mach3 XD

    • @CuriousScientist
      @CuriousScientist  7 หลายเดือนก่อน +1

      Hi! I let you have that honorable task! 😄 I am not that well-educated in CNC stuff.

    • @ArcAiN6
      @ArcAiN6 7 หลายเดือนก่อน +1

      XD
      I don't think it's going to be that difficult, all the work is pretty much done, i think i'm just going to slap an ESP32 module on a custom board that will plug onto that, and use ESP-NOW to feed the data to a main ESP32 dev board plugged into USBC

  • @RobinRastle
    @RobinRastle ปีที่แล้ว

    It is not a true absolute position encoder - its relative cos you dont have a physical zero deg state (ie end stop). An optical disc with gray code gives you true absolute (at a cost ++). Depends on your application of course. How do CNC machines do it when they work to 10 microns. You cant afford to get out of step or tolerate glitches as per your demo affected by noise - scary. I you get out of step you have to rst to a known datum somehow as per inkjet printers who zero against an end stop (some use a strain gauge sensor to detect accurate end rather than just banging into the end stop.) If you were using the motor on a lead screw for an xy table then what todo?

    • @CuriousScientist
      @CuriousScientist  ปีที่แล้ว

      It is an absolute encoder. If you don't believe it, just read the datasheet. CNC machines probably don't use this cheap sensor to replicate 10-micron precision. :)
      Regarding your last question: th-cam.com/video/IZ0FyiMYT48/w-d-xo.html

    • @RobinRastle
      @RobinRastle ปีที่แล้ว

      thanx for the tip - that 44 page data sheet ams.com/documents/20143/36005/AS5600_DS000365_5-00.pdf makes scary reading. You need to allow for toggling at 0/360 xsition point, also a static band for no movement , allowance for magnet condition vs time and temp and distance and so on - many pages of intricate detail. How many ways can this go wrong? Bottom line is that this is NOT to be confused with a true absolute encoder (as per an optical gray code disc or similar). But its a good approximation but I am concerned about its reliability in practice. The ADC has 12 bit res, how does this stack up against linearity? No data shown. Are you able to actually check this?

  • @prasadp6713
    @prasadp6713 3 ปีที่แล้ว

    Sorry curious scientist.....
    Words in your screen are invisible in a mobile device. I feel so sorry to give a like and a share.....
    Sorry.... for quitting in the middle of a very interesting topic

  • @zvibeexz7191
    @zvibeexz7191 4 หลายเดือนก่อน

    mach zusammenfassung und einfacher