On average, 38 children die in hot cars each year from heat-related deaths after being trapped inside motor vehicles. This system is meant to alert a parent if they forget their child in the car, my main design criteria for the system are:
1- No action is required to activate / deactivate the system. It is meant to "just be there". The reason is that a parent who is running late or stressed out enough to forget a child in the car isn't likely to remember activating / deactivating a system.
2- It's not too noisy, if the system gives too many false alarms parents will end up disabling it.
The system works by monitoring CO2 levels in the car, CO2 is actually a very good indicator of the presence of people. The system will check CO2 level over N intervals, if CO2 level is continuously going up or if it gets past a certain threshold this is a sign that someone might be trapped in the car. Once detected a message is sent to all saved parents alerting them that something might be wrong. The message also includes information about location and temperature in the car.
Step 1: Supply List
I am sure most of these items can be purchased for lower prices, but I was focusing on US based sellers since I don't like waiting 4 weeks to get my items, suggestions welcome :)
1- Intel Edison Board with arduino shield, I got mine from Amazon
4- DS18B20 Digital Temperature Sensor- Ebay
5- (1) 4.7k sensor and (1) 1k- I just purchased this kit from Amazon
6- LED for testing
7- Female - male Duport connectors - Ebay
Power Source - More on this later!
Step 2: Software: Insalling the Edison IDE
Before proceeding, you will need to connect your Edison board and install the IDE, just follow the instructions here
Step 3: Schematic
Step 4: Connecting, Calibrating and Testing the MQ135 Sensor
VCC to 5V
Gnd to Gnd
AO to A0 on your board
Calibrate (Very important)
This drove me crazy for some time, the value you get from the CO2 sensor should be around 399
To learn more about the calibration process, please check this out.
Connect the sensor to your circuit and leave it powered on for 12-24 h to burn it in. Then put it into outside air, preferably at 20°C/35% rel. hum. (humidity is not so crucial). Read out the calibration value as such
float rzero = gasSensor.getRZero(); Wait until the value has somewhat settled (30min-1h). Remember, this is an ADC measurement so you might not want to wait some time between reading the sensor and also do some averaging. Once you have determined your RZero, put it into the MQ135.h. Note: Different sensors will likely have different RZero!
Run Test code
I uploaded the test code to this step, I used a RED LED to light up when the value exceeds a certain threshold. you can also check out the video of my assistant (8 years old) testing it.
Step 5: Connect Heat Sensor
Point the flat side of the DS18B20 towar you.
- Left = Ground
- Center = Signal (Pin 13)
- Right = +5 or +3.3 V
- 4.7 k Resistor from +5V to Signal
Step 6: Sim900 Module
It's recommended to power up the SIM900 from a separate power supply, I did not do that for my module though
+5V <---> VCC;
GND <---> Power Supply GND;
next GND <---> Board GND
TXD <---> Pin 8
RXD <---> Pin 7
If your SIM900 is properly connected to the network you should see it blink every 3 seconds, if it blinks too fast this means it's still looking for network, I uploaded a video to show the difference - notice how it blinks fast at first, then it starts to blink more slowly
Step 7: Optional: Red LED for Testing
You can optionally connect an LED to signal you when the SMS is about to be sent, this is useful for testing. I used a 1k resistor.
Connect one end of the resistor to pin 12.
Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor.
Connect the short leg of the LED (the negative leg, called the cathode) to the GND.
Step 8: Useful References
For different ways to power up your board, I found this great instructable: https://www.instructables.com/id/How-to-Power-with-...
I ended up buying a SIM from T-mobile for 99c and bying a very cheap plan (I believe it ended up being 5$/month) - Adafruit has a great page about different SIM options
Step 9: Code
The code is available on CodeBender.cc, unfortunately the Embed function isn't working today, so you will have to download it from here
Once Downloaded you can open it with the Arduino IDE and send it to your Edison Board
Step 10: End Result
It's important to note that this is not meant to be a "Go ahead and leave your child in the car, we will let you know if things get really bad" - this is more of a "You might have forgotten that sleeping baby in the car", or "You know that person who's supposed to be watching your child? they're not doing a very good job"
Please remember to vote for me if you like this tutorial :)