Driving a Relay using #RaspberryPi GPIO

Great tutorial/article about controlling a relay from the Pi. It’s quite an old post (from June 2012) but it does mean that there are loads of comments at the bottom of the post with more information. If you’re interesting in controlling mains voltage from the Pi, have a read!

Raspberry Pi – Driving a Relay using GPIO | SusaNET.

ModMyPi Case for #RaspberryPi – Review


Supplier: ModMyPi
Price: £2.99 – £5.99 (plus delivery)

Rating: 6/10

Another case review. This is for the widely-available ModMyPi case. I purchased two of these cases for £2.99 each. They were ‘GAMBLE Mix N Match‘ cases which means I did not know when I ordered what colours I would get.

As it turns out, I received blue and red top halves and black and white bottom halves, which I was pleased with. There were slight differences between the two bottom halves – one had holes for the mount points on Rev 2 Pis, the other didn’t.

These are well-made cases using good-quality plastic. I have no doubt that they provide good protection for the Pi.

Below is a picture of my Blue-White combo case. Please ignore the flaky white stuff (this is polymorph which I was using to make something else and it stuck to the case).


Here’s the Pi inside the bottom half of the case.

When placing the Pi inside the bottom half of the case, I noticed that it wasn’t a tight fit and I was hoping that the top half of the case would have kept the Pi solidly in place. However, the top doesn’t contain anything to do this and as a result the Pi does move around a fair amount (about 2mm) when shaken. This is disappointing as it means that the Pi could possibly become damaged in transit.

The external ports of the Pi are all easily available and I had no problem connecting all my peripherals to it.

In terms of accessing the GPIO pins, the makers of the case provide a ‘cut-out’ area above the pins. This requires cutting out some plastic ‘struts’ (as seen in the top picture above). I had to use a Dremel rotary cutter to do it properly (see my efforts below) but, because the slot is close to the side of the case, it’s difficult to do the job neatly. As you can see, my cutting job wasn’t the cleanest.


Getting the ribbon cable out of the case is difficult if you don’t cut out enough of the slot and, in fact,  the area given to you to cut-out isn’t big enough. Lots of trial and errors required here. I would have been a lot happier if the slot had been covered by an easily-removable piece of plastic rather than something that needs a specialist tool to cut out!

Overall, these are good cases if you want something cheap and don’t mind taking the lucky dip of the GAMBLE. I wouldn’t pay £6 for one for two reasons: The loose-fitting of the Pi inside and the GPIO slot. It’s a pity as the build quality of the product is very strong.

Update: Later versions of the cases (such as those now on sale at ModMyPi) have push-out sections for the GPIO and are apparently a slightly better fit. So, say 8/10 with those modifications.

SB Components #RaspberryPi case review

Supplier: SB Components (via eBay)
Date of purchase: 4th January 2013
Price: £4.79 (inc VAT & postage)
Delivery: 9th January 2013

Rating: 9/10

I spotted this post on the Raspberry Pi Foundation forum and thought I’d take a look at this case from SB Components. They come in a variety of colours: black, clear, blue, pink, red, dark blue and yellow. I went for the dark blue as it looked the most stylish. Delivery was quick – it arrived this morning in a grey Royal Mail packet inside both a box and a plastic bag. Here’s the unboxing:


The case, once unwrapped, feels quite sturdy and the dark blue is an attractive colour. All the ports are labelled in the plastic on top of the case. Importantly, there is a generous cut-out for the GPIO pins as well as for the CSI and DSI connectors and JTAG headers. On the backside of the case, there are some generous cut-out strips for ventilation and two cross-shaped mounting points.

I took these photos after I’d prised the two halves apart. I was a little concerned about breaking the case while doing this but I needn’t have worried. Once opened, the quality of the case continues.

P1360155 P1360154

Now it was time to put the Pi in the case. I knew straight away that it was going to be a snug fit and I wasn’t wrong. In fact, as pictured, you can hold the Pi upside down without it falling out. This is an improvement over the ModMyPi case, for example, that requires you to screw it to the case.



Putting the top of the case on was a matter of lining the edges up. It took a little while to do this as it is an extremely snug fit.


The slot for the SD card is also a tight fit and for a while I didn’t think it would fit, but it did. In fact, because of the way the plastic goes all around the slot, the card is solidly supported.

I had read that some of the sockets were too small on earlier versions but that wasn’t a problem for me (see below – I also tested the HDMI cable and that was okay too). The only minor quibble I have is with the light pipes as the light tends to blend together. This is very minor though and the lights are different colours so it’s not a huge thing that needs fixing.

P1360165 P1360167

Overall, this is a fantastic case for the price. The build quality is top-notch and has very tight dimension tolerances which, in layman’s terms means that it doesn’t rattle when you shake. The accessibility to all the ports and pins on the Pi is outstanding. I have rated this case 9/10 simply because, as per usual, the SD card isn’t completely protected.