Hooking up a servo motor arduino
Each servo is different, and sometimes two servos with same model number from the same manufacturer will have different ranges. Also, you need to know that overdriving the servo beyond the range it wants to be in can damage both your arduino and your servo.
HOOKING UP A SERVO MOTOR ARDUINO FULL
The truth is though, that most will not operate over that full range. Most servos are designed to be operational in a range from 0 degrees to 180 degrees.
This simple circuit allows you to create a voltage divider with a potentiometer, which we will use to set position of the Servo. As a reminder, this is circuit diagram for the potentiometer, which you will be using in this project. Be sure to check the instructions on your servo to verify the color code. For many of these types, the red is for power, the orange is for the control line, and the brown is for ground. Also, some servos have a different color code on the wires. The one in the sparkfun kit can be driven by the arduino without a problem.
Realize that you must be careful and not hook a larger servo to the arduino for power, as that can damage your arduino. Understand that many servos draw lots of power, and require a separate power supply, and just the control line connects to the arduino. The small servo that comes with the sparkfun kit can be powered directly from the arduino. The white line is the control line, and it should be hooked up to one of the arduino pins with a squiggly line. The black line is ground, and should be hooked up to ground on the arduino. The red line is for power, so it should be hooked up to 5V from the arduino. for the servo in the sparkfun kit, it has three wires. In addition, we will need to hook the servo up.
In order to do this, we will need to start with our Voltage Divider Potentiometer circuit from LESSON 10. The servo should “track” the position of the potentiometer. Circuit for controlling a Servo from the Arduino using a Potentiometerįor this project, our objective is to control the position of a servo based on the setting of a potentiometer. If you have the sparkfun inventor kit, it has everything you need (You can pick up the inventor kit HERE). You will need an arduino, a servo, a potentiometer and some wires.
HOOKING UP A SERVO MOTOR ARDUINO HOW TO
Its time to get moving! In this project we show you how to get things moving with Arduino.