[Tutorial] How to Use Incremental Encoders with Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ค. 2024
  • Thank you so much for watching my video, I hope it was helpful!
    For questions feel free to leave me a comment and I will try getting back to you :)
    📖 Chapters 📖
    00:00 - Intro
    00:15 - Theory
    01:32 - Wiring
    02:02 - Code
    02:55 - Outro
    🔗 Resources 🔗
    Code (GitHub): github.com/Phlipinator/Tutorials
    Encoder: www.mouser.de/ProductDetail/6...
    🎵 Music by Panda Beats 🎵
    pandabeatsmusic.com/
    Dreaming: open.spotify.com/intl-de/trac...
    #IncrementalEncoders #ArduinoProjects #BurnsEncoders #EncoderTutorial #ArduinoNano #MechanicalEngineering #ElectronicsTutorial #DIYElectoronics #EncoderWiring #RotaryEncoders #ArduinoProgramming #EncoderAndArduino #DIYEncoderWiring #ElectroMechanicalDevices #AngularPositionSensing #DigitalOutputSignals #EncoderCodeExample #DirectionOfRotation #ElectronicsComponents #MicrocontrollerProjects #ArduinoForBeginners #STEMEducation #EngineeringTutorial #TechDIY

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

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

    very nice video with great quality. Keep making more!. Wishing you the best.

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

      Thank you for the encouragement, This means a lot to me!
      I am planning to do more.
      Anything specific you would like to see?

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

    Great explanation.
    Great animation.

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

    While this shows the fundamentals of how incremental encoders work, this implementation wouldn’t work so great in practice because you’re hogging CPU time to make sure you don’t miss a pulse.
    This would be an excellent time to use interrupts to trigger this logic, which would free up your CPU cycles to actually run the rest of your project.

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

      I also had a version that was using interrupts. However, that was causing issues with rest of the code I was using in my project 🤔
      I settled for this approach, because its more „general purpose“, I think.
      Thank you for the comment though. I am also not all-knowing and would love to learn more about the topic :)

    • @lohikarhu734
      @lohikarhu734 6 วันที่ผ่านมา

      You might like to look at the STM32 encoder functions, which use 2 timers to do count and direction, with the ability to "chain" the encoder counter to another timer to get the pulse width of the transitions, to generate speed values...

    • @PhilippThalhammer
      @PhilippThalhammer  6 วันที่ผ่านมา

      Sounds interesting 🤔

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

    Wait, it doesn't have a Vin pin?

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

      This one does not. There are models with 4 Pins, that include a Vin I belive.
      When I started playing around with it, I assumed it would be working the same as a Potentiometer and connected 1 pin to ground, one to a GPIO and one to 3.3V. This resulted in me frying my microcontroller 😂

  • @lohikarhu734
    @lohikarhu734 6 วันที่ผ่านมา

    Einfach... Interesse encoding both step change to get direction.

    • @PhilippThalhammer
      @PhilippThalhammer  6 วันที่ผ่านมา

      What do you mean by this? 😅
      I already get the direction 🤔