ENGR2210 22 September 2013
Lab 2 - LCD’s and Communication
Due: 3/4 October 2013
Review
After Labs 0 and 1, you’ve encountered Arduino programming, digital and analog input/output, using libraries, servo motor control, and two-way communication with a PC.
Description
In this lab, you will expand your familiarity with the capabilities of the Arduino by building a computer-connected temperature sensor and LCD display.
When complete, the device will:
If connected to a computer, it will also:
Optionally, you could make a nice mechanical case for the system, or add the ability to control the backlight color from the PC (you can set it to any color of the rainbow...)
Tackle this lab in stages - don’t just try to build everything all at once. It probably won’t work, and will be much harder for you to debug.
Part A - Reading Analog Sensors, and Datasheets
TMP36 Temperature Sensor
The TMP36 temperature sensor is a (relatively) easy-to-use temperature sensor. TMP36 sensors have only three pins - ground, power supply, and the reading. The reading is convertible into a temperature. Check the datasheet!
Part B - PWM Control of LEDs
1 @ 2x16 Character LCD with RGB Backlight
Current-limiting resistors for Backlight
LCD’s come in a variety of styles, ranging from the style on your laptop, down to small color LCD’s, to small monochrome LCD’s, to the character LCD you have in front of you. Character LCD’s are easier to use than graphical LCD’s, but more limited in capabilities. Rather than displaying arbitrary graphics, the LCD has a preprogrammed set of characters that it can display in each space. This LCD has space for 32 characters arranged in two rows. The LCD has a backlight which shines through the liquid crystal, and makes it (much) easier to see the characters. This LCD’s backlight is an RGB LED, which means we can change the background to nearly any color we want.
Part C - The Fun Part
1 @ 10k Variable Resistor / Potentiometer for LCD Contrast Adjustment
Wire up the rest of the LCD. Follow the tutorial on Lady Ada’s (Limor Fried) website, at http://www.ladyada.net/learn/lcd/charlcd.html.
Part D - Controlling from the PC
Finally, add the ability to control the LCD from the host computer. You can use any programming language you’d like, though Python+PySerial is Chris’s recommendation.
Deliverables
Please hand in a lab report at the completion of this lab. Your report should contain, at a minimum: