Chinese New Year

 

IMG_7142_1024_2.jpg

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.

 

Robin Hill Country Park on the Isle of Wight hold a "Spirit of the Orient" -  a stunning spectacle of Oriental themed light, sound and colour to mark the Chinese New Year.

 

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 ...

Initial Idea.jpeg

Some Bits.jpeg

 

Which then got a little more detailed ...

More Detailed1.jpeg

 

And more detailed still ...

More Detailed2.jpeg

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.jpg

Nude Thingatrons - direct from Ragworm

Quality Control.jpg

Batch assembly - Quality Control caught this one

Monopoly Houses.jpg

These connectors remind me of Monopoly houses.

 

Thingatrons.jpg

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.

 

OptoIsolator.jpg

 

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

 

Filming1.jpg

 

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!

DinRail.jpgHoles.jpeg

 

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.

Ferules.jpg

 

Wiring the control box proved fun. This is my first attempt at a wiring diagram ...

 

More Detailed3.jpeg

 

It did get a bit neater ...

More Detailed4.jpeg

 

The ferrules and DIN rail made wiring a lot simpler and neater!

Wiring1.jpg

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,

 

Wiring3.jpg

 

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!

 

Bottom of box.jpg

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.

Hardwire Fogger.jpg

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.

Fogger Feet.jpgFogger Nozzle.jpgFogger in Box.jpg

 

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.

Testing Nodered.jpg

 

I did a quick test ...

 

 

Then packed everything up ready for transporting to the Isle of Wight!

Boxed.jpg

 

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:

 

 

                                                                                                                                                                                                                                                                                                                                                                                                                     

Farnell   NumberDescriptionLink
103727Accessory Type:DIN Rail Mount; For Use With:DIN Rail   Terminals; Length:500mm;http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=103727
1635222TRACOPOWER-TBL 030-112-AC/DC, 12V/2.5A/30W, DINhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1635222
1122451Connector Type:Circular Industrial; Series:713; Connector Body   Material:Nylon (Polyamide); Gender:Plug; Contact Gender:Pin; Connector   Mounting:Cable; Connector Shell Size:-; Inserthttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1122451
1122454For Use With:M12 Connector Type Sensors; SVHC:No SVHC   (17-Dec-2014); Accessory Type:Sensor Connector; Connector Mounting   Orientation:Panel; Connector Type:Circular Industrial; Contact   Termination:Solhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1122454
1220787AMPHENOL-RJF C2B-CAP, SQ FLANGE RECEPTACLEhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1220787
1220789Accessory Type:Gasket; For Use With:RJ Square Flange Panel;   SVHC:No SVHC (17-Dec-2014)http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1220789
1285850LAPP KABEL-1120233-CABLE, POWER, UV, 3CORE, 0.75MM, 50Mhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1285850
1286442PRO ELEC-0138-BK-SOCKET, EXTENSION, 1WAY, RUBBER, BLACKhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1286442
1333051Reel Length (Imperial):164ft; Reel Length (Metric):50m; No. of   Conductors:2; Conductor Size AWG:-; Voltage Rating:300V; No. of Max Strands x   Strand Size:24 x 0.2mm; Conductor Area CShttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1333051
1333114Reel Length (Imperial):164ft; Reel Length (Metric):50m; No. of   Conductors:3; Conductor Size AWG:-; Voltage Rating:500V; No. of Max Strands x   Strand Size:30 x 0.25mm; Conductor Areahttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1333114
1349716TE CONNECTIVITY-XT484L12-RELAY, INTERFACE, DPDT, 12VDChttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1349716
1428232AMPHENOL-RJF21RAB-RECEPTACLE, RJ45, SEALED, SQ FLANGEhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1428232
1909552PCB Support Type:Lock-In Support With Adhessive Base; PCB   Support Material:Nylon 6.6 (Polyamide 6.6); Height:6.4mm; External   Width:3.18mm; SVHC:No SVHC (17-Dec-2014); Overall Length:12.http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1909552
2290057Voltage Rating V DC:-; Voltage Rating V AC:400V; Current   Rating:10A; No. of Poles:2; Circuit Breaker Mounting:DIN Rail, Panel; Product   Range:FAZ6 Series; SVHC:No SVHC (17-Dec-2014)http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=2290057
2427499STONTRONICS-T5582DV-PSU, RASPBERRY PI, 5V, 2A, MICRO USBCountry Site Redirection - Premier Farnell
2461029RASPBERRY-PI-RASPBERRYPI-2-MODB-1GB-SBC, RASPBERRY PI 2, MODEL   B, 1GB RAMCountry Site Redirection - Premier Farnell
4109673WALTHER-215306SW-PLUG, 16A, 240V, BLACK, 2P+E WAYhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=4109673
4109685WALTHER-315306SW-SOCKET COUPLER, 240V, 16A, 2P+E WAYhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=4109685
4169426Gender:Jack; No. of Contacts:4; Connector Mounting:Cable;   Connector Body Material:Metal; Contact Plating:Silver; SVHC:No SVHC   (17-Dec-2014); Connector Colour:Grey; Contact Termination:Screw; Series:http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=4169426
4109697WALTHER-410306SW-SOCKET, PANEL MOUNT, 240V, 2P+E WAYhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=4109697
147483ENTRELEC UK  011511607  TERMINAL BLOCK, DIN RAIL, 2POS, 2AWGhttp://uk.farnell.com/entrelec-uk/011511607/terminal-block-din-rail-m4-6-22/dp/147483?CMP=SOM-e14-Blog-LRo-Firecrackers
147486ENTRELEC UK  016511316  TERMINAL BLOCK, DIN RAIL, 2POS, 10AWGhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=147486
178733ENTRELEC UK  11654112  JUMPER BAR, ALTERNATE, 10WAYhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=178733
1123643Box for Foggerhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1123643
1283804Power Lead IEC 60320 C13http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1283804
1310128NEUTRIK  NL4MD-V  SOCKET, SPEAKON, PCB, 4POLEhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1310128
1349721Relay Sockethttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1349721
1392749Fifty way headerhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1392749
1526185ethernet cablehttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1526185
1571656Relay Retaininghttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1571656
1593506Crimp Housing 2 Wayhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1593506
1593508

