Using Rotary Encoders with Arduino
DroneBot Workshop
View ChannelAbout
Welcome to the Workshop! The DroneBot Workshop is the place where I work with Arduino, Raspberry Pi, ESP32, and lots of other cool microcontrollers, components, and sensors. This is a channel for learning and understanding. While I do build projects, most episodes focus on showing you HOW things work, so you can use the information to bring your own designs to life. Every video has a corresponding article on my website at https://dronebotworkshop.com , along with the diagrams and code samples you’ll need to build your own creations. You can also participate in discussions on my Forum at https://forum.dronebotworkshop.com. Please note that I no longer do any sponsored videos, enquiries for these will be ignored! If you'd like to know more about me or the DroneBot Workshop you can read the FAQ at https://dronebotworkshop.com/about-dronebot-workshop/faq/ And if you have technical questions please ask them on the Forum. Welcome to the Workshop! I hope you enjoy your stay! Bill
Latest Posts
Video Description
Rotary encoders are versatile devices that can be used both as controls and as instruments to measure the rotation of a DC motor. Today I will show you how to do both of those things using rotary encoders and an Arduino. Complete article with code - https://dronebotworkshop.com/rotary-encoders-arduino/ More articles and tutorials: https://dronebotworkshop.com Join the conversation on the forum: https://forum.dronebotworkshop.com Subscribe to the newsletter and stay in touch:https://dronebotworkshop.com/subscribe/ We will look at two types of rotary encoders today. The first one is a very common control that looks a bit like a potentiometer but, as you will see, is much more accurate and versatile. The second rotary encoder we’ll examine is attached to the back of the DC Gearmotor I’m using to build my DB1 robot. Both encoders work on similar principles. I’ll show you how rotary encoders can determine both the position and direction of rotation by using and comparing two output pulses. Then we will create and run a few Arduino sketches to put them to use. In the first sketch, we will see how to read the value from a rotary encoder control. Next, we will add a servo motor and precisely control its position with a rotary encoder. After that, we will bring out the servo motor encoder. We will look at the output pulses on an oscilloscope, then we will connect it to an Arduino to build a tachometer of sorts, reading the RPM of the motor. Here is the Table of Contents for today's video. 00:00 - Introduction 02:15 - Rotary Encoder Operation 06:13 - Basic Rotary Encoder Control Sketch 12:09 - Controlling a Servo Motor 18:40 - Rotary Encoder on a DC Gear Motor 21:08 - Reading RPM from a Motor As usual, you will find all of the code in a detailed article on the DroneBot Workshop website. And if you haven't subscribed to the YouTube channel then now is the time! Just hit the Subscribe button and you’re in the club! Hope you enjoy the video, thanks for watching!
Essential Slime Making Kit
AI-recommended products based on this video

Calming Collar for Dogs 4 Pack Dog Calming Collar with Soothing Pheromone for Dog Helps Relieve Anxiety Stress Adjustable for Dogs Long-Lasting 60 Days Pet Calming Collars Grey

Jacked Factory Creatine Stick Packs - Creatine Monohydrate Powder 5000mg Per Stick - Creatine Supplement for Muscle Growth, Increased Strength, and Improved Athletic Performance - 30 Pack, Unflavoured

Huer - Frank's RedHot Original Spicy Gummy Bears 3 Pack - Sweet, Spicy, Salty, Fruity Candy - 6 Flavours - A Fiery Twist on Classic Gummies - 100g Bag (Pack of 3)

COZSINOOR Pillows Queen Size 2 Pack for Sleeping - Bed Pillows Hotel Quality Cooling Down Alternative Microfiber Filled for Side, Back and Stomach Sleepers, Breathable Skin-Friendly

3D Spiral Apples Silicone Molds for Baking | Food Grade Mousse Cake Chocolate Molds | Reusable Baking Molds Silicone Shapes (3.46x3.46x2.09in)

Apples Silicone molds Spiral Pastry Chocolate Mousse Cake Molds for Cupcake topper, Candy, Gummy, Ice Cube, Soap

Spiral Apples Mousse Cake Silicone molds French Pastry Chocolate molds Candle molds Burns Up to 45 Hours - Pack of 6, Frost

Spiral Apples Mousse Cake Silicone molds French Pastry Chocolate molds Candle molds Burns Up to 45 Hours - Pack of 6, Frost

GuaGua for Galaxy S25 Case Samsung S25 Case Glow in The Dark Noctilucent Luminous Cover Space Nebula Slim Thin Shockproof Protective Phone Cases for Samsung S25, Purple/Blue

LEGO Marvel Spider-Man's Car and Doc Ock Building Set, Spidey and His Amazing Friends Buildable Toy for Kids 4 Plus Years Old with Glow in The Dark Pieces, 10789

Kids Rock Painting Kit - Glow in The Dark - Arts & Crafts Easter Gifts for Boys and Girls Ages 4-12 - Craft Activities Kits - Creative Art Toys for 4, 5, 6, 7, 8, 9, 10, 11 & 12 Year Old Kids




