[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
very nice video with great quality. Keep making more!. Wishing you the best.
Thank you for the encouragement, This means a lot to me!
I am planning to do more.
Anything specific you would like to see?
Great explanation.
Great animation.
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.
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 :)
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...
Sounds interesting 🤔
Wait, it doesn't have a Vin pin?
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 😂
Einfach... Interesse encoding both step change to get direction.
What do you mean by this? 😅
I already get the direction 🤔