Chinese New Year
Traditions vary, but a reunion dinner, red coloured decorations and firecrackers are all high on the Chinese New Year celebrations list.
While dinner and decorations are available globally, firecrackers cause thousands of injuries every year and have therefore been banned in many countries, including the UK.
I asked if they would be interested in some "safe" firecrackers - made out of, say, some strobe lights, speakers, a smoke machine and garage door remote control? All controlled using Node-Red on a RaspberryPi ?
I think they were as keen as I was to see the results, and invited me to install them ready for a "celebration" in April.
I have made a video about some of the making and installation (below and here) - this blog covers some of the behind the scenes of the making.
The idea was simple enough ...
Which then got a little more detailed ...
And more detailed still ...
As the strobe lights were 240V, and the fog machine ran off a 12V battery, I knew I needed something else to connect them to the Raspberry Pi. Fortunately, I had something I made earlier - the Thingatron (See the blog here). It's actually an Open Collector Driver, but I have nicknamed my boards Thingatrons.
Nude Thingatrons - direct from Ragworm
Batch assembly - Quality Control caught this one
These connectors remind me of Monopoly houses.
A "flock" of Thingatrons? A "swarm" ?
The Thingatrons were ideal for the outputs. The inputs also needed something to connect them to the Pi. Despite my initial thoughts, the PIR's or motion sensors, I got were actually 12V, not 240V.
I used an Opto-Isolator board which I made. This allows the PIR's to trigger the Pi, and even if there is a fault on the PIR's they won't fry the Pi.
As the Firecrackers would need to be installed outside, the control system had to be in a waterproof box, with waterproof sockets etc. I decided to use a DIN rail mount inside the box, as this makes the wiring simpler. I laid out the parts for the box - when I did this the amplifier and the garage door remote receiver were still to arrive, so I made paper cutouts. The white cable plugged into the Raspberry Pi is a USB Audio Adaptor. Although the sound from the Pi's audio jackplug is OK, I needed something that was a higher quality - the audio adaptor does this.
The film crew arrived when I was about at this stage! This involved tidying the workshop and even cleaning my fingernails
From moving the bits around, I could decide where things would go in the box, and drill appropriate holes. This is the bit I still find most scary. What if I measure the hole centres wrong? What if I drill too big a hole? Although I know these problems can be overcome, they still give me angst!
I put ferrules on the ends of most of my wires - this made wiring the sockets easier, and also allowed me to take things out and re-wire them without damaging the individual copper strands.
Wiring the control box proved fun. This is my first attempt at a wiring diagram ...
It did get a bit neater ...
The ferrules and DIN rail made wiring a lot simpler and neater!
On the far right is the circuit breaker - the same sort of thing that is in a house fuse box. The black boxes with orange switches are relays - the Pi controls the Thingatrons which controls the relays, which allow mains electricity to flow to the Strobes and the power adaptor for the fog machine. To the left of the relays is the 12V PSU - it does the same job as a "soap on a rope" 12V PSU, but is DIN rail mounted. The item at the top above the Thingatrons is the innards of the garage door remote control receiver. the black crosses are where I need holes drilled to secure the amplifier and its power supply,
The Raspberry Pi GPIO pins are not yet connected in this photo. The green ethernet cable connected to the Pi allows a computer to be connected to the Pi without opening the box.
I kept everything as modular and accessible as possible. I want the staff at Robin Hill to be able to fix any problems without having to call me back in!
The fog machine needed adapting - I hard wired it "on", rather than having to push a button, and connected it permanently to a 12V supply. This supply is controlled by the relay.
I also had to adapt it to fit in its own waterproof box, including welding an extended nozzle to the front so the box wouldn't fill with smoke.
I used NodeRed to program the Pi. Here I had a small speaker and some LED's connected to the Pi to simulate the whole kit.
I did a quick test ...
Then packed everything up ready for transporting to the Isle of Wight!
The video shows some more of the making plus the installation. The Firecrackers2 blog will describe some of the fixes that were needed before I could finally hand over the Firecrackers to Robin Hill. Thanks to James Macfarlane for the help with the electronics and to Andy Stanford-Clark for his assistance with NodeRED.
The smoke machine, strobe lights, PIR's and speakers were bought form the Internet. The rest was from Farnell and CPC: