Wednesday, February 5, 2014

Interfacing with Raspberry Pi

Up until this point, I had just been using a breadboard to connect the Pi to the sensors so it was time to make something more permanent in the form of an add-on shield.  

I started with a piece of protoboard and some screw terminals from RadioShack and a GPIO header extension from Adafruit.  The analog-digital converter (to read the potentiometer) needs to be incorporated into the board and each of the screw terminals needs to connect to the corresponding GPIO pins.  I'm not terribly confident with my soldering skills, but I decided to give it a shot.  To my surprise, it worked on the first try!
Bottom side of the board

Since the Raspberry Pi doesn't have a real-time clock, I decided to add one onto the shield.  Adafruit has a couple RTCs to choose from, and I chose the cheaper of the two for $9.  See DS1307 HERE.  It easily interfaces via I2C and will keep time when detached from the network and even when powered off.  This one might lose/gain up to 2 seconds per day, but that isn't a huge concern since it can periodically get the time over the Internet.  

Top side of the board plugged into the Pi. 
Real Time Clock is the blue board on the bottom right

No comments:

Post a Comment