LIPRO - LIFE PROTECTOR

Published Dec 11, 2021
 24 hours to build
 Intermediate

LIPRO is a self driving ambulance that acts as an electric vehicle which is programmed and automated to run itself on the track. It contain required medical equipment necessary to take the patient to hospital.

display image

Components Used

Arduino UNO
Arduino UNO
1
L298N Motor driver
L298N is a high current, high voltage dual full bridge motor driver. It is useful for driving inductive loads.
2
LCD 16x2 Display Module
LCD16x2 has two lines with 16 character in each line. LCD16x2 is generally used for printing values and string in embedded application.
3
Relay Module Single Channel
Relay Module Single Channel
4
AK9753 IR sensor
AK9753 is a low power and compact IR (infrared) sensor module.
10
Metal Chasis for a Mini Robot Rover
Robotics Kits Anodized Aluminum Metal Chasis for a Mini Robot Rover
5
em-506 GPS Module
EM-506 is a GPS receiver module by USGlobalSat. It provides high sensitivity and performance even in dense areas.
7
SIM900A GSM GPRS Module
SIM900A is dual band GSM/GPRS 900/1800MHz module board used to utilize GSM and GPRS services around the globe. It is used to make/receive voice calls, send/receive text messages, connect to and access the internet over GPRS.
6
LIPO Battery 11.1V
Battery Packs LIPO Battery 11.1V 1000mAh LB-010
8
DC Gearbox Motor
Adafruit Accessories DC Gearbox Motor - TT Motor - 200RPM - 3 to 6VDC
9
Connecting Wire Jumper Wires
Connecting Wire Breadboard wires
11
Caster Bearing Wheel
Adafruit Accessories 20mm Height Metal Caster Bearing Wheel
12
Wheel for DC Gearbox Motors
Adafruit Accessories Skinny Wheel for TT DC Gearbox Motors
1
Description

1. INTODUCTION

      Today, India is one of the developing country in the world. The development of a nation is in the hands of people. Nowadays due to urbanization people are so busy in their world. This urbanization has lead to the development of roads and highways. Due to this we can see a drastic change in increase of vehicles on roads. Over a period of decade we can see many accidents that had occurred on the roads and highways. Due to accidents many people had lost their precious life. So our project aims to protect the lives of people when accident occurs. The only 1st idea that comes to a person when he sees an accident is to call the Ambulance. It is a life savior to many of them. Sometimes the ambulance fails to take the patient to hospital in time. Traffic is one of the reason for this. Our project is well designed and traffic free which helps to take the patient to hospital in time LIPRO model consists of an IR-LED and Photodiode arrangement for each motor which is controlled by the switching on and off of the transistor. The IR LED on getting proper biasing emits Infra red light. This IR light is reflected in case of a white surface and the reflected IR light is incident on the photodiode. The resistance of the photodiode decreases, which leads to an increase in current through it and thus the voltage drop across it. The photodiode is connected to the base of the transistor and as a result of increased voltage across the photodiode, the transistor starts conducting and thus the motor connected to the collector of the transistor gets enough supply to start rotating. In case of a black color on the path encountered by one of the sensor arrangement, the IR light is not reflected and the photodiode offers more resistance, causing the transistor to stop conduction and eventually the motor stops rotating. 

2. DESCRIPTION OF THE IDEA

       Our project LIPRO plays a role as similar to the ambulance. It is an electric vehicle which is programmed and automated to run itself on the track. It contain required medical equipment necessary to take the patient to hospital. As per our idea any highways and roads will have a divider in-between it. A small bridge has to be constructed on the divider not exceeding it’s width. The bridge has to be constructed in such a way that it connects every hospitals. When an accident occurs on the road, the person who sees it can give a miss call to a toll free number like 108. LIPRO comes to the spot using the location of the informer's phone number and the patient can be taken to hospital in time. There is no risk of traffic in this idea.

3. PROJECT BUILDING

STEP 1

  • Choose a right chassis required for the project, mount two BO motors to the chassis and attach wheels to the motors as shown in figure 1.
FIGURE 1. ROBOTIC CHASSIS

