his low power controller may even be a useful building block for other battery-powered application.
The prototype controller board sits on top of the RaspberryPi model A+ connected via 26 of the 40 pin header, with a single plastic threaded pillar for additional support.
I can see now that the controller strip board should have been slightly larger, because I could not attach the pillar in exactly the right place (i.e. it needed to be one hole further out towards the edge). However, I may use this prototype anyway, as it works, and I just don’t have the time to build mark II.
As I have soldered the Picaxe (rather than use a dil socket) I’ve also included the two resistors required for programming the device. This means I just have to temporarily tack 3 wires to a 3.5mm jack socket if I need to reprogram.
IC1e and the associated 10k pull-up resistor are probably not necessary (I only thought about this after writing this post on mixing voltage levels). However there are a few spare drivers in the 16 pin ULN2003 chip, so not a problem.
The current draw for BirdBox2014 was about 20mA with the 555 timer controller powered, but the RaspberryPi off. For the new Picaxe controller it is just 11mA, with 8mA of this is due to the box activity detector.
This makes me think that the controller could be used for other battery powered applications. For long periods when the RaspberryPi is not needed, the battery drain is negligible.
The only issue is boot time; for last years box using Raspbian Wheezy, the boot-to-application time was 45 seconds. This time around I’m using Raspbian Jessie, and for some reason it takes 60 seconds to boot…I need to try tuning this.
The Picaxe code is simple.
‘This Picaxe 08M2 program controls the BirdBox power supply.
‘When triggered by the activity sensor, the power is turned on for 90 seconds.
‘If RPi boots into application and starts kicking the Picaxe, power is maintained.
‘If RPi stops kicking, the Picaxe sends a shutdown signal within 90 seconds.
‘After a further 30 seconds, RPi power is switched off.
‘There is then a 5 seconds delay before the Picaxe can be re-triggered and power
‘ can be re-applied to the RPi.
For more detail: BirdBox2015: Picaxe controller details