10/09/2012

How to build a robot #5 - Adding sensors, an LCD display, and another box



In this episode of 'How to Build a Robot', I am making quite a few physical improvements to the robot.  I was going to call this bot Affordabot, but I've decided I don't like the name.  I'm looking for suggestions for a new name, so if you have one, please leave it in the comments below.

I decided the Launchpad box would be too crowded once I added the HC-SR04 ultrasonic sensors and LCD display.  I looked up at the shelf and spotted the box my new Stellaris Launchpad came in.  Why not just add another box?  If you can put two mobile homes together and call it a double wide, why can't I stack two boxes on my robot and call it a double stack?

Now it's time to add some sensors.  I'm installing four HC-SR04 ultrasonic sensors.  These are only about $3 apiece on eBay.  I'm putting two on the front of the robot, and one on each side.  I modded the HC-SR04's slightly.  I took the male header pins off of each sensor and soldered female headers instead.  This will make them much easier to hook up using regular wire instead of having to use female Dupont jumpers.

So, a simple slit in the box and a little hot glue and the HC-SR04's are attached.

With the growing pin count, I decided to use a serial LCD display instead of a parallel one.  The motor controller uses 6 I/O pins, the ultrasonic sensors are using 8 I/O pins total, and the serial LCD is using 2 pins.     Using the serial LCD I will only have 4 pins left.  If I had used a regular HD44780 LCD, I'd be out of I/O pins already!  There are still a few things I want to add, like a bump switch and a speaker, so the serial LCD is a must.

I simply cut a hole the size of the LCD screen and taped the LCD display down.