Instructables

Wireless Altoids Display

Featured
Picture of Wireless Altoids Display
This Instructable will show you how to modify an Altoids tin for a wireless 2x16 character display.

Using an Altoids tin was inspired by the need to have a small yet protective enclosure for a pair of Xbee modules recently bought from Sparkfun. I purchased the Xbee Pro modules with external antenna for the extended range the setup provides (useful for future projects). Then I realised I would need to mount the antenna socket and have a box to house the circuits.

A L T O I D S !

Overall Configuration

There will be a 'remote' Altoids tin containing Arduino, LCD and Xbee module.

A second Altoids tin containing an Xbee module only. This connects to the PC with a USB to FTDI serial cable.

Data is sent from the PC using a terminal program such as the Arduino 'Serial Monitor' and appears on the Altoids display.

So here are some possible ideas for use with this setup:

(Data flow PC to Wireless Display)
- Email Notifier
- RSS Feeds
- Facebook/Twitter Updates
- Realtime Clock

(Data flow Wireless Display to PC)
- Weather Station
- Speedometer
- Engine Monitoring
- Heart Rate Monitor
- Other realtime data logging

Let's get started!
 
Remove these adsRemove these ads by Signing Up

Step 1: Components & Tools

Picture of Components & Tools
So here's a list of what you're going to need for this project:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

 A) Featured P2P Wireless Setup

- (2x) ALTOIDS TIN
- (1x) Arduino Duemilanove
- (1x) 2x16 LCD HD44780
- (4x) Hex Posts/Spacers
- (4x) Matching Screws
- Form of sheet insulation (Card / Foam etc.)

- (2x) Xbee Modules (U.FL antenna connector)
- (2x) U.FL to RP-SMA cable connector
- (2x) Adafruit Industries Xbee Adapter Kit
- (2x) RP-SMA 2.4Ghz Duck Antenna

- (1x) USB type A to type B
- (1x) USB to serial FTDI
- Cat5 Cable

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

I realise that the Xbee modules can be quite costly.

If you still want wireless and you're content with one-way communication then there are alternative radio modules such as these from HopeRF:
http://shop.jeelabs.com/products/rfm12b

I think it's worth mentioning that this project can still be effective without wireless communication so why not create a neat USB desktop widget?

B) USB Version Only

If you just want to create a USB Altoids Message Display you're going to need:

- (1x) ALTOIDS TIN
- (1x) Arduino Duemilanove
- (1x) 2x16 LCD HD44780
- (4x) Hex Posts
- (4x) Matching screws
- (1x) USB type A to type B
- Cat5 Cable
- Form of sheet insulation (Card / Foam etc.)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Tools Needed

- Soldering iron & solder
- Needle-nose pliers
- Scissors
- Tin snips
- Marker pen
- Wire strippers
- Cross head screwdriver
- Fine grade sandpaper
- Drill & bits 3mm + 6.5mm

Step 2: Prepare the surface...

Picture of Prepare the surface...
IMG_0259.JPG
As iconic as the Altoids graphics are, I found that I quite liked the 'brushed' metal look.

Take some sandpaper and begin wearing away the top layer of paint.

(The finer the grade of sandpaper, the smoother the finish)

Step 3: Mark & drill holes

Picture of Mark & drill holes
IMG_0273.JPG
IMG_0279.JPG
IMG_0276.JPG
IMG_0303.JPG
You will need to mark out and drill 6x holes in total.

1. Place the the LCD over the top surface and mark 4x holes (3mm)
Alternatively you could create a cardboard template to be more accurate.

2. Use a larger, 6mm drill for the antenna socket.
I chose to mount the socket on the back left on the tin as this would allow the antenna to be folded down parallel to the case for storage. 

3. The final 6mm hole (underneath display) will allow the wires from the LCD to pass through to the inside.

NOTE: Be patient when drilling these holes through the metal. I found that the best solution was to use a combination of a high speed setting and slow movement into the material. If you're too quick, you can easily deform the metal.

Step 4: Attach the Antenna Socket & Posts

Picture of Attach the Antenna Socket & Posts
IMG_0288.JPG
This is fairly straight forward stuff...

1. Push the RP-SMA antenna socket through the case to the outside.
Leave the locking washer on the inside so that it bites into the metal when tightened.

2. Screw in the 4x hex posts.
You may wish to add matching nuts and locking washers if the posts are too loose.

Step 5: Insulate!

