Loading
Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

Raspberry Pi case

by HansH, published

Raspberry Pi case by HansH Jan 17, 2012

Description

The Raspberry Pi is a creditcard sized computer which you can buy for $25 or $35 (depending which version)

Never designed a case before, so perhaps things can be better...

......

v11 Different splitlevel (more simple) on backside
keep a little margin on back split, so that top and bottom always fit
added openlogo option
added pcbholder option
changed support studs a bit
changed dimensions to 85.0 x 56.20

v12 Different component locations/sizes
keep a little margin on component holes
pcbsize to 57.0 x 86.0 (actual it is 56.17 x 85.0)
made casestuds wider and added 2 minor holes for self tapping screws

v14 Got a RPI.. so production board measurements...

v15 moved the rca and snd a bit to get them more centered
Thanks to lincomatic at Thingiverse
Added option for GPIO side hole in bottom or top
Added showing GPIO pins with component drawing

If it fits or doesn't, please let me know..

The bottomholder_frame.stl is a standlone minimal frame for a RPi.
All the other bottom_xxx and top_xxx.stl files can be combined.
If you want something specific just take the openscad file and alter it, or just ask...

Recent Comments

view all
I tried loading the scad file but I get a syntax error line 220!
I made one - I've tried to upload the photo, but it won't let me - hopefully you can see it here:
https://lh5.googleusercontent.com/-s_x_3de00io/U1GRV-AuetI/AAAAAAAALzA/sNjzuFgV6mw/w415-h553-no/IMG_20140411_171037.jpg
This is one FANTASTIC case!!! Fits Perfectly!!! :) Thankyou for posting!

One little query, I've setup the scad file to have the pi-logo cutout a bit smaller and I've got only the top setup to render....
The query is, I'd like to use the write.scad to indent some text above and below the logo into the top (like the indented text in TestSurfaceText.scad, or like the recently published Luggage Label) but having a lot of trouble getting it to work.

Is anyone able to please give me some hints as to where/how to put the difference in, etc?
Thankyou all!

More from 3D Printing

view more

Liked By

view all

License

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

// All parts are draw as default just disable the ones you don't want
DRAWfull = 1;
DRAWtop = 1;
DRAWbottom = 1;
DRAWtopinlet = 0;
DRAWbottominlet = 0;
DRAWpcb = 1;

GPIOHOLE = 2; // GPIO opening in : 1=bottom 2=top
GPIOsize = 2; // define height of gpiohole

If you draw 1 part, it will center, otherwise multiple parts are showed.

You can control the case looks by changing :
topframe = false; // if false, underneath values determines how
topinlet = false; // false is outside, otherwise it is with an indent
topholes = true;
topmiddle = true;
toplogo = false;
toplogohole = true; // cut out logo, so you have a view on the pcb
toplogosunken=false; // true or false, no idea if this works on a reprap
bottomframe = false; // if false, underneath values determines how
bottominlet = false;
bottomholes = true;
bottomscrew = false;
bottomfeet = false;
bottomsupport = true; // Added extra support locations for pcb
bottomclick = true;
bottompcb = false; // just a pcb holder without a top


Controlling the size of the case can be done by:

box_thickness = 2.0; // minimum = 2.0 for RepRap printing

Low box (red box in picture):
inside_h = 12.1; // USB goes through deck, 16.5=full height
pcb_h = 5.6; // room for SDslot and a deck

Normal box:
inside_h = 16.5;
pcb_h = box_thickness*2+3.5;

File Name

Downloads

Size

I tried loading the scad file but I get a syntax error line 220!
I made one - I've tried to upload the photo, but it won't let me - hopefully you can see it here:
https://lh5.googleusercontent.com/-s_x_3de00io/U1GRV-AuetI/AAAAAAAALzA/sNjzuFgV6mw/w415-h553-no/IMG_20140411_171037.jpg
This is one FANTASTIC case!!! Fits Perfectly!!! :) Thankyou for posting!

One little query, I've setup the scad file to have the pi-logo cutout a bit smaller and I've got only the top setup to render....
The query is, I'd like to use the write.scad to indent some text above and below the logo into the top (like the indented text in TestSurfaceText.scad, or like the recently published Luggage Label) but having a lot of trouble getting it to work.

Is anyone able to please give me some hints as to where/how to put the difference in, etc?
Thankyou all!
Nice but I was not sure they would stay clamped, so I added two belts with this very small piece of openscad:

dw=61; // box width
dh=22; // box height
dlen=6; // belt width
th=1.2; // belt thickness
difference()
{
minkowski() { cube([dw,dh,dlen],center=true); sphere(r=th, $fa=1, $fs=1); }
cube([dw,dh,dlen+th*2+1],center=true);
}
hey, I printed like 5 of these for colleagues as well as myself.

