autonomated active safety system

13
Presented By Haren Dodke – fx7465 Rajas Moghe – fw3687 Vinodhini Priya Pandiselvan – fy1318 Automated Active Safety System Group 7 ECE 5620 Embedded System Design

Upload: haren-dodke

Post on 11-Apr-2017

173 views

Category:

Engineering


2 download

TRANSCRIPT

Autonomous Active Safety System

Presented ByHaren Dodke fx7465Rajas Moghe fw3687Vinodhini Priya Pandiselvan fy1318Automated Active Safety SystemGroup 7 ECE 5620 Embedded System Design

Our Inspiration

Our AdaptationNode 1Front Sensors (Msg 0)Left Side Motors (Msg 2-6)Node 0Front Sensors (Msg 0)Rear Sensors (Msg 1)Left and Right Side Motors (Msg 2)Node 2Rear Sensors (Msg 1)Right Side Motors (Msg 2-6)Msg 0Msg 1Msg 2-6Msg 2-6

CAN We?Arduino UNO (Atmega328)Seeed CAN Bus Shield (MCP2551)Motor Driver (L298)Ultrasonic Distance Sensors (HC-SR04)MotorsBatteryChassis

Components Required :Work FlowGet data from Front Sensors for obstacleIs there obstacle?Go ForwardGet data from Rear Sensors for obstacleWaitTake appropriate TurnYesYesNoNoIs there obstacle?

Yes We CAN !!Node 0Decision nodeLED indicatorNode 2Sensor and Actuator nodeNode 1Sensor and Actuator nodeFront Right SensorFront Center SensorFront Left SensorRear Right SensorRear Left SensorLeft MotorsRight Motors

How we made it

The End Product

The FuelIN1IN2Motor StatusLOWLOWStopsLOWHIGHAnti-ClockwiseHIGHLOWClockwiseHIGHHIGHStops

void Forward() //forward{ digitalWrite(L1, LOW); digitalWrite(L2, HIGH);}void Reverse()//reverse{ digitalWrite(L1, HIGH); digitalWrite(L2, LOW);}void Left() //left{ digitalWrite(L1, LOW); digitalWrite(L2, LOW);}void Right()//right{ digitalWrite(L1, LOW); digitalWrite(L2, HIGH);}void Halt()//halt{ digitalWrite(L1, LOW); digitalWrite(L2, LOW);}H-Bridge Way:0101Forward (ID 2)1010Reverse (ID 3)0100Left (ID 4)0001Right (ID 5)0000Halt (ID 6)

//Functions for motion

void Forward() //forward{ digitalWrite(R1, LOW); digitalWrite(R2, HIGH);}void Reverse()//reverse{ digitalWrite(R1, HIGH); digitalWrite(R2, LOW);}void Left() //left{ digitalWrite(R1, LOW); digitalWrite(L2, HIGH);}void Right()//right{ digitalWrite(R1, LOW); digitalWrite(R2, LOW);}void Halt()//halt{ digitalWrite(R1, LOW); digitalWrite(R2, LOW);}The Combinations:

When and What ?// Motor control logic

if (SensFL >= 50 && SensFR >= 50 && SensFC >= 50){ msg[0] = {2}; // Move forward (message ID2) CAN.sendMsgBuf(0x02, 0, 1, msg); // send data: id = 0x02, standrad frame, data len = 1, msg: data buf delay(100);} if (SensFL < 50) // Obstacle detection and negotiation on left side{ if (SensBR < 30) { msg[0] = {5}; // Look for obstacle from back. If yes them wait else turn (message ID5) CAN.sendMsgBuf(0x05, 0, 1, msg); // send data: id = 0x02, standrad frame, data len = 1, msg: data buf blinkled(); delay(100); } else { msg[0] = {4}; // Turn Right (message ID 4) CAN.sendMsgBuf(0x04, 0, 1, msg); // send data: id = 0x02, standrad frame, data len = 1, msg: data buf delay(100); }}

Oh My DOG !!!

What Went Wrong

After The Fix

Questions ?