STEP 2 

  • Connect two motors to the driver with a supply of 9-12V.
  • Now take the Arduino and mount it on chassis and power up using power jack as shown in above figure.
  • Make the connections as shown in figure 2.
FIGURE 2. LINE TRACKER PIN DIAGRAM

STEP 3

  • Upload the given code to Arduino UNO using Arduino software.
#define en1 9
#define input1 6
#define input2 7
#define en2 11
#define input3 10
#define input4 8
#define L_sensor 4
#define R_sensor 3
void setup() {
pinMode(en1, OUTPUT);
pinMode(en2, OUTPUT);
pinMode(input1, OUTPUT);
pinMode(input2, OUTPUT);
pinMode(input3, OUTPUT);
pinMode(input4, OUTPUT);
pinMode(L_sensor, INPUT);
pinMode(R_sensor, INPUT);
// put your setup code here, to run once:
Serial.begin(9600);
analogWrite(en1,250);
analogWrite(en2, 250);
}
void loop() {
if((digitalRead(L_sensor) == HIGH) && (digitalRead(R_sensor) == HIGH)){
Serial.println(" Left and Right sensors are high");
digitalWrite(input1, HIGH);
digitalWrite(input2, LOW);
digitalWrite(input3, HIGH);
digitalWrite(input4, LOW);
}
else if((digitalRead(L_sensor) == HIGH) && (digitalRead(R_sensor) == LOW)){
Serial.println(digitalRead(L_sensor));
Serial.println(digitalRead(R_sensor));
digitalWrite(input1, LOW);
digitalWrite(input2, LOW);
digitalWrite(input3, HIGH);
digitalWrite(input4, LOW);
}
else if((digitalRead(L_sensor) == LOW) && (digitalRead(R_sensor) == HIGH)){
Serial.println(" Left Low");
Serial.println(Right HIGH);
digitalWrite(input1, HIGH);
digitalWrite(input2, LOW);
digitalWrite(input3, LOW);
digitalWrite(input4, LOW);
}
else {
digitalWrite(input1, LOW);
digitalWrite(input2, LOW);
digitalWrite(input3, LOW);
digitalWrite(input4, LOW);
}
}

STEP 4

  • In order to start the LIPRO you can place a switch and manually turn on it.
  • Or you can use GSM module along with Arduino and make connection as shown in figure 3 to ON the model.
FIGURE 3. GSM PIN DIAGRAM
  • Now connect the motor driver to the relay.

STEP 5

  • Upload the given code to Arduino.
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include <EEPROM.h>
SoftwareSerial gsm(10, 11); // RX, TX
LiquidCrystal_I2C lcd(0x27, 16, 2);

int address = 0; 
int wr_call_add = 1; 
int f_address = 2; 
int eeprom_dead = 3; 
int wr_call_val = 0;
int f_value = 70;
int value = 0;
int ring = 0;
int i = 0;
int var = 0;
int eeprom_tst = 0;
int eeprom_tst_ack = 0;
int tst_var = 100;
int wr_call_tst = 100;
int eeprom_dead_val = 0;
String number = "";
String string = "";
const int output = 5;
const int red = 7;
const int buzzer = 4;
const int green = 6;
boolean wait = true;
boolean at_flag = 1;
boolean net_flag = 1;