but now they want one to fit the new camera (I have yet to order it).
any plans for that?
I had no plan in getting a camera.. but perhaps I get one, and I will adapt the case.

Probably someone else will modify it anyway, since the source is available...

Thanks for reporting back.

I also have a case on shapeways.. shapeways.com/model/590790

If I have some time I will post the files here, if there is interest in it
Very nice case. Thanks! I just printed it out but I had a few problems:

1. It doesn't snap together. All the measurments the tabs that are supposed to interlock with the bottom are a bit too thick so they don't go in. Also, the rear part that goes on top of the SD card is also a bit too wide. Some work with an X-acto knife fixed it, but I wonder what I might be doing wrong... (Prusa i3 box frame, ABS plastic). I've calibrated the printer and other pieces print out fine.

2. The slot for the microUSB is too small for the plug to fit in it. The connector itself fits but all the plugs I have are too large. Again, X-acto to the rescue.

3. The Ethernet port on my board has 2 studs on the bottom to hold it to the PCB, which bump up against the support square on the bottom. That makes the PCB stand up too high above the studs so the case doesn't close on that side.

Also, it would be nice for the base to have "ears" to screw it, for example, on the i3 box frame :). I am a rank newbie on OpenSCAD (did a one-hour workshop and that's it) but I might have my hand at it when I have some free time.
Very nice case. Thanks! I just printed it out but I had a couple of problems:

1. It doesn't snap together. All the measurments the tabs that are supposed to interlock with the bottom are a bit too thick so they don't go in. Also, the rear part that goes on top of the SD card is also a bit too wide. Some work with an X-acto knife fixed it, but I wonder what I might be doing wrong... (Prusa i3 box frame, ABS plastic). I've calibrated the printer and other pieces print out fine.

2. The slot for the microUSB is too small for the plug to fit in it. The connector itself fits but all the plugs I have are too large. Again, X-acto to the rescue.

Also, it would be nice for the base to have "ears" to screw it, for example, on the i3 box frame :). I am a rank newbie on OpenSCAD (did a one-hour workshop and that's it) but I might have my hand at it when I have some free time.
Hi, I find that this model doesn't provide clearance (between top and bottom, between bottom and pcb). Is there a way to add this option to the script? Thanks!
Hi.  Will bottom_frame.stl  snap together with ftop_frame.stl ?  In other words, will they work together to make an enclosure?  If not, which open top will fit with bottom_frame?  Thanks very much.
No, any top and bottom stl file will fit together.
Just combine the ones you like.Only the bottomholder frame.stl is standalone, that is more for having some minimal protection and having access to everything.If you take the scad file you can determine what the output is:// All parts are draw as default just disable the ones you don't wantDRAWfull = 1;DRAWtop = 1;DRAWbottom = 1;DRAWtopinlet = 0;DRAWbottominlet = 0;DRAWpcb = 1;Just modify the vars and less or more is printed...That way you can see how a full box looks like andhow the RPI board will fit.
hey, i'm trying to make your case longer to keep the SD card totally inside, block the microusb, and a bit higher.

all this to fit thingiverse.com/thing:26814 inside the case at the top ;)

i just tried to make inside_l = 108.0 but that left me with an unjoinable box.
do you see this happening also? and could you share where i need to change something to get the split happening properly?
Here you see the rendered case.

Well i just need a hint how you split it ;) I'll go ask on #reprap in the meantime
found it o/ 100x100 cube is big enough for everybody 'eh' :)
I didn't expect that somebody would do that.... ;)
thats ok ;) I really love this case design, as you made the most flexible openscad version i found ;)

getting ahead quickly but still need to add some stuff... should finish it somewhere this week probably
Printed the case yesterday (like 2hours before your update). Solid bottom (PCB click), "holes" top. Beside not being on production unit measurements it fits pretty good, just the MicroUSB and HDMI is a bit off but it works. PCB clicks nicely in. Thanks for sharing!
I didn't see a transparent one yet, it looks great !

Perhaps that you or someone else can try out the v14.scad and see if that is better. hdmi is a little larger, and some others have been also moved a bit.

Have fun with the RPi !
Thanks, I haven't worked with OpenSCAD yet (will try to figure out how to get STL files out of it - or do you plan to update your exports as well?). I will ask for another print after I have a new set of STLs.
Openscad is very simple, just load it in and press F6 and from the menu to can generate the STL....

I will update the stl's this weekend.
Printed a v15 today, fits nicely! HDMI is perfectly centered, Sound is OK, Analog Video is a bit to the left. USB isn't extremely tighty anymore. Could use a slightly bigger USB power hole (to the left and top), but I will just cut it with a hobby knife.
NIce !!!

