“Come and hack the dinosaurs ..."

(What happened after #BlackgangPi 1)

Lucy Hatching .jpgIMG_4217.jpg

 

I (@DrLucyRogers) brought together a group of hackers / makers / electronic engineers and computer experts to help Blackgang Chine, a Theme Park on the Isle of Wight take control of their animatronic dinosaurs.

 

Currently the dinosaurs run a pre-programmed sequence of events – roar, tail wag, neck movement etc. However, the Park would like to change the order and duration of each event.

 

One of Blackgang’s staff, Mark Butler, Technical Projects coordinator, had already adapted one of the dinosaur controllers to work with a Raspberry Pi. The Pi has the advantages that the Blackgang staff can alter the programs to suite their needs, and also the component is relatively inexpensive.  If something goes wrong, the Pi or SD card can be easily swapped out, making any dinosaur down time as short as possible. However, most Blackgang staff members had not had any experience with programming or Pi’s.

 

So I invited some Pi experts, some people who hack things for fun and some people with an open and technically curious mind for a couple of days of “hacking dinosaurs” - and also to help train Blackgang staff members.

IMG_4197.jpgIMG_4190.jpg

 

The results were amazing.

 

With the help of Neil Ford (@neilcford), a Raspberry Jambasador, and IBM’s Andy Stanford-Clark (@andysc) within an hour everyone was programming the Pi’s using Node-RED – a “drag and build” method of programming.

 

This started with the simple switches and lighting LED’s I described in my previous blog and then moved on to whatever interested those involved.

 

Will, a web developer at We3Create used the switch to change from one web site to another, and then to control the movement of an animated mouse across the screen.

 

Tom, a programming expert, got the Pi sending tweets on Twitter and playing sound files.

 

James Macfarlane (@RocketEngines), an electronics engineer at Airborne Engineering Ltd., spent the first day reverse-engineering the control electronics already in use.

 

The Blackgang Chine staff, along with @andysc, focused on what they’d like the dinosaur to do.

 

By the end of day one, everyone was confident they could use a Raspberry Pi to make an input device, such as a switch or IR sensor, control an output device, such as a motor, light, sound or a website. Those who had previously only used software were very impressed at how simple it is to control external hardware - and those with the hardware knowledge, how simple it is to program! However, the dinosaurs had not yet been touched …

 

IMG_4229.jpgIMG_4194.jpgIMG_4241.jpg

Blackgang had brought two of their “smaller” dinosaurs inside for us to play with – a Tyrannosaurus Rex and a Velociraptor.

 

By looking at the data sheets for the existing driver integrated circuits in the dinosaur control system, James Macfarlane discovered that they could be controlled using 3.3V logic. This allowed the interface with the Raspberry Pi’s to be simplified considerably.

 

He also added some circuitry to convert the 12V output of the dinosaurs’ infra red motion sensor – which detects people – to the 3.3V input level needed by the Pi. This was all mounted on Sugru feet.

 

The Blackgang team, under the tutelage of @andysc wrote an application on the Pi to trigger the different motors and the roar sound file when an input was received from the motion sensor. Andy said “I was very proud to take this group of non-programmers, and watch them choreograph a sequence of operations using the pre-existing building blocks in Node-RED.” He admitted that getting the LED’s to come on and off had been quite trivial, and the group quickly took to Node-RED, rearranging the flow, adding trigger nodes and delays to get an integrated application. The only coding they required was the development of some “random” code to randomise the movements – so the dinosaur would move differently each time the sensor was triggered.

 

So with the hardware ready and the software written, it was time to put the two together.

IMG_4254.jpgIMG_4230.jpgIMG_4273.jpg

The grins when everything worked as planned was a delight to see.

 

Debbie Davies from Meaningful Makings made a great four minute video of the event. It shows the fun we had!

 

 

The fun did not stop at the event ...


The “random” program that the team required has been developed into a Node-RED node by Dave CJ (@ceejay) - and available here. This means whenever a random output is required, anyone, anywhere in the world, can use the node rather than programming it for themselves.

 

Paul Davies, a computer game programmer has adapted a 3D CGI dinosaur  for when we don’t have a real dinosaur to play with.

 

I have made a cardboard dinosaur, complete with LED’s which I can use to test any changes I make to my Node-RED program.

IMG_4484.jpgIMG_4496.jpgIMG_4495.jpg

I’m looking forward to visiting the Chinese manufacturer of the animatronic dinosaur and explaining how we used Raspberry Pi’s in their control boxes. The trip will take place in early December, when I am also hoping to meet up with other Pi enthusiasts and see the cool things they’ve got up to with it.

 

Watch this space for a blog post about it.

 

Connecting Pi to my laptop:

Farnell Number

Description

2431427

Pi B+ & SD card

2426744

Clear Enclosure

1734943

Ethernet Cable 1m

2254792

PSU

 

 

Extra Parts needed to connect Pi to external monitor:

Farnell Number

Description

2113608

HDMI Lead

2113614

Keyboard

2113622

Mouse

 

 

Electronics:

Farnell NumberDescription

1472846

Bread Board

2112098

LED Yellow

2112106LED Red

2112013

12V supply

9564993

Diode

2101808

BC337 Transistor

9342389

Resistor Kit

2128120

Toggle Switch