Back in April, I wrote about how we build a job lot of Gertboard Experimenter Kits for the Design West exhibition and conference. In case you are interested in building the Experimenter Kit, I've put together this tutorial to help.





The idea of the Experimenter Kit is that it expands the hardware on the Gertboard by giving young engineers a digitally controlled linear actuator, which responds to actions from a slider via software running on the Raspberry Pi. The setup is designed to be a basic version of a real life control system that you might find in an industrial environment. The software is largely based on the test programs written for the Gertboard and hence building this project helps you to learn about the Gertboard itself. Since this was built for an exhibition we added a nice laser cut box for the assembly to sit on, but of course you could just grab the components and wire them together. Building the kit is part of the fun, so I'd suggest having a go! If you are teaching a class, this is definitely a group project, as even though the setup is fairly simple, it would take one person quite a while...


I've included the actual CAD files for the box and I would encourage you to head to your local Hackerspace and get familiar with the laser cutter (the heroes at the Leeds Hackspace were very patient in helping me and my brother set up the cutter).


What you need


Raspberry Pi

SD card with Raspbian OS

Linear Actuator

Replacement Motors

Long Throw MicroswitchesLong Throw Microswitches

9V Battery

Battery Holder

PVC Tubing

Wire (the Gertboard comes with straps, but you may need extra to wire up the motor)

Slide Potentiometer

Nylon Standoff Spacers

3 mm & 5 mm bolts, washers & nuts

3 mm ply (I used 3.6 mm since that was all I could find at short notice. Most good hobby shops sell 3 mm birch ply which is of a good quality and doesn't tend to have so many knots)




As an initial wiring setup you can follow this diagram, though please refer to Gert's user manual as different programs will require different wiring.



Drawing the Box Template

You are more than welcome to use my drawings and improve upon or modify them as much as you want. I used Adobe Illustrator for the design, which was the only program I had access to which had the required accuracy.

I spent a lot of time getting the exact measurements from various datasheets for the footprint of components such as the slider and therefore they fit fairly precisely. However, we did need the occasional woodscrew in places. If you swap out components then you'll need to revise the design, but this might be a good chance to do a little bit of CAD!


You may have to change the size of the ramparts so that they match the thickness of the wood (or acrylic) you are using so that the pieces fit flush together. You can grab a free trial of Adobe Illustrator or use a free program such as Inkscape to edit the drawing.

If you want to just use my files, then you can find them in the attached .zip file:


Laser Cutter Considerations

Some aspects of the box, such as labelling and logos are designed to be engraved rather than cut. In this mode, the laser will "scan" the surface much like a printer, engraving in a very precise way. However, this takes a significant amount of time, so depending on the required accuracy it can sometimes be better just to cut at a lower power. If you are building a one-off then a 30 minute wait isn't too bad, but otherwise it is worth thinking about this before you start. Another consideration is which way to orientate the wood in the cutter, so as to minimise the distance the laser travels on each run.


The early prototypes of the Experimenter Kit were designed to be cut on the HPC Laser LS-3020 which has a roughly A4 size cutting area. Depending on the size of the cutter you are using, you will need to spin the drawing around or separate it into different sections. The HPC used a proprietary piece of CAD software which required .dwg files. Exporting from Illustrator into this format loses the information about line thickness, so we had to reselect the areas to be cut or scanned. You can find information on the laser power and cutting speed here on the Leeds Hackspace Wiki. Later versions of the Kit were manufactured using the Epilog Helix 24 Laser Engraver at Fab Lab Airedale. Other than the larger cutting area (and its Terminator-esque 40 W range), the Epilog handily reads from a .pdf file so you are less limited by your CAD software. Simply changing the colour of the lines in the .pdf helps the laser cutter to identify which areas are to be scanned or cut.


Depending on the make, model and age of your cutter, a little trial and error is necessary, though here are some suggested settings from the Leeds Hackspace. Don't simply decrease the speed of the laser if it is not cutting as it tends to set fire to the wood which ranges from looking unsightly to being a serious fire hazard. Never leave the laser cutter unattended either for this reason.


N.B. If the cutter seems to be getting worse and worse at cutting, it is likely that the smoke from the wood has started to build up a residue on the mirror which reflects the laser beam downwards. This can be cleaned with a specialist solvent. Ask for help!


Here's one of our early versions being laser cut. Notice how we haven't quite got the power and speed right yet, as the "14" of element14 is pretty charred!






Once you have managed to laser cut a baseboard for the kit, it should be fairly self-explanatory how the pieces fit together. I designed the box so that it could be slotted together simply and then glued, rather than a solution that held itself together naturally. This was because the kits had to travel across the Atlantic and then survive the classes. However, once you have the box assembled, attach the Raspberry Pi, using the 3 mm bolts, washers and nuts. It only really needs one central bolt to keep it in place as the next thing to do is attach the Gertboard, which stands up on nylon spacers. It should line up with the holes in the wood!


Now you need to modify the motor which drives the linear actuator. The motor which comes as standard drives the plastic actuator far too quickly and won't be very forgiving if your code is wrong! What you need to do instead is cut the shaft to free the motor and then attach the replacement, which is a geared motor and moves much more slowly, but with higher torque.


Be careful when you cut the shaft from the motor, as it can be pretty tough. Use a hacksaw (we used an angle grinder!). The best way to attach the new motor to the shaft is to use a short length of PVC pipe (or similar) and dab of superglue. Don't worry if it doesn't look totally aligned, the pipe will allow for some flexibility and the frame of the actuator will hold it steady. Before you reassemble the actuator, allow the glue to dry and then drill two new holes in the aluminium frame to line up with the bolt holes of the motor (roughly diagonally opposite each other).See the before and after pics below:




Next, attach the battery holder. Before going any further, solder as much of the hardware together as possible as shown in the diagram above without, for example, bolting down the switches. By doing this, you don't then have to fiddle about with a soldering iron in a tight space. If you need some tips on soldering, then Gert has made a video here which you can glean some tips from.


Once you have the microswitches wired up, bolt them in place and make the final connections to the Gertboard, motor and battery.


Finally, wire in the slider as shown in the diagram. Here it is best to solder the wires to the legs of the slider first and then thread them through the wood, pulling the wires back through the extra holes before attaching them to the Gertboard.

Test Software


Since the original kit was intended to be part of an interactive lesson, Gert put together a course document which provides "question" software and complete "answer" software which I've included in the attached file. However, you can also download the software for the Gertboard "as is" here.


His code allows you to program the motor, take readings from the position of the slider through the ADC and control the system in this way.


Connect up your Raspberry Pi to a monitor, Ethernet, mouse and keyboard and then power it up. You should be able to tidy the wires away into the holes which are positioned carefully on the box and feed them out the back of the kit to make the workspace a bit neater. Once your Pi has booted up, transfer the files to it. You could do this a couple of ways, but via a computer and an SSH connection is probably the easiest in this case. Once you have done this, run the examples as executables and open them up in an editor so that you can view the code at the same time. You can do this either from the desktop or from the command line.


The next step is to explore the demo code and attempt to fix the "questions"! Good luck.