Professional Documents
Culture Documents
Smart Products
Telmo Garai López
Mikel Corres Eroa
May 2021
Project description and motivation. Target
market:
Description
Our project consists of a security system for bicycles or any kind of non road
vehicle such as scooters, etc… It is capable of warning about danger in your blind
spots and in case of an accident, contacts a rescue team.
How it works?
The system makes sure that the cyclist has at least one of his or her two hands on
the handlebar.
Then, it also provides information about how far an object behind the bicycle is,
so that the cyclist increases the focus on the road and is aware and conscious
about it and makes the right decision in order to avoid any incident.
If the worst possible case happens, and the cyclist has an accident, probably the
cyclist will fall off the bike and the hands won’t be on the handlebar any more. If
this happens, thirty seconds after the system has detected that, it will send an
alarm to a relative of the victim or the nearest hospital.
Target market:
Our target market consists of people who are forced to share the road while
biking. Cyclists who do lots of kilometers on the side of the main roads or just
people biking around the city to go shopping or to work.
Sadly it is quite common to hear on the news that a cyclist has been hit by a car
nowadays, but this is normal. Nowadays there are more cars than ever on the
roads, and the popularity of bicycles has increased a lot.
Obviously this product will also be helpful for other types of users, but we have
concluded that these are our main focus.
- Speech recognizer sensor: In the case that once the incident or accident
has happened, and the biker can’t reach the bike in less than 30 seconds,
the speech recognizer will stop the alarm notification if the right command
is received.
Mikel
Telmo
24. 25.
Documentat Document
ion and ation,
program Program
developme developme
nt nt and final
integrated
testing
Strategy followed
1. First we made the touch sensors work as we wanted to. Their work could
be defined with the following table
1 1 = 0
1 0 = 0
0 1 = 0
0 0 = 1
3. Then we tried with the speech recognizer, after downloading the libraries
we needed, ESP Sparkfun module started giving compilation problems, so
we had to leave this option and use a button instead which works as the
speech recognizer would.
4. The ultrasonic sensor and the led strp were mutually connected so we left
them for the final part as we had already used them earlier. We had some
problems with this part due to the sensors and Led stripe not working
properly, and having some programming issues, but after all we managed
to make them work as we wanted to.
5. Finally, we mixed both programs in one, and implemented the Led stripe
functions in some of the code from the touch sensors as we mentioned in
the explanation of the system. Overall we are pleased with the result even
though some of the sensors are quite sensitive and not so accurate so the
model would be in an early phase.
Interior:
Mounted:
Arduino code just in case:
#include <Arduino.h>
#include <WiFi.h>
#include "ThingSpeak.h"
#include <HTTPClient.h>
#include "Ultrasonic.h"
#include <Adafruit_NeoPixel.h>
//WiFi
const char* ssid = "MIWIFI_KAez_plus";
const char* password = "y9SYTzjq";
WiFiClient client;
//SENSORS
const int SENSOR_PIN = 37; // the Arduino's input pin that connects to the
sensor's SIGNAL pin
const int SENSOR_PIN2 = 35;
const int BOTON = 18;
//wifi
unsigned long myChannelNumber = 1398352;
const char * myWriteAPIKey = "PZDQEHW1211PU2ZI";
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
//Initialize Wifi communication
Serial.println(ssid);
WiFi.begin (ssid, password),
ThingSpeak.begin(client);
// initialize the Arduino's pin as an input
pinMode(SENSOR_PIN, INPUT);
pinMode(SENSOR_PIN2, INPUT);
pinMode(BOTON, INPUT);
// initialize pixels
pixels.begin();
}
void loop() {
// LED functioning
pixels.clear();
long RangeInCentimeters;
long warningZone = 100;
long warningZone2 = 50;
long warningZone3 = 20;
//SENSOR FUNCTIONING
// read the state of the the input pin:
currentState1 = digitalRead(SENSOR_PIN);
currentState2 = digitalRead(SENSOR_PIN2);
boton = digitalRead(BOTON);
lastTime = millis();
while (lastState == LOW && currentState1 == LOW && lastState2 == LOW &&
currentState2 == LOW && boton == LOW){
if ( millis()-lastTime > 30000){
callAmbulance();
}
currentState1 = digitalRead(SENSOR_PIN);
currentState2 = digitalRead(SENSOR_PIN2);
boton = digitalRead(BOTON);
}
lastState = currentState1;
lastState2 = currentState2;
delay(1000);
}
void callAmbulance(){
Serial.println("Calling ambulance");
sos = 1;
for(int i=0; i < 9; i++){
pixels.setPixelColor(i,pixels.Color(255,0,0));// Turn everything red
pixels.show();
}
ThingSpeak.setField(1,sos);
ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
}