Crimp Housing 4 Way

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1593508
1772646Bootlace Ferrule Single entry AWG20http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1772646
1822089Bootlace Ferrule Single entry AWG16http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1822089
147498

ENTRELEC UK  011849923 DIN Rail Terminal Blocks

http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=147498
236512512V 5.4Amp PSUhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=2365125
2409850FIBOX  ARCA 405021  ENCLOSURE, CABINET, POLYCARBONATE, GREYhttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=2409850
9733272Crimp Inserthttp://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=9733272
CPCRemote Control Switch / receiverhttp://cpc.farnell.com/velleman-kit/vm130/2-ch-rf-remote-control-set/dp/RF00273?CMP=SOM-e14-Blog-LRo-Firecrackers
CPCFog Fluidhttp://cpc.farnell.com/pulse/pfx-mediumfog/fog-fluid-medium-5ltr/dp/DP33568?CMP=SOM-e14-Blog-LRo-Firecrackers
CPCAmplifierhttp://cpc.farnell.com/pulse/sda40/stereo-amplifier-compact-2x-20w/dp/AV19709?CMP=SOM-e14-Blog-LRo-Firecrackers
CPC3.5mm stereo jack phono splitterhttp://cpc.farnell.com/pulse/pls00178/3-5mm-st-jack-to-2x-phono-lead/dp/AV19106?CMP=SOM-e14-Blog-LRo-Firecrackers
1123668FIBOX-EKIV 23-MOUNTING PLATE,   STEEL, TYPE 1http://grh.premierfarnell.com/pageredir.aspx?c=EU1&u=jsp/search/productListing.jsp?CMP=SOM-e14-Blog-LRo-Firecrackers%26SKUS=1123668