Testing on the Weather Pi continues.
I already have code for all the sensors apart from the Wind Direction sensor. The direction sensor uses 8 different resistors to indicate the wind direction using only 2 wires. Unfortunately I've had major problems calibrating it. The code is basically the same for detecting the light level using an LDR, but I've not been able to tune it to obtain reliable results.
I've decided that the capacitor method for detecting analogue values is not reliable enough.
I've been working on a new PCB design that will use dedicated analogue sensors. I could have used an 8 port SPI chip but the code looked rather complex to interpret the values. Instead I decided to use an I2C PCF8591. Unfortunately it only has 4 ports, so I'll use 2 of them.
This is the latest PCB Design.
Major changes have been made to the PCB:-
- 40 Pin header to connect to a Raspberry Pi A+, B+ and Pi2 (Weather Pi also works with A and B models)
- Row of breakout pins alongside the GPIO header
- 2 additional 3.3v I2C headers points, and 2 x 5v points
- More header points for the temperature sensors (ds18b21)
- Sensors that work as switches will use an MCP23017 I2C chip (Rain Quantity, Wind Speed, plus the 3 switched used for monitoring)
- Analogue Sensors will use a PCF8591P I2C chip (Light Level, Wind Direction, Rain Detector and an additional soil moisture sensor). There's a jumper to allow either 3.3v or 5v operation. At the time of designing this I'm unsure if it's safe to use 5 volts.
- The 3 LED's are joined by a 4th Blue LED, and will run via the same MCP23017. This will allow 4 additional LED's to be added at a later date. Red - power, Orange - Linux running, Green - script running, Blue - networking working.
- Points added to allow surface mount Switches, LED's and resistors to be used (SMD components).
- A 16 row breadboard style prototyping area, with 3.3v and negative power rails.
The PCB has grown from 10cm x 5cm to 10cm square. The size is required to fit the 2 analogue chips and one digital chip. Space may be saved in future versions by using surface mount chips.