So about a year ago I decided that I wanted to get into AVR microcontrollers. After ordering an AVR pocket programmer from Sparkfun , I soon realized that it was too delicate to be sitting on a workbench full of wire clippings. I knew I needed a small enclosure to put it in, but couldn't find anything I really liked. My final decision was to make my own.
This instructable will explain the steps necessary to construct a "Lexan" shell for an arduino UNO (or other arduino). Of course these steps can be adapted to almost anything.
I don't remember where I learned this method, but it was definitely from another Instructable. Here are some with similar methods:
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Tools/Materials
Use whatever tools you like, these are what I used:
- Ruler/Square combo
- Table Saw
- Jig Saw
- Pencil torch
- Drill press
- Fine sandpaper
- Small file set
- Lexan polycarbonate (1/10" thickness is usually carried by home improvement stores)
- Chunk of 2X4 wood
- Masking tape
- 4 nice screws with matching nuts (~18mm length)
- 2 - 1" Nylon spacers (must fit over screws)
Step 2: Make a Bending Jig
This step is OPTIONAL but highly RECOMMENDED
This is where the table saw and chunk of 2X4 come in. I have tried to bend polycarbonate over the edge of a table and in a vise, its easier in the long run to make a jig.
If you don't have a scrap piece of wood laying around, go to your local home improvement store near the end of business hours and ask if they have any scrap they're throwing away. Home depot gladly gave me a few small pieces.
If you've never used a table saw before, this is not the time to start; have someone else cut it for you. The goal is to cut slots of varying depths into your scrap wood, be careful. To get an idea of the depth required for your project, take the distance from the edge of the Lexan to the target bend line and subtract 1/8". Why? Because when you eventually use a torch to heat the Lexan it almost always bends 1/8" above the wood. Also keep in mind that if you want a "U" shape, two bends need to be made. The slot will need to be close enough to the edge so that the first bend will clear the wood when making the second bend.
In my case I wanted the walls to be 5/8" high, subtract 1/8" and I need a 1/2" deep slot. (Close to the end of the wood)
Step 3: Measure and Cut
According to my measurements, my arduino is about 2-11/16" long by 2-1/8" wide. In the design I chose to go with, the bottom shell covers the sides with the 4 headers and the top shell covers the ends with power/USB and ICSP header.
Bottom- 3-1/2" X 2-15/16"
2-1/8" (width of arduino) + 5/8" (side 1) + 5/8" (side 2) + 1/8 (for luck) = 3-1/2"
2-11/16" (length of arduino) + 1/8" (the luck that is added to the top) + 1/8" (for sanding) = 2-15/16"
Top- 4-1/16" X 2-3/8"
2-11/16 (length of arduino) + 5/8 (end 1) + 5/8 (end 2) + 1/8 (for luck) = 4-1/16"
2-1/8" (width of arduino) + 1/8" (the luck that is added to the top) + 1/8" (for sanding) = 2-3/8"
You've probably heard the saying measure twice, cut once. Before picking up the jigsaw, cut out paper pieces the same size as your Lexan should be and bend them accordingly. Do the paper pieces fit together the way you expected them, will your Arduino fit inside? (excluding the USB and power connectors) If not, step back and decide what measurements need to be modified.
Be careful not to bend the wrong edges of the Lexan you cut, so labeling the bending edges is recommended.
You will inevitably end up with some scrap pieces, use them for test bends.
Step 4: Test Bend(s)
Reminder Lexan may give off toxic fumes when heated, just to be safe bend your Lexan in a well ventilated area.
- First, slide your Lexan piece into the slot in the wood; make sure it goes in all the way to the bottom.
- Next, take your torch and evenly heat the wood/Lexan corner while at the same time applying pressure in order to convince the Lexan to form in the right direction. Take your time, heat evenly across the bend and never stop moving the torch.
- When the Lexan starts to fold, push the folding piece all the way down to the wood and hold it down until it cools.
My test Lexan in the video ended up bubbling in one of the ends of the bend because it became too hot.
Step 5: Heat and Bend
Before you try to bend your perfectly cut pieces of Lexan, you may want to sand down the edges so they are flat and don't wabble in the jig. If the Lexan doesn't sit correctly in the jig, you may end up with a crooked bend.
By now you've heard the saying measure twice cut once, there is nothing more frustrating than realizing you've just bent the wrong piece the wrong way. So before you light your torch, use your cut out paper pieces and label the edges of the Lexan that need to be bent. Again do the paper pieces fit together the way you expected them? If not decide what bends need to be moved.
Its probably a good idea to do this in a well ventilated area.
Keep in mind that wider pieces of Lexan take more time to heat than thiner scrap pieces.
These are the bends that count, take your time, be patient and don't burn yourself. (or mess up :)
Step 6: Sand It Down
You can ignore this step if you were lucky enough to not have any excess Lexan in the way of your shell fitting together and looking nice.
The goal it to remove just enough Lexan so that the two halves slide together and don't have any "overhang". What I mean by "overhang" is Lexan that goes past the point where the two edges should intersect.
To accomplish this I started with a Dremel tool, then moved to rough sanding pads that I had laying around. To finish the edges I used some 400 grit sandpaper on a flat surface. The finer the sandpaper the longer it will take to remove material, but the better the edges will look.
Step 7: Drilling Holes
Hopefully by this step you were able to create a beautiful Lexan shell that almost fits an Arduino. In my case, I had to jump back to step 3 after severely mangling one of my bends.
Drilling holes may sound easy enough, but don't let it fool you; its tricky.
- First, find something to mark the Lexan with, it can be a pencil, pen or scribe. Take your arduino and set it in the bottom half of the Lexan shell. Center your arduino as best you can and apply pressure so it wont slide around. Holding your marking tool vertically, mark through the mounting holes in the Arduino to the Lexan below.
- Next, using a 1/16" drill bit , drill out undersized mounting holes in the bottom half of the base.
- Then, slide both halves of the shell together and secure them with tape. Orient the shell so that it is upside down and with the drill bit carefully go through the first set of holes in the bottom to drill the new holes in the top. If your using a hand drill, be very careful to keep it vertical. Finally remove the tape and re-drill all the holes with an 1/8" drill bit.
Don't forget the hole for the reset button. I used a 1/4" drill bit.
Step 8: More Cutting and Sanding
The top half to the Lexan shell needs cut-outs for the USB connector, power connector and pin headers. This is more of a trial and error process. Don't let the picture throw you off, its the same piece of Lexan. I removed the plastic covering and replaced it with scotch tape because it was easier to write on. Don't use scotch tape unless you want to peel it off in small slivers, masking tape would have worked much better.
- First, estimate and mark the Lexan that needs to be removed for the power and USB connectors. Its always better to underestimate and have the connectors not fit rather than remove too much of the Lexan.
- Next, using a jigsaw roughly cut out the holes. Perfect the holes using a small file and sandpaper. I borrowed a small file set, if you cant find one a nail file would also work. Periodically check to make sure all the corners of the cut-out are at a 90 degree angles and the edges are straight.
- Finally, when the top half of the shell will fit over the arduino, repeat the process for the pin headers.
Step 9: Screws, Nuts and Spacers
I had to visit the hardware store because I didn't like any of the screws I already had. I ended up purchasing 18 mm long chrome screws with matching nuts and two 1" long nylon spacers. If you are able to find the right size spacers it would save some time.
The bottom spacers need to be taller than the highest pin on the bottom of the arduino, on mine is about 3/32".
The top spacer need to fill the distance remaining from the top of the PCB to the top Lexan shell, when measuring make sure the spacers will fully support the Lexan and keep it from bending when the screws are tightened.
Cutting the nylon spacers can be simplified with a lathe and a razor blade. If you don't have access to a lathe you can mount the spacer in the chuck of a drill and again use a razor blade as it spins.
Step 10: Enjoy
If you are unhappy with the quality of the edges of the Lexan, the pencil torch can be used to give the edges a "glazed" finish.
Congratulations, the next step is to enjoy your new custom enclosure. Shields will still fit on the arduino, just be careful of the screws on the top of the enclosure; they may short out pins on the bottom of some shields.
Of course this entire process would be simplified with a laser cutter, you can vote for this Instructable in the Epilog Challenge .
Participated in the
3rd Epilog Challenge