Table of Contents
Raspberry Pi Weather Station Board
Private Sections
Project Updates
I bought an Arduino, another I2C logic level shifter. Now the goal has been moved to running BME280 and the PM2.5 sensor off an Arduino. The constraint is still the 4-wire connection to the outdoor environment.
Bill of Material
This is the current estimate of the minimum cost for constructing the whole thing. It doesn't include the cost of the enclosure and the delivery charges.
Name | Cost (£) |
---|---|
Raspberry Pi Zero | 4 |
DN7C3CA006 | 14.04 |
BME280 | 13.28 |
ADS1115 | 9.96 |
Current BOM cost (£) |
Specification
This weather station board should be able to performed the following functions:
- Sense temperature
- Sense humidity
- Sense air pressure
- Sense PM 2.5 1)
Choosing the component
Raspberry Pi
I have decided that this extension board should comply with the RPi GPIO connector standard. This is because RPi 0 is the cheapest development board you can get in the market 2) . It means that I am not afraid of breaking things. I suppose Arduino is more suitable for interacting with random sensors, but it is just way too expensive.
For prototyping, I will be using RPi 0, simply because it is cheap. The actual device will use either RPi 2B ir RPi 0. RPi 2B is more powerful than RPi 0, but I am not sure if I need the extra power. It all depends on whether the RPi itself will be used for other things.
Temperature Sensors
I have decided to use I2C temperature sensors only, below is a list of possibilities:
I have listed them in the order of desirability. The top two options are both okay.
Pressure Sensors
I have no idea how atmospheric pressure is related to the weather. It is a fun thing to measure anyway. I have decided to only use I2C sensors, for simplicity. Please note that I chose to use relative accuracy in the table. Different manufacturers use different ways to measure relative accuracy. For more details, refer to their individual datasheet.
Below is a list of possible pressure sensors:
Name | Price (£) | Relative accuracy (hPa) | URL | Other notes |
---|---|---|---|---|
BME280 | 18.50 | 0.12 | https://shop.pimoroni.com/products/adafruit-bme280-i2c-or-spi-temperature-humidity-pressure-sensor | |
BMP180 | 9 | 0.12 | https://shop.pimoroni.com/products/adafruit-bmp180-barometric-pressure-temp-altitude-sensor-5v-ready | |
BMP280 | 9.50 | 0.12 | https://shop.pimoroni.com/products/adafruit-bmp280-i2c-or-spi-barometric-pressure-altitude-sensor | |
MPL115A1 | 10 | 10 | https://shop.pimoroni.com/products/sparkfun-barometric-pressure-sensor-breakout-mpl115a1 | |
MPL3115A2 | 9 | 1 | https://shop.pimoroni.com/products/adafruit-mpl3115a2-i2c-barometric-pressure-altitude-temperature-sensor | Absolute accuracy is 4 hPa |
T5403 | 11 | 0.15 | https://shop.pimoroni.com/products/sparkfun-barometric-sensor-breakout-t5403 | Absolute accuracy is 5hPa (worst case scenario) |
Humidity Sensors
The local temperature is required for calculating relative humidity. This means that humidity sensors come with temperature sensor.
Name | Price (£) | Relative humidity accuracy (%) | URL | Other notes |
---|---|---|---|---|
HTU21D-F | 13.50 | 2 | https://shop.pimoroni.com/products/adafruit-htu21d-f-temperature-humidity-sensor-breakout-board | Also measures temperature |
BME280 | 18.50 | 3 | https://shop.pimoroni.com/products/adafruit-bme280-i2c-or-spi-temperature-humidity-pressure-sensor | Also measures temperature humidity |
HDC1008 | 7.00 | 4 | http://www.modmypi.com/raspberry-pi/breakout-boards/adafruit/adafruit-hdc1008-temperature-and-humidity-sensor/ | Also measures temperature |
HIH6130 | 24 | 4 | https://shop.pimoroni.com/products/sparkfun-humidity-and-temperature-sensor-breakout-hih6130 | Also measures temperature |
The PM2.5 Sensor and the ADC
Well, there is only one PM2.5 sensor exist on the market 3). It is made by Sharp. So I will have to get it.
The PM2.5 sensor outputs analogue voltage, so I need an ADC. I have decided to pick one from Adafruit - since every other breakout board I bought are from Adafruit. This ensures compatibility. I have decided to go for the 16-bit 4-channel ADC 4). The 16-bit version is about £3 more expensive than the 12-bit version. I have no idea if the extra sensitivity makes that much of a difference (probably not), however it is better to be safe than sorry. After all, it is only £3.
Final Decision
I have decided to buy the following sensors:
Name | Price, excluding VAT / £ | Price, including VAT / £ | URL | Datasheet | Instructions | Notes |
---|---|---|---|---|---|---|
BME280 | 13.28 | http://www.digikey.co.uk/product-detail/en/2652/1528-1359-ND/5604372 | https://www.adafruit.com/datasheets/BST-BME280_DS001-10.pdf | https://learn.adafruit.com/downloads/pdf/adafruit-bme280-humidity-barometric-pressure-temperature-sensor-breakout.pdf | Measures temperature, humdity and pressure - one chip that measures it all! | |
ADS1115 | 9.96 | http://www.digikey.co.uk/product-detail/en/1085/1528-1461-ND/5761229 | https://www.adafruit.com/datasheets/ads1115.pdf | https://learn.adafruit.com/downloads/pdf/adafruit-4-channel-adc-breakouts.pdf | ADC for Raspberry Pi, required by the PM 2.5 sensor | |
DN7C3CA006 | 14.04 | http://www.digikey.co.uk/product-detail/en/DN7C3CA006/425-2896-ND/5114242 | http://media.digikey.com/pdf/Data%20Sheets/Sharp%20PDFs/DN7C3CA006_Spec.pdf | Measure PM 2.5 | ||
Total |
Asembly and development
DN7C3CA006
DN7C3CA006 is an analogue PM2.5 sensor, that needs to be installed in a peculiar way. The voltage source of the sensor's LED requires some sort of RC circuit. The sensor itself seems to require to drive it. I have tried pulling down the LED pin (pin 3) and read the the voltage from Vout, but it doesn't work.
Existing tutorials using DN7C3CA006 and its variants
- https://github.com/rccursach/SAM_i2c_Dust_Sensor (Attiny85 → I2C)
- https://github.com/miaoski/pm25 (Arduino)
- https://www.hackster.io/edwios/air-quality-monitor-3f422f (Particle Photon)
- http://www.ti.com/lit/ug/tidub68a/tidub68a.pdf (TI MSP430)
Datasheets
- https://www.sparkfun.com/datasheets/Sensors/gp2y1010au_e.pdf - GP2Y1010AU0F
- http://www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y1010au_appl_e.pdf - Application note of Sharp dust sensor GP2Y1010AU0F
The bunch of transistors that I bought
I bought a bunch of transistors off taobao.com. Here is a summary of their datasheet:
Transistor | $V_{CBO}$ / V | $V_{CEO}$ / V | $V_{EBO}$ / V | $I_{C}$ / mA | |
---|---|---|---|---|---|
8050 | 40 | 25 | 6 | 1500 | 2W Output Amplifier of Portable Radios in Class B Push-pull Operation |
9014 | 50 | 45 | 5 | 100 | Pre-Amplifier, Low Level & Low Noise |
9013 | 40 | 25 | 5 | 500 | 1W Output Amplifier of Portable Radios in Class B Push-pull Operation |
9018 | 30 | 15 | 5 | 50 | AM/FM Amplifier, Local Oscillator of FM/VHF Tuner |
3906 | -40 | -40 | -5.0 | -200 | General purpose amplifier and switching applications at collector currents of 10 µA to 100 mA |
3904 | 60 | 40 | 6.0 | 200 | General purpose amplifier and switching applications at collector currents of 10 µA to 100 mA |
5401 | 160 | 150 | 5.0 | 600 | Amplifier Transistor |
9012 | -40 | -20 | -5 | -500 | 1W Output Amplifier of Portable Radios in Class B Push-pull Operation |
1815 | 60 | 50 | 5 | 150 | Audio Frequency Amplifier & High Frequency OSC |
5551 | 180 | 160 | 6 | 600 | General-purpose high-voltage amplifiers and gas discharge display drivers |
Note that for NPN transistors, collector is at the top, emitter is at the bottom, base is at the side. To make an NPN switch, the emitter goes to the ground, the collector goes to Vcc, the Base goes to control 5).
Table of symbols
Symbols | Meaning |
---|---|
$V_{CEO}$ | Collector-Emitter Voltage |
$V_{CBO}$ | Collector-Base Voltage |
$V_{EBO}$ | Emitter-Base Voltage |
$I_C$ | Collector Current Continuous |