

#SERVO MOTOR PROJECTS HOW TO#
In this tutorial we will simply use one servo motor to show how to program our PIC MCU to control the motor. The colour coding of your servo motor might differ hence check for your respective datasheet.Īll servo motors work directly with your +5V supply rails but we have to be careful on the amount of current the motor would consume, if you are planning to use more than two servo motors a proper servo shield should be designed. In this tutorial we will be using a MG995 Metal Gear Servo Motor which is most commonly used for RC cars humanoid bots etc. Out of which two will be used for Supply (positive and negative) and one will be used for the signal that is to be sent from the MCU. Servos have three wires coming out of them. Interfacing hobby Servo motors with MCU is very easy. Interfacing Servo Motors with Microcontrollers: For example: A 6kg/cm Servo motor should be able to lift 6kg if the load is suspended 1cm away from the motors shaft, the greater the distance the lesser the weight carrying capacity. This kg/cm tells you how much weight your servo motor can lift at a particular distance. Servo motors are rated in kg/cm (kilogram per centimetre) most hobby servo motors are rated at 3kg/cm or 6kg/cm or 12kg/cm. Metal gear is used in places where the motor is subjected to more wear and tear, but it comes only at a high price. There are two types of Servo motors based on the gear, one is the Plastic Gear Servo Motor and the other is Metal Gear Servo Motor. This tutorial uses a 0- 180° servo motor. Most of the hobby servo motors have a rotational angel of 0- 180° but you can also get 360° servo motor if you’re interested. They also eliminate the need to custom design a control system for each application.

They provide an off-the-shelf solution for most of the R/C and robotic hobbyist's needs. Hobby servos are a popular because they are the inexpensive method of motion control. There are many types of Servo motors available but in this tutorial let us concentrate on the hobby servo motors shown below. We will simulate and build the hardware setup for this project and you can find the detailed Video at the end of this Tutorial.Ī Servo Motor is a type of actuator (mostly circular) that allows angular control. YES, Servo motors respond to the PWM signals (which we create using timers here) we will learn why and how in this tutorial. If you have understood all programs then, Congratulations you have already coded for a Servo motor also. In our previous tutorial we learnt how to generate PWM signals using PIC Microcontroller, the signals were generated based on the value read from the potentiometer. If you are an absolute beginner, then please visit the complete list of PIC tutorials here and start learning. Till now, we have covered many basic tutorials like LED blinking with PIC, Timers in PIC, interfacing LCD, interfacing 7-segment, ADC using PIC etc. If you have already worked with Servo motors you can skip the first half of this tutorial but if you are new to servo motor itself then continue reading. In this tutorial we will learn How to control Servo Motor with PIC Microcontroller.

This is our 11th tutorial of Learning PIC microcontrollers using MPLAB and XC8.