void setup()
{
Serial.begin(9600);
lcd.init();
lcd.backlight();
gsm.begin(9600);
pinMode(output, OUTPUT);
pinMode(red, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(green, OUTPUT);
if (EEPROM.read(f_address) != f_value)
{
EEPROM.write(f_address, f_value);
EEPROM.write(address, value);
EEPROM.write(wr_call_add, wr_call_val);
eeprom_dead_val = 0;
EEPROM.write(eeprom_dead, eeprom_dead_val);
}
if (EEPROM.read(eeprom_dead) == 1)
{
while (true)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("EEPROM Error.");
lcd.setCursor(0, 1);
lcd.print("System Disabled.");
delay(1500);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Reload the code");
lcd.setCursor(0, 1);
lcd.print("with new address");
delay(1500);
}
}
if (EEPROM.read(address) == 0)
{
digitalWrite(output, LOW);
digitalWrite(red, HIGH);
digitalWrite(buzzer, LOW);
delay(2000);
digitalWrite(green, LOW);
gsm_init();
lcd.clear();
if (EEPROM.read(wr_call_add) == 0)
{
lcd.setCursor(0, 0);
lcd.print("Sending SMS");
lcd.setCursor(0, 1);
lcd.print("Acknowledgement.");
delay(1000);
gsm.println("AT+CMGF=1");
delay(500);
gsm.print("AT+CMGS=");
gsm.print("\"");
gsm.print(str);
gsm.println("\"");
delay(1000);
gsm.println("Motor is OFF / System is Ready.");
delay(100);
gsm.println((char)26);
}
if (EEPROM.read(wr_call_add) == 1)
{
wr_call_val = 0;
EEPROM.write(wr_call_add, wr_call_val);
}
}
if (EEPROM.read(address) == 1)
{
eeprom_test();
output_begin();
}
}
void(* resetFunc) (void) = 0;
void loop()
{
serialEvent();
if (ring == 1)
{
number = "+918830584864";
var = string.indexOf("+CLIP: \"");
if (var > 0)
{
number += string.substring(var + 8, var + 13 + 7);
}
if (number[0] == str[0] && number[1] == str[1] && number[2] == str[2] && number[3] == str[3]
&& number[4] == str[4] && number[5] == str[5] && number[6] == str[6] && number[7] == str[7]
&& number[8] == str[8] && number[9] == str[9] && number[10] == str[10] && number[11] == str[11])
{
gsm.println("ATH");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Incomming call");
lcd.setCursor(0, 1);
lcd.print("Number Verified.");
delay(2000);
if (EEPROM.read(address) == 0)
{
EEPROM.write(address, 1);
}
else if (EEPROM.read(address) == 1)
{
EEPROM.write(address, 0);
}
resetFunc();
}
if (!(number[0] == str[0] && number[1] == str[1] && number[2] == str[2] && number[3] == str[3]
&& number[4] == str[4] && number[5] == str[5] && number[6] == str[6] && number[7] == str[7]
&& number[8] == str[8] && number[9] == str[9] && number[10] == str[10] && number[11] == str[11]))
{
gsm.println("ATH");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Unknown number");
lcd.setCursor(0, 1);
lcd.print("Call Rejected.");
wr_call_val = 1;
EEPROM.write(wr_call_add, wr_call_val);
delay(2000);
resetFunc();
}
}
if (EEPROM.read(address) == 0)
{
serialEvent();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("System Standby");
lcd.setCursor(0, 1);
lcd.print("Status: OFF");
delay(1000);
}
else if (EEPROM.read(address) == 1)
{
lcd.setCursor(0, 0);
lcd.print("STATUS: ON");
lcd.setCursor(0, 1);
lcd.print("----------------");
}
}
void gsm_init()
{
lcd.print("System booting....");
lcd.setCursor(0, 1);
lcd.print("initiating......");
delay(1500);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Checking Module");
lcd.setCursor(0, 1);
lcd.print("Connectivity....");
while (at_flag)
{
gsm.println("AT");
while (gsm.available() > 0)
{
if (gsm.find("OK"))
at_flag = 0;
}
delay(1000);
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Module");
lcd.setCursor(0, 1);
lcd.print("Connection: OK");
delay(1500);
eeprom_test();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("System is Ready");
lcd.setCursor(0, 1);
lcd.print("----------------");
delay(1500);
}
void serialEvent()
{
while (gsm.available())
{
char read_char = gsm.read();
string += read_char;
i++;

if (string[i - 4] == 'R' && string[i - 3] == 'I' && string[i - 2] == 'N' && string[i - 1] == 'G' )
{
ring = 1;
}
}
}
void output_begin()
{
digitalWrite(red, LOW);
digitalWrite(buzzer, HIGH);
delay(2000);
digitalWrite(buzzer, LOW);
digitalWrite(green, HIGH);
if (EEPROM.read(wr_call_add) == 0)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Sending SMS");
lcd.setCursor(0, 1);
lcd.print("Acknowledgement.");
delay(1000);
gsm.println("AT+CMGF=1");
delay(500);
gsm.print("AT+CMGS=");
gsm.print("\"");
gsm.print(str);
gsm.println("\"");
delay(1000);
gsm.println("Motor is ON.");
delay(100);
gsm.println((char)26);
}
if (EEPROM.read(wr_call_add) == 1)
{
wr_call_val = 0;
EEPROM.write(wr_call_add, wr_call_val);
}
lcd.clear();
}
void eeprom_test()
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Testing EEPROM");
lcd.setCursor(0, 1);
lcd.print("Memory.");
delay(1500);
eeprom_tst = EEPROM.read(address);
eeprom_tst_ack = EEPROM.read(wr_call_add);
EEPROM.write(address, tst_var);
EEPROM.write(wr_call_add, wr_call_tst);
if (EEPROM.read(address) == tst_var && EEPROM.read(wr_call_add) == wr_call_tst)
{
EEPROM.write(address, eeprom_tst);
EEPROM.write(wr_call_add, eeprom_tst_ack);
if (EEPROM.read(address) != eeprom_tst || EEPROM.read(wr_call_add) != eeprom_tst_ack)
{
digitalWrite(output, LOW);
digitalWrite(red, HIGH);
digitalWrite(buzzer, LOW);
delay(2000);
digitalWrite(green, LOW);
eeprom_dead_val = 1;
EEPROM.write(eeprom_dead, eeprom_dead_val);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("EEPROM Test is");
lcd.setCursor(0, 1);
lcd.print("Unsuccessful.");
delay(1500);
}
else if (EEPROM.read(address) == eeprom_tst && EEPROM.read(wr_call_add) == eeprom_tst_ack)
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("EEPROM Test is");
lcd.setCursor(0, 1);
lcd.print("Successful.");
delay(1500);
}
}
else if (EEPROM.read(address) != tst_var || EEPROM.read(wr_call_add) != wr_call_tst)
{
digitalWrite(output, LOW);
digitalWrite(red, HIGH);
digitalWrite(buzzer, LOW);
delay(2000);
digitalWrite(green, LOW);
eeprom_dead_val = 1;
EEPROM.write(eeprom_dead, eeprom_dead_val);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("EEPROM Test is");
lcd.setCursor(0, 1);
lcd.print("Unsuccessful.");
delay(1500);
}
}
void eeprom_sms()
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Sending SMS");
lcd.setCursor(0, 1);
lcd.print("Acknowledgement");
delay(1000);
gsm.println("AT+CMGF=1");
delay(500);
gsm.print("AT+CMGS=");
gsm.print("\"");
gsm.print(str);
gsm.println("\"");
delay(1000);
gsm.println("EEPROM error. System disabled. Please reload the code with new address.");
delay(100);
gsm.println((char)26);

{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("EEPROM Error.");
lcd.setCursor(0, 1);
lcd.print("System Disabled.");
delay(1500);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Reload the code");
lcd.setCursor(0, 1);
lcd.print("with new address");
delay(1500);
}
}

STEP 6

  • Make a bridge or a track for Lipro.
  • Here I had used waste bottles and sunmica sheets to build a bridge as shown in figure 4.
FIGURE 4. BRIDGE

4. VIDEO DEMONSTRATION

5. CONCLUSION

       The novelty in our idea is that since the applications of line follower robot can be seen in industrial and domestic sectors, our project differs from all by upholding and showing the world that it can also be used as an Ambulance. It can also run using sunlight by mounting solar panels on it. As mentioned above life is very precious and we all have one life. Lipro performs the work of an ambulance and saves the life of a person by taking him to hospital in time. There is no question of obstacle or traffic to it as there is a separate path for the movement of Lipro. It is also eco-friendly and pollution free as it runs by using electric power and sunlight. Lipro saves,

                                    * Natural Resource(petrol/diesel)

                                    * Environment 

                                    * Time 

                                    * Life

Codes

Downloads

LIPRO Download

Institute / Organization

BGS Institute of Technology
Comments
Ad