Friday, January 14, 2011

Kit review: Freetronics 16×2 LCD Arduino Shield

Hello everyone

Within this article we are going to examine the first of several new kits available from Freetronics, a company formed to provide many interesting Arduino-based products after the publication of the book “Practical Arduino” by Jonathan Oxer and Hugh Blemings – which in itself is a good read, there are many interesting projects to make and learn from.

Today we examine their latest kit, the “16×2 LCD Arduino Shield“. This is a very easy to construct, yet useful tool for those experimenting, prototyping and generally making things with their Arduino-based systems.  The purpose of the shield is to offer easy access to a 16 x 2 character LCD module, and also the use of five buttons – connected to an analog input using the resistor ladder method. The kit comes packaged very well, and includes not only detailed printed instructions in colour, but also the full circuit schematic:

It is nice to see such a high level of documentation, even though most people may not need it – there is generally someone who does. Sparkfun – get the hint. All the parts are included, and for the first time in my life the resistors were labelled as well:

So being Mr Pedantic I followed the instructions, and happily had the components in without any troubles. The next step was the Arduino shield pins – the best way to solder these is to insert into your Arduino board, drop the shield on top then solder away as such:

And finally, bolting on the LCD whilst keeping the header pins for the LCD in line. Some people may find the bolt closest to D0 interferes with the shield pin, so you can insert the bolt upside down as I have. Remember to not solder the LCD pins until you are happy it is seated in correctly:

Once you are satisfied the pins are lined up and sitting in their required position – solder them in, tighten your nuts and that’s it:

The contrast of the LCD in real life is better than shown in the photo above – photographing them is a little difficult for me. However once assembled, using the shield is quite easy. If your LCD doesn’t seem to be working after your first sketch, adjust the contrast using the potentiometer. The LCD is a standard HD44780-interface model, and wired in to use a 4-bit parallel data interface. If using these types of LCD is new to you, perhaps visit this article then return.

One uses the standard Arduino liquidCrystal library with this LCD, and the function parameters to use are as follows:

LiquidCrystal lcd(8,9,4,5,6,7)

The buttons are read using analog pin A0. Use the following sketch to find the values returned by the analogRead function:

/*  analogRead + button demonstration using Freetronics 16x2 LCD shield
John Boxall - http://tronixstuff.com/kitreviews - Jan 2011  */
#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,4,5,6,7);
int a=0;
void setup()
{
lcd.begin(16, 2);
}  void loop()
{
lcd.clear();
a=analogRead(0);
lcd.setCursor(0,0);
lcd.print("analogRead()");
lcd.setCursor(0,1);
lcd.print("value = ");
lcd.print(a);
delay(200);
}

and a quick video of this in action:

Now that we know the values returned for each button, we can take advantage of them to create, for example, a type of menu system – or some sort of controller. In the second example, we have used a modified TwentyTen with a DS1307 real-time clock IC to make a digital clock. The buttons on the LCD shield are utilised to create a user-friendly menu to set the clock time.

You can download the demonstration sketch from here.

In general this is an excellent kit, and considering the price of doing it yourself – good value as well. To get your hands on this product in kit or assembled form – visit Freetronics’ website, or your local reseller.

Remember, if you have any questions about these modules please contact Freetronics via their website.

Higher resolution images available on flickr.

Otherwise, have fun, stay safe, be good to each other – and make something! :)

[Note - the kit assembled in this article was received from Freetronics for review purposes]

No comments:

Post a Comment