Picture of Insulate!
IMG_0291.JPG
Now, you don't want to short out any of your Arduino + Xbee circuits.
Make sure the inside of your case is well insulated.

I just used some black card and cut it to the outline profile of the Altoids tin.

You will need three main insulating panels:

1. Bottom of tin
2. Underside of lid
3. Wrap around panel for Xbee module (see page about adding Xbee)

Step 6: Add Arduino

Picture of Add Arduino
IMG_0294.JPG
IMG_0302.JPG
The Arduino Duemilanove conveniently fits within the Altoids tin.

Of course this takes up quite a bit of space in your case.
If you want that extra room for other circuits then you might be better building a 'Boarduino' available here from Oomlout.

Using tin snips, cut away entry points on the right hand side for the USB and DC power sockets. I found that it was best to make two vertical cuts and then fold excess material on the inside. This can then be hidden underneath the insulating material we put in earlier.

Step 7: Attaching the LCD

Picture of Attaching the LCD
IMG_0311.JPG
IMG_0314.JPG
After many failed attempts using ribbon cable, I found Cat5 to be the best solution for wiring the display.

Advantages of Cat5
- Colour coded
- Not too bulky +
- Flexible for closing the lid
- High quality copper great for soldering!

1. Cut 7x pieces of Cat5 about 120mm in length.

These will provide communication from the Arduino to the LCD.
For the power and ground, I actually used slightly thicker grade black and red wire.

2. Start by soldering to the pads on the display. (Datasheet)

3. Feed the wires through the lid to the inside.

4. Fix the display in place with 4x screws into the hex posts. 

In the next step, we'll complete the wiring to the Arudino.

Step 8: Wiring up & adding Xbee Module

For information about how to wire the popular HD47780 display to the Arduino follow the links below...

Datasheet
http://www.sparkfun.com/datasheets/LCD/GDM1602K.pdf

Tutorial
http://www.ladyada.net/learn/lcd/charlcd.html

Now to add the Xbee

I found that both the Adafruit adapter and Xbee module fit snugly just behind the USB socket on the arduino. In the picture, hopefully you can see the folded card insert insulating the module from other components.

The Xbee adapter makes it easy to connect to the Duemilanove with a 5v supply as the Xbees themselves require 3.3v.

Note: If you haven't yet built the Xbee Adapter kit and you're using XbeePro modules, be aware that the capacitor on the adapter board should lay down flat against the PCB. Otherwise the Xbee doesn't quite fit into the adapter headers.

Step 9: Finished Construction...

The Altoids tin attached to the PC is much easier to construct than that with the display. 

1. Strip the paint from the top surface as in Step 2.
2. Attach the antenna socket as in Step 4.
3. Insulate as in Step 5
4. Add Xbee and attach FTDI cable (see Xbee tutorials)

Congratulations, we've finished the making part!

Now for the testing and code examples!

Step 10: Upload Sketches & Testing

Picture of Upload Sketches & Testing
IMG_0332.JPG
Here are some simple sketches.
I suggest that you upload them directly over USB cable to the Arduino. Although I believe it is possible to upload wirelessly, I haven't yet been able to establish this with the XbeePro modules.

Arduino Wiring configuration:
0 / RX (leave)
1 / TX (leave)
2 - LCD D7
3 - LCD D6
4 - LCD D5
5 - LCD D4

11 - LCD Enable Pin
12 - LCD RS Pin

14/ A0 used as NewSoftSerial RX - connects to Xbee TX
15/ A1 - used as NewSoftSerial TX - connects to Xbee RX

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

We will be using the LiquidCrystal library to communicate with the display.

As well as the NewSoftSerial library for the Xbee.
You can download it here: NewSoftSerial
It allows you to connect the Xbees TX/RX to other digital pins on the Arduino. 
This means that the Arduino's serial pins are kept free for use by the USB when uploading.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(You can download the pde. files below)

Sketch One (InstructablesDisplay.pde)

This example will test the display without using wireless communication.
The code will print ' Instructables! ' on the top line of the display!

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(" Instructables! ");
}

void loop() {}

Sketch Two (mySerialDisplay.pde)

This sketch displays text on the Altoids LCD via Xbee wireless from the PC serial monitor.
The initial startup screen shows
1. 'Instructables, altoids display'
2. (delay of 5 seconds) 
3. 'Waiting for serial input...'


