DC Motor Control with Encoder Using Arduino Uno
Control and monitor the speed of a DC motor with encoder feedback using Arduino Uno. This project demonstrates a basic closed-loop motor control system using PWM, real-time feedback, and speed display on an LCD — ideal for robotics and automation learning.
Simulated in Tinkercad or built on hardware, this system integrates signal conditioning, transistor-based motor driving, and RPM monitoring.
Key Components and Their Functions
1. Arduino Uno
The central controller that:
-
Reads encoder pulses
-
Generates PWM signals
-
Calculates RPM
-
Displays speed on LCD
2. DC Motor with Encoder
-
Provides rotational motion
-
Encoder generates pulse signals
-
Pulses are used to measure motor speed (RPM)
3. 16x2 LCD Display
-
Displays real-time motor speed (RPM)
-
Can show set speed and actual speed
4. Potentiometer
-
Acts as a speed control knob
-
Sends analog voltage (0–5V) to Arduino
-
Sets desired motor speed
5. Power Supply
-
Provides required voltage and current to motor
-
Ensures stable operation
6. Oscilloscope
-
Observes PWM waveform
-
Monitors encoder pulse signals
-
Helps in debugging and tuning
7. Op-Amp Circuit
-
Conditions or amplifies encoder signals
-
Ensures clean pulse input to Arduino
-
Improves signal reliability
8. NPN Transistor (e.g., 2N2222)
-
Works as a switching device
-
Receives PWM from Arduino
-
Controls motor current safely
Working Principle (Step-by-Step Explanation)
This project demonstrates a closed-loop motor control system.
Step 1: Speed Input
The user adjusts the potentiometer to set the desired speed.
Step 2: Analog Reading
The Arduino reads the analog voltage using analogRead().
Step 3: PWM Generation
The Arduino converts this value into a PWM signal using analogWrite().
-
Higher duty cycle → Higher motor speed
-
Lower duty cycle → Lower motor speed
Step 4: Motor Driving
The PWM signal is sent to the 2N2222 transistor, which drives the motor.
Step 5: Encoder Feedback
The encoder generates pulses proportional to motor rotation.
Step 6: Speed Calculation
The Arduino:
-
Counts encoder pulses
-
Calculates RPM using time-based measurement
-
Compares actual speed with desired speed (basic feedback concept)
Step 7: Display Output
The calculated RPM is displayed on the 16x2 LCD.
Step 8: Signal Monitoring
The oscilloscope monitors:
-
PWM waveform
-
Encoder output signals
This helps analyze performance and fine-tune the system.
Closed-Loop Control Concept
Unlike open-loop systems, this setup uses feedback:
-
Desired Speed → From Potentiometer
-
Actual Speed → From Encoder
-
Controller → Arduino
-
Correction → PWM Adjustment
This forms the foundation of PID motor control systems used in robotics and automation.
Applications
This project is widely used in:
BEGINNER PROJECTS (Foundation Skills)
- Ultrasonic Distance Measurement
- Traffic Light Simulation with 7-Segment Display
- 7-Segment Display Counter
- Kids Piano Circuit (8-Key Version)
- 16×2 LCD Display with Text Output
- LCD I2C to Arduino UNO
- Temperature Measurement using Arduino UNO
- LDR Controlled Street Light
INTERMEDIATE PROJECTS (Build Your Skills)
- Servo Motor Control Using Potentiometer
- DC Motor Speed Control
- Temperature Controlled Fan
- PIR Based Theft Alert System
- LPG Gas Leakage Detection System
- Automatic Door Locking System
- Soil Moisture Based Automatic Watering System
- Simple Digital Clock using Arduino UNO
- Automatic Voting Machine (EVM)
- Joystick Control using Arduino Uno
- RGB Lamp Control using Arduino Uno
ADVANCED PROJECTS (Master Level)
- Home Automation Using Arduino UNO
- Bluetooth RC Car using Arduino Uno
- Obstacle Avoiding Robot
- Line Follower Robot
- Radar System Using Arduino UNO
- Automatic Parking System
- Bi-Directional People Counter using Arduino Uno
- Automatic Plant Watering System
- NeoPixel LED Ring Control using Arduino Uno
- Smart Gloves for Bedridden People

Comments
Post a Comment