Electronics Assembly

Understanding the Components

We’re going to start by reading the tutorials for each of the components separately, then we are going to combine them to make our reverse geocache box.
Read through these links and get to know the basics of how they work. Use a breadboard and examples to experiment and get familiar with them.
No really, go read them. It’s important.

Arduino Pins

Now that you’ve read how the LCD, GPS, and servo work, let’s combine them. The serial Library uses digital pins 0 and 1, so we want to stay away from those. This allows us to debug the Ardunio with Serial.print() and see what’s going on in the program. The GPS breakout uses digital pins 2 and 3, just like in the Ultimate GPS tutorial. The LCD uses 6 pins, and the Servo motor uses 1 pin.

I put the Servo on Pin 9, and I put the LCD in pins 7,8,6,10,11,and 12 (I had to move the third LCD pin from pin 9 to pin 6 to accommodate the servo).

NOTE: The Servo library and the SoftwareSerial library (which the GPS uses to spit out data) do NOT play nice with each other. To fix this, we’re going to install an older version of the servo library that doesn’t interfere with SofwareSerial.

That library is located here: http://arduiniana.org/libraries/pwmservo/

Download version 2 (by Paul Stoffregen) and install it into the libraries folder in your Arduino folder, just like you did with the Adafruit_GPS folder in the Ultimate GPS tutorial. This library is called PWMServo. It requires the servo to be on Pin 9 or 10 (which is why you see the change above). Otherwise, you interface with it similarly, you just have to use servoLatch.attach(SERVO_PIN_A); when you attach the servo pin.

Wire It Up

Now, lay out all of your components. I tried to make the total size as small as possible, and fit into the 5” x 5” box I made. You can see my layout below. The Uno is on the bottom, with two wires coming off to power my proto board. The LCD does not use pins 7, 8, 9, or 10, so I chose to put the contrast potentiometer there. I cut the traces to those pins so I didn’t advertently send a signal to the LCD.
Here’s the underside of the proto board.  You can see the row of male headers at the bottom. These plug into the digital pins in the Arduino (note: The servo is connected to pin 6 here. It was later swapped to pin 9).
Now you’re ready to melt some solder and connect you electronics! Solder the LCD, GPS, and servo pins into the protoboard. Then connect jumpers to your digital pin headers. Solder the contrast pot into the slots not used by the LCD (I used 7, 8, and 9) and cut the trace to the LCD pin. You can also just not attach headers to the LCD for pins 7-10. I installed a jumper from the pot wiper to pin 3 of the LCD (green wire).

NOTE: If you’re using the perma-proto board, you’ll notice that the digital pins on the Uno are not spaced correctly between pins 7 and 8. There is a .160” gap between the pins. I got around this by bending pins 8-12 to fit. If I did this again, I would have used the proto shield, which accounts for this gap and makes it super easy to connect to the Uno.
This guide was first published on Dec 06, 2012. It was last updated on Dec 06, 2012. This page (Electronics Assembly) was last updated on Sep 18, 2019.