You are on page 1of 6

Power Electronics

Robotic Arm Simulated Version

Purpose

The purpose of this project is to implement a simplified version of a robotic arm. This
arm uses three motors: one to control the horizontal rotation (about z-axis) of the arm,
second and third to control the vertical rotation (up & down movement).
Servo motors are used in robotics whose position is controlled by varying the duty cycle
of the waveform applied. This project uses the Hitec HS-311 servos which operate
between 4.8-6V, require a 50 Hz (20ms time period) square waveform, and are controlled
using Pulse Width Modulation. These motors can rotate through an angle of 180 degrees
max. A positive cycle duration of 0.9ms corresponds to an angle of -90 degrees and
approx 2.1ms positive cycle corresponds to +90 degrees. The position or angle in
between varies linearly with the duration of positive part in between 0.9-2.1ms. Hence,
for example, a 50 Hz square wave with peak duration of 1.5ms would move the servo to
0 degree.

6 buttons are connected to 6 input pins such that 2 buttons each control the direction of
rotation of one servo, i.e. one button moves the motor in one direction and the other
moves the motor in opposite direction

Main Components Used

1: Microcontroller 89C51

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K


bytes of Flash programmable and erasable read only memory (PEROM). The device
is manufactured using Atmel’s high-density nonvolatile memory technology and is
compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip
Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash
on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides
a highly-flexible and cost-effective solution to many embedded control applications. The
AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of
RAM, 32 I/O lines, three 16-bit timer/counters, a five vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition,
the AT89C51 is designed with static logic for operation down to zero frequency and
supports two software selectable power saving modes. The Idle Mode stops the CPU
while allowing the RAM, timer/counters, serial port and interrupt system to continue
functioning. The Power-down Mode saves the RAM contents but freezes the oscillator
disabling all other chip functions until the next hardware reset.

Pin Configurations

2: Servo Motor

There are a wide variety of servos on the market today. Ranging from micro servos with 15oz-in
torque to powerful heavy-duty sail boat servos, they all share several common characteristics.

A servo is essentially a positionable motor. The servo "knows" two things: where it is (the actual
position) and where it wants to be (the desired position). When the servo receives a position, it
attempts to move the servo horn to the desired position. The task of the servo, then, is to make
the actual position the desired position
The first step to understanding how servos work is to understand how to control them. The servo
is controlled by three wires: ground (black), power (red), and command (typically white). Power is
usually between 4v and 6v and should be separate from system power (as servos are electrically
noisy). Even small servos can draw over an amp under heavy load so the power supply should
be appropriately rated. Though not recommended, servos may be driven to higher voltages to
improve torque and speed characteristics

Servos are commanded through "Pulse Width Modulation," or PWM, signals sent through the
command wire. Essentially, the width of a pulse defines the position. For example, sending a
1.5mS pulse to the servo, tells the servo that the desired position is 90 degrees. In order for the
servo to hold this position, the command must be sent at about 50Hz, or every 20mS. The
following table shows the timing constraints of one servo

Position Pulse Width Example Pulse

Minimum 0.5mS
Center 1.5mS

Maximum 2.5mS

If you were to send a pulse longer than 2.5mS or shorter than 0.5mS, the servo would attempt to
overdrive (and possibly damage) itself.

Once the servo has received the desired position (via the PWM signal) the servo must attempt to
match the desired and actual positions. It does this by turning a small, geared motor left or right.
If, for example, the desired position is less than the actual position, the servo will turn to the left.
On the other hand, if the desired position is greater than the actual position, the servo will turn to
the right.

In this manner, the servo "zeros-in" on the correct position. Should a load force the servo horn to
the right or left, the servo will attempt to compensate.

To download the simulation and other files of


the above project click the link given at the end
of the page

You might also like