Can you post a detailed picture of the analog video .

I will make the usb power slightly larger

Also printed in transparent ?
Great job on the model - Fits my RPi perfectly, but it would still benefit from a fractionally bigger slot for the HDMI connector.

8-) - I can play with my Pi now :)
The case is slightly too small for my Raspberry Pi. I think I might have left extra shells on for the print so I am going to attempt again and will post a pic and dimensions if it is still too small.
thx for reporting back..

I got reports back for different sizes of the pcb, 85.0x56.17 but also 84.9 x 55.9

so there seems to be a variation of it.

just adapt the global vars and see if it fits better..

// Define Raspberry Pi pcb dimensions in mm

inside_l = 85.60;

inside_w = 56.00;

pcb_thickness = 1.6;

I still got no date for my Pi... :'(
HansH - in reply to HansH
Change it to

inside_w = 56.20;

If it works, I will post a new version, including one with an large open RPI logo...
Thanks, mine measures 56.18mm x 84.96mm so I will try tweaking the size and reprinting.
Thanks, that did the trick. I tweaked the width up by 1mm and the length by .5mm and was able to get a fit. Printing the top half now and will post a picture once done.

Sorry to hear you haven't gotten a ship date. I really lucked out and was able to get registered on RS before their servers went totally unresponsive on the release day. Since I am in the states I was also suprised it shipped so quickly one they started shipping.
Nice picture, looks like a perfect fit...

Can you post the exact w and h you used, then I can post a version 12 and t seperated stl files for bottom and top case versions

Is it a tight fit, or can it be tighter ?

Perhaps then you can try out the open logo top, because I want to know if this works.

I think you have the first USA Pi in a box ;)
Here is what I used:

// Define Raspberry Pi pcb dimensions in mm
inside_l = 86.30;
inside_w = 57.10;
pcb_thickness = 1.6;

But I ended up having to take a hobby knife to remove some of the plastic around most of the ports to get a good fit (USB, Ethernet, HDMI etc). Do you want me to post measurements of everything (b
ody, ports etc)?

Sorry would have posted sooner but been working on getting OpenELEC working (just got it working):

raspberrypi.org/forum/general-discussion/openelec-meets-raspberry-pi-part-1-xbmc/page-4/#p69414

Also I would recommend people print at lease the vented top (unless you l
ive someplace very cool). The Pi warms up a bit when playing video.
Yes please report the exact positions if you can, in the openscad file the connector position and dimensions are named in the top part:

// Coordinates based on RJ45 corner = 0,0,0
// pcb connectors and locations. Based on Beta Board measurements of Gert
Crj45_x=2.0;
Crj45_y=-1;
Crj45_w=15.4;
Crj45_d=21.8;
Crj45_h=13;

So rj45 starts 2mm from the left and is 15.4 mm width

You just need to adapt it and it will redraw everything to
the new location.
Is that inside_l not too large, because maximum I heard was 85.0

OpenElec/xbmc development is going fast !
HansH - in reply to HansH
tzzhc4, I added a testpcb.scad.

That has all components positions and draws a minimum pcbholder with component holes, to reduce printing times. If you can use that to test the definite positions.
Good Work, any idea when it will be altered for the final model B boards sizings?
HansH - in reply to Guest
I don't expect that it is needed to adjust, unless they used completely different components. Gert (of Raspberry Pi) exactly measured the beta boards and the component locations.

The only difference there can be is the:

- sd card holder, which will be different, but I found the specs of it on the suppliers website, so that is already adjusted.

- USB connector, original that was a smaller version (alpha board), but was changed due to cost and availability to the one on the beta board,which is higher and sticks out. I used that connectors dimensions...

No idea if the production model uses the same one.

If the locations need to be changed, anybody can do this, just alter them in the scad file... that is the reason I published it here...
Just went looking in the Raspberry Pi forums for the dimensions so I could design a case for Thingiverse, and what do I find? Someone beat me to it! Huzzah! Good on you. I'll be printing this one up as soon as the computer lands on my doorstep.
Well perhaps that you can look at the logo and see if it is printable on a RepRap.

Also I would appreciate if someone came up with a way to fasten the 2 parts together. Currently the studs give enough friction to hold them together.
bobc - in reply to HansH
Where the studs overlap, how about a hole through for a self tapping screw?
HansH - in reply to bobc
1 made 2 side studs a little wider and put a very small hole through it, you can drill it further out if needed.
bobc - in reply to HansH
Awesome! Time to load up translucent blue!
Didn't have a 3D printer, so I ordered 2 case versions, normal and low profile

Just got a picture of the printed parts

Will arrive coming weeks, hopefully the Pi will sell shortly and everthing fits...
Top