Enclosing your project, the pursuit continues

In a previous post, I discussed my journey to enclose my projects. I have been thinking about this question for a while. Recently I developed my serial LCD keypad backpack, specifically to make the difficulty of creating a user interface goes away. Now it needs to be mounted. So I devised a plan to create a physical user interface with appropriate project box for LCD projects. Here is a finished picture, not too bad, right?

Here is a list of materials needed:

Here is a list of tools needed:

  • Dremel handheld rotary tool (includes a small cutter and a few abrasive disks)
  • A couple of drills (1/16 and 1/4 inches or 1mm and 3.5mm)
  • Utility knife or just a cutter
  • LCD printout
  • Screw driver

My choice of enclosure has an advantage:the enclosure has a 9V battery compartment :). If you decide to not buy my serial LCD keypad backpack, then there will be 20 wires between the front panel and inside the box, 8 for the keypad, and 12 for the display. You may want to use a ribbon cable or jumper wires. If you do get the backpack, you only need 4 wires instead of 20 plus the programming is much easier with the backpack. So your choice.

Cutting and drilling:

First, get a precise layout of your display including the PCB boarder, screw hole and size, and display area. I suggest you print it out on paper or draw it on paper. Make sure you check the actual display instead of solely relying on the spec sheet, which could be different from your display.

If you got the serial LCD backpack, you can download this file and print it out. Cut out one display diagram. Read this spec sheet, maybe it’s the same as yours so you can also use this file. Whatever way you get the layout, use double sticky tape and secure it symmetrically on the front of the enclosure, leaving some space above it, maybe 1/4 inch or 6mm.

Now use the dremel abrasive disk and carefully cut along the inner rectangle, or the dimension of your display’s viewable area, not the entire black frame. You want to be careful not to over cut. You can try to cut from the under side to help you remove the window. Once you’re done cutting, use a knife to free the four corners.

I messed up the top edge of the box a bit by getting the spinning chuck too close to the edge. No big deal. Now you can use the dremal cutting tool to cut the four corners. Here is the under side.

Now use the smaller drill bit to drill guidance holes at the screw holes. Then use the proper drill bit to open the hole up for your screws.

Now remove the printout and excess material. Mount the LCD to see how it looks like.

Here is the back side:

See the standoff on the enclosure? That is why you don’t want to cut the window too high.

A closeup on how I mounted the display:

Basically from top to bottom: nut, display PCB, standoff, then screw on the other side.

Now cut a slot at the bottom of the box top to allow the membrane keypad connection to pass inside the box:

Just don’t cut too low. Leave about 0.5 inch or 12 mm.

Then carefully remove the backing of the membrane keypad. Pass the connector through the slot and stick the keypad on to the box:

Tada! A good-looking box that you can use for anything! I am planning to add a GPS module inside of it and run a GPS logger with it. Please see the phi-2 shield page for the GPS project code.

Now the under side:

As you can see, the connector comes back up to about the bottom of the LCD. This way you can connect the LCD serial back pack easily without stretching the cable.

Later I will add an LCD backpack to the box. The box has enough space to hold a full-size Arduino UNO and some other stuff, plus a 9V battery compartment so you are all set for an exciting project.


If you don’t have an LCD backpack, I suggest you solder a female header on the back side of the LCD so you can run simple jumper wires between the LCD and arduino. For the potentiometer and LCD resistors, solder them inline. Also use jumper wires to connect the keypad to arduino. You will only have 4 free arduino pins left. Total of 20 arduino pins – 2 serial programming pins – 6 LCD pins – 8 keypad pins = 4 pins left.

Otherwise, use the LCD backpack and the 4 included jumper wires. The backpack only uses 2 arduino pins.You will have 16 free pins on your arduino.