/* ------------------------------------------------------------
This sketch displays text sent over soft-serial (digital pins) 
using the NewSoftSerial library. (RX - 14/A0, TX - 15/A1)

Modified SerialDisplay example to include soft-serial for Xbee
A.dlp 28th July 2010 for Wireless Altoids Display Instructable
www.instructables.com
------------------------------------------------------------ */

// include the library code:
#include <LiquidCrystal.h>
#include <NewSoftSerial.h>

// initialize the LiquidCrystal library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// initialize the NewSoftSerial library RX-14/A0  TX-15/A1 
NewSoftSerial mySerial(14, 15);

void setup(){
  // set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // initialize the serial communications:
  mySerial.begin(9600);
  // print text 1st line
  lcd.print("Instructables");
  // set cursor to 2nd line
  lcd.setCursor(0, 1);
  // print text on 2nd line
  lcd.print("Altoids Display");
  // wait 5 seconds till next message
  delay(5000);
  // clear the screen
  lcd.clear();
  lcd.print("Waiting for");
  lcd.setCursor(0, 1);
  lcd.print("serial input ...");
}

void loop()
{
  // when characters arrive over the serial port...
  if (mySerial.available()) {
    // wait a bit for the entire message to arrive
    delay(100);
    // clear the screen
    lcd.clear();
    // read all the available characters
    while (mySerial.available() > 0) {
      // display each character to the LCD
      lcd.write(mySerial.read());
    }
  }
}

Step 11: Resources

Here's a list of all of the resources I found useful when making this project:

Datasheet for HD47780
http://www.sparkfun.com/datasheets/LCD/GDM1602K.pdf

Arduino LCD Tutorial
http://www.ladyada.net/learn/lcd/charlcd.html

Xbee Adapter Kit
http://www.ladyada.net/make/xbee/solder.html

Arduino Xbee Point to Point
http://www.ladyada.net/make/xbee/point2point.html

Custom Character Creator
http://icontexto.com/charactercreator/

Hope this project inspires some people!
how do you make the colors inverted?

I know this is an old comment, but for any new readers that are new to this tech:

You need to buy the lcd character displays that you plan to use in either the 'positive' contrast format or the 'negative' contrast format. Negative format LCD displays have bright lettering/pixels on a dark background. Positive displays have dark lettering/pixels on a light or colored background. In other words, the positive lcd pixels actually mask the backlighting that is shining through the glass display yielding dark text.

There are some coding tricks you can do on some models to imitate an inverted character set on the display but it's not the same visually and capabilities vary from product to product.

DX, ebay, adafruit and sparkfun all have some very cool offerings. I personally prefer the iic/i2c lcs displays as it's easier to connect and looks nicer without all the wiring on projects where the guts will be exposed. i2c backpacks can be picked up for a few bucks to retrofit older lcd displays you already own.

If you get adventurous, some lcd displays can even have the back-lighting leds changed out for a different color of your choice--but you'd have to do that yourself. There are some videos (youtube) online, but be advised that this will void your warranty, is tedious and has risks. However, it is an excellent way to re-work or re-purpose older or cheaper lcd character displays for new projects.

Once again, I enjoyed this fine article!

Alexdlp (author)  The nerdling2 years ago
Well it's a monochrome display and so is only meant show white text on a black background. Other colours are available like Red on Black, Black on Green etc. Just search for 16x2 character display. I suppose you could create custom characters if you really wanted to have the background/text inverted though :)
M.Hawse26 days ago

Very nice indeed!

iApple guy2 years ago
Where did you get that display? Can I use a arduino UNO, if not can I change up the code so that I can use a UNO?
I know its a really old question but... it just happens that I got to this instructable today and I made it with an arduino UNO, it works :) just had to adjust the code a tiny bit, cheers.
I wonder how difficult it would be to modify this setup to work with bluetooth. You could make something almost like an old school pager. Anyway, very cool Instructable, definitely trying this one out.
blenderking2 years ago
VERY COOL :)!!!!!!!
iApple guy2 years ago
5 STARS!!! Great Instructable!
shewolf232 years ago
I'm very new to this kind of thing and I was wondering how you could get the screen to have buttons, so that i could have it display different text if i pressed a button.

