18
Avoider robot Nitesh Dubey & Parag Nikhra B.E. 2 nd Year (E.C.) BY

Robotics

Embed Size (px)

Citation preview

Page 1: Robotics

Edge Avoider

robot

Nitesh Dubey & Parag NikhraB.E. 2nd Year (E.C.)

BY

Page 2: Robotics

What is a Robot?Electro-mechanical device.

Performs Various tasks.

May be human controlled or automated.

It finds it’s uses in all aspects of our life.

Page 3: Robotics

Basic Parts of a RobotMechanical system

Power supply system

Sensory devices for feedback

Sensor Data processing unit

Control system

Page 4: Robotics

THE EDGE AVOIDER ROBOT (EAR)

Page 5: Robotics

Basic Electronics Components in EAR

• Resistors

• Capacitors

• Inductors

• Diodes

• Microcontroler

Page 6: Robotics

RESISTORS Electric current is simply the motion of electrons from one place to another through a wire. It breaks the current by controlling the electrons.

CAPACITORS The capacitor's function is to store electricity, or electrical energy. The capacitor also functions as a filter, passing alternating current (AC), and blocking direct current (DC).

Page 7: Robotics

Inductors An inductor is a passive electrical device that stores energy in a magnetic field, typically by combining the effects of many loops of electric current.

DIODES The diode is the simplest form of semiconductor. You use semiconductors in a circuit to control the flow of electrons. A diode has two terminals, each with a high resistance to current in one direction and low resistance to current in the opposite direction.

Page 8: Robotics

ATmega 16 DEVELOPMENT BOARD

Page 9: Robotics

IR Sensors

Page 10: Robotics

H- Bridge

Page 11: Robotics

L293D Dual H-Bridge Motor Driver

Page 12: Robotics

MICROCONTROLLER (ATmega 16)PIN Diag…

Page 13: Robotics

CODE FOR EAR#define F_CPU 12000000UL //set your clock speed#include <avr/io.h>#include <util/delay.h>int move_backward=0b01110100;int right_turn=0b10110100;int move_fordward=0b10111000;int left_turn=0b01111000;int left_sensor_on=0b10000000;int right_sensor_on=0b00000001;int left_sensor_off=0b00000000;int right_sensor_off=0b00000000;int main (void){DDRC = 0xFF; //Output portDDRA = 0x00; //input portint left_sensor = 0;int right_sensor = 0;

Page 14: Robotics

while(1) //create an infinite loop{left_sensor = (PINA & 0b10000000);right_sensor = (PINA & 0b00000001);if(( left_sensor==left_sensor_off) & (right_sensor==right_sensor_off)){PORTD = move_backward; //move backward_delay_ms(500);PORTD=right_turn; //take a right turn_delay_ms(500);left_sensor = 0;right_sensor = 0;}if((left_sensor==left_sensor_on) & (right_sensor==right_sensor_on)){PORTD=move_fordward; //move forwardleft_sensor = 0;

Page 15: Robotics

right_sensor = 0;}if((left_sensor==left_sensor_off)& (right_sensor==right_sensor_on)){if (left_sensor != left_sensor_on){PORTD=right_turn; //turn right}else while (( left_sensor==left_sensor_off) &(right_sensor==right_sensor_off)){PORTD = move_backward; //move backward_delay_ms(500);PORTD=right_turn; //take a right turn_delay_ms(500);}left_sensor = 0;right_sensor = 0;}

Page 16: Robotics

if(( left_sensor==left_sensor_on) & (right_sensor==right_sensor_off)){if (right_sensor != right_sensor_on){PORTD=left_turn; //turn left}if(( left_sensor==left_sensor_on) & (right_sensor==right_sensor_off)){if (right_sensor != right_sensor_on){PORTD=left_turn; //turn left}

Page 17: Robotics
Page 18: Robotics

THANK YOU!!!!!!!!!!!!!!THANK YOU!!!!!!!!!!!!!!