GUTTULA. KRISHNA .CHAITANYA
LORDS INSTITUTE OF ENGINEERING AND TECHNOLOGY
(Approved by AICTE – New Delhi AND Affiliated to JNTU-Hyderabad)
Sy. No.32, Himayatsagar, Hyderabad
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
IMPLEMENTATION OF MOBILE CONTROLLED ROBOT
Aim of the project:
The aim of the project is to design the mobile controlled robot using hardware description language.
Robotic manipulators are widely used to replace human operators in tasks that are repetitive in nature. However, there are many tasks that are non-repetitive, unpredictable, or hazardous to the human operators. Clearing up a nuclear power plant leak or exploring the extreme depths of ocean are just some examples. The most developed robot in practical use today is the robotic arm and it is seen in applications throughout the world. Robotic are used to carry out work in outer space where man cannot survive and also used to do work in the medical field such as conducting experiments without exposing the researcher.
In early days, robotic manipulators have been implemented in different control techniques like mechanical control and the remote control or tele-opertation. But with the advent of high performance, a new way of control using mobile has been implemented which is introduced in this project.
All the above systems are controlled by the Microcontroller. In our project we are using the popular 8bit microcontroller AT89S52. It is a 40 pin microcontroller.The Microcontroller AT89S52 is used to control the dc motors. It gets the signals from the DTMF decoder and it drives the motors according to the DTMF inputs. Two DC motors are used to drive the robot in four directions i.e. Front ,Back ,Right ,Left
Robotic manipulators are widely used to replace human operators in tasks that are repetitive in nature. However, there are many tasks that are non-repetitive, unpredictable, or hazardous to the human operators. Clearing up a nuclear power plant leak or exploring the extreme depths of ocean are just some examples. The most developed robot in practical use today is the robotic arm and it is seen in applications throughout the world. Robotic arms are used to carry out work in outer space where man cannot survive and also used to do work in the medical field such as conducting experiments without exposing the researcher.In early days, robotic manipulators have been implemented in different control techniques like mechanical control and the remote control or tele-opertation. Butwith the advent of high performance, a new way of control using mobile has beenimplemented which is introduced in this project. The remote control of physical Systems by humans through the mediation of mobile is the concept. In order to successfully execute a given task, control software is necessary that sends and tracks appropriate orders to the robot arm. This project presents the design principles of a general software framework capable to control any real time robot arm without any set of feedback devices. A possible implementation of such a general
1.2 Project technology:
The technology used in this project is Embedded Systems.
Definition of embedded systems
Embedded system is a combination of hardware and software, it is also named as “Firm ware”.An embedded system is a special purpose computer system, which is completely encapsulated by the device it controls. It is a computer-controlled system.An embedded system is a specialized system that is a part of a larger system or machine. As a part of a larger system it largely determines its functionality. Embedded systems are electronic devices that incorporate microprocessors with in their implementations. The main purpose of the microprocessors are simplify the system design and improve flexibility. In the embedded systems, the software is often stored in a read only memory (RAM) chip.Embedded systems provide several major functions including monitoring of the analog environment by reading data from sensors and controlling actuators.
Examples of Embedded systems
Embedded systems are found in wide range of application areas. Originally they were used only for expensive industrial control applications, but as technology brought down the cost of dedicated processors, they began to appear in moderately expensive applications such as automobiles, communication and office equipments and television Today's embedded systems are so inexpensive that they are used in almost every electronic product in our life. Embedded systems are often designed for mass production.
Some examples of embedded systems:
• Automatic Teller Machines
• Cellular telephone and telephone switches
• Computer network equipment
• Computer printers
• Disk drives
• Engine controllers and antilock break controllers for automobiles
• Home automation products
• Handheld calculators
• Household appliances
• Medical equipment
• Measurement equipment
• Multifunction wrist watches
• Multifunction printers
Microprocessors and Microcontrollers
Microprocessors and microcontrollers are used in embedded system products. An embedded product uses a microprocessor ( or microcontroller ) to do one task and one task only.
Microprocessor as the term come to be known is a general purpose digital computer central processing unit. Although popularly known as a "computer on chip", the microprocessor is in no sense a complete digital computer.
Microprocessor CPU contains Arithmetic Logical Unit, a program counter, a stack pointer, some working registers, a clock timing circuits and interrupt circuit.
To make complete microcomputer memory must add, usually Read Only Memory, Random Access Memory, memory decoders and an Input/Output devices. In addition special purpose devices such as interrupts, counters may be added to relieve the CPU from time consuming counting or timing chores.
The hardware design of microprocessor CPU is arranged so that a small or very large system can be configured around the CPU as the application demands. The internal CPU architecture as well as the resultant machine level code that operates that architecture is comprehensive but as flexible as possible.The prime use of microprocessor is to read data perform extensive calculations on that data and store those calculations in mass storage devices or display the results for user use. The program is used by microprocessor are stored in the mass storage devices and loaded into RAM as the user directs.A microcontrollers is a computer on a single chip .Micro suggest that the device is small and controller tells that the device is used to control objects, process or events
Microcontroller is a highly integrated chip that contains all the devices comprising a computer. Typically this includes a CPU, RAM, Input/ Output ports, timers, interrupts. So microcontroller is also called as "true computer on a chip". Unlike a general purpose computer which also includes all of these devices. A microcontroller is designed for a very specific task to control a particular system.
A microcontroller is a general purpose device but one that is meant to read data, performs limited calculations on that data and control its environment based on those calculations.
The prime use of microcontroller is to control the operation of machine using a fixed program that is stored in ROM that does not change over the life time of the system.
The advantages of microcontroller over microprocessor are
• cost is less
• speed is more
• power consumption is less
• compact device
• external components are minimum
1.3 Significance and applications:
Robotic Arm plays a very important role in industrial as well as domestic applications. The ease of operation of the kit and low cost add up as an additional advantage for its usage. Its significance can be proved by considering the following specialties of kit designed by us
• Reliability: Reliability is one such factor that every electrical system should have in order to render its services without malfunctioning over along period of time. We have designed our kit using AT89C52 micro controller which is itself very reliable and also operates very efficiently under normal condition
• Cost: The design is implemented at a very economical price. The total cost incurred by us in designing this kit is very less and further we have developed the Arm of Robot which are more economical rather than just interfacing those which are readily available in the market.
• Ease of operation: Mobile is being used as the mode to give instructions to Robot. As the operation of mobile is comfortable one can easily handle it to instruct the Robot as for his wish.
CIRCUITS AND THEIR OPERATION
In this chapter, the entire circuitry of the project is shown. The design parameters kept in mind while the circuits are being designed are clearly explained. Also the chapter includes the main important part of any hardware project i.e., a power supply, its circuit and its internal circuit components. On the whole this chapter gives the circuits employed in the whole projects and their interfacing.
2.2 Power supply:
There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. For example a 5V regulated supply can be shown as below
A transformer steps down high voltage AC mains to low voltage AC. Here we are using a center-tap transformer whose output will be sinusoidal with 36volts peak to peak value.
The low voltage AC output is suitable for lamps, heaters and special AC motors. It is not suitable for electronic circuits unless they include a rectifier and a smoothing capacitor. The transformer output is given to the rectifier circuit.
A rectifier converts AC to DC, but the DC output is varying. There are several types of rectifiers; here we use a bridge rectifier. The Bridge rectifier is a circuit, which converts an ac voltage to dc voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is shown in the figure. The circuit has four diodes connected to form a bridge. The ac input voltage is applied to the diagonally opposite ends of the bridge. The load resistance is connected between the other two ends of the bridge.For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with the load resistance RL and hence the load current flows through RL. .For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load resistance RL and hence the current flows through RL in the same direction as in the previous half cycle. Thus a bi-directional wave is converted into unidirectional.
The varying DC output is suitable for lamps, heaters and standard motors. It is not suitable for lamps, heaters and standard motors. It is not suitable for electronic circuits unless they include a smoothing capacitor.
The smoothing block smoothes the DC from varying greatly to a small ripple and the ripple voltage is defined as the deviation of the load voltage from its DC value. Smoothing is also named as filtering.Filtering is frequently effected by shunting the load with a capacitor. The action of this system depends on the fact that the capacitor stores energy during the conduction period and delivers this energy to the loads during the no conducting period. In this way, the time during which the current passes through the load is prolonging Ted, and the ripple is considerably decreased. The action of the capacitor is shown with the help of waveform.
Regulator eliminates ripple by setting DC output to a fixed voltage. Voltage regulator ICs are available with fixed (typically 5V, 12V and 15V) or variable output voltages. Negative voltage regulators are also availableMany of the fixed voltage regulator ICs has 3 leads (input, output and high impedance). They include a hole for attaching a heat sink if necessary. Zener diode is an example of fixed regulator which is shown here.
2.3.1 Circuit Description:
The main aim of the project is development of robotic arm control using mobile phone. Here we used DTMF IC to decode tones that are received from the dialed phone into hex values (i.e. if you press 1 from the dialed phone the receiver phone receives the tone and transfer to the DTMF IC HT 9170 B ASTHIS IC converts into hex equivalent i.e. 0x01) which are parallels transferred to the microcontroller port 1 lower bits.
In controller section we write an software program for different motors defined below to move in different directions according to the values received from the DTMF IC
1. FORWARD DIRECTION
2. BACKWORD DIRECTION
3. LEFT DIRECTION
4. RIGHT DIRECTION
Here are the brief descriptions as how we are using the helical gear motors as the above four motors for the project purposes.
1. SHAFT MOTOR:
As this motor moves the shaft up and down. it operates for the keys 1 and 2 from the dialed telephone key pad as microcontroller receive 0x01 and 0x02 the shaft motor rotates in clock wise direction Which the motor moves the shaft in upward direction if it receives 0x02 shaft motor rotates in anti clock wise direction which motor moves in downward direction
2. ANGLE MOTOR:
As this motor moves the angle motor forward and backward to get exact angle to move toward the object. It operates for the key 3 and 4 from the dialed telephone key pad as the microntroller receive 0x03 and 0x04 as angle motor rotates in clockwise and anti clockwise when it receive this hexa values
3. BOTTOM MOTORS
We use two motors to rotate the two rear wheels, one for each. These motors rotate the entire equipment in 4 directions: left, right, forward and backward directions. We use 7,9,8and 0 from the dialed telephone key pads for respective direction as the controller receives 0x07,0x09,0x08 and 0x00 from DTMF IC.
4. GRIP MOTOR:
As this motor used to grip the object with help of the clip connected to the motor. As we press ‘6’ from the dialed telephone key pad the controller receives 0x06 value.
2.4 Project Implementation using DTMF Technology:
As we used key ‘5’ common for all the motors including grip to be in off conditions for safety purposes. As the motors will on and off with help of the relays connected to the different motors. As we know that relay acts as the switch to on/off the motor.
• Relays DPDT used here to rotate helical gear motor in clock-wise as well as anti-clock wise.
• Relays SPDT used to rotate the grip motor in clock-wise direction.
• All the relays used here operate for the 12v dc which microntroller cannot be used to drive them. Hence we use driver IC ULN2803s to drive the relays to on the appropriate motors.
• The controller operates for 5v dc and driver IC operates for 12v dc.
DESCRIPTION OF HARDWARE COMPONENTS
A brief history of microcontrollers:
In 1981, Intel Corporation introduced an 8-bit microcontroller called 8051. This microcontroller had 128 bytes of RAM, 4K bytes of chip ROM, two timers, one serial port, and four ports all on a single chip. At the time it was also referred as “ A SYSTEM ON A CHIP”The 8051 is an 8-bit processor meaning that the CPU can work only on 8 bits data at a time.Data larger than 8 bits has to be broken into 8 bits pieces to be processed by the CPU.The 8051 has a total of four I\O ports each 8 bit wide.There are many versions of 8051 with different speeds and amount of on-chip ROM and they are all compatible with the original 8051. this means that if you write a program for one it will run on any of them.The 8051 is an original member of the 8051 family. There are two other members in the 8051 family of microcontrollers. They are 8052 and 8031. All the three microcontrollers will have the same internal architecture, but they differ in the following aspects.
• 8031 has 128 bytes of RAM, two timers and 6 interrupts.
• 8051 has 4K ROM, 128 bytes of RAM, two timers and 6 interrupts.
• 8052 has 8K ROM, 128 bytes of RAM, three timers and 8 interrupts.
3.1.2 Description of 8052 Microcontroller:
The AT89C52 provides the following standard features: 8Kbytes of Flash, 256 bytes of RAM, 32 I/O lines, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89C52 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.By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C52 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications.
3.1.3 Features of Microcontroller(8052):
• Compatible with MCS-51 Products
• 8 Kbytes of In-System Re-programmable Flash Memory
• Endurance: 1,000 Write/Erase Cycles
• Fully Static Operation: 0 Hz to 24 MHz
• Three-Level Program Memory Lock
• 256 x 8-Bit Internal RAM
• 32 Programmable I/O Lines
• Three 16-Bit Timer/Counters
• Eight vector two level Interrupt Sources
• Programmable Serial Channel
• Low Power Idle and Power Down Modes
In addition, the AT89C52 is designed with static logic for operation down to zero frequeny 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.
The AT89C52 has a total of six interrupt vectors: two external interrupts (INT0 and INT1), three timer interrupts (Timers 0, 1, and 2), and the serial port interrupt. These interrupts are all shown in Figure 2.5 Each of these interrupt sources can be individually enabled or disabled by setting or clearing a bit in Special Function Register IE. IE also contains a global disable bit, EA, which disables all interrupts at once. Note that Table 2.3 shows that bit position IE.6 is unimplemented. In the AT89C51, bit position IE.5 is also unimplemented. User software should not write 1s to these bit positions, since they may be used in future AT89 products.
3.2.5 Idle Mode:
In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hardware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.
3.2.6 Power Down Mode: In the power down mode the oscillator is stopped, and the instruction that invokes power down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power down mode is terminated. The only exit from power down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.
Steering control circuit:
The steering control circuit is used for measuring the effective signal duration and for protecting against drop out of valid signals. It employs the analog delay by external RC time-constant controlled by EST. The EST pin is normally low and draws the RT/GT pin to keep low through discharge of external RC. When a valid tone input is detected, EST goes high to charge RT/GT through RC.When the voltage of RT/GT changes from 0 to VTRT (2.35V for 5V supply), the input signal is effective, and the code detector will create the correct code. After D0~D3 are completely latched, DV output becomes high. When the voltage of RT/GT falls down from VDD to VTRT (i.e. when there is no input tone), DV output becomes Low, and D0~D3 keeps data until a next valid tone input is produced. By selecting adequate external RC value, the minimum acceptable input tone duration (tACC) and the minimum acceptable inter-tone rejection (tIR) can be set. External Components (R, C) are chosen by the formula.
3.4 Relay Driver ULN 2803:
The ULN2803A is a high-voltage, high-current Darlington transistor array. The device consists of eight npn Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads. The collector-current rating of each Darlington pair is 500 mA. The Darlington pairs may be connected in parallel for higher current capability.
3.12 SPST Relay (SINGLE POLE SINGLE THROW RELAY):
SPST Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical.
3.5.1 Protection diodes for relays:
If the coil is energized with DC, a diode is frequently installed across the coil, to dissipate the energy from the collapsing magnetic field at deactivation, which would otherwise generate a spike of voltage and might cause damage to circuit componentsRelay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the relay coil. Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. The diagram shows how a signal diode (e.g. 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.
Relays and transistors compared:
Like relays, transistors can be used as an electrically operated switch. For switching small DC currents (< 1A) at low voltage they are usually a better choice than a relay. However transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). In these cases a relay will be needed, but note that a low power transistor may still be needed to switch the current for the relay's coil! The main advantages and disadvantages of relays are listed below:
3.6 Motors – Helical Gear Motors:
A unit which creates mechanical energy from electrical energy and which transmits mechanical energy through the gearbox at a reduced speed is a Gear motor.A gear head and motor combination is to reduce the speed of the motor to obtain the desired speed or torque.
Gear motors of all types and sizes include single / multiphase, universal, servo, induction and synchronous types. DC gear motors are configured in many types and sizes, including brushless and servo. A DC gear motor consists of a rotor and a permanent magnetic field stator and an integral gearbox or gear head. The magnetic field is maintained using either permanent magnets or electromagnetic windings. DC motors are most commonly used in variable speed and torque applications. A DC servomotor has an output shaft that can be positioned by sending a coded signal to the motor. As the input to the motor changes, the angular position of the output shaft changes as well. Servomotors are generally small and powerful for their size, and easy to control. Common types of DC servomotors include brushless or gear motor types. Stepper motors are classes of motors that provide incremental motion, or steps, in response to pulses of current that alternately change the polarity of the stator poles; step motors do not require feedback and are sometimes used in "Open Loop," or no-feedback applications.
Important performance specifications to consider when searching for gear motors include shaft speed, continuous torque, continuous current, and continuous output power. The terminal voltage is the design DC motor voltage. The continuous torque is the output torque capability of the motor under constant running conditions. Continuous current is the maximum rated current that can be supplied to the motor windings without overheating. Continuous output power is the mechanical power provided by the motor output.Important DC motor specifications to consider include terminal voltage, motor construction and commutation. The terminal voltage is the design DC motor voltage. Motor construction choices include permanent magnet, shunt wound, series wound, compound wound, disc armature, and coreless or slot less. Important gearing specifications to consider for gear motors and gear heads include the gearing arrangement, gearbox ratio, and gearbox efficiency. Gearing arrangement choices for gear motors or gear heads include spur, planetary, harmonic, worm, and bevel. Gearbox ratio is the ratio of input speed to output speed. A ratio greater than one, therefore, indicates speed reduction, while a ratio less than one indicates speed increase. Efficiency is the percentage of power or torque that is transferred through the gearbox. Losses occur due to factors such as friction and slippage inside the gearbox. Feedback choices for gear motors include integral encoder, integral resolver, and integral tachometer. Other important parameters to consider when specifying gear motors include shaft orientation or type and number of shafts, design units, motor shape, diameter or width, housing length, NEMA frame size, enclosure options and special or extreme environment construction. Common features include multi-speed, reversible, integral driver electronics, integral brake, integral clutch, and brake and clutch combination
SOFTWARE USED AND PROGRAMMING
In this chapter the software used and the language in which the program code is defined is mentioned and the program code dumping tools are explained. The chapter also documents the development of the program for the application. This program has been termed as “Source code”. Before we look at the source code we define the two header files that we have used in the code.
Advantages of Industrial Robots:
delay(unsigned char time)
unsigned char i,j;
Robots have the capacity to dramatically improve product quality. Applications are performed with precision and high repeatability every time. This level of consistency can be hard to achieve any other way.
With robots, throughput speeds increase, which directly impacts production. Because robots have the ability to work at a constant speed without pausing for breaks, sleep, vacations, they have the potential to produce more than a human worker.
Robots increase workplace safety. Workers are moved to supervisory roles, so they no longer have to perform dangerous applications in hazardous settings.
Greater worker safety leads to financial savings. There are fewer healthcare and insurance concerns for employers. Robots also offer untiring performance which saves valuable time. Their movements are always exact, so less material is wasted.
The applications of the Robotic Arm can broadly be classified in two categories.
• Fire Mishaps:
In the event of a fire accident it is better to send the robot, than to send a human inside the affected area to, either search and rescue a person or for surveillance purposes. The arm can also be equipped with a fire extinguisher to put off the fire.
• Bomb Detection:
In the likely event of a bomb alert, this robotic arm can safely go, detect and diffuse the bomb instead of a human being risking his life.
• In Bio Hazardous Areas:
In areas where the probability of a chemical accident is more, like in a laboratory or in a factory, the robotic arm can be equipped with certain chemicals to stop the adverse diffusion/reaction of the chemicals. Cleaning bio hazardous debris is also one important activity in which the robotic arm can play a significant role.
• In Space Explorations as Land Rover:
Recent Chandryaan moon mission employs such robotic arms (a complete version of the robot), to survey the geographical and chemical composition of the surface of the Moon. NASA also has used such robots in its survey of Mars. The collected samples from the surface are then transported back to the space shuttle, from where other chemical tests are conducted, and results relayed back to Earth.
• In Coal Mines:
In coal mines it is quite natural that Methane gas leaks occurs. The robot can be equipped with a Methane gas sensor and warn the presence of said gas, without exposing humans to the danger.
The advantages explained earlier in this chapter justify the significance of a mobile based robotic arm. The application areas are also vast with the simplest of modifications. Since all we need is a mobile call establishment to instruct the robot due to the cell phone’s unending and cheap availability, this is highly feasible. The signals received at the robot’s mobile is decoded with DTMF decoder which is easy to use. No heavy motors are employed in the making of the robot, and thus it becomes very light weight. The level of sophistication is quite low and hence its working is user friendly.
Since this robot is highly flexible adding components to facilitate application specific working yields a robot that has high use in vast areas. This project can also be subjected to standardization and hence has a good future scope.