Nice work :)
Alexdlp (author)  shewolf232 years ago
You might find this useful... It uses the Arduino LCD Keypad Shield :)
http://www.youtube.com/watch?v=XGGvrkku1ig
Sky-Monkey2 years ago
Have you gotten to test the range limitations yet? - I just ordered a pair of the 60mW U.FL units with similar antennae, for a project. I was originally hoping to get upwards of 1000m range, but reading some reviews online, that may be optimistic. Thanks - Nice work
BodenM2 years ago
Would it be possible to add a buzzer or vibration motor? I was thinking of maing this, and it means I can leave it on the table so i don't have to constantly check it.
vika3672 years ago
hi, i have already bought xbee pro chip antenna, is it ok to me to use it??i'm placed the xbee pro in the box.
is it same between u.fl with chip?? i'm new in xbee. so really need your help.thanks
Alexdlp (author)  vika3672 years ago
Hmm I haven't used the xbee's with the chip antenna (: I'm not sure what kind of range you're gonna get with it being in the altiods tin..

I have a feeling that putting the antenna inside a metal box is going to shield and discharge the radio signal - a bit like a Faraday Cage?? Although i'm not certain.

You could always try it I guess - if it doesn't work, how about mounting the Xbee on top of the Altoids tin instead of on the inside?

Let me know how you get on :)
pobturtle3 years ago
How much does this cost to make?
I just worked out gathering parts from America, UK and Hong Kong (eBay) that this would cost roughly £150 GBP inc postage for me.

I could be way off though as I wouldn't know where to buy the parts from the UK alone.
Alexdlp (author)  garyrowe2 years ago
Gary - please don't order parts just yet!! I think you may have overestimated slightly... Just to let you know that I've got your message and will get back to you later this evening :) Thanks
Ghost Wolf3 years ago
I want to make one big time
Same here!
Same, big time!
kyismaster3 years ago
could i make this into a name tag?
pretty high-tech for a nametag.
Oh man...The Bike Shack needs one like this that reads the hours for volunteers off of Google Calendar. Alas, no funds, and I'm sure not going to take the time.
fzxdf53 years ago
It would be easier to use a nibbler...you can get these from home depot for about $15 in the electrical department
Digi-mech3 years ago
(removed by author or community request)
Alexdlp (author)  Digi-mech3 years ago
Hey there! Sure, I admit that the particular components featured are expensive but they were actually meant for another project (not just to put in a tin!) :D

I think it's the Arduino and radio modules that bump up the cost...

Check out the link below for a great kit that was designed especially for low cost Arduino/radio communication!

http://shop.jeelabs.com/products/jeenode

Hope this helps?
siklosi3 years ago
Have you tried what's the range, and also what happens when signal is lost? I need something like this for fast moving car... display would be in car and should show text that is sent every lap when car passes. Is it possible with Xbee? What is reconnection time when signal is again in range?
Alexdlp (author)  siklosi3 years ago
Hi, it's funny you should mention that because that was the idea I had when I bought the components! (Fit to a track car to gather sensor data and send messages to driver). I have to admit that i'm fairly new to Xbees and at the moment just running default settings. (There are many configurations).

The modules used here are XbeePro 60mW which are good for about 1 mile outdoors, but believe you can get higher power output modules with 6 mile range. I haven't done a range test yet but if you disconnect one module and power it up again, data starts streaming almost immediately!

Please keep me informed about your project, it sounds very interesting :)
Ghost Wolf3 years ago
NOTICE: All who don't give this person 5 stars should have never joined instructables! Thank you for your time
Alexdlp (author)  Ghost Wolf3 years ago
Thanks, I'm glad you liked it! :)
blackwellj3 years ago
how can i get my mac to display the number of unread emails i have on the lcd?
Alexdlp (author)  blackwellj3 years ago
Hmm, I have made an Arduino Gmail Notifier before, but that only triggers an output such as an LED. I know that you need to have a program called Python installed. From what I understand, it gathers your inbox status data (unread emails) and then sends it to the arduino software. I imagine it must be a similar setup to check the amount of emails unread and print to the LCD.

Check out this link... (google mail though)
http://blog.tinyenormous.com/2008/11/25/gmail-notifier-project-for-dummies/

Sorry I don't know exactly but hope this helps?
kingbirdy3 years ago
this would make a nice little RSS feeder, depending on costs. what did you spends total on this project?
Alexdlp (author)  kingbirdy3 years ago
Hi there, I agree an RSS feeder would be great! The components featured in this 'ible weren't specifically bought for this project alone. I just needed some sort of enclosure for the circuits. The Xbee wireless modules were the most expensive components, you can find them here... http://www.sparkfun.com/commerce/advanced_search_result.php?keywords=xbee&x=0&y=0&search_section=products. :)
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!