How to Make a RPi Fire Alarm
by TJ Jean Augustine in Circuits > Electronics
3587 Views, 3 Favorites, 0 Comments
How to Make a RPi Fire Alarm
Hello!! In this instructable, I will be teaching you how to make a fire alarm using a Raspberry Pi. This fire alarm will sense and notify you if there is a fire with warning messages and will call the police with the push of a button.
Materials Required
- 1 Raspberry Pi B+
- 1 T-Cobbler
- 1 Raspberry Pi breadboard
- 3 female to male wires (1 Red, 1 Black, 1 Brown)
- 2 jumper wires (1 Red, 1 Black)
- 1 River cable
- 1 Raspberry Pi Flame sensor
- headphones or a speaker
Procedure
- Declutter your work area so it gives you ample space to work
- Plug in an output display through an HDMI into your Raspberry Pi
- Plug in the power cable and computer peripherals i.e (keyboard and mouse) into your Raspberry Pi
- Attach one end of the river cable to the top end of the T-Cobbler
- Attach the other end of the river cable to the pins on the Raspberry PiGPIO7Navigate
- Place your T-Cobbler so that it is in the middle of the breadboard
- Attach the T-Cobbler in a way that each column attaches to separate sides of the breadboard
- Plug one end of the Red jumper wire into the row that says 5V5 on the T-Cobbler
- Plug the other end of the Red jumper wire in the Column with the "+" sign or the positive column
- Plug one end of the Black jumper wire into the row that says GND on the T-Cobbler
- Plug the other end of the Black jumper wire in the Column with the "-" sign or the ground column
- Plug the female end of the Red male to female wire into the pin that says "VCC" on the Flame sensor
- Plug the male end of the Red male to female wire into the same column as the Red jumper wire
- Plug the female end of the Black male to female wire into the pin that says "GND" on the Flame sensor
- Plug the male end of the Black male to female wire into the same column as the Black jumper wire
- Plug the female end of the Brown male to female wire into the pin that says "DO" on the Flame sensor
- Plug the male end of the Brown male to female wire into any row on the breadboard with the label GPIO7
- Now in order to get sound for this alarm, go to an mp3 converting, and convert whatever sound file you want to a .wav file
- Navigate to the bottom hand corner of the screen on your RPi and click the windows button.It will bring up a small menu you will want to hover over where it says "Programming"This will bring up another menu where you will want to click "Python 3 (IDLE)"This will bring up a new window, go to the top left of this window and click where it says "File"
- This will bring up a small menu where you will click "New File"Once in this new blank window,
- Make sure to create a new folder and place the .wav file and the file with the code in it together. this will make it easier for the computer to find the file.
- insert headphone jack into port and insert USB if there is one
- Once the code has been pasted press the button that says F5 on the keyboard
- A little option will pop up click "run"This will bring you to an area where you can save your code, please feel free to name the project to your liking
- Once the file is saved, you can run the code and see your New RPi fire alarm working perfectly
- Enjoy your brand new homemade Fire alarm
Code
you will copy and paste the code that is in the image.
Closing Remarks
This has been a great 10 minutes that you have spent building a great Fire alarm, I hope you get enjoyment out of this new crazy project that you just made3This will keep you safe and will notify of any Fires. Have an AWESOME day and STAY SAFE.