We attempted to find an easy and cheap solution to limit drunk driving. Our project consist in a box, that will contain your keys and is locked by an electromagnet connected to a breathalyser. Once you blow into the breathalyser, if positive, it will remain closed. Otherwise the box will open itself.
Components we needed: capteur MQ -3 alcohol gaz sensor switch 3 or 2 positions,3 LED blue yellow and green, 3 resistor 270 ohms, arduino micro, micro servo 5g, cables, 3D Printer, Soldering iron and tin, glue-gun with glue sticks.
Details
0
Files
IMG_4703.m4v
With our box finally printed, we can finally start arranging all the components inside!
We worked on solid works to make our final box so that we can print it with the 3D printer. Using solid works was a way to have the most precision and the measures, especially with the holes made in the box, which were tricky to do.
We also had to solder the cables on the new arduino card.
To diminish as much as we could the size of our box we had to find smaller components. Thus we tried to use a smaller card ( arduino nano) and attempted to make it work. Soldering was also needed to be done on this card.
We researched programs to use the seven-segment display on arduino and the breathalyser, which took us quite some time since some codes were wrong, but we also had problems with the cable connections. Pierre had to redo the soldering since the connections didn’t correspond. Pierre Emmanuel and Emily searched for the codes and how to connect the breathalyser to the arduino as well.
We also continued to work on the modelling of our box using solid works.
We received most of the elements we needed for our project and now had to put everything together. First of all Pierre took care of the soldering part.
Emily did a first prototype of the box using cardboard. We measured with all the different objects including car keys to see how big and thick the box had to be.
And last of all, we started to build our own breathalyser.
We defined our project as officially being the alcohol test and searched for all the possible things we would need to make our project by respecting the demanded budget. We first looked at car keys that we could personalize but rapidly saw that it would be too difficult and illegal.
We then looked at the steering wheel locks but they were too expensive for our budget.
We then chose to use a basic ethyl test to help us with our arduino .
#include
Servo monServomoteur;
int mq3_analogPin = A2; // connected to the output pin of MQ3intvalue;
voidsetup(){
Serial.begin(9600); // open serial at 9600 bps
monServomoteur.attach(9);
monServomoteur.write(100);
pinMode(8,OUTPUT);//blue led for saying you are too drunk try again later
pinMode(6,OUTPUT);//green led for saying you are negative you can drive
pinMode(4,OUTPUT);//yellow led for saying please wait
digitalWrite(8,LOW);
digitalWrite(6,LOW);
digitalWrite(4,HIGH);
delay(5000);
digitalWrite(4,LOW);
}
voidloop()
{
value = analogRead(mq3_analogPin);
Serial.print("alcool value:");
Serial.println(value);
delay(1000); //Just here to slow down the outputif ((value > 70) and (value < 110))
{ // range des valeurs pour ouvrire la boite
monServomoteur.write(10);
digitalWrite(6,HIGH);
delay(15000);
digitalWrite(6,LOW);
}
if (value > 120);
{
monServomoteur.write(100);
digitalWrite(8,HIGH);
delay(1000);
digitalWrite(8,LOW);
}
}