Archives for 

servo

SG90 Tower Pro Servo Datasheet

servo-for-arduino-sg90-tower-pro

servo-for-arduino-sg90-tower-pro

One type of electric motor is a servo. Servo motor is used to make mechanical robotic or automated devices. Servo work based on the frequency signal from the controller (such as a microcontroller or arduino). Tower Pro SG90 servo motor can also be controlled by a ruspberry pi. You can plug this SG90 Tower Pro Servo straight onto the raspberry pi GPIO pins 4,6,8 without some extra wires. Pin 8 on the raspberry pi is normally the UART Tx pin, so your SG90 Tower Pro servo will not work properly if you connect it without disabling the UART before running the main program, You can search the instructions for how to disabling the UART on pin 8 from google.

sg90 tower pro servo cable pin

sg90 tower pro servo cable pin

Each servo motor cables have different pin configurations. Tower Pro SG90 servo has a three-pin cable. Red cable is wired VCC. Black/brown cable is a ground cable. While the orange cable is a signal cable.

You can find the SG90 Tower Pro servo tutorial and arduino uno source code here.

Build Your Own Hexapod Robot

servo-for-hexapod-robot

servo-for-hexapod-robot

Hexapod robot is a robot that has six legs. Hexapod robot is used for through steep terrain or rocky areas. Wheeled robots can’t pass through the rocky and steep area. Therefore hexapod robot designed to replace wheeled robots in this area. Hexapod robot inspired by spider legs. Six feet make a robot stable and has a smooth movement. The movement of the robot will be smoother if more joints on the robot.

Each robot joints filled by a servo motor. Servo motor allows a movement like a joint in humans or animals. However, in general, the servo will only make one-way direction movement (right-left). So if you are going to make a four-way movement (right-left-front-back) then it must be made of two joints.

In general, a hexapod robot has three joints on each leg. So you need eighteen servo to make a hexapod robot.

how to make hexapod robot mechanics

how to make hexapod robot mechanics

Now many companies that sell body hexapod robot. So you do not have to bother making mechanics. Part of the body of the robot is shown in the image above. There are five different robot parts. To make a joint, you can use a servo Tower Pro SG90 as used in the hexapod robot in the picture No. 1. But the selection of servo should be tailored to the needs of torque. If the load of the robot is heavy, then you should use a servo with greater torque.

small servo for hexapod robot

small servo for hexapod robot

Source Code for Arduino Servo Control

tower-pro-sg90-servo-and-arduino-uno-wiring-cable-tutorial

tower-pro-sg90-servo-and-arduino-uno-wiring-cable-tutorial

Servo is one type of motor controlled by a frequency signal. However, some types of servo have different ways to control it. Because each type of servo have different degrees of movement.

For example, I use a servo Tower Pro SG90 and controlled using the Arduino UNO. Servo Tower Pro SG90 this has the following specifications (or you can read here for more details):

Tiny and lightweight with high output power. Servo can rotate approximately 180 degrees (90 in each direction), and works just like the standard kinds but smaller. You can use any servo code, hardware or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gear box, especially since it will fit in small places. It comes with a 3 horns (arms) and hardware.

Tower Pro SG90 Specifications :
Weight: 9 g
Dimension: 22.2 x 11.8 x 31 mm approx.
Stall torque: 1.8 kgf·cm
Operating speed: 0.1 s/60 degree
Operating voltage: 4.8 V (~5V)
Dead band width: 10 μs
Temperature range: 0 °C – 55 °C

 

Tower Pro SG90 Servo characteristic : Position “0” (1.5 ms pulse) is middle, “90” (~2 ms pulse) is all the way to the right, “-90” (~1ms pulse) is all the way to the left.

This is the Arduino Source Code for the Sweep Mode Servo :

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

void setup()
{
myservo.attach(2); // attaches the servo on pin 2 to the servo object
}

void loop()
{
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
}