PIX-E Gif Camera Upgrades

Since I built the PIX-E Gif camera nearly two years ago two problems with the design nagged at me. First, the rocker-style power switch would frequently get switched on if I put the camera in my bag, a fault I "solved" by using masking tape to tape the button in the off position. Second, I managed to corrupt the SD card by switching the power to the Pi Zero off instead of properly shutting down the Pi. Over the December break I decided to remedy these issues.

First, I got it in my mind to see if somehow the Pi Zero could be told to shut down through the GPIO pins. As it turns out there are a few Python scripts to do just that. I had a momentary push button switch handy and soldered wires to the outputs. I modified the script to use GPIO pins 5 and 25 since the pins in the instructions were already in use. 

The shutdown script path was added to the end of /etc/rc.local and once the Pi was rebooted, watches those GPIO pins to see if there is a closed circuit. When that happens, at the push of a button, the script simply tells the Pi Zero to shutdown. The blue LED indicating the Pi is ready to take a photo turns off and the power switch can be flipped into the off position without risking data corruption on the SD card.

I drilled a small hole in the back of the camera and hot glued the switch in place. The button is very recessed to prevent it from accidentally being pressed.

Speaking of the power switch, I modeled a bumper in Tinkercad that wraps around three sides of the switch. I used model cement to attach it to the camera back (I 3D printed the camera and parts in ABS).

The power switch is still accessible but will not be accidentally switched because the switch itself cannot be accidentally pressed because the bracket is in the way.

These two upgrades make a big difference for me. I hope they inspire other PIX-E users, too.