This project is a prototype of Homer Simpson's brilliant invention, "The Everything's OK" Alarm. The alarm will sound off every three seconds, letting you know that everything is OK! If gas or fire is detected, things are NOT OK and the alarm will stop.

Setup



I got all my sensors from a kit by SunFounder. This kit came with some hardware specific libraries for my ADC Converter and my LCD Screen. Other companies should provide equivalent libraries, or you can try the SunFounder ones which can be found here. If you download the zip, the two you'll need are 'PCF8591.py' and 'LCD1602.py'.

I use FileZilla and an ssh connection to develop from my desktop. To get started create a directory on your pi called 'FlameDetector' or whatever you'd like to call it, and move 'PCF8591.py' and 'LCD1602.py' into that directory. Now lets get started with the Gas Sensor

Raspberry Pi Gas Sensor Setup

To set up the gas and flame sensor I used the PCF8591 ADC converter to generate numerical readings. The Gas sensor and Buzzer were wired as shown below