LCD and Enclosure.

I'm looking for an enclosure for a project that will include one of the 2x8 character LCDs from seeedstudio and should have an IR panel and battery enclosure.

I'm looking at using http://www.allelectronics.com/make-a-store/item/1593-QBK/BLACK-PLASTIC-CASE-2.6-X-4.4-1.1-/-/1.html
but accoring to the datasheet, the internal dimension is 60mm wide and according to seeedstudio, the LCD is 58mm wide. I'm worried I'll have trouble fitting the LCD because it's cutting too close, or in the best case the aesthetics will suffer because the display will be too far off center (it doesn't look centered on its own PCB).

Can anyone with more experience with enclosures give any insight or suggest a slightly wider enclosure that will work?

Thanks.

to get an idea of what's available, try the pactec web site.http://www.pactecenclosures.com/

They have a wide range of boxes and provide free samples.

I'm working with a similar sized LCD but it's going behind a panel rather than in a box. I am lucky that I can make my own cutout and fit the LCD into it. I'm not real sure how I'm going to protect the LCD though - it will be exposed to the elements.

Regardless of research or advice though I would suggest you get your hands on any remotely-possible container and trial fit your stuff. I never cease to be amazed at how different realitly is from my vague imaginings of what will fit.

oh, by the way, I have one of the Seeed modules in my hand and I would say the LCD face is pretty well centered on the board. It's not EXACT but no more than a couple of mm further from the backlight end of the board than the connector end.

oh, also, I wasn't able to get the Seeed module working myself. That doesn't mean it won't work for you but I moved on. If you do get it working I'd like to know.

Very good point about the difference between reality and a datasheet for an enclosure. For me to get the box I was linking too I'll have to order it which means shipping fees and a nice long wait.

I have the seeedstudio LCD too. It was my original request that he stock them ;). I'm thinking a few mm off will look pretty crappy in the box though.

What trouble are you having getting it to work? It's working for me, but I had to modify the time delays in the arduino liquidcystal library (the problem was with the library, not the display). I had a horribly frustrating time where it would work once in a while, but 95% of the time would never initialize.

I am having trouble with the 60mm red-green 8x8 matrix display though. I've only tested by directly connecting to the LEDs, through a resistor of course, and the brightness is very, very dim.

What trouble are you having getting it to work? It's working for me, but I had to modify the time delays in the arduino liquidcystal library (the problem was with the library, not the display). I had a horribly frustrating time where it would work once in a while, but 95% of the time would never initialize.

I would get either blank or sometimes the black character boxes showing (I now know) that it was getting power. This was the first LCD module I bought and I had not yet learned about the liquidcrystal library so i was working just from the datasheet. The problem could have been my wiring or my code. I have it out now and I'll try it again. What timing did you have to change?

In terms of centering, I just don't believe I could detect the offset, maybe mine is not quite the same. How are you going to make the cutout for the LCD and attach it?

That sounds like exactly the problem I had.

With thanks to mem, the solution for my LCD problem was remove the init code from the constructor and add:

void LiquidCrystal::begin()
{
//for 4 bit:
 delay(50);
 command(0x3);
 delay(5);
 command(0x3);
 delay(1);
 command(0x3);
 delay(1);


  command(0x28);  // function set: 4 bits, 1 line, 5x8 dots
  command(0x0C);  // display control: turn display on, cursor off, no blinking
  command(0x06);  // entry mode set: increment automatically, display shift, right shift
  clear();
}

Then call that begin method towards the end of your setup function after some time has elapsed.

I have no idea how I'm going to cut the opening :). I was thinking of using a nibbler to make it a little on the small side and then adjusting with a file or a dremel with a grinding disc. Or just cutting it out with the dremel in the first place.

I also don't know if I should remove the metal bezel and reattach it from the outside. I don't have any way of making those narrow slits.

the solution for my LCD problem was remove the init code from the constructor and [move it to a begin method]

hah! I did almost exactly the same thing to cure erratic startups! I haven't tried the seeed module since though so it may work now.

With respect to the cutout, dremeling or whatever is going to make a rough cut, at least in my hands. It would be really nice to be able to get an external bezel. The one already on there wouldn't do for me though, I'd just have the rough edge outside it.

I decided to try mounting my prototype yesterday and found it doesn't work anymore. There's probably a short somewhere or a wire fell off. It semi-worked once of the 30-40 times I tested it. This hobby is frustrating at times. It was built on perf board with isolated holes, so it's a big mess of spaghetti wiring so it's probably easier to start again with a PCB now that I had the hardware working.

sorry to hear about the prototype. when you get back to the case and lcd I'd like to hear what you do.

I recently mounted an lcd into a simple plastic project enclosure from radio shack, and it was dreadful... i can give you pictures a bit later...

it looks better now since ive taped the sides but it was impossible to cut a perfect rectangle witha dremel, nor a box cutter, so i had to sand and sand, and, ofcourse, i over sanded and ended up with huge, awkward gaps between the sides of the lcd screen and the box...

Although I find them a bit expensive for this purpose, some people use the pelican cases for the LCD kind of project:


There are a few sizes, I am sure one can fit your project.

Others (like me) may prefer the cheaper (free) case, recycling a box of chocolates:

I recently mounted an lcd into a simple plastic project enclosure from radio shack, and it was dreadful... i can give you pictures a bit later...

it looks better now since ive taped the sides but it was impossible to cut a perfect rectangle witha dremel, nor a box cutter, so i had to sand and sand, and, ofcourse, i over sanded and ended up with huge, awkward gaps between the sides of the lcd screen and the box...

exactly what I've been worrying about. I foolishly expected there would be readily available plastic/chrome bezels that would fit neatly around stock-sized LCDs, no luck yet though.

The pelican and candy boxes won't do it for me because I'm mounting into a flat panel. Thanks though.

I think the pelican box is way too expensive. I've thought about the Ferrero box but it's so breakable.

One thing I've used is a shadow box. It's like a picture frame but instead of holding a flat page it's got an internal compartment to hold and display 3D objects. I paid around $10 at a crafts store for a 5x7 with about 2 inches inside. It came with a glass front and a felt-lined pressboard back. I made all the holes in the back board.

But what I'm focusing on now is handheld devices. A shadow box is too heavy, bulky, and breakable.

I got a couple of sample boxes like the one below from pactec. They have a wide variety on their web site. In this case the end is separate but probably too small for the LCD and the sides of the cases just leave you with the same issue of cutting your own hole and finishing it.

See the drawing here http://www.pactecenclosures.com/Plastic-Enclosures/PP-drawing.html

They also have items like the one below which has a specific spot for a display and a bezel - Looks like a (1980s) handheld calculator.

Their web site is here http://www.pactecenclosures.com/

If you really want to get crafty, you can design your case out of acrylic sheets and get the parts laser-cut:

Otherwise, a visit to Staples/Office/Business Depot is a good opportunity to pick some acrylic boxes, originally designed for different purposes (card holders, disk holders etc etc). And these are cheap.

Also, keep in mind that you can, relatively easy, bend your acrylic sheets. There are lots of articles on the internets on how to do this (basically heat up along the line you want to bend).

If waterproofing/dustproofing is not important, you can just sandwich your project (PCB, LCD etc) between 2 sheets of acrylic, with long screws and spacers.

They also have items like the one below which has a specific spot for a display and a bezel - Looks like a (1980s) handheld calculator.

That one looks good except for the lack of an IR panel. The data sheet for it though has no information on the size of the opening or the PCB dimensions. Also, my local supplier and digikey doesn't stock it. Mouser seems to with a minimum order of 289 units. It also seems to be double the price of the hammond unit, though that's not a problem (assuming it has all the hardware in the datasheet listed under different part numbers).

florinc: for now, custom making a box is beyond my ability. Knowing me, if I try I'll never finish and it'll just stop me from finishing any projects for a while. In grade 8 industrial arts, I got to play with a heat tool for bending it and it is fun to play with :).

That one looks good except for the lack of an IR panel.

If you poke around on the pactec site you may find other possibilities.

I'm still surprised that there aren't more readily available LCD mounting options. In my case I need something really weatherproof because I'm mounting on an exposed motorcycle surface but I haven't see anything that would help finish off a project.

I think it is amazing that there isn't already on the market a simpe palstic box with rectangular holes the size of the screens on LCD's, which are all pretty standard.

As far as I can see there is a great market opportunity here for someone to manufacture these types of enclosures for the hobbyist electronics market.

Mike, I don't think there is a single standard. I have three 16x2 LCD panels and all require different size cutouts. My 16x1 and 16x4 panels are different sizes again.

bill: There are some nice looking options there, though the ones with IR panels are a bit thinner which makes it harder to fit components. The main issue I seem to have is finding a source, I'm shocked that digi-key doesn't seem to carry them. I have almost no local sources for electronics parts, but Hammond boxes seem to be one of the few things I can get locally.

For your weatherproof project, why not use florinc's suggestion of a pelikan or otterbox? They're expensive, but very weatherproof and available with clear tops for the display. For the interface if needed, you can rig up something IR so you don't have to comprimise the weatherproofing.

Mike: someone with a laser cutter should do exactly that. They can get a great price on 100 boxes, cut the holes and sell the boxes for double.

Box has quite a few with cutouts categories - Box Enclosures:, but it seems they only support a couple of different lcd sizes.

Most of the manufacturers will do custom CNC routing or laser cutting for large orders, but that really doesn't help the average hobbyist. You might be able to find a local machine shop to do the routing for you, or even get a router attachment for a Dremel tool, and build a small jig to get a clean hole.

Polycase http://www.polycase.com/ might be another source

Bill: You might be able to do something like the second example here http://www.sparkfun.com/commerce/static.php?name=custom_enclosure_design for yours. Maybe a short piece of 4" or 6" PVC pipe, and a couple of pieces of Lexan over the ends. Something larger than the hole in your gas tank cover.

I've seen the same need to provide enclosures for Arduino, and other DIY projects, and have started working on a couple of things. They are a few months off, so don't really solve any problems now, but I'm trying to get a couple of manufacturers to work with me on a more modular enclosure design that would work better for the type of projects that Arduino, and other hobby projects seem to need.