Вы находитесь на странице: 1из 87

Project N.E.O.

BOT

DREAM INSTITUTE OF TECHNOLOGY

Page 1

Project N.E.O.BOT

PROJECT N.E.O.BOT
(Negotiating Edge and Overcoming roBOT)
BY

1. SAIKAT ROY (G.L)..(EC/08/30) 2. AYAN MAJUMDER..(EC/08/11) 3. RANIT MAJUMDER..(EC/08/29) 4. SAURAV DAS.(EC/08/33) 5. SUMIT MAHATO.(EC/08/46)
ELECTRONICS AND COMMUNICATION ENGINEERING DEPARTMENT Submitted in fulfillment of the requirements of the degree of Bachelor of Technology TO

DREAM INSTITUTE OF TECHNOLOGY


PO: Nahazari, VILL: Samali, PS: Bishnupur . 24Pgns(S) Kolkata-700104
DREAM INSTITUTE OF TECHNOLOGY Page 2

Project N.E.O.BOT

CERTIFICA TE
This is to certify that the dissertation entitled PROJECT N.E.O.BOT submitted by 1. SAIKAT ROY (G.L)..(EC/08/30) 2. AYAN MAJUMDER..(EC/08/11) 3. RANIT MAJUMDER.(EC/08/29) 4. SAURAV DAS.(EC/08/33) 5. SUMIT MAHATO..(EC/08/46) in partial fulfillment for the award of the degree of Bachelor of Technology in Electronics and Communication Engineering Department is a bonafide record of the work carried out by them under my supervision. The matter embodied in this dissertation, to the best of my knowledge has not been submitted for the award of any degree or diploma elsewhere.

Date:

ABHISHEK MAZUMDAR Project Guide D ream Institute Of Technology Kolkata -700104

INDEX
DREAM INSTITUTE OF TECHNOLOGY Page 3

Project N.E.O.BOT

DREAM INSTITUTE OF TECHNOLOGY

Page 4

Project N.E.O.BOT

ACKNOWLEDGEMENT

Apart from the individual efforts , the success of any project depends largely on the encouragement and guidelines of many others. We take this opportunity to express gratitude. to the people who have been instrumental in the successful completion of this project. I express thanks to Dr. Dipankar Sarkar, our Director And Mr. Abhishek Mazumdar our mentor, of DREAM INSTITUTE OF TECHNOLOGY. Without their encouragement and guidance this project would not have materialized. The guidance and support received from all the members who contributed and who are contributing to this project, was vital for the success of the project. We are grateful for their constant support and help. I also extend my heartfelt thanks to my family and well wishers.

DREAM INSTITUTE OF TECHNOLOGY

Page 5

Project N.E.O.BOT

SYNOPSIS

In the world of automation, simulation of the human mind using artificial intelligence has strategic importance. It is worth noting that large scale industry primarily depends on automatic processes. Advantages such as perfection in design, bulk production and reduction in human overhead drive the need to automate a certain process. A work is best done by a human because man has the most superior brain that can be trained and made to adapt varying situations. Such a dynamic environment is difficult to attain in a system of mechanical or electrical robots. Artificial intelligence (AI) implants a brain into these lifeless entities. Implementation of an AI based system demands flexibility, adaptability and changeability. A microcontroller offers all the three requirements. A microcontroller with its flash memory provides ample space for the learning algorithm to operate. Microcontrollers such as the PIC and Basic Stamp offers certain added features that help the process of implementation. The available IDEs and simulation tools come as a package that allows real time simulation even without actually implementing the design. Statistical tools may then be used to analyze these results and form an opinion about the system design. These added features go on to make microcontrollers the best hardware to implement artificially intelligent systems. In this project we are going to build an autonomous robot that will prevent itself from falling off the edge. The NEOBOT operates in 2 modes ,namely 1)autonomous and 2)manual.

DREAM INSTITUTE OF TECHNOLOGY

Page 6

Project N.E.O.BOT
The user can switch to any one of the above mode with the help of a mode selector switch integrated on the robot body. In autonomous mode the NEOBOT detects edges in its path and can take intelligent decisions to avoid it. Under manual mode the user is provided with a remote through which user can control the motion in 4 directions( forward ,backward, left right) and also control the speed of the robot in 3 modes.

DREAM INSTITUTE OF TECHNOLOGY

Page 7

Project N.E.O.BOT

INTRODUCTION

Autonomous robots are robots which can perform desired tasks in unstructured environments without continuous human guidance. Many kinds of robots have some degree of autonomy. Different robots can be autonomous in different ways. A high degree of autonomy is particularly desirable in fields such as space exploration, cleaning floors, mowing lawns, and waste water treatment. One important area of robotics research is to enable the robot to cope with its environment whether this be on land, underwater, in the air, underground, or in space. A fully autonomous robot has the ability to

Gain information about the environment. Work for an extended period without human intervention. Move either all or part of itself throughout its operating environment without Avoid situations that are harmful to people, property, or itself unless those

human assistance.

are part of its design specifications.

An autonomous robot may also learn or gain new capabilities like adjusting strategies for accomplishing its task(s) or adapting to changing surroundings. Autonomous robots still require regular maintenance, as do other machines.

Examples of progress towards commercial autonomous robots


DREAM INSTITUTE OF TECHNOLOGY Page 8

Project N.E.O.BOT

Self-maintenance Self maintenance is based on "proprioception", or sensing one's own internal status. Common proprioceptive sensors are Thermal

Hall Effect

Optical Contact Sensing the environment Exteroception is sensing things about the environment. Autonomous robots must have a range of environmental sensors to perform their task and stay out of trouble. Common exteroceptive sensors are

Electromagnetic spectrum Sound

Touch

Chemical sensors (smell, odor)

Temperature Range to things in the environment Attitude (Inclination)

Task performance
DREAM INSTITUTE OF TECHNOLOGY Page 9

Project N.E.O.BOT
The next step in autonomous behavior is to actually perform a physical task. The next level of autonomous task performance requires a robot to perform conditional tasks. For instance, security robots can be programmed to detect intruders and respond in a particular way depending upon where the intruder is.

Outdoor autonomous position-sensing and navigation Outdoor autonomy is most easily achieved in the air, since obstacles are rare. Cruise missiles are rather dangerous highly autonomous robots.

Automation in our project


The automation of NEOBOT is mainly implemented by the Atmega8 microcontroller. The robot senses the environment with the help of the sensors and the status of the sensors are continuously interpreted by the microcontroller to take intelligent decisions concerning the motion of the robot. In any case failure of automation is overcome by the implementation of the remote control module which allow the user to retrieve the robot from any type of environmental hindrance. Based on suitable environment the NEOBOT is an autonomous robot and can move on its own without any human aid.

CAUSE OF CHOOSING THIS PROJCET


DREAM INSTITUTE OF TECHNOLOGY Page 10

Project N.E.O.BOT
The main reason for choosing this project is the fact that modern day Robotics has been progressing at a very fast rate and for electronics engineer like us it presents a great opportunity and prospect to work in this field and develop something that in future will be beneficial to the whole human kind.

This robot is a prototype for eliminating dependency of industries on labourers. Since it is an autonomous robot it can be used as automated carriers. Whatever may be the functionality an autonomous robot always eliminate human dependency.

Since it can detect edges with moderate accuracy there is always a provision for using it at a medium of transport in hilly regions. It can reduce accidents prone to human errors.

Therefore through this projects we are basically trying to

solve the above

mentioned problem by building an autonomous with an inbuilt memory which can ideally sense edges and avoid them automatically thereby reducing human intervention.

BASIC BLOCK DIAGRAM OF NEOBOT


DREAM INSTITUTE OF TECHNOLOGY Page 11

Project N.E.O.BOT
We have divided our project into 5 basic modules. They are Power supply Control unit Sensing unit Motor and motor controllers.
DC motor

DREAM INSTITUTE OF TECHNOLOGY

Page 12

Project N.E.O.BOT

LM78 05

POWER SUPPLY UNIT

This unit supplies power to to the complete robotic module. The power supply consists of : 9 v dc battery

2pin Power Supply Connector .


A diode ( IN4007) One capacitor (470 F, 25 V ) Regulator IC LM7805

.1F ceramic capacitor 1 push button ON/OFF switch 1 K resistor

3mm red LED (indicator) Working:The input from the 9v dc battery is fed to the power supply connector followed by a reverse polarity protection diode(IN4007). A 5v constant power supply is obtained by using the voltage regulator IC 7805. The capacitors ( 470F and 0.1F)are used as filtering capacitors. The 1k resistor is used for protecting the 3mm red LED which is used as a power supply indicator.
DREAM INSTITUTE OF TECHNOLOGY Page 13

Project N.E.O.BOT

Ripple factor:-The most common meaning of ripple in electrical science is the small unwanted residual periodic variation of the direct current (dc) output of a power supply which has been derived from an alternating current (ac) source. This ripple is due to incomplete suppression of the alternating waveform within the power supply. Ripple factor () may be defined as the ratio of the root mean square (rms) value of the ripple voltage to the absolute value of the dc component of the output voltage, usually expressed as a percentage. = {rms value of alternating components of load current( or voltage)} {average value of load current (or voltage)} The ripple voltage is very large in this situation; the peak-to-peak ripple voltage is equal to the peak ac voltage. The large smoothing capacitor acts as a reservoir. After a peak in output voltage the capacitor (C) supplies the current to the load (R) and continues to do so until the capacitor voltage has fallen to the value of the now rising next half-cycle of rectified voltage. At that point the rectifiers turn on again and deliver current to the reservoir until peak voltage is again reached. If the time constant, CR, is large in comparison to the period of the ac waveform, then a reasonable accurate approximation can be made by assuming that the capacitor voltage falls linearly..

DREAM INSTITUTE OF TECHNOLOGY

Page 14

Project N.E.O.BOT

Fig: - Ripple voltage from a full-wave rectifier, before and after the application of a smoothing capacitor The 9v dc is used to power:

The 2 IR sensors The microcontroller board. The chassis containing the dc motors and motor controller circuits.

POWER DISTRIBUTION:

The microcontroller board and the sensors solely require 5v dc supply while the motors and motor controller circuits requires both 9v and 5v dc supply

DREAM INSTITUTE OF TECHNOLOGY

Page 15

Project N.E.O.BOT
LM7805 The 7805 voltage regulators employ built-in current limiting, thermal shutdown, and safe-operating area protection which makes them virtually immune to damage from output overloads. 7805 is a three-terminal positive voltage regulator.With adequate heatsinking, it can deliver in excess of 0.5A output current. Typical applications would include local (on-card) regulators which can eliminate the noise and degraded performance associated with single-point regulation. 7805 regulator comes from the 78xx family of self-contained fixed linear voltage regulator integrated circuits. The 78xx family is a very popular choice for many electronic circuits which require a regulated power supply, due to their ease of use and relative cheapness. When specifying individual ICs within this family, the xx is replaced with a two-digit number, which indicates the output voltage the particular device is designed to provide (for example, the 7805 voltage regulator has a 5 volt output, while the 7812 produces 12 volts). The 78xx line are positive voltage regulators, meaning that they are designed to produce a voltage that is positive relative to a common ground. There is a related line of 79xx devices which are complementary negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide both positive and negative supply voltages in the same circuit, if necessary. 7805 ICs have three terminals and are most commonly found in the TO220 form factor, although smaller surface-mount and larger TO3 packages are also available from some manufacturers. These devices typically support an input voltage which can be anywhere from a couple of volts over the intended output voltage, up to a maximum of 35 or 40 volts, and can typically provide up to around 1 or 1.5 amps

