What it does
Fire alert, as the name alludes, serves as an alert for fires. It utilizes a temperature sensor to consistently poll for the temperature, set off a buzzer, turns on the sprinklers and opens the nearest door to escape when the temperature of the surroundings exceeds a specific threshold. This information is all sent to NodeRed to facilitate remote monitoring.
The inspiration for this project comes from fires accidentally occurring in the Industries. Usually in the manufacturing units, whenever there is a fire accident, sound buzzers are set ON and all the employees will be instructed to leave the site. They are told to turn OFF all the machinery and water sprinklers are activated (from my industrial experience). All these are done manually (except the fire alarm). As the Industries are moving towards Industry 4.0, we thought of automating all the functionality using sensors and controllers, integrating them with IoT. This way we can control the severity of fire accident occurrences. This project can be further extended to smart homes.
How it works
There is one sensor we constantly poll (the temperature sensor) using I2C. When we read a temperature value that exceeds a specific threshold, we then change the GPIO pin values for the buzzer, motor driver (which drives the water pump), and servo motor (to open door). This is set for a specific amount of time before the GPIO pins are reset to their default values. If the temperature still exceeds the threshold, this will re-trigger the response (buzzer, motor/water pump, servo), until the temperature sensor reads an acceptable value. The buzzer sets off an alarm sound. The motor will drive the water pump to spray water throughout the surroundings. The servo motor opens a door. In the case of a false alert, NodeRed is facilitated with a sleep mode, which reset the entire system.
Challenges we ran into
We initially faced challenges with power management, as we have water pump (6V), buzzer (3.3V) and servo (3.3V). We have distributed different regions for these three power supplies on the PCB board and placed the components accordingly. While working on the hardware, we integrated all the development boards. However, we couldn't manage the power properly as the MCU doesn't provide enough current to drive the motor and water pump. Using our knowledge in electronics, we have connected the positive to the direct power supply and connected the negative terminal to a MOSFET (switch). We have programmed the MCU to control the MOSFET accordingly.
Beside that, we ran into a number of challenges -- primarily in the integration part of the project (the end). We had a lot of hardware issues that we couldn't quite figure out (ex. SD cards corrupting). Even after going to office hours and talking to TAs, these issues still kept coming up and thus it was incredibly difficult for us to work on our project when we couldn't run it on the hardware. It was as if we were just blind coding until our hardware would work and we could run it before it broke again.
What we learned with the prototype
Both of us learned a number of skills as neither of us had any experience with many of the tasks necessary to build this prototype. The first thing we learned was how to design a PCB -- this was truly an iterative process as we had to continually redesign our PCB and pass it off between the two of us. We tried a number of different designs/configurations (power management) before we finally settled on the one we currently have. We also learned a lot about embedded systems programming and interfacing with the internet with MQTT, as neither of us had ever used or touched MQTT before. These technical skills in building our prototype are going to travel far with us as we continue to build prototypes for other projects. In addition, pin configuration, mapping and power management were additional important skills we learned for this project. Since we had so many devices to control with the microcontroller, we had to make sure we properly mapped our pins to our external devices and that there were sufficient pins to control the devices. Also we placed all the components nearer to their power supply with the minimal routing length. In additional, we learnt the application of electronic switches (MOSFETs). Initially, we thought of using a voltage amplifier to supply power to water pump, as we are unable to feed enough amount of current, we sticked ourselves to using MOSFETs.
What we learned
Technical skills aside, we learned how to work collaboratively and remotely. One of the teammates had to travel a lot throughout the semester, for personal and familial reasons, and having to coordinate working on the hardware and software together was quite the learning opportunity. Through the class we learned the importance of application study. Though we sat in class/lecture and understood the material, once it came to building our own prototype, that's where we learned the most -- the trial and error, iterative design process. At the end of the day, we have got a great opportunity to apply our theoretical knowledge in the project and have learnt so much due to hands-on implementation. We are extremely satisfied that we were able to successfully implement the project after facing many challenges in the hardware, software and their integration.
What's next for Fire Alert
Looking forward, an improvement to our project could be to create an app interface to be downloadable on iOS and Android devices to control the turning on and off of the alarm trigger -- for false alarms. We could also incorporate more sensors (such as a gas sensor) to make sure that the temperature rise is actually due to a fire, as opposed to any other external reason. We can also try to control all the machinery in the industry using this interlock, thereby reducing the criticality.