My Current Pi Projects

Featured

Update 16 July 2016

Raspberry Pi's

Used waiting new use - 1 x Pi2, 1 x B+, 2 x B, 2 x A+, 3 x A
New Raspberry Pi - Zero (1.2), Zero (1.3), B+
Broken - 1 x B+ (water), 2 x B rev 2 (ebay arrived O/S)
Missing - 1 x B rev 1

TinyTX3 - Wireless Sensors - http://nathan.chantrell.net/tinytx-wireless-sensor/

  • Bathroom - DHT22 Humidity Sensor (Node 11)
  • Kitchen - DHT22 Humidity Sensor (12)
  • Hallway - DHT22 Humidity Sensor (14)
  • Extractor Fan Pipe - DHT22 Humidity Sensor (15)
  • Freezer- DS18B20 1-Wire Temperature Sensor (23)
  • Fridge - DS18B20 1-Wire Temperature Sensor (24)
  • Spare - DS18B20 1-Wire Temperature Sensor (26)
  • PC Case - DS18B20 1-Wire Temperature Sensor (27)
  • Air Con Fan - dual DS18B20 1-Wire Temperature Probes (29)
  • Door Switch (5)
  • Window Switch (6)

 

This site is a collection of notes, documentation and web links for my Pi's.

Retired Pi Uses

I mainly buy parts from CPC, ModMyPi, Pimoroni and eBay

General Update – 1st December 2015

I've produced version 2.1 of the WeatherPi and now have 4 in long term test.  They seem to be doing well.  It looks like the MCP23017 chip can't keep up with the wind speed detector, so that's sensor is now going through an arduino nano, and in to the pi via the serial connection.  If an Arduino Nano is being used, might as well use it for the analogue sensors as well.

Possible changes to the Weather Pi? Remove 2 x I2C Analogue converters and replace with an Arduino Nano. Add 2 headers dedicated to running servos direct from the pi for Pan and Tilt Camera. Add header for serial I/O. Possibly pre-route some GPIO ports to the breakout section of the board.

On a separate subject I've moved the 433mz receiver from a dedicated Pi to the Weather Display Pi.  This seems to be working well.

I've removed the aircraft tracking facility from Pi 7 as I never seemed to actually use the data.  I did have it feeding in to the Flight24 website but again they never seemed to use the data.

My test Pi is currently testing PL9823 RGB Addressable LED's which are similar to Neopoxles / WS2811 / WS2812.  Testing seems to be going well, although I can only get them displaying Red, Green, Blue, Yellow, Purple, Pink and White.  I can't get them to "dither" other colours.

I received a Pi Zero on the front cover of my Magpi Magazine, and at this stage not sure what I'll do with it.

WeatherPi Version 2 PCB Rescued

Following my disastrous testing I decided to try rescuing my WeatherPi version 2 PCB.  In summary I'd designed the PCB wrongly, and the three IC chips had the wrong connections.

Ver-2-front-breaksOn the top of the PCB I had to break 3 tracks.  I tried a mixture of tools from a drill bit, counter sinc, and eventually ended up with a scalpel blade.  Working very carefully I was able to scratch away first the green coating, then the copper track, and to be safe some of the actual board material. I was surprised how thick the copper layer was.

On the bottom of the board I had to make 6 breaks.  I'd tried to place as many tracks on the bottom side where possible so that I could see them when troubleshooting!

2015-04-15 10.52.07I carefully solder wires to the bottom of the board using the existing pins of the IC's and headers.  I had started to use one of the unused header socket pins at the top of the board but then realized it was running at 5 volts rather than 3.3 volts.  Hence why 3 wires run to one section and one to another.

I also attempted to unsolder the 40 pin header to replace with a 24 pin header but despite using a desolder iron and desolder braid, I could not release the header.  In the end I gave in and resolder it again.

Once complete I checked there were no short circuits in the design and powered it up.

The Pi powered up and could see the three IC's, and also the temperature sensor.

So the PCB version 2 has been rescued but I don't think I'll use the other 9 boards.  At this stage I think I'll work on the design and fix the issues and make another attempt at the PCB.  Meanwhile I can work on the code to make it all work.

 

 

 

 