DREAM INSTITUTE OF TECHNOLOGY

Page 16

Project N.E.O.BOT
of current (though smaller or larger packages may have a lower or higher current rating).

Pin Diagram: Pin Description: Pin No 1 2 3 Function Input voltage (5V-18V) Ground (0V) Regulated output; 5V (4.8V-5.2V) Name Input Ground Output

DREAM INSTITUTE OF TECHNOLOGY

Page 17

Project N.E.O.BOT
Advantages

78xx series ICs do not require additional components to provide a constant,

regulated source of power, making them easy to use, as well as economical and efficient uses of space. Other voltage regulators may require additional components to set the output voltage level, or to assist in the regulation process. Some other designs (such as a switching power supply) may need substantial engineering expertise to implement.

78xx series ICs have built-in protection against a circuit drawing too much

power. They have protection against overheating and short-circuits, making them quite robust in most applications. In some cases, the current-limiting features of the 78xx devices can provide protection not only for the 78xx itself, but also for other parts of the circuit. Disadvantages

The input voltage must always be higher than the output voltage by some

minimum amount (typically 2 volts). This can make these devices unsuitable for powering some devices from certain types of power sources (for example, powering a circuit that requires 5 volts using 6-volt batteries will not work using a 7805).

As they are based on a linear regulator design, the input current required is

always the same as the output current. As the input voltage must always be higher than the output voltage, this means that the total power (voltage multiplied by current) going into the 78xx will be more than the output power provided. The extra input power is dissipated as heat. This means both that for some applications an adequate heat sink must be provided, and also that a (often
DREAM INSTITUTE OF TECHNOLOGY Page 18

Project N.E.O.BOT
substantial) portion of the input power is wasted during the process, rendering them less efficient than some other types of power supplies. When the input voltage is significantly higher than the regulated output voltage (for example, powering a 7805 using a 24 volt power source), this inefficiency can be a significant issue.

Even in larger packages, 78xx integrated circuits cannot supply as much

power as many designs which use discrete components, and are generally inappropriate for applications requiring more than a few amps of current.

CONTROL UNIT

AVR MICROCONTROLLER: ATMEGA8 The AVR core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while
DREAM INSTITUTE OF TECHNOLOGY Page 19

Project N.E.O.BOT
achieving throughputs up to ten times faster than conventional CISC microcontrollers The device is manufactured using Atmels high density non-volatile memory technology. The Flash Program memory can be reprogrammed In-System through an SPI serial interface, by a conventional non-volatile memory programmer, or by an On-chip boot program running on the AVR core. The boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash Section will continue to run while the Application Flash Section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega8 is a powerful microcontroller that provides a highly-flexible and cost-effective solution to many embedded control applications The ATmega8 provides 8K bytes of In-System Programmable Flash with ReadWhile-Write capabilities, 512 bytes of EEPROM, 1K byte of SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible Timer/Counters with compare modes, internal and external interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, a 6-channel ADC (eight channels in TQFP and QFN/MLF packages) with 10-bit accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and five software selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next Interrupt or Hardware Reset. In Power-save mode, the asynchronous timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC
DREAM INSTITUTE OF TECHNOLOGY Page 20

Project N.E.O.BOT
Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low-power consumption.

6.1 FEATURES: High-performance, Low-power AVR 8-bit Microcontroller Advanced RISC Architecture 130 Powerful Instructions Most Single-clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 16 MIPS Throughput at 16 MHz On-chip 2-cycle Multiplier In-System Programming by On-chip Boot Program True Read-While-Write Operation Programming Lock for Software Security Peripheral Features Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode
DREAM INSTITUTE OF TECHNOLOGY Page 21

Project N.E.O.BOT
Real Time Counter with Separate Oscillator Three PWM Channels 8-channel ADC in TQFP and QFN/MLF package Eight Channels 10-bit Accuracy 6-channel ADC in PDIP package Channels 10-bit Accuracy Six Byte-oriented Two-wire Serial Interface Programmable Serial USART Master/Slave SPI Serial Interface Programmable Watchdog Timer with Separate On-chip Oscillator On-chip Analog Comparator I/O and Packages 23 Programmable I/O Lines 28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF Operating Voltages 2.7 - 5.5V (ATmega8L) 4.5 - 5.5V (ATmega8) Power Consumption at 4 Mhz, 3V, 25C Active: 3.6 mA Idle Mode: 1.0 mA Power-down Mode: 0.5 A

DREAM INSTITUTE OF TECHNOLOGY

Page 22

Project N.E.O.BOT

PIN CONFIGURATION OF ATmega8

DREAM INSTITUTE OF TECHNOLOGY

Page 23

