Introduction: 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.

Step 1: 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

Step 2: Procedure

  1. Declutter your work area so it gives you ample space to work
  2. Plug in an output display through an HDMI into your Raspberry Pi
  3. Plug in the power cable and computer peripherals i.e (keyboard and mouse) into your Raspberry Pi
  4. Attach one end of the river cable to the top end of the T-Cobbler
  5. Attach the other end of the river cable to the pins on the Raspberry PiGPIO7Navigate
  6. Place your T-Cobbler so that it is in the middle of the breadboard
  7. Attach the T-Cobbler in a way that each column attaches to separate sides of the breadboard
  8. Plug one end of the Red jumper wire into the row that says 5V5 on the T-Cobbler
  9. Plug the other end of the Red jumper wire in the Column with the "+" sign or the positive column
  10. Plug one end of the Black jumper wire into the row that says GND on the T-Cobbler
  11. Plug the other end of the Black jumper wire in the Column with the "-" sign or the ground column
  12. Plug the female end of the Red male to female wire into the pin that says "VCC" on the Flame sensor
  13. Plug the male end of the Red male to female wire into the same column as the Red jumper wire
  14. Plug the female end of the Black male to female wire into the pin that says "GND" on the Flame sensor
  15. Plug the male end of the Black male to female wire into the same column as the Black jumper wire
  16. Plug the female end of the Brown male to female wire into the pin that says "DO" on the Flame sensor
  17. Plug the male end of the Brown male to female wire into any row on the breadboard with the label GPIO7
  18. 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
  19. 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"
  20. This will bring up a small menu where you will click "New File"Once in this new blank window,
  21. 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.
  22. insert headphone jack into port and insert USB if there is one
  23. Once the code has been pasted press the button that says F5 on the keyboard
  24. 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
  25. Once the file is saved, you can run the code and see your New RPi fire alarm working perfectly
  26. Enjoy your brand new homemade Fire alarm

Step 3: Code

you will copy and paste the code that is in the image.

Step 4: 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.