Arduino Anti Sleep Alarm for Drivers
by CrazyScience in Circuits > Arduino
666 Views, 3 Favorites, 0 Comments
Arduino Anti Sleep Alarm for Drivers
Hello Friends in this instructables i will show you an interesting project that could save the lives of many, I gave it a name and it goes like"Anti sleep alarm goggles for drivers" There are many other ways by which you can call this.
Let me quickly explain you how this project works and what inspired to build this project.
One of the common reasons for accidents in car or bike is the due to sleep! Most of them feel sleepy on their long rides and at some point feel asleep causing the vehicle to loose control.
In the advanced vehicles they are using anti sleep sensors, its nothing but a onboard camera that senses the eyes on real time and if the eyes are closed it gives out a beep sound, this technology is costly and most of them cant afford.
I made a lot of research and came up with a simple yet effective idea, I made use of eye blink sensor, that sense the open and closing of the eye and when the eyes remain closed for more than 2 seconds the servo gets activated accompanied by a beep.
There are many ways this project could be implemented, I thought of truck drivers in mind who always are on long drives and most of them feel asleep, They can wear this goggles and go on for a drive and if they fell asleep this buzzer makes noise and also the servo triggers this can be used to apply break and bring the vehicle to halt.
I recommend to build such projects and share it to the world, This will help many people
I have given all the resources to build this project, Also there is a working video given at the end of this article make sure to check that out
Supplies
Here is the list of components that are necessary to build this project, Most of them are available on local hobby electronics shop
Arduino Nano from amazon
N20 gear motor
Eye Blink sensor with goggles
Buzzer
Jumper Cables
Breadboard
Wheels
Lithium Ion battery with case
Relay Module
Arduino IDE and Programming Cable
Arduino Codes and Circuit Diagram
Arduino circuit for this project is kind of complex who are new to this circuit thing, Let me break it down for you
I will explain the circuit component wise so that anyone can follow with ease.
The sensor that we are using here is eye blink sensor and it comes with 3 pins
2 for power supply and one for signal, connect the Vcc and Gnd to ášhe 5v and Ground pin whereas the output pin to D2 on the nano.
Relay module has 5 pins, 3 on one side and 2 on the other
Vcc and Gnd to the power pins whereas the In is connected to D8 pin on the nano board.
The other side of relay is connected to positive of battery, negative of battery is connect to dc motor, the other terminal of motor is connect to other pin on the relay.
This completes the circuit part for this project, You can now simply connect the nano board to computer and open arduino IDE
Use the codes that i have given below, Paste on the IDE and type proper board type and port number, Click on upload and now you are good to go
Downloads
Components Assembly
Start by connecting jumper cables, I would start with an eye blink sensor
This sensor is almost similar to IR sensor but works in some other way, after you connect the jumper cables to this sensor attach the sensor to the goggles and extend the wire by connecting 2 layers of jumper wires
By doing this you can easily access the goggles in standing position and make sure the jumpers are tight and there is no loose connection in the joining areas.
I recommend to connect the battery to the case at the last to avoid any problems while building the connection.
Now I will use the breadboard to make the connection easier and if anything goes wrong you can easily figure out the issues on a breadboard and its components.
Later connect the jumper to relays, Establish the connection between all the components and later we can head over to placing this components on a piece of board.
You also can simplify this circuit with a Simple small PCB, Complete your electronic projects in the best way from PCBWay
Christmas Event is live, check the best offers here
Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market, They also have Color PCB printing check it out
Check out their7th project design contestwhere you have a chance to participate and win exciting prizes.
With their Multicolor 3D printing service your project becomes more interesting
A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.
With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits.
Setting Up Components
Make use of other components to secure the electronics on board, Use hot glue for this purpose.
Start by buzzer and then we can go ahead with other components, Use hot glue and double side adhesive to secure all the parts.
There is no thumb rule to keep these parts as i did, feel free to experiment in your own ways.
Here one thing that you have to take care is the motor placement, Use sufficient amount of hot glue to secure it on the board.
Attach the wheels to N20 motor shaft, Insulate the joins and make the connections look neat, In the end when you raise or lower the tables none of the components should move here and there.
After all this is done take a piece of paper, mark black paint on a strip of white paper
This is used as a reference to open and close the eyes and will make you ensure if the circuit is working fine or not, On the last image of this step you can see it how.
How It Works
You may now have the idea on its works on a cream layer, well let me explain it to you in details.
To make this project work, you have to power up the nano board first, connect to any USB power source in my case i will use a power bank
After this is done the project is ready to use and now you may wear the goggles, When you open the eyes the device will be in standby condition, when you close the eyes the buzzer make a beep sound and if you still continue to close your eyes the motor activates.
For this project i have added wheels, You can utilize the activation of motor to trigger the breaks or something else according to your needs.
Now the wheel activates and when you open the eyes the setup will go back to default position.
This mechanism is the base for most of the anti sleep alarm that is available today, There are endless option to customise this project and i would love to hear any ideas that are on your mind.
If you have any questions let me know in the comments box, Thanks and kindly try building such useful projects and share it to the world, Thank you for reading
Video
Here is a detailed video version of this tutorial, If you find anything that is missing on this written part i can assure you will find it inside this video.
Like i mentioned in the previous steps, feel free to experiment this project and let me know in what way you used this project and post a make in the " i made it section"
That is all for this anti sleep alarm project, If you still have anything to ask you can ask in the comments section and i will address it shortly, Thanks and happy building.