Search This Blog

Saturday 27 May 2017

Steampunk alarm case

The mad scientist in me could not resist creating a steampunk inspired case for the alarm receiver that goes with my driveway alarm.

The workings are based on a NodeMCU with some LEDs and a passive buzzer. It flashes and beeps in the event that anyone triggers the IR beams across the driveway.

The case is made from odd scraps of sapele or similar timber I had in the shed and a 3D printed insert.

It's adorned with some watch cogs and gears, some tiny glass bottles, some brass bar, and copper wire.

Making sure the capacitive switches work with the copper wire

The components to fit in

The aerial end of the NodeMCU is deliberately inside the plastic dome to minimise the wireless absorption that it might have had from the timber.

Lemmy, helping, again :-)

The copper wire is connected to two capacitive touch switches.

Solder a connector on to the touch pad

I've used off the shelf capacitive switches from e-bay, as usual.

The large coil acknowledges the alarm and resets the LED's and the small staple like wires silences the alarm for a few minutes as well as resetting the LED's.

The bottles are filled with two part epoxy resin that I coloured with a few drops of acrylic paint at the mixing stage. I made a paper tube to avoid getting the resin on the rim of the tiny bottles.


Sunday 14 May 2017

FreeCAD 3D modelling

Today I came across a 3D modelling tool I had not tried before. FreeCAD.

It's for parametric modelling. That's where you can change the parameters of the shapes using formulae in addition to graphically manipulating primitive shapes. This is different to the tools I have used in the past, like Blender, where you create all shapes from polygon faces, usually triangles or quads.

Each type of tool has it's advantages but for engineering modelling, which I'm doing more of at the moment for 3D printing, the parametric tools look to be very well suited.

So far all I have used FreeCAD for was to convert STP or STEP files in to STL files which I could then import in the Blender.

FreeCAD worked very well for the short time I used it. At some point I might have a go at making models in FreeCAD.


NodeMCU 3D models
I used FreeCAD to convert some STEP files that I downloaded from GrabCAD.

NodeMCU v0.9

I want these to help size models of cases to fit NodeMCU's in to.
Although I only have NodeMCUs in the version 1.0 style, I took the opportunity to convert a version 0.9 model as well.

NodeMCU v1.0

NodeMCU version 1.0 thanks to Francisco Castells available from GrabCAD in STEP format
NodeMCU version 0.9 thanks to henrik available from GrabCAD in STEP format
NodeMCU version 1.0 in STL format converted from the above by myself
NodeMCU version 0.9 in STL format converted from the above by myself
NodeMCUs both versions 1.0 and 0.9 in Blend format imported and adjusted by myself
Licence for the above (non-commercial use only)


FreeCAD is OpenSource.


Friday 12 May 2017


Shelley has turned a shady neglected corner in to a lovely courtyard.

All in a day, including a trip in Fender to collect the gravel.

It needed some chairs and a table that would not sink in to the gravel.

I made these from some old scaffold boards that Shelley had recently been given.

I also added a planter from some of the off cuts.

Driveway alarm

Over a couple of days Shelley and I fitted the driveway alarm beams and the NodeMCU based transmitter.

I wanted something like a baby monitor for the cars. If anyone approaches or tries to remove a car, we get notified. Most alarm systems are expensive and tend to use GSM signals to send notifications to mobile phones. We don't have any mobile coverage at home so I wanted something that uses WiFi and the Internet. I could not find anything off the shelf, hence why I've built this.

I'm using Pushover to send push notifications to an app running on our phones. I also have a receiver for use in the house. That's still on a breadboard while I design a housing for it.

The design is fairly simple. If the normally closed switch, on the alarm sensor, is open the NodeMCU sends a push notification to mobile phones and sends network messages to any receivers on the network. There's handshaking at startup to notify all the receivers so they can monitor for tampering.

To protect the driveway I've opted for IR beams. I bought a pair of 100m range beams from ebay that accept a big range of input voltages. Anywhere between about 11Volts and 24Volts. I had a handy 12V adapter. I'm using an OKI-78SR voltage regulator. The OKI-78SR-5/1.5-W36-C I selected accepts any input voltage between 7V and 36V and drops it down to 5V which I then connect to the Vin on the NodeMCU. That way the one 12V adapter powers both the IR beams and the NodeMCU.

Both ends need power so we had to dig a trench across the drive and lay a cable. I used exterior mains cable to reduce the voltage loss. I only need two wires because my code deals with detecting tampering.

As the power is low voltage we only dug a shallow trench. One cat deep by one cat wide :-)

It was hard going as confirmed by my mattock!

I did manage to straighten it.

The wooden shuttering in the photo's is to protect the cables from the bites of horses.

The beams need to be aligned for them to work. It was easy when I tried it in the study but it was a bit fiddly in the driveway.

There's supposed to be a way to do it with a built in periscope type device but I could not work out how to use that so I did it by eye. There's a level light that gets brighter as the beams get near to alignment. You can use a voltmeter to get a more accurate setup but it works well enough without going to that degree.

I soldered the NodeMCU to a small piece of stripboard. 13x15 holes. With hindsight I should have aligned the NodeMCU to one side and used jumper wires for the LED. That would have made the voltage regulator fit better. Despite that, my layout does fit in the housing of the beam receiver, so it's OK as it is.

I used some hot glue to hold the fly leads securely under the nodeMCU. I connected the 12V socket outside the IR beam housing to minimise the wires inside. That gave me just enough space for my NodeMCU board.

All connected up, that's it.

Now every time anyone crosses the beams we get notified.


Bill of materials
Trigger end:
- NodeMCU (US$3.50 from China, £8.50 from the UK)
- LED (optional, about £1 for lots)
- Stripboard (£1.50 for a bit larger than needed)
- IR beam alarm (£26 from ebay)
- Cable to connect between the beam ends (£30 for 50m from ebay)
- 5V voltage regulator OKI-78SR-5/1.5-W36-C (£3 from RS Components)

Receiver end (optional):
- NodeMCU (US$3.50 from China, £8.50 from the UK)
- Red LED
- Green LED
- Passive buzzer module (£3 from the UK or less from China)


Alarm trigger and receiver code (zip, Arduino C)