Who wouldn't want to know more about the quality of the air in the area they live in? Sure, you could look up the statistics on many websites, but where’s the fun in that? Living here in Florida there are many areas that lend themselves to doing these kinds of tests and being that the Tampa Hackerspace is located near a high traffic area by the I-4 / I-275 interchange, well, we used the opportunity that the space's location provided.
The thought of pollution and plenty of sunlight is how the idea bore of a Solar powered pollution monitor. The goal we set out with was to measure CO in real time using a remote sensor, then after taking the sampling, publish it publicly to an interactive map. All of this, of course, while being powered by solar energy using the 6 Watt Solar Charger Kit from Voltaic Systems. A self-contained solution.
Step 1: Parts and Pre-requisites
- A Soldering iron
- PC or Laptop that can program your Arduino (or clone), with a USB port
Go get and install drivers for the DigiX from: http://digistump.com/wiki/digix/tutorials/software
Github Repo: https://github.com/TampaHackerspace/pollution-sensor-network
- 6 Watt Solar Charger Kit by Voltaic Systems (http://www.voltaicsystems.com/6wattkit.php)
- Arduino or Arduino Clone with Wi-Fi built in (we used the DigiX by Digistump Version 1.0)
- USB to Micro Connector to Power the Arduino, this comes with the Solar Charger Kit
- USB to Micro Connector to Program the Arduino (unfortunately you can’t use the one that comes with the Solar Charger Kit)
- MQ-7 Carbon Monoxide sensor from SparkFun
- Gas Sensor Adapter Board from SparkFun
- BUK553-100 Mosfet (N-channel Logic level Mosfet, any N-channel level Mosfet handling 1 Amp)
- 2 x 10K Ohm Resistors
- Spare PC Board (Solderable Prototype board)
- Male Header Pins (enough to handle at least 8, the final number will depend on the number of sensors you want to attach should you choose to expand from this Instructable!)
- 1 x 2 inch by ¼ inch Carriage Bolt (we chose this bolt as there is a square piece just under the mushroom head that wedges nicely against the PVC to prevent rotation)
- 3 x ¼ inch nuts for the Carriage Bolt
- 1 x 1 inch PVC pipe that is roughly 4 inches long
- 4 x 1 inch pieces of heat shrink tubing of 3/16 inch size
- 1 Orange 24 AWG wire 1.5 meters long
- 1 Black 24 AWG wire 1.5 meters long
- 1 Red 24 AWG wire 1.5 meters long
- 1 Yellow 24 AWG wire 1.5 meters long
Note: While it’s not necessary, we recommend the 4 colors of hookup wire. It can really be all the same color, but using different colors helps to avoid making improper connections.
Ensure you can see it by executing one of the standard Arduino sketches. We recommend using 01.Basics, then select Blink. This will make sure you can program the Arduino when it comes time.
Click Play, it’ll run, then open the Serial Monitor. It will say “Press Any key”. Put in any letter you want, then click Send. Watch the Serial Monitor for confirmation that it is communicating.
Setup Wi-Fi on the DigiX:
To do this, we will install the Headers.
The Headers need to line up with the following Arduino pin locations:
+3.3V (our connection 1)
+5V (our connection 2)
Ground (our connection 3)
Ground (our connection 4)
Voltage In (our connection 5)
Leave a Gap (this is where the Arduino has a space in it’s Female connector) (our connection 6)
A0 (our connection 7)
A1 (our connection 8)
A2 (our connection 9)
The Resistor will connect the 7th and 9th connector slots, adjacent to A0 and A2.
Mosfet goes on 7, 8, and 9 on our board.
Pin1 on the Mosfet (which is the Gate), lines up with Slot 7 (which is above but not connected to A0)
Pin 2 on the Mosfet (which is the Drain), lines up with Slot 8 (which is above but not connected to A1)
Pin3 on the Mosfet (which is the Source), lines up with Slot 9 (which is above but not connected to A2)
Install the A0 to Pin1 Mosfet connection (which is the Gate), using the Yellow wire.
Install the Pin3 of the Mosfet (which is the Source), to pin 4 on the Headers (which goes to the Arduino Ground)
Install the end of the resistor from Step 7 to the 9th slot header pin which is going to A2 on the Arduino board.
Use about 1 meter of wire for each connection
Solder the black wire to the GND (Ground)
Solder the yellow wire to the B1
Solder the orange wire to the A1
Solder the red wire to the H1 (this is the heater power)
Now that the connections are soldered, plug in the sensor to the board itself.
Install the red H1 Sensor wire to Slot 2 on the Header pins (which is Arduino +5)
At this time, you might want to install a couple of extra header pins that really don’t do anything but provide stability on the board as it lays.
Take the Carriage Bolt and put on all 3 nuts.
At this time, put a slight bend in the Sensor wire about 1 inch back from the sensor.
After you have placed the sensor, put the Carriage bolt in behind it, wedging the sensor in place.
Secure the Carriage bolt by tightening one of the nuts to the PVC
The point of doing this is to provide a moisture shield and prevent debris from easily affecting the sensor, while still allowing for flow of air to prevent stale air measurements.
Heater goes on for 60 seconds then it goes to Idle which is mid range for 90 seconds (where it takes readings, but only after every 5 minutes between sampling periods as this is during the next available Idle time period)
We take the reading every 10 seconds during this idle period during the 5th minute. We throw out the highest, the lowest, then we average the remaining. This is to get rid of noise.
You will need to go to this URL and register for your API key:
Just create a quick account and the page will output the USER_ID, SENSOR_ID, and API_KEY that you will be using in the following steps (in your Arduino code).
Just enter your address, then grab the values that are created in the Latitude and Longitude box. You will be using them in the next step.
“Network and Location Information” section of the Arduino
Download the new code just like Step 17, then test it.
The great thing about the power source for this project is, the Voltaic Panel gives us 6 watts, the battery gives us 5 watts, and we consume 1 - 2 watts. So we should theoretically, never run dry.
A completely self-contained powered project! It’ll run through the night, and charge in the day!
Credit where credit due: