
Another post I’ve been meaning to write for a long time. I finally got my Rigidbot 3D printer in August 2014 some 9 months later than the estimate but I was one of the lucky ones, many had to wait a lot longer and some have even had to pay extra for delivery, having already paid it once as the company completely ran out of funds. I am very happy with the printer though, I’ve printed all kinds of things since I’ve had it and it has produced some great results.
One of the main things I had in mind for it was printing customised enclosures for my electronics projects. I’ve used a variety of off the shelf cases for my indoor TinyTX and Tiny328 sensors, my favourite being the Evatron EN30W sensor case but I really wanted to design something of my own.

After a few aborted attempts using other 3D CAD packages I discovered the joys of OpenSCAD an open source 3D CAD package that allows you to write code to construct the 3D model instead of the more traditional graphical model. When I had first seen this tool I thought it seemed wrong, to approach what I saw as a graphical problem in a programmatic way but in retrospect it makes total sense as we are dealing with precise numbers here and being able to code parts in modules allows you to easily turn various parts of the design on and off easily and scale the whole design just by changing a few defines as well as easily reuse modules in other designs. Once you get in to the right mindset it really is good.

At the top of the code window you can see there are some defines to select whether it should render just the top or bottom of the case or the full thing, whether there should be vents in the top and how long they should be, if a square or round cut out is required for a cable or sensor to stick out of and if mounting holes are required in the back half of the case.
The next section sets the width and length of the PCB section and the battery holder section so I can set which board I am using and whether it is a single or double battery holder. Then it goes on to configure how long the vents on the top should be and the dimensions and positions of the cut outs if required.
Once happy with that it’s just a case of exporting it as an STL file which I then process with Slic3r and send onto Octoprint running on a Raspberry Pi connected to the printer ready to be printed.
This prints really well on my printer, there are no clips to hold it together as such, the extended pieces in the corners are just made to a tight enough tolerance that they grip the top of the case as it is pushed on. I’ll probably tweak this a bit more over time but it does the job as it stands, the dimensions can be adjusted but as noted in the code comments there are some issues with the PCB supports not scaling properly once the PCB length gets over 46mm.
I’ve put the code on my Github here if anyone fancies giving it a try.




Stevenson Screen

One of the early prints I did was this Stevenson screen which is an enclosure for outdoor sensors, the principle is to shield the sensors from direct heat radiation from outside sources while still allowing air to circulate freely. I used the STL files from Thingiverse here, if I recall correctly it took over 20 hours to print all the parts (over several days). It consists of four identical middle sections (more or less if you want it bigger or smaller), a top section and the base section. It’s a well designed object, each piece clips together very well and I was lucky enough to have a piece of plastic pipe that it fitted to perfectly (thanks to the random fly tipper that threw it over my back fence!).
I printed it using PLA which being biodegradable isn’t ideal but it was all I had. I wasn’t sure how well it would stand up to the weather but after 12 months it doesn’t look any different than it did when I first put it out there. I did think of treating it with something to protect it but decided to leave it as an experiment to see how it fares over time.
Inside the box mounted below it is one of my Tiny328 boards and four AA batteries connected to the regulated input, this is connected to a DHT22 temperature and humidity sensor which is suspended from the top of the stevenson screen so that it is positioned roughly in the middle.
Below are some pictures of it coming together and there is also a timelapse video here of one of the sections being printed.



PIR housing

One other related item that I’ve printed is this nice compact housing for the cheap BIS0001 based PIR motion sensors. I got this one from Thingiverse here and there are two versions available, one with square edges and one more rounded, I’ve used the rounded one.