N20 miniature DC geared motor with AS5600 encoder and PID

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

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

  • @wolpumba4099
    @wolpumba4099 7 หลายเดือนก่อน +4

    Video Summary: N20 miniature DC geared motor with AS5600 encoder and PID
    * *[**0:00**]* Introduction and Problem: Standard N20 geared motors with built-in encoders are inaccurate for precise positioning due to backlash and slack in the gearbox.
    * *[**4:49**]* Solution: Replace the built-in encoder with an AS5600 absolute magnetic encoder (0-360°) mounted on the gearbox output shaft.
    * *[**6:42**]* Implementation:
    * Attach a small magnet to the back of the output shaft.
    * 3D print a bracket to house the AS5600 and position it accurately over the magnet.
    * *[**7:59**]* Demonstration:
    * Uses a simple setup with a motor driver, rotary encoder for target setting, and display.
    * Motor accurately moves to target positions set with the rotary encoder, demonstrating improved accuracy.
    * *[**15:04**]* Code:
    * Combines code from previous videos on AS5600 and PID control of DC motors.
    * Reads encoder position, calculates error, and uses PID algorithm to control motor speed and direction.
    * Includes code for magnet presence detection, rotary encoder button handling, and display updates.
    * *[**43:24**]* Call to action:
    * Support the creator on Patreon for access to code files and to see more projects.
    * Visit the website for schematics, parts list, and more information.
    i used gemini 1.5 pro to summarize the transcript.

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

      This is fantastic, thank you! So if I understand correctly, the AI basically watches the video and then interprets what I said and creates a summary, right? It is very cool!

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

      @@CuriousScientist not that advanced. i write something like "i don't want to watch the whole video, give me a bullet list summary" and copy and paste the transcript from your video into the prompt

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

      Nice! However, I hope people will still watch my videos instead of AIs. 😅

  • @owlsight4499
    @owlsight4499 7 หลายเดือนก่อน +4

    Great video as always!
    A minor and friendly correction, though:
    @ 10:56 - The 12-bit resolution equals 4096 distinct values - remember to also count '0' as such a value.
    So it should be 360/4096, to be precise. Not 360/4095.

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

      Thanks! And I should say "user name checks out"! 😀Even funnier that I actually read Nick Gammon's discussion on this topic (1023 vs 1024), but I still keep messing this thing up. Luckily, it is only 0.0000215° error per conversion, but still, bad practice should not be used. I will try to avoid this in the future. Thanks again!

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

    Just one fact to consider; the magnet has to be positioned a bit off-center of the chip, the exact position of the sensor center is printed in the AS5600 data sheet. With such a small magnet the difference does matter.

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

      I don't know where you saw this information, but the datasheet does not explicitly say that it has to be off-centered. It only mentions the maximum allowed displacement of the rotational axis of the magnet from the center of the package. But it does not mention anything about a mandatory offset.

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

    Very Helpfull.Thank you.

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

      I am happy to hear that! Cheers!

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

    Another awesome vid.

  • @noanyobiseniss7462
    @noanyobiseniss7462 7 หลายเดือนก่อน +4

    Algo time!