8 Responses to Enclosing your project, the pursuit continues

  1. John says:

    If you want to make your rectangular (or square!) openings just a touch nicer, before you slice – drill.
    Drill a hole in the each corner with a small bit (1/8″ or so), but step it in 1/16″ (or whatever the radius of your bit is) from each side (to get your center). Then you slice inside your lines, and you get a nice pre-radiused corner!

    Off topic: Do you have a library of pressure sensors for use with your boards? I want to sense & display air pressure (say 0-150psi) and then based on the reading allow or dis-allow a user to press a button that does something else.

    • liudr says:

      Thanks John. I will try that technique next time I cut something open. I always had an impression that the drilled hole will extrude from the cut line but if I’m careful enough, that should not happen.

      What exact pressure sensor do you have in mind? Any link you can provide? Once you know how to read that sensor, everything else is done in software 🙂

  2. John says:

    The trick really is to measure the radius distance in from each edge (eg. top left corner you’d draw down from the horizontal line, and then to the right from the vertical). Center punch (critical!) that new point where the lines cross, then drill. Common technique in metal work. It also removes the stress riser in the corner, so the plastic won’t end up with a radial crack.

    As for the sensor, I was going to just use a common automotive oil pressure sensor (they’re cheap, and easy to find. Like this: http://www.egauges.com/vdo_indS.asp?Sender=150PSI_10Bar&PN=360-004). These ones are 10-180 ohms (some are 0-90 ohms). So I’m guessing that as long as it’s a linear resistance sweep (I guess it would be, since it works with an analog gauge normally?), the math of (pressure/ohms)vs(voltage) would be pretty easy, then tie it onto an analog input pin in series with the 5v/3.3V (my clone is 5v, true arduinos are 3.3?) rail??? Or am I over complicating it.

    I might leave that part up to you (as I just hurt my brain thinking about it) if you think it would be useful for others. 😉

    • liudr says:


      I think you can use a simple series resistor to get the resistance of your pressure sensor. Here I have a blog post on resistive temperature sensor:


      The circuit diagram works for any resistive sensors including your pressure sensor. You just need a different fixed resistor, instead of 10Kohm, possibly 41 ohm. The formula R=V/(5-V)*10KOhm just needs to be changed to use that resistance instead of 10Kohm.

  3. liudr says:

    Here are some comments left by arduino forum members:

    From cr0sh:

    Looks nice – I would suggest

    1) Cut the hole larger to fit the bezel, and/or…
    2) Use (or make) “studs” for the LCD that can be epoxied to the inside of the case (so no visible screwheads)
    3) Alternatively, make or thread ABS (or whatever material the box is made of) studs, then glue them with the appropriate glue

    To make the studs, you could simple use some flat-head screws or similar. Another way might be to cut the head off the screw, then thread a nut in place. You might also try gluing a nut in place, then thread the screw into that (if there are enough threads to “catch”). Finally, you could glue/epoxy in place some abs or nylon standoffs, then screw the LCD in place (you might tap the standoffs beforehand).

    I just think that if you can hide the LCD mounting screws, it would make the project that much better; as it is, it looks great – take it to the next level next time around.

    On another note: Too bad that keypad didn’t have E and F keys; it could make a sweet hex programmer (or other similar “terminal” handheld)…!

    From draythomp:

    I’ve used a number of the bezels you point out. They saved me a ton of work getting the perfect hole in an enclosure to see the lcd through. Yes, they cost some, but they saved me hours of filing, sanding, and fitting the displays. I support my boards with hot glued plastic threaded standoffs. They cost almost nothing when you buy a bag of them off ebay. I also use nylon screws to hold things in place; they work fine until you drop the device and then the head pops off the screw. But, being nylon, they don’t short anything out and I don’t have to worry about them cutting the traces on anything.

    To cut the hole in a plastic enclosure, I put a rotozip bit into the dremel; it’s 1/8th inch and fits fine. Then I can plunge the bit through the plastic and use the side of the bit to cut out the rough opening. To smooth it, just put one of the round sanding bits in and rough sand the big jagged edges. Like I said, I make the hole to fit the bezel and then mount the lcd behind that with glued in standoffs. For something that needs to be a little more rugged, I have used epoxy putty to hold the standoffs. Get the epoxy putty for plumbing; it sets up in about 15 minutes and you can sand it in around an hour. So you shape the stuff, cram it into one end of the standoff so it engages the inside threads and then mash it onto the plastic enclosure. Fifteen minutes later you can test fit the lcd. After an hour you can use the dremel to fine tune the shape of the epoxy.

    The beauty of using plastic standoffs and screws is that you can buy the one inch long ones and cut them down to fit whatever you need. That way a bag of them can last through many projects.

    If you happen to be using a metal front panel, the bezels can really save you time and frustration. Just use a hand nibbler to cut the rough opening to hold the bezel and then glue it in place. This saves several hours of messing around trying to get it just right.

  4. liudr says:

    Here are pictures from Tiaki showing how a commercial product does its enclosures:





    as you can see they have just covered the faceplate with a printed clear film and to makes the button look like touch buttons but they are just normal button like on your phi-panels, I think this is a very good idea for us hobby people because when can just mark and drill out the holes for the button and it doesnt have to be perfect becasue it just gets covered over by a printed sticker, which must be clear to start with before printing as you can see the non printed areas are where the leds are.

    but to be fair once you have printed the sticker you can just cut holes in anything really and put the sticker over top, the buttons on this panel are set to flush below the sticker very cunning I thought.

  5. Pingback: Make an enclosure or face plate for your arduino projects | Liudr's Blog

  6. Good job, bro. Look elegant and convenient.

Leave a Reply