DHT11 Humidity Sensor
PCB Circuit Board - Main Control Over Sensors
PIR Motion Sensor
Raspberry Pi - The Brain of Communication
LCD Display in Motion
Vaping is a growing issue around North American schools. This problem persists because school staff do not have the resources to constantly monitor school environments for vaping, e.g. washrooms. Modern problems require modern solutions. Some companies have marketed vape detectors to mitigate this issue, however, the price is astronomically high, some retailing at $1000 USD. For what seemed to be a daunting, but definitely doable challenge, we were driven to implement the same technology for less than $50.
What it does
The device detects vape by monitoring fluctuations in humidity and motion in its surrounding environment. The PIC analyzes the data and sends an interpretation of the situation to the raspberry pi. The pi organizes the data into a visually appealing interface and sends the results to the user via email.
How I built it
The main focus of this challenge was in reducing as much cost as possible. Instead of opting to use an Arduino or a breadboard, we designed and built our own circuit board. The circuit board includes a humidity sensor, temperature sensor, and a motion sensor to analyze the environments in the washroom. We used BASIC to code the PIC, which interprets the data and communicates serially to the raspberry pi. The pi reads signal inputs from its GPIO pins and interprets the information. Pi itself has internet access, allowing it to send out emails to corresponding teachers.
Challenges I ran into
The first problem we ran into was discovering that the PIC 16F628A could not store its data in Bytes, only in Bits. This was a big problem because the analog values from the sensor ranged from 0 to 255. So we redesigned our entire circuit board to accommodate the PIC 16F887.
In terms with the software, we faced difficulties integrating the sensor and the raspberry pi. The sensors, along with the microchip, are low-level devices, built to use with the C language. On the other hand, raspberry pi itself is a computer, running Linux-like operating system. The apps on raspberry pi are written in Python. The communication between these two devices was a challenge. Also, due to the school's wifi being censored, it blocked emails sent from unknown devices. Our solution was to use our mobile data plans instead, to navigate around the issue of the school's wifi.
Accomplishments that I'm proud of
We are proud that we succeeded in delivering a working project on time. There were some ideas we had to forgo because of time constraints. We gave up midway on creating an app that could seamlessly display real-time data on a nice GUI, and instead developed a simpler setup with email notifications. Had we stuck with our original decision, we probably would not have finished on time. We learned that sometimes, great ideas are bad ideas. It is better to have a working idea than none at all. By going a different route, we stayed motivated and productive.
What's next for School Air Alert
We wish to hone our developing skills to create a web app that can display our sensor data on a nice gui.