Post Top Ad

Tuesday, January 17, 2023

on video How to use Rotary Encoder with Arduino


 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.

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.


 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.

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.

No comments:

Post a Comment

Post Top Ad

Pages