Hardware Updates
Updates as I build a prototype fire detector, specifically around my hardware choices.
Updates as I build a prototype fire detector, specifically around my hardware choices.
This week, I built most of the hardware side of my project. I built and successfully tested the project. Using the Arduino IDE, I programmed the FireFinder as well. I attached a photo of my code as well as the project itself (without the esp8266 wifi module). Next week, I will use AWS's capabilities and the esp8266 to make a data model for my project.
int redLed = 12;
int greenLed = 11;
int buzzer = 10;
int smokeA0 = A5;
// Your threshold value
int sensorThres = 500;
void setup() {
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(smokeA0, INPUT);
Serial.begin(9600);
}
void loop() {
int analogSensor = analogRead(smokeA0);
Serial.print("Pin A0: ");
Serial.println(analogSensor);
if (analogSensor > sensorThres)
{
digitalWrite(redLed, HIGH);
digitalWrite(greenLed, LOW);
tone(buzzer, 1000, 200);
}
else
{
digitalWrite(redLed, LOW);
digitalWrite(greenLed, HIGH);
noTone(buzzer);
}
delay(100);
}
Today, I borrowed all the parts I need for the fire detector from Mrs. Kaminski. I took 12 connecting wires, 1 resistor pack, 1 connector wire bundle, 1 arduino uno, 1 breadboard, 1 programming cable, 1 power cable, 1 red and 1 green LED, and a buzzer. I will need to purchase another part called the ESP8266 Adapter Module from here. I also found a very helpful guide for wiring here. Next week, I will start programming the FireFinder.
This week, I bought the parts I need. I also perfected the entire flow of information and processes that will take place inside each fire detector using the details I have collected till now. First, I need to program the ESP8266 WiFi Module using the Arduino. A voltage will be running through the MQ2 sensor continuously and if a fire is detected the voltage will be amplified by the ionization chamber and will return as a measurement of ppm and voltage to the loop running in the module's code. From here, a separate code file will pass on the details of the fire from the ESP8266 to an EC2 and S3 in Amazon Cloud. From here I need to work out the details of the back-end side of this project.
This week, found the parts I need to buy and added them to my cart. I will buy two ESP8266 WiFi Modules and the Willwin MQ2 Sensor Module 2 pack. The WiFi Module can be found at SparkFun. The Willwin Sensor can be found at Amazon. Today, I read a how-to project on Hackster.io which can be found here. This taught me how to get started with the wiring between an arduino and MQ2 sensor. I also got to understand the basic functions of an MQ2 sensor and how it outputs data. I will use this information to create a basic sensor with the arduino then I will incorporate the WiFi Module to add smarter capabilities to my project. I also found another Hackster.io project that may help me here.