Project N.E.O.BOT
PIN DESCRIPTION: VCC Digital supply voltage. GND Ground. Port B (PB7..PB0) XTAL1/XTAL2/TOSC1/ TOSC2 Port B is an 8-bit bidirectional I/O port with internal pull-up Resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Depending on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier and input to the internal clock operating circuit. Depending on the clock selection fuse settings, PB7 can be used as output from the inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6 is used as TOSC2..1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set. Port C (PC5..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running.

DREAM INSTITUTE OF TECHNOLOGY

Page 24

Project N.E.O.BOT
PC6/RESET If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. The electrical characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a Reset.

Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running. RESET Reset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a reset. AVCC AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that Port C (5..4) use digital supply voltage, VCC. AREF AREF is the analog reference pin for the A/D Converter.

DREAM INSTITUTE OF TECHNOLOGY

Page 25

Project N.E.O.BOT
ADC7..6 (TQFP and QFN/MLF) In the TQFP and QFN/MLF package,

ADC7..6 serve as analog inputs to the A/D converter. These pins are powered from the analog supply and serve as 10-bit. ADC channels

ARCHITECTURAL VIEW

DREAM INSTITUTE OF TECHNOLOGY

Page 26

Project N.E.O.BOT

DREAM INSTITUTE OF TECHNOLOGY

Page 27

Project N.E.O.BOT

TYPICAL CHARACTERISTICS OF ATMEGA8 A. Idle Supply Current vs. VCC

DREAM INSTITUTE OF TECHNOLOGY

Page 28

Project N.E.O.BOT

B. I/O Pin Source Current vs. Output Voltage (Internal RC Oscillator, 8 MHz) (VCC = 5V)

L293D MOTOR DRIVER

DREAM INSTITUTE OF TECHNOLOGY

Page 29

Project N.E.O.BOT

The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications. All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo- Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated drivers are enabled, and their outputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled, and their outputs are off and in the high-impedance state. With the proper data inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor applications. On the L293, external high-speed output clamp diodes should be used for inductive transient suppression. A VCC1 terminal, separate from VCC2, is provided for the logic inputs to minimize device power dissipation. The L293and L293D are characterized for operation from 0C to 70C.

DREAM INSTITUTE OF TECHNOLOGY

Page 30

Project N.E.O.BOT

PIN DIAGRAM OF IC L293D

BLOCK DIAGRAM OF L293D

DREAM INSTITUTE OF TECHNOLOGY

Page 31

Project N.E.O.BOT

ARCHITECTURAL VIEW OF IC L293D

DREAM INSTITUTE OF TECHNOLOGY

Page 32

Project N.E.O.BOT

WORKING OF SINGLE H-BRIDGE MOTOR CONTROLLER CIRCUIT

SINGLE H-BRIDGE S1-S4 ON, S2-S3OFF (for one direction). S2-S3 ON and S1-S4 OFF (for other direction) Switches S1,S2,S3,S4 are implemented by npn and pnp transistors. The disadvantage of using the outputs directly from the microcontrollers for running the dc motors is that, the logic pulse(0-5v) from the microcontroller output does not provide sufficient torque in the motor. With the help of this H bridge circuit we can operate the dc motors under a sufficiently high voltage(4.8-48 volt) under the control of the output logic pulses from the microcontroller.

DREAM INSTITUTE OF TECHNOLOGY

Page 33

Project N.E.O.BOT

The bases of a pair of npn and pnp transistors(as shown in the above figure) are combined and given a common Logic A. Similar arrangement is also made for Logic B. These Logic A and B are used in controlling the motion of the motor. For example, if A is given Logic 0 and B Logic 1, then the pnp transistor of Logic A arrangement and npn transistor Logic B arrangement turns ON. Whereas the remaining two transistors remains in OFF state. Thus a conducting path is established between Vcc And Gnd via the motor (as shown in red). Since the motor is under some potential difference rotation takes place in a particular direction( clockwise or anti-clockwise ). Thus by selecting the logic state of A and B the motion of the motor is controlled. The advantage of this circuit is by using Logic 1 and Logic 0 (0v and 5v from the microcontroller) we are controlling the motor under potential difference Vcc where Vcc can take values from 4.8v to 48v.

DREAM INSTITUTE OF TECHNOLOGY

Page 34

Project N.E.O.BOT

PICTORIAL REPRESENTATION OF DIFFERENT COMPONENETS IN N.E.O.BOT


1 MICROCONTROLLER BOARD 2 SENSORS 3 CHASSIS 4 REMOTE CONTROL UNIT 5 DC GEARED MOTOR WITH WHEELS 6 USB AVR PROGRAMMER 7 N.E.OBOT TOP VIEW SIDE VIEW FRONT VIEW

DREAM INSTITUTE OF TECHNOLOGY

Page 35

Project N.E.O.BOT

1 . AVR ATMEGA8 MICROCONTROLLER BOARD

The image on the left is a readymade Atmega8 development board built on a FR-4 PCB material. We have improvised on this design and built a custom made Atmega development board omitting some extra features from the standard board according to our requirements. In the whole process optimization was the key.

DREAM INSTITUTE OF TECHNOLOGY

Page 36

Project N.E.O.BOT

DREAM INSTITUTE OF TECHNOLOGY

Page 37

Project N.E.O.BOT 2. IR SENSOR MODULE

The circuit of the IR sensor module on the left exhibited a small range of sensitivity range. The circuit was remodeled which showed a wide range of sensitivity. In other words the module remained active/sensitive to the IR rays for a wide range of resistance values

DREAM INSTITUTE OF TECHNOLOGY

Page 38

Project N.E.O.BOT 3. CHASSIS

This is the image of the NEOBOT chassis with DC geared motors fitted with tracked wheels. The L293D and IC 7805 mounted with a heat sink is housed within.

DREAM INSTITUTE OF TECHNOLOGY

Page 39

Project N.E.O.BOT

4. REMOTE CONTROL UNIT

The NEOBOT is made wireless with RC5 coded IR Remote control. Ideal for making any DC motor controlled robot. It can control upto 1Amp of current on each channel .It can Drive 2 motors (Connect two motors in parallel for 4 wheeled robot) in skid steer control with three stage speed control and 2 DC motors without sped control.

Control 2 DC motors with Skid Steer Control with 1Amp capacity each 3 stage Speed Control On 2 robot driving DC Motors 2 DC motors operated forward and backward on different buttons
Page 40

DREAM INSTITUTE OF TECHNOLOGY

Project N.E.O.BOT
Functions on Remote Control Action
Press Forward

Effect
Both Motors Forward Robot Moves Forward

Right Motor Forward Press Left Left Motor Reverse Robot turns Left Right Motor Reverse Press Right Left Motor Forward Robot turns Right

Both Motors Reverse Press Reverse Robot Moves Backward

Press 1

Robot Speed Minimum

Press 2

Robot Speed Medium

Press 3

Robot Speed Maximum

DREAM INSTITUTE OF TECHNOLOGY

Page 41

Project N.E.O.BOT 5. DC GEARED MOTOR WITH WHEELS

DC geared motor which gives good torque and rpm at lower voltages. This motor can run at approximately 150 rpm . Features

Working voltage : 3V to 9V 40gm weight 3 Kgf.cm torque No-load current = 60 mA, Stall current = 700 mA

High quality Plastic Tracked Wheel for motors with 6mm diameter.

68mm diameter 2cm width Hole diameter 6.1 mm

DREAM INSTITUTE OF TECHNOLOGY

Page 42

Project N.E.O.BOT 6. USB AVR PROGRAMMER

The above USB AVR programmer can be used to program most of the microcontrollers from the AVR family either using the standard Atmel 6pin ISP header or the standard Atmel 10pin ISP header. The above programmer itself contains an Atmega8 micrcontroller loaded with the firmwire. The 3mm red LED indicates power from USB port whreas the 3 mm green Led indicates that the programmer is busy.

DREAM INSTITUTE OF TECHNOLOGY

Page 43

Project N.E.O.BOT

AVR USBASP PROGRAMMER CIRCUIT USBASP is well known USB programmer for Atmel AVR microcontrollers USB ASP is made of an Atmega8 and few components. The programmer uses a firmware driver that makes this programmer attractive to many amateurs. The core of USBASP adapter is Atmega8 microcontroller clocked by 12MHz crystal. Soldered board is ready to be connected via simple USB cable with B type connector (Computer side needs A type of connector). Resistors R2 and R6 are current limiting resistors, that protect computer USB port. Resistor R7 helps computer to recognize device as LS (Low Speed). Diodes D1 and D2 indicates about data transfer. Header SV1 is compatible with STK200/300 just 4 and 6 pins are used for RXD and TXD (may be used for other purposes).

DREAM INSTITUTE OF TECHNOLOGY

Page 44

Project N.E.O.BOT

SCK signal can work at two frequencies 375kHz and 8kHz which can be selected by Jumper JP3. If Jumper is unconnected, then SCK speed is 375kHz. Low speed SCK is used when MCU is clocked with low speed oscillator like 32kHz.

Jumper JP1 is used for programming adapter itself via ISP adapter. And last Jumper JP2 is used for powering adapter from USB port (not recommended)
DREAM INSTITUTE OF TECHNOLOGY Page 45

Project N.E.O.BOT 7. NEOBOT

DREAM INSTITUTE OF TECHNOLOGY

Page 46

Project N.E.O.BOT

DREAM INSTITUTE OF TECHNOLOGY

Page 47

Project N.E.O.BOT

SENSING UNIT
What is sensor? A sensor is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. For example, a mercury-inglass thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated glass tube.The NEOBOT senses the outer environment through its 2 IR sensors interfaced with the Atmega8 microcontroller via pin 23 and 26(PC0 and PC3 respectively).

IR (INFRA-RED) SENSORS
Infra red sensors are the most often used sensor by amateur roboteers. Understanding how they behave can help address many of your requirements and would suffice to address most of the problem statements for various robotics events in India. Be it a typical white/black line follower, a wall follower, obstacle avoidance, micro mouse, an advanced flavor of line follower like red line follower, etc, all of these problem statements can be easily addressed and granular control can be exercised upon your robots performance if you have a good operational understanding of Infra red sensors OPERATION: When the Tx is forward biased, it begins emitting infra red. Since its not in visibl e spectrum, you will not be able to see it through naked eyes but you will be able to view it through an ordinary cell phone camera. The resistance R1 in the above circuit can vary. It should not be a very high value (~ 1Kohm) as then the current flowing through the diode would be very less and
DREAM INSTITUTE OF TECHNOLOGY Page 48

Project N.E.O.BOT
hence the intensity of emitted IR would be lesser. By increasing the current flowing in the circuit, you can increase the effective distance of your IR sensor. However, there are drawbacks of reducing the resistance. Firstly, it would increase the current consumption of your circuit and hence drain the battery (one of the few precious resources for any embedded system) faster. Secondly, increasing the current might destroy the Tx. So, the final choice should be a calculated trade off between these various factors. The receiver diode has a very high resistance, typically of the order of mega Ohms when IR is not incident upon it. However, when IR is incident upon it, the resistance decreases sharply to the order of a few kilo Ohms or even lesser. This feature forms the basis of using IR as a sensor. You will need to connect a resistance of the order of a few mega Ohm in series with the Rx. Then tap the output voltage at the point of connectivity of these two resistors. Remember, the value of R2 can vary depending upon the Rx diode you are working with. You are advised to first check the resistance of Rx diode with no IR incident upon it and then select the value of R2 for decent performance.

DREAM INSTITUTE OF TECHNOLOGY

Page 49

Project N.E.O.BOT
A complete Tx-Rx circuit is given below

Case1: WHEN NO IR IS INCIDENT UPON THE Rx When the IR Tx is above a black line, the black line will absorb all the IR and will not reflect an appreciable amount of IR for the Rx to receive. If you are making an obstacle avoiding robot, then when there is no obstacle in front of the IR Tx, Rx will not receive back the transmitted IR. However, when an obstacle comes in front of the Tx, it will reflect the IR incident upon it and hence Rx will receive the IR. In this case, the output voltage of the sensor = 2.5v. Hence the input voltage at pin 2 =2.5v. Input voltage at pin2 > input voltage at pin3 ; Output1=> logic 0 Case2: WHEN IR IS INCIDENT UPON THE Rx The resistance of Rx will sharply fall and hence the output voltage would be around 1.8v - 1.5v depending upon your choice of Rx and R2.

Spectral distribution of IR LED and phototransistor sensitivities


DREAM INSTITUTE OF TECHNOLOGY Page 50

Project N.E.O.BOT

IR led Infrared (IR) light is electromagnetic

radiation with a wavelength longer than that of visible light, measured from the nominal edge of visible red light and at 0.7micrometres, extending

conventionally to 300 micrometers. These wavelengths correspond to a frequency range of approximately 430 to 1 THz,
[1]

and

include

most

of

the thermal

radiation emitted by objects near room temperature. Microscopically, IR light is typically molecules emitted when or absorbed they by change

their rotational-vibrational movements.

DREAM INSTITUTE OF TECHNOLOGY

Page 51

Project N.E.O.BOT

IR LED PHOTODIODE PAIR

In our sensor circuit module we have used IR LED as transmitter and photodiode as IR receiver.

SENSOR CIRCUIT WORKING

IR SENSOR CIRCUIT

DREAM INSTITUTE OF TECHNOLOGY

Page 52

Project N.E.O.BOT
In the circuit the positive input terminal of the voltage comparator LM358 is fed from a voltage divider bias . The input to the negative terminal is the voltage drop across the diode. The voltage comparator LM358 in the above arrangement constantly compare the voltage levels at its input terminals. If the input at the positive terminal is greater than its voltage level at the negative terminal the output of LM358 switches to logic high or 5V .When the reverse casehappens the output switches to logic 0 or 0 V. The above switching in the voltage comparator is being utilized for sensing and detecting particular environment in the NEOBOT. When IR rays from IR LED falls on the photodiode upon reflection from a reflective surface, current starts flowing in the diode thus turning it on , and the corresponding voltage drop across the diode also drops( Since the photodiode is in ON state). Thus the input at the negative terminal of LM358 now becomes much lesser than the input at the positive terminal and output of LM358 HIGH(Also indicated by the red Indicator LED). Thus vicinity to some reflective surface is indicted by the glowing red LED switches to logic

DREAM INSTITUTE OF TECHNOLOGY

Page 53

Project N.E.O.BOT
LM358

GENERAL DESCRIPTION The LM358 series consists of two independent, high gain, internally frequency compensated operational amplifers which were designed specifically to operate from a single power supply over a wide range of voltages. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include transducer amplifiers, dc gain blocks and all the conventional op amp circuits which now can be more easily implemented in single power supply systems. For example, the LM358 series can be directly operated off of the standard +5V power supply voltage which is used in digital systems and will easily provide the required interface electronics without requiring the additional 15V power supplies. FEATURES Internally frequency compensated for unity gain Large dc voltage gain: 100 dB Wide bandwidth (unity gain): 1 MHz (temperature compensated) Wide power supply range: Single supply: 3V to 32 or dual supplies: 1.5V to
DREAM INSTITUTE OF TECHNOLOGY Page 54

Project N.E.O.BOT
16V Very low supply current drain (500 A) essentially independent of supply voltage Low input offset voltage: 2 mV Differential input voltage range equal to the power supply voltage Large output voltage swing UNIQUE CHARACTERISTICS In the linear mode the input common-mode voltage range includes ground and the output voltage can also swing to ground, even though operated from only a single power supply voltage. The unity gain cross frequency is temperature compensated. The input bias current is also temperature compensated. ADVANTAGES Two internally compensated op amps Eliminates need for dual supplies Allows direct sensing near GND and VOUT also goes to GND Compatible with all forms of logic Power drain suitable for battery operation

CALCULATIONS: Assuming Vcc to be equal to be 5V and all the resistors fairly ideal, the approximate calculations are shown below:

DREAM INSTITUTE OF TECHNOLOGY

Page 55

Project N.E.O.BOT

Since Vcc is 5V, the voltage divider supplies 2.5V to the positive input terminal of the voltage comparator. This can also be calculated by : V = I*R2 = [5/(2*1000) ]*1000 = 5/2 = 2.5V Now with no applied illumination photodiode is in off state and a very small current called dark current exists in the device. Therefore almost the whole of Vcc is reflected to the negative input terminal in the absence of illumination.

DREAM INSTITUTE OF TECHNOLOGY

Page 56

Project N.E.O.BOT

With applied illumination ,the current starts flowing through the reverse biased photodiode and now since a conducting path is available through the photodiode the voltage drop( must be less than 2.5V gets reflected in the negative input terminal, thus switching the output status of LM358 to logic HIGH indicating a reflective surface has been discovered in the path of the robot.

DREAM INSTITUTE OF TECHNOLOGY

Page 57

Project N.E.O.BOT
HOW IT WORKS IN OUR PROJECT: The sensor circuit module reads the environment and sends the necessary signals to the microcontroller accordingly. The microcontroller itself interprets the signals received from the sensors to take the intelligent decisions on its own for the motion of the NEOBOT.

IR SENSOR MODULE

.As soon as the microcontroller receives a status signal from the sensors it interprets the same and decides what to do on its own HIGH according to some predefined algorithm. In this project when the microcontroller receives a logic the algorithm dictates the microcontroller to act normally and move forward. When it receives a logic LOW from the sensors the microcontroller interprets that the NEOBOT has encountered an edge, so it has to move backward some distance and then take left or right turn according to necessity. In this way the autonomous mode is incorporated in the Project NEOBOT. ADVANTAGE OF IR SENSOR MODULE Low power requirements
DREAM INSTITUTE OF TECHNOLOGY Page 58

Project N.E.O.BOT
Low circuitry costs Simple circuitry

MOTION CONTROL:Components utilized for NEOBOT motion control: 1. IC L293D (Dual H-Bridge Motor Controller IC) 2. DC geared motor.(with gear box)

DREAM INSTITUTE OF TECHNOLOGY

Page 59

Project N.E.O.BOT

L293D is a dual H-Bridge motor driver, So with one IC we can interface two DC motors which can be controlled in both clockwise and counter clockwise direction and if you have motor with fix direction of motion the you can make use of all the four I/Os to connect up to four DC motors. L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF ouput diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5V to 36V, which has made L293D a best choice for DC motor driver.

TRUTH TABLE OF L293D LOGIC STATE

A 0 0

B 0 1

STATUS MOTOR HALT CLOCKWISE ROTATION

ANTICLOCKWISE ROTATION

MOTOR HALT

DREAM INSTITUTE OF TECHNOLOGY

Page 60

Project N.E.O.BOT

DC Motors-Working

Structure
: Rotating armature-electromagnet . Armature enclosed between a set of permanent magnets .Commuter Rotary switchwhich reverses the direction of electric current twice every cycle. DC Motors-Torque and R.P.M Torque is the amount of turning force.
DREAM INSTITUTE OF TECHNOLOGY Page 61

Project N.E.O.BOT

T=Kt*I

I: Current through armature.

R.P.M is rotations per minute and is proportional to the voltage applied

E=Ke*w

w: Angular velocity

V=Rin*I + Ke*w

PROGRAMMING THE ATMEGA8 MICROCONTROLLER

DREAM INSTITUTE OF TECHNOLOGY

Page 62

Project N.E.O.BOT

1> Creating a C file using AVR Studio 4 software

DREAM INSTITUTE OF TECHNOLOGY

Page 63

Project N.E.O.BOT

2> Creating the hex file using AVR GCC COMPILER

DREAM INSTITUTE OF TECHNOLOGY

Page 64

Project N.E.O.BOT

3>

Preparation for flashing the microcontroller using ExtremeBurner software

DREAM INSTITUTE OF TECHNOLOGY

Page 65

Project N.E.O.BOT

4> Flashing the microcontroller in progress

DREAM INSTITUTE OF TECHNOLOGY

Page 66

Project N.E.O.BOT

5>

Microcontroller flashed and file.

loaded with the required hex

DREAM INSTITUTE OF TECHNOLOGY

Page 67

Project N.E.O.BOT

CONCLUSION:
Future Aspects:
In the present scenario, such an automatic car may seem to be unrealizable for the roads in India. But in developed countries, especially in Japan, such smart cars have already hit the roads. Leading car manufacturing companies like NISSAN, are switching over to making of such cars that would be something more than mere means of transport. Apart from the human tragedy, there is a high cost and much inconvenience associated with traffic jams, emergency services and property damage as a consequence of road accidents Much experimentation has been done, and is still going on, at universities around the world, to arrive at decent obstacle detection systems to be used in connection with highway traffic, to bring down the rate of traffic fatalities. Other future prospects include:
1.

Military applications: Military usage of remotely controlled military vehicles dates back to the first half of 20th century. Soviet Red Army used remotely controlled Teletanks during 1930s in the winter war and early stage of World War II. There were also remotely controlled cutters and experimental remotely controlled planes in red army. Remote control vehicles are used in law enforcement and military engagements for some of the same reasons. The exposure to hazards is mitigated to the person who operates the vehicles from a location of relative safety.

DREAM INSTITUTE OF TECHNOLOGY

Page 68

Project N.E.O.BOT
Remote controlled vehicles are used by many Police Department Bomb-squads to defuse or detonate explosives. UNARMED AREIAL VEHICLES (UAVs) have undergone a dramatic evolution inn capability in the past decade. Early UAVs were capable of reconnaissance missions alone and then only with a limited range. Current UAVs can hover around possible targets until they are positively identified before releasing the pay load of weaponry

2. Autopilot application & Driver Assistance

us. This was demonstrated by the successful use of UAVs during the 2008 hurricanes that struck Louisiana and Texas.

UAVs will likely play an increased role in search and rescue in the

Automated Highway systems

4. Unmanned Transportation

DREAM INSTITUTE OF TECHNOLOGY

Page 69

Project N.E.O.BOT

Future scopes of Improvement:

a)

Here we have used a basic power supply circuit. But in future we can also eliminate the use of wires by incorporating a battery or solar panel. This solar panel would reduce electricity consumption and also our project will be working on renewable energy. Solar cells can give a backup for 3 days. Theres no problem of power cut also. This will make the model more environment friendly.

b)

The IR SENSOR module can be modeled to detect static or slow moving obstacles also.

c) The robot can be manually driven by using an RF controller thereby eliminating the need of line of sight operation altogether.
d)

Infusing a SPYCAM with the robot an extrasensory vision is obtained. Using this the robot can be controlled to venture into places where human intervention is harmful such as bomb threat zones, fires etc.

e) Adding Gas sensors, Temperature / Heat sensors the robot can be modified into fire fighting robot.

DREAM INSTITUTE OF TECHNOLOGY

Page 70

Project N.E.O.BOT

APPENDIX
MICRCONTROLLER PROGRAMMING
// Project name : Edge Avoider for Atmega8 mini // Compile Date : 22/2/2012 Time : (16:21) // Designed By : AYAN MAJUMDER AND SAIKAT ROY /* ___________________________________________________ Connection settings of Kit PWM LED-------------->PB1 RIGHT MOTOR(+)------->PB1 RIGHT MOTOR(-)------->PB2 LEFT MOTOR(-)-------->PB3 LEFT MOTOR(+)-------->PB4 BUZZER--------------->PB0 LDR------------------>PC5 BOOTLOADER Condition Check-----PC2(if 0 bootoloader section else program execution section of Flash memory) RESET----------------->PC6
DREAM INSTITUTE OF TECHNOLOGY Page 71

