Step 2: Make circuit

Assemble your components into a functional circuit.

« Step 1 Step 3 »
Circuit Diagram: If you're more of a diagram sort of person, you can check out the circuit diagram over at circuit.io (a bigger version of that diagram can be found here)

Breadboard


First, clip your breadboards together, with the longer sides together.

Then, if you have a Cobbler (see Step 1), push it into one of the breadboards so that its pins straddle the gap in the middle of one of the breadboards. Then proceed to connect the 5V, 3.3V, and ground outputs from the Raspberry Pi's GPIO to the rails on the side of the breadboard.

This is done because these are the most commonly used pins from the Pi, so they need to be easily accessible.


ADC


Then add your MCP3008 ADC to the breadboard in the same fashion. When looking at it from above, with the small notch at the top, the 8 pins on the right are connected to the Pi, and the 8 pins on the left are used as inputs to the ADC, normally coming from sensors you've placed onto your board. These are the connections which you need to make from the 8 right hand pins:


BMP085


This pressure and temperature sensor has either 6 or 7 outputs, depending on where you obtain it, however this does not impact its installation, as the pin missing from some versions is not important for our usage of the sensor. Connect the pins as follows:

Leave any remaining pins unconnected.


DHT22


To use this humidity sensor with the AirPi you will need a 10KΩ resistor (that has a resistance of 10,000 Ohms).

While holding the sensor facing you (so you can see the grating), the pins are numbered from left to right 1, 2, 3 and 4. Connect them up like this (Pin 2 is connected to two places, that's not a typo!):

Leave Pin 3 unconnected. The breadboard should look somewhat like this at the end of this stage:


LDR


To use this light sensor with the AirPi you will need a 2.2KΩ resistor.

To connect the LDR to your breadboard, attach one end of it to ground. Connect the other end both to 3.3V via the 2.2KΩ resistor, and to the first input on the ADC (the one closest to the notch on the left).

Important! Place this sensor towards the edge of your circuit, so that light can get to it.

TGS 2600


To use this air quality sensor with the AirPi you will need a 22KΩ resistor.

If you're looking at this sensor from above, with the little bump at the top, the pins are numbered 1 to 4 working clockwise from the pin directly to the right of the bump. Connect them up like so:


MiCS-2710


To use this nitrogen dioxide sensor with the AirPi you will need a 10KΩ resistor. You will also need some resistors which sum to 66Ω (we used a 47Ω and a 11Ω).

Using the same pin numbering as for the TGS 2600, connect the pins as so:


MiCS-5525


To use this carbon monoxide sensor with the AirPi you will need a 100KΩ resistor. You will also need some resistors which sum to roughly 82Ω (we used a 47Ω, a 22Ω and a 10Ω).

Using the same pin numbering as for the TGS 2600, connect the 4 pins like this:


LEDs


If you want to add 2 LEDs to your AirPi so it can tell you when it uploads data, you will need 2 600Ω resistors.

Connect the shorter leg of both resistors to ground via a resistor each. Then connect the longer leg of the red LED to GPIO #21, and the longer leg of the green LED to GPIO #22.


UVI-01 UV Sensor


You'll need a 0.1uF capacitor (0.1 micro farads), a CA314 op-amp, one 10KΩ resistor, and two resistors each of at least 1KΩ, one of which has 470 times the resistance of the other. (we used a 10KΩ and a 4.7MΩ - that's 4.7 million Ohms).

Insert the UV sensor, the capacitor and the 1MΩ resistor into the breadboard so that they are connected in parallel, and then connect the whole thing to ground on one side and to pin 3 (the non-inverting input) of the op-amp on the other side. Here's a small circuit diagram:

Then connect the remaining pins on the op-amp follows: