Servo Motor Control by using Microcontroller PIC16F877A

PIC16F877A is an easy micro controller for the beginners
Here in project:
1) How PIC switches servo motor forward and back ward
When we push one switch it goes to positive 90 degree , on second switch it moves backward to  negative 90 degree
Servo Motor Control by using Microcontroller PIC16F877A
a. MickroC  PRO        // for programming of MICRO CONTROLLER
b. Proteous  8 professional       //For simulation of CKT and Design

Eng. Mahmoud Abuzayed

Step 1: R/C Servo Control Theory

Servos designed for use in radio-controlled airplanes, cars, and boats can be easily interfaced to a PIC MCU. They are often used for robots and applications where simple mechanical movement is required. This might be surprising because a positional servo is considered to be an analog device. The output of an RC servo is usually a wheel that can be rotated from 0 to 90 degrees. (some servos can turn from 0 to 180 and others have very high torque outputs for special applications). Typically, they only require +5 V, ground, and an input signal.

An RC servo is an analog device; the input is a PWM signal at digital voltage level. This pulse is between 1.0 and 2.0 ms long and repeats every 20 ms .The length of the PWM pulse determines the position of the servo’s wheel. A 1.0-ms pulse will cause the wheel to go to 0 degrees and a 2.0-ms pulse will cause the wheel to go to 90 degrees.

Pulse Width Modulation (PWM)
Pulse Width Modulation (PWM) is one of the powerful techniques used in control systems today. They are not only employed in wide range of control application which includes: speed control, power control, measure and communication.
Servo Motor Control by using Microcontroller PIC16F877A
Basic Principal of PWM

READ  Wireless Sensor Motor Control using PIC18LF4520

PWM is achieved with the help of a square wave whose duty cycle is changed to get a varying voltage output as a result of average value of waveform. A mathematical explanation of this is given below:


For more detail: Servo Motor Control by using Microcontroller PIC16F877A

Current Project / Post can also be found using:

  • pic 16f877a servo proteus pdf
  • servo motor control with pic16f877a code example pdf
  • servo motor with pic16f877a

Leave a Comment

= 5 + 9

Read previous post:
Simple Constant Current Driver for a High Power LED

** Schematic diagram corrected and updated ** In my previous post, I slapped together a quick LED lighting solution for...

Scroll to top