Project N.E.O.BOT
Crystal Oscillator----PB6 and PB7 left sensor---------->PC0 right sensor--------->PC3 Temperature sensor------>PC1 sound sensor------------>PC2 *********DTMF sensor connection******** DTMF D0---->PC0 DTMF D1---->PC1 DTMF D2---->PC2 DTMF D3---->PC3 VB=Battery Supply VCC=regulated 5V+ Gnd=ground(0V) VR1=Contrast of LCD

DREAM INSTITUTE OF TECHNOLOGY

Page 72

Project N.E.O.BOT
#include<avr/io.h> #include<util/delay.h>

void wait(float sec, int freq) //wait function to create time delay { for(int i=0;i<(int)(46*sec);i++) _delay_loop_2(0); } void main() { DDRC=0b0000000; //set PORTC as input port DDRB=0b00011110; //PB1, PB2, PB3, PB4 as output port int ls=1, rs=1; // define & initialize ls, rs integer as 1 to // acquire the left sensor status in ls and //right sensor status in rs

DREAM INSTITUTE OF TECHNOLOGY

Page 73

Project N.E.O.BOT
while(1) { ls=(PINC&0b0000001); //acquire only left sensor status connected at PC0 rs=(PINC&0b0001000); // acquire only right sensor status connected at PC3 // create infinite loop

if((ls==0b0000000)&(rs==0b0000000)) //check sensor status for both sensor OFF { PORTB=0b00001100; //move back wait(1.5, 12); //keep on moving back for 0.5 sec

PORTB=0b00010000; wait(0.4, 12); ls=1; rs=8; } //keep on turning right for 0.5 sec

//set sensor status on //set sensor status on

DREAM INSTITUTE OF TECHNOLOGY

Page 74

Project N.E.O.BOT
if((ls==0b0000001)&(rs==0b0000000)) //check sensor status for left sensor=ON and // right sensor=OFF { PORTB=0b00001100; //move back wait(1.5, 12); //keep on moving back for 0.5 sec

PORTB=0b00010000; //turn right wait(0.4, 12); //keep on turning right for 0.5 sec

ls=1; //set sensor status on rs=8; //set sensor status on }

if((ls==0b0000000)&(rs==0b0001000)) //check sensor status for left sensor=OFF and // right sensor=ON { PORTB=0b00001100; //move back wait(1.5, 12);
DREAM INSTITUTE OF TECHNOLOGY

//keep on moving back for 0.5 sec


Page 75

Project N.E.O.BOT
PORTB=0b00000010; //turn left wait(0.4, 12); //keep on turning left for 0.5 sec

ls=1; //set sensor status on rs=8; } if((ls==0b0000001)&(rs==0b0001000)) //check sensor status for both sensor ON { PORTB=0b00010010; //move forward ls=1; rs=8; } } } //set sensor status on //set sensor status on //set sensor status on

DREAM INSTITUTE OF TECHNOLOGY

Page 76

Project N.E.O.BOT

NEOBOT LOGIC FLOWCHART

DREAM INSTITUTE OF TECHNOLOGY

Page 77

Project N.E.O.BOT

BASIC WORKING

DREAM INSTITUTE OF TECHNOLOGY

Page 78

Project N.E.O.BOT

COLOUR CODE FOR RESISTORS:

DETAILED IC SPECFICATIONS
DREAM INSTITUTE OF TECHNOLOGY Page 79

Project N.E.O.BOT

IC 7805

IC L293D

IC LM358

IC ATMEGA8

DREAM INSTITUTE OF TECHNOLOGY

Page 80

Project N.E.O.BOT

IC 7805

DREAM INSTITUTE OF TECHNOLOGY

Page 81

Project N.E.O.BOT

IC L293D

DREAM INSTITUTE OF TECHNOLOGY

Page 82

Project N.E.O.BOT

IC LM358

DREAM INSTITUTE OF TECHNOLOGY

Page 83

Project N.E.O.BOT

IC ATMEGA8

DREAM INSTITUTE OF TECHNOLOGY

Page 84

Project N.E.O.BOT

TOTAL CURRENT RATING OF PROJECT

No of components

components

Current Ratings ( mA)

1 2 1 7

Microcontroller 150 mA
IR sensor

80 mA*2=160mA 150 mA 5X 5mA= 25mA

Motor driver LED

APPROXIMATE PROJECT BUDGET


DREAM INSTITUTE OF TECHNOLOGY Page 85

Project N.E.O.BOT

BIBLIOGRAPHY
DREAM INSTITUTE OF TECHNOLOGY Page 86

Project N.E.O.BOT

HTTP://WWW.GOOGLE.COM HTTP://WWW.HOWSTUFFWORKS.COM HTTP://WWW.IEEE.CO.IN HTTP://WWW.ATMEL.COM HTTP://WWW.DATASHEETCATLOG.COM HTTP://WWW.AVRFREAK.NET HTTP://WWW.ELECTRONICSFORYOU.COM

DREAM INSTITUTE OF TECHNOLOGY

Page 87

Вам также может понравиться