WeatherPi Version 2 PCB issues

WeatherPi version 2 has been assembled and I have attempted to test. And that's when I hit some issues.

I'd assembled the board with new 40pin extended headers to fit to a A+, B+ or 2. Unfortunately my test Pi was an old style model A, and the 40 pin header get's in the way of the Audio port on the classic A.  I tried it on a B+ that I have but the PC can't clear the USB and ethernet socket.  Major fail.  I'd soldered the extended header too close to the PCB rather than at the full extent.

2015-04-15 10.53.22Thankfully I came up with the idea of using an additional header to "stand off" the PCB from the Pi.  This worked but left a 10cm square board hanging in mid air.  Once populated with cables the entire thing tips over.  Another reason the next version must have mounting holes for both forms of Pi.

Once I'd worked that out I turned on the Pi. I had a power light but nothing happening. I'd already tested the Pi and it was fully networked, but I couldn't connect.  I gave in and connected a monitor to find it wasn't booting up.

To cut a very long story short I spent a very annoying two days trying to figure it all out.  I discovered that despite spending 2 weeks on the PCB design and checking it for a further 5 days, that I'd wired up the IC chips incorrectly.

On the MCP23017 digital input output IC I'd wired up the i2c and power wrongly.  Basically I'd wired up from the bottom upwards, but should have missed a pin at the start which is not used.

On one of the PCF8591 analogue chip I'd missed out an SCL connection for i2c. On both chips I'd mistakenly wired up the address pins to positive instead of negative. This isn't a big issue as the chips appear successfully on different port numbers.  I'd also connected the VSS pin to positive instead of negative.At this stage I'm ready to give up.

 

WeatherPi Version 2 PCB arrived and assembled

2015-04-15 10.51.39The WeatherPi version 2 PCB has finally arrived from Seedstudio in Singapore.

I'm impressed with the "customer experience" from Seedstudio and they always seem to delivery 3 weeks after initial order.

10 PCB's came in at about £20.  To have these produced in the UK would have cost about £50 for the first one

The PCB was populated in height order.  Smallest components first working my way up to the tallest components :-

  • Surface mount LED's, Resisters and switches (painful when using a soldering iron)
  • Resisters
  • IC sockets
  • Jumper style headers
  • Molex style headers
  • 40 pin Header for connecting to Pi
  • Finally the Analogue and Digital IC's, plus the DS18B20 temperature sensor

I've gone ahead and assembled it and these are my initial thoughts:-

  • Needs mounting holes to match up with the A+, B+ and Pi 2.
  • Needs mounting holes on each corner
  • The I2c headers at the top of the board are the wrong way round.  All my other PCB's have the "head board" of the header inwards. I had to switch them round to match up with existing i2c devices I have
  • It was difficult to solder the 8 different 2 way headers for the analogue ports (on the left).  Much easier to solder the 8x2 headers for digital inputs and outputs

Next step will be testing and initial power on!

 

 

 

i2c Analogue Breakout PCB (ver 1.2)

As part of development of Weather Pi, I wanted to test out Analogue sensors with the Raspberry Pi.  I had a look a some of the commercial available PCB's such as Custard Pi and Quick2Wire but was shocked at the high price (£15 - £20 plus P&P).

PCF8591The PCF8591 I2C chips that these units are based on can be purchased for about £1 so that does not justify the high price. This includes postage from China.

 

Introducing the Analogue Breakout Version 1.2 PCB.

PCF8591-1.2_pcb

The PCB uses 2 x PCF8591P i2c chips providing 8 ports for analogue sensors.  The chips are hard coded on the PCB to use i2c channel 48 and 4c.

The PCB has a jumper to allow the chips to run at 3.3 volts or 5 volts.  At the time of designing I was unsure if it was safe to run the chips at 5v when interfacing with the RaspberryPi.  Normally the Pi's only like 3.3 volts.

Also on the PCB are 3 x i2c headers running at 3.3v.

The PCB is compatible with all models of Pi except the compute model.  Only the 3.3v, 5v, GND, SDA and SCL pins are used. Using a 5cm board it's not possible to include space for all 40 possible GPIO pins, hence why they run to the edge.

The PCB's were ordered from SeedStudio, and cost about £7 for 10.

 

 

Update on Weather Pi – February (PCB Ver 2)

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.

PCF8591I'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.

weather-pcb-10-x-10-Ver2-0-smd-LEDs_pcb

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.

 

Update on the Weather Pi – January

A short update on the Weather Pi. The Weather Pi unit has been fully assembled and tested on the bench.

2015-03-02 11.28.18I've slightly modified the stand for the sensors to reduce the number of components required.  On the left hand side we have the wind speed and wind direction.  Right hand side we have the temperature sticking out of the end of the pipe.  Unseen inside the pipe is the humidity sensor.  On top we have the rain detector and the rain quality sensor.  The cables are fed inside the plastic tubes down to the base.

2015-03-02 11.28.31The plastic tubes are made from 44mm drainage pipe normally used to connect sinks and washing machines to the drains.  The bottom of the pipe has been cut at a 45 degree angle to allow it to be driven in to the ground.  I've placed 45 degree bends on to top T section of pipe to try and keep the bulk of the rain out, whilst allowing air to circulate to the humidity sensor.

2015-03-02 11.28.41The Raspberry Pi and the Weather Pi circuit board have been placed inside a "DriBox" enclosure.  This has access points to allow cables to enter the box, and have rubber seals to keep the rain out. I plan to have the LED's sticking out of the case so I can see the Pi has power and is running the scripts.  The case has enough room for the Raspberry Pi, Circuit board, USB WIFI dongle with large areal, and also a large USB battery.  At this stage I haven't been able to route electricity outside to power the box, so am relying on USB batteries

 

DRiBOX FL 1859 200 IP55 Small Weatherproof Box Black
DRiBOX FL 1859 200 IP55 Small Weatherproof Box Black $17.62
End Date: Monday Sep-12-2016 23:20:29 PDT
Buy It Now for only: $17.62
Dribox Waterproof Outdoor Electric Enclosure Box for Christmas Lights
Dribox Waterproof Outdoor Electric Enclosure Box for Christmas Lights $38.11
End Date: Thursday Sep-1-2016 20:46:47 PDT
Buy It Now for only: $38.11
Garland Dribox Black Medium
Garland Dribox Black Medium $41.63
End Date: Saturday Sep-10-2016 8:55:16 PDT
Buy It Now for only: $41.63
Outdoor Electrical Box 330mm DRiBOX
Outdoor Electrical Box 330mm DRiBOX $32.70
End Date: Sunday Sep-11-2016 7:33:08 PDT
Buy It Now for only: $32.70
Dri box Outdoor Weatherproof Box IP55 P3 285 330 DriBox SOCKiT Box sockitbox
Dri box Outdoor Weatherproof Box IP55 P3 285 330 DriBox SOCKiT Box sockitbox $34.99
End Date: Saturday Sep-10-2016 16:27:45 PDT
Buy It Now for only: $34.99
DRiBOX FL 1859 200G IP55 Small Weatherproof Box Green
DRiBOX FL 1859 200G IP55 Small Weatherproof Box Green $20.54
End Date: Monday Sep-12-2016 23:20:19 PDT
Buy It Now for only: $20.54
DRiBOX FL 1859 330 IP55 Large Weatherproof Box Black
DRiBOX FL 1859 330 IP55 Large Weatherproof Box Black $35.27
End Date: Monday Sep-19-2016 22:17:55 PDT
Buy It Now for only: $35.27
DRiBOX FL 1859 285G IP55 Medium Weatherproof Box Green
DRiBOX FL 1859 285G IP55 Medium Weatherproof Box Green $27.20
End Date: Monday Sep-5-2016 22:27:35 PDT
Buy It Now for only: $27.20
DRiBOX FL 1859 330G IP55 Large Weatherproof Box Green
DRiBOX FL 1859 330G IP55 Large Weatherproof Box Green $35.27
End Date: Friday Sep-16-2016 22:21:46 PDT
Buy It Now for only: $35.27