Category Archives: Electronics

A model train set in a suitcase – a seemingly never ending project

Over the past two years I’ve been working on my largest and most complicated electronics project yet.  My work on the project has ebbed and flowed, but it’s mostly finished.  So I thought I’d start writing up some notes on it.

The initial inspiration was seeing Jeff Faust’s Arduino controlled z-scale train set. I’d been toying with the idea of getting a train set even since my first child was born, but space was very much a premium in the house. So z-scale appealed greatly. It didn’t take much of a leap to then consider putting the train set inside a suitcase, so it’d be easy to store. So after saving up for a little bit, I picked up a Marklin z-scale starter set. I also picked up a turnout, a decoupler and a bit more track, so there was a little bit more interest to the layout.

Seeing what the z-scale layout looks like in suitcase with scenery mostly done

Although, it’s not finished, I wanted to get some of this written up now. If I wait till it’s actually finished it may be a long time. Hopefully I’ll go into more detail on a few bits at a later date as well. From an electronics point of view there are quite a few “modules” that would justify individual blog posts. For now I’m just going to provide an overview of my progress to date.

Continue reading

A couple of ATtiny projects (ARC reactor + lighthouse)

Here are a couple of the other ATtiny projects I’ve worked on.  Only now just writing them up.  They are both pretty simple.

The first was an Iron Man style “ARC reactor” (the circle light in his chest) that I made to go with my son’s (shop bought) Iron Man costume.  It was just three blue LEDs covered in translucent Fimo, that light up in sequence, stay lit for a few seconds, then shut off in sequence.

Arc reactor on Iron Man costume

Continue reading

Re-configuring the HC-06 (cheap) bluetooth serial module

I picked up a cheap bluetooth serial (rs232) module from Amazon. As it didn’t cost too much, I thought I’d take a chance. The module arrived fine, though (unsurprisingly) without any documentation. Initially I’d tried following the documentation for configuring a HC-05 module, but after I while I realised it was actually a HC-06 module. The HC-06 is very similar to the HC-05, but (crucially) initially runs at a different baud rate (9600bps instead of 38400bps). Luckily I found some good instructions for configuring the HC-06 serial module elsewhere. I’m going to recap what I did to get the module working with my (OS X) laptop and a USB serial adapter. Initially I just connected the pins from the bluetooth module to the USB serial adapter directly. Although this meant that the power/ground pins lined up it also meant that the rx/tx (receive/transmit) pins also lined up – which we don’t actually want. We actually want the rx pin on the serial adapter to go to the tx pin on the bluetooth adapter (and vice-versa). This is because it’s not simply passing through the signals – instead we’re transmitting from the serial and receiving on the bluetooth adapter. This also means that we have to make sure the baud rates of both adapters match. You can see the pinouts of the bluetooth (top) and serial (bottom) adapters here: USB Bluetooth module (HC-06) and USB serial adapter I used a breadboard and some jumper wires so I could have rx and tx swapped over: Configuring HC-06 bluetooth module with USB serial adapter connected to laptop
Continue reading

Making a musical Robot Santa ornament using an ATtiny 85

William tests robot santa

In what is threatening to become a tradition, I made a Christmas ornament again this year. Last year I just made simple tree ornaments using sculpey and fimo.

This year things got a bit more involved, as I decided to make a musical model of the Robot Santa from Futurama. It was a good thing I started working on it in November, as it took quite a few evenings to get it all finished.

Continue reading

Arduino powered, temperature sensing, RGB LED nightlight

About a year ago I started on a project to make a temperature controlled nightlight. I was inspired by seeing these lovely LED lamps styled as mushrooms growing out of pieces of wood. Those mushrooms were made out of glass, which was somewhat beyond my skills. However I then saw some had used translucent sculpey to make mushroom nightlights on instructables. So with that discovery it seemed like it would be rather simple to do…

The first job was to solder up a three colour (RGB) LED (a super bright one from oomlout):


Wires + RGB LED ready for coating in Fimo

I then covered the LED in translucent Fimo:


RGB LED and wires covered in Fimo

Continue reading

DIY Canon G10 Camera Remote

I quite enjoy some casual macro photography and am always taking pictures of various projects (which are usually on the smaller scale). For those types of photos you ideally need good light and a steady hand. When you don’t have good light then a tripod helps a lot, but a remote camera trigger is also useful. The main reason is so that you don’t shake the camera body when you press the shutter button.

After seeing a DIY guide to making a remote I thought I’d have a go at making my own. Most of the remotes I’d seen cost about £40. The parts I used to make my remote were only about £10. Of course it helped I already had a soldering iron etc…

The circuit is really simple, it just involves soldering a couple of push button switches to a 2.5mm stereo socket. Both switches connect to ground (the outer part of the socket). Each switch then connects to the other “side” of the socket.


Inside view of simple camera remote Inside view of simple camera remote

Continue reading

Blinking Halloween Spider Eyes Hats using PICAXE 08m chips

For some reason I got seized by the idea of creating some electronics for our Halloween costumes this year. In previous years I have gone as far as dying my hair green for Halloween, but that is just an evening’s work. This year we were having a more sedate affair – it being our first Halloween as parents.

We settled on making spider costumes. Basically black clothing, with extra arms made out of tights. I then decided that as spiders have eight eyes that making some hats with six extra eyes would make sense. After initially thinking I would just hook up some LEDs straight to a battery I decided to massively complicate matters by and try to make them blink periodically (at random).

So for this act of over-complication I chose to use the PICAXE 08m microprocessor. The core circuit (minus ability to program) is essentially just 3AA batteries, the chip itself and two resistors – so at least for a circuit involving a microprocessor wasn’t that byzantine. That is kind of the point of a microprocessor though. To the end-user it hides it’s internal complexity away. I don’t really need to know how many hundreds or thousands of transistors it contains internally. I only need to think about how it fits into my circuit.

I chose to have six LEDs to create pairs of “eyes” that would blink in tandem. This meant the PICAXE chip would turn three output pins on and off at random intervals. With a 4.5V power supply two LEDs wouldn’t need a massive current limiting resistor – 100Ohm would be sufficient. So the circuit consists of the 08m chip, two resistors (10KOhm and 22KOhm) to pull-down the serial-in pin, a 100nF capacitor to even the power supply, six LEDs and three 100Ohm current limiting resistors:

It’s not actually that complex a circuit, but spending several hours soldering it up (twice) for a couple of hours at a party might have been overkill. Still it was good practice. I also got to try out fitting everything into some project boxes and generally making things look “proper”.


Underside of circuit

Finished soldering the LED eyes

Making sure it all fits in project box

I used perfboard for the finished circuit, with some holes enlarged to accept screws for the project box. I also added some extra holes so I could loop the power and LED wires through. This helped to make the connections nice and sturdy.

The chips were programmed using a different circuit, with the serial adapter attached and were then removed from their sockets and inserted into the soldered circuits. The two hats had slightly different programs uploaded to tweak the speed and random nature of the blinking (so they wouldn’t be too similar). The code is viewable at my picaxe08m repository on github (as well as a Fritzing file for the circuit). I did encounter a bug in the PICAXE compiler whilst writing this code. When I started using subroutines (and the gosub call) MacAXEPad would suddenly say “Hardware not found” when attempting to upload. Apparently this problem only affects the Mac version of AXEPad. Luckily there was an easy fix – simply adding a dummy sub-routine at the end of the file:

interrupt: return


The Eye Hat

The finished result looked a bit goofy, but it did work. The main problem though was that it only really worked when the light was low. Not a bad problem for halloween I guess: