Skip navigation
1 2 Previous Next

Dr Lucy Rogers's Blog

16 posts



The Firecrackers (blog here and video here) that I made for Robin Hill Country Park on the Isle of Wight were good, but after I'd tried them out in real life on site, I knew there were some improvements I could make.

These included stringing the lights in one line, rather than going over the top of the path, improving the sound and increasing the amount of smoke.


Stringing the lights in one line is simple, and one I can leave to the Robin Hill staff when they next need the firecrackers. (The displays are changed regularly at the Park).


I got an improved sound file which gave a more realistic firecrackers noise.


I also simplified the NodeRED flow by taking out most of the delays and loops.


Screen Shot 2016-01-16 at 22.54.18.png


The amount of smoke produced by the hand held 12V fog machine I had used was great for indoors ...


but outside it got blown away too quickly. My next step was to adapt one of the larger mains powered fog machines used by the Park. These have to be permanently powered and the smoke output is controlled with a switch, so I could not power them through the relays. The hand held one was almost instantaneous - power on and smoke comes out.

Another thing I noticed on site was the Raspberry Pi GPIO pin that controlled the smoke machine triggered on bootup or reset of the pi - meaning I got a wash of smoke before anything else. I had thought I had worked out which pins were high on bootup, but obviously not.


After connecting LEDs to every pin and rebooting and starting the Pi from scratch, I made the following table - both Pi B+ and Pi2 gave the same results:


Pin NumberPowerupReboot

NodeRED deploy





I therefore changed the pins for some of the inputs and outputs.


I also had to de-bounce the remote control - when triggered it sent two messages. I put a "limit messages" node in to fix this.


The whole system is now ready for the Park to install at their next event - Chinese New Year.



After breaking my wrist and decorating my cast as a Buzz Lightyear Cuff using sugru and 3doodler (Blog here), I needed further surgery and a new cast.



Seems my first step is always eyes ...


But it was December. And cheerlights

were beginning to flash across my twitter stream.


A tweet controlled Christmas Tree with lights was required.


I bought an Adafruit Flora, Bluefruit and Neopixels.


I sketched the design on my cast.



I transfered the design onto carboard ...



And stuck the neopixels on with bluetak







Although the neopixels are sewable, as it was going onto a solid cast, I soldered the wires - which also made the shape of the tree and tinsel.

A lithium Ion polymer battery (3.7V 1200mAh) powered the components.



Using evostick contact adhesive, I stuck the soft and fluffy side of velcro to my cast (I thank myself for this at night!) and the prickly side to the components.


The adafruit flora coding was done by the amazing James Macfarlane and is on github here


The Bluefruit connected to my phone via bluetooth using the adafruit app Bluefruit LE.


If there is no bluetooth connection or no input for a while, the lights change randomly.


Using the UART connection, the code also allows for the UART feed to type in a colour.


By connecting the MQTT feed to the cheerlights topic from Andy Stanford-Clark's MQTT feed (mqtt:// with the topic cheerlights) the lights respond to tweets (Tweet #cheerlights and a colour).



(This works on android and iphone, but not on ipad1 and the mac app does not have the MQTT feed).


The colour picker from controller also works.









The first outing for my lights was to the Thingmonk conference




Where I and other delegates had a lot of fun!


Screen Shot 2015-12-05 at 17.26.03.png

Screen Shot 2015-12-05 at 17.29.48.png

IMG_9246.jpgI broke my wrist (being chased by animatronic dinosaurs, or something similar).


So obviously I wanted to decorate my cast ...


Although fun, the eyes were a little uncomfortable.


And I like space.


So a Buzz Lightyear cuff seemed the right thing to do ...



I used a 3doodler to do the intricate bits




And sugru for the buttons and covers





I used sellotape to mask out the buttons.



Some worked better than others.





I used the 3doodler to go round the buttons and tidy them up.



However, I needed a checkup X-Ray the following week.


All the nurses loved the decoration.


But the sugru showed up on the X-Ray.



The doctors suggested to not to use sugru on my cast in future.


And they told me I needed further surgery and would therefore have to remove the cast.


Which meant I would have another cast to decorate ...


Here's the blog on twitter controlled cheerlights cast.


Giant Test Tubes

Posted by drlucyrogers Sep 25, 2015

"Can you make an interactive variable colour bubble tube -
two foot wide and ten foot tall?"

I am not very good at saying "no" to challenges like this - especially when it's a client that asks. As with most challenges, my first step is to make a prototype.

Makerfaire Child.jpg

Here's a video of the prototype in action, plus some explanation of what went into it:



The rest of this blog shows some of the making involved.


I used 50mm External Diameter, 44mm Internal Diameter 2000mm long clear acrylic extruded tubes (from The Plastic Shop about £17+VAT each) a RGB (Red, Green Blue) Luxeon Rebel LED board* and an aquarium pump. I had a bung made to connect the pump to the tubes, and added a one way valve, bought from a pet shop.

*(If you want to get your own board made the Eagle Files are available here  - just replace the white LED's with LXML-PD01-0040 LXML-PM01-0080 and LXML-PR01-0500)


IMG_8736.jpgIMG_8740.jpg IMG_8745.jpg

The outside of the bung was polished with Autosol metal polish to make it clear. To focus the light up the tube, I used a lens (part number PL350A06NK)

The photo of the bung shows the lens attached to the bung with red sugru. The feet of the lens pass through the PCB, so it takes the weight of the tube plus water and the LED's aren't crushed.





IMG_8751.jpg IMG_8747.jpg


To make it interactive  I used an arduino and some prototype PCBs that transfer data from sensors to an arduino and from the arduino to outputs, using controller area network (CAN bus). These PCB's are part of a distributed IO system called "Touchbridge".


For the inputs I used vandal-proof (it's aimed to be used by kids!) LED backed buttons to control the lights and turn them all off, and a switch to turn the pump off.



The LED’s consume a lot of power - more than a typical LED (350mA to 700mA per LED - compared to 10-20mA of a typical LED).  A microcontroller such as an Arduino cannot output this amount without amplification - the Touchbridge PCB's allowed for this too. The LED's needed some rather large resistors (the gold things in the photo below) - the metal channel they are in acts as a heat sink.




Next I wanted to make some form of stand for the tubes - so I made a test-tube rack using a couple of planks and some staircase spindles ...

Plank for Test Tubes.jpgStaircase Spindles.jpg

I made and painted the rack. The indents in the bottom were needed to stop the tubes slipping sideways. The extra two bits of wood that I painted were stabilising feet.

Nude Rack.jpgPainted Rack.jpg


I only needed to make one prototype for the bubble tube - but I had bought four tubes. I like to make my prototypes useful in other areas, so I decided to make a game with them. My whole prototype could then be taken to Makerfaires or even the village fete.

As I had a supply of ping pong balls left over from making glowing eyes (blog here), and they fitted in the tube, I decided to use an ultra sonic range measuring sensor to control a 12V centrifugal blower (fan).  I could then balance a ping pong ball up the tube at different heights. I had to put some tape across the top of the tubes to stop the ball flying out. With two sets, the competition is to keep it in the middle - without hitting the top or bottom.


The final tube I put some Christmas Lights in - controlled by a relay. A relay also controlled the aquarium pump I used for the bubbles.


Using a relay separates the mains power from the Arduino microcontroller. I made some boxes for the relays - these and the cable glands are waterproof, as I want to be able to make an outside installation with them all later.


Box with Relay - not drilled.jpgDrilling the Relay Box .jpg

Relay Boxes Drilled.jpgRelay Box Complete.jpg


The whole system works and I am very pleased with it. I've even tried it out with real live people (at Makerfaire UK in 2013) The two foot diameter ones will need a much bigger pump, but the principles will be the same.


Below are a couple of shots of Mark the cameraman and I filming the video. The photo on the right is filming my finger pointing at things.


Kneeling to camera 2.jpgFilming Finger.jpg


Can you see a use for things like this? How would you adapt it? What would you use it for? Add a comment below - I'd love to hear your ideas.


Update 28th Sept 2015: Someone asked about the enclosures and connectors:


The enclosures were these:


The connectors are Bulgin mini buccaneer series


There's also some "normal" cable glands


If using any of these, make sure you get all the bits - lock nuts, inserts etc. Also, you can get base plates for the enclosures which makes life easier.

In parts 1 and 2 of this series of blog posts, I shared how I design PCB's using CadSoftusa's Eagle PCB Design Software.


Having the design on screen is one thing, but holding an actual PCB in my hot little hands is quite another.


Screen Shot 2015-08-17 at 14.58.23.pngPCB.jpg



Although some PCB manufacturer's will take the .brd and .sch files, most prefer the gerber files. (This is a standardised format, in a similar way that pdf's are for documents).


For my previous boards, I have followed a tutorial I randomly found online - however, this time I followed Cadsoft's tutorial on making the gerbers - copied below: (Note, following these instructions meant the silkscreen (words) didn't turn out as I expected - I have added in the tutorial (in red) how to change this.)



"Generating Gerber Data with the CAM Processor

The same steps are usually required for each board whenever films and manufacturing data are generated. This process can be defined as a CAM Processor job.

The file, which can be found in the default subdirectory for CAM jobs, automates the output of the most common Extended Gerber data for double sided boards.

Please contact your board house to confirm which data are needed.

Load the job into the CAM Processor, either by doubleclicking the entry with the name in the Control Panel's tree view (CAM Jobs), or by clicking the CAM Processor icon in the Layout Editor window and selecting in the file dialog (File/Open/Job).


In case you have started the CAM processor from the Control Panel, load the board file demo3.brd: File/Open/Board and demo3.brd

Here is where I needed to change some bits to make the silkscreen look how I wanted:

Click the Silk Screen CMP tab, then click on 25 tNames to unhighlight it, and click on 27 tValues to highlight that instead.

Screen Shot 2015-09-09 at 18.11.53.png

Click the button Process Job. Now all the necessary files will be written into the directory where the board file is located.

The files have the following meanings:


demo3.cmp    Component side

demo3.sol Solder side
demo3.plc Silkscreen for component side Soldering mask for the component side

demo3.sts Soldering mask for the solder side

demo3.gpi Information file, not relevant here


The first five files need to be sent to your board manufacturer.

Generating Drill Data

Drilling data can be generated accordingly by using the job This job consists of one single step. The EXCELLON device generates a file that contains both drill data and drill table. The output file has the file extension .drd.

This file has also to be sent to your board manufacturer.
Further information can be found on the CAM Processor help pages and in the EAGLE manual. "


It is a good idea to check the gerbers before sending them off. (I didn't). I have now downloaded cuprum, which seems to work well. (Found via an Element14 search


I have been told (by @adamgreig) that is also very good, but I need more gerber files than is given in this tutorial to make it work.


After making the gerbers I then zipped the six files and sent them to my PCB manufacturer (Ragworm) who kindly checked them (but obviously not the silkscreen - how would they have known what I wanted?)

After getting the OK, I ordered some - and a couple of weeks later they arrived ...



I quickly soldered the components on. I discovered that the phototransistor has "knobbles" on its legs and so wouldn't go through the holes. I believe this has something to do with protecting it from heat transfer from soldering. I could have made the LED stick up the same amount for symmetry.

LED vs PhotoTransistor.png


The finished board does exactly what I wanted. The LED lights up if not in direct daylight (not near a window in the house) and goes out when it is near daylight. Now to wait for Halloween!



Do let me know how you'd use an "OnWhenDark" PCB - or if you have found this tutorial helpful. Also, if there are any bits you'd like clarifying, please just leave a comment below.



In Part 1 of this series of blog posts, I explained how I got from a hand sketch of a circuit to a schematic in Eagle, CadSoftusa 's PCB Design Software.

IMG_8319.jpgScreen Shot 2015-08-17 at 14.39.30.png


This blog takes the randomly placed components onto a board, to the final layout.


Screen Shot 2015-08-24 at 12.00.46.pngScreen Shot 2015-08-17 at 14.58.23.png


This symbol Screen Shot 2015-08-24 at 14.25.10.png on the top toolbar of Eagle switches from schematic to board view. If a board has not been generated from the schematic already, it asks if you'd like to do this.


First item is to run an Electrical Rule Check (ERC) to make sure there are no electrical errors with the schematic.Screen Shot 2015-08-30 at 15.42.18.png




On the board there is a cross in the bottom right hand corner of a wire rectangle. The rectangle is the outline of the PCB, the cross the origin.


Using the arrows icon Screen Shot 2015-08-24 at 14.28.39.png move the devices (components) around on the board until you are happy with their placement. The yellow lines that join them indicate which tracks need to be laid between the components.


Right clicking when placing a component rotates it through 90 degrees.


Remember to "save all" at regular intervals.


Holding down the "alt" key changes the grid size to the "Alt" grid. You can check the grid size and Alt size by clicking View, Grid.


Screen Shot 2015-08-30 at 16.36.11.png



I have it (and I believe the default is as above) so that Alt halves the grid size, allowing you to get things closer together.


You can also make the PCB smaller by moving the wires or clicking the "info" button Screen Shot 2015-08-24 at 20.42.12.png, clicking on a wire and changing the coordinates.


Screen Shot 2015-08-24 at 20.35.28.png


You can separate the name/value from the component by using the "smash" button Screen Shot 2015-08-30 at 16.03.04.png - this allows you to move the name of the part onto the PCB in a place where it can be read if required.


PCB's are much more user-friendly if they have holes through which you can mount feet or tie a cable tie. Add a hole using Screen Shot 2015-08-24 at 20.40.12.png the "add a hole" icon.

You can either make the radius correct to start with, or you can place the hole and edit it using "info" Screen Shot 2015-08-24 at 20.42.12.png later. I use a 3mm size drill, (the grid is probably still in inches, so you may need to type the "mm" after the 3.) I could maybe have made the drill size 3.1mm to give a bit of clearance for a 3mm screw.


Screen Shot 2015-08-30 at 15.14.42.png


A hole can then be used to screw the PCB down - but you have to leave a space for the screw head. If a screw is tightened down on some tracks, it can cause them to break or short - so it is best to avoid.


You can either avoid the area manually, but there is a nifty trick in Eagle that allows it to be checked in the Design Rule Check (explained later).


Add a circle Screen Shot 2015-08-30 at 15.13.03.png then edit it using the info button.


Screen Shot 2015-08-30 at 15.15.54.png


The position should be the same as the hole position. The width needs to be zero - this tells the software that the whole area should be hatched (this is not intuitive).

Place it on the 42 bRestrict layer, and the head of a screw to fit through a 3mm hole will be about 6mm (3mm radius).


Now comes, for me, the most fun part. Joining all the tracks between the components, without crossing over and trying to get it all one sided. (Two sided boards can be made, but they are often more expensive, and also can't be easily made "at home".)


For small boards, I use the "route manually" button Screen Shot 2015-08-30 at 15.26.27.png rather than the Autorouter Screen Shot 2015-08-30 at 15.27.14.png as I can control exactly what goes where.


Click on one component to start, then join it to another component. When it has joined correctly, a little noise (low beep) is made. Take care: it is possible to make them look as though they are joined, when they have not quite connected.


"Best Practice" says that the tracks should be at 45 degrees or 90 degrees as it looks neat. However, as phil.s said in a comment to one of my previous blogs "Electrons don't much care about angles". You can change the angles the track lays by using these buttons:

Screen Shot 2015-08-30 at 15.36.36.png

Thicker tracks are more robust and less likely to "lift" than thinner ones. I have used 0.6mm wide tracks from the battery terminals and 0.4mm wide tracks everywhere else. As this circuit only draws milliamps, this is sufficient. If more current is used thicker tracks are very important.


Screen Shot 2015-08-30 at 15.41.22.png


All the tracks are on Layer 16 Bottom.


Once all the tracks are laid, you can check by clicking on Ratsnest Screen Shot 2015-08-30 at 15.42.18.png. At the bottom right a comment will appear "Nothing to do" if they are all connected as per the circuit diagram.


I then run the ERC (Electrical Rule Check) and the DRC (Design Rule Check) to check for errors. If a track is laid too close to the edge, or too close to another track, it will tell me here. You can change the settings and rules. I approved two rule violations in this board: Screen Shot 2015-08-30 at 15.46.07.png


The two positive pads for the battery holder overlap Screen Shot 2015-08-30 at 15.48.00.png - but as they are both positive, this is what they should do.


Now all rules have been checked (or apporved), time to add some words - it's nice to rummage through my box of electrical bits and be reminded what is this PCB for, rather than trying to work it out by reverse engineering. I also put the version number, date and my name (you never know, someone may have a fun project they want me involved with ...).


I add words using the text button, then change size and ratio and make the font "vector". This is because I have put it on the 16 Bottom layer - and it will be etched in the copper layer, so it has to obey the same rules as the tracks. If these aren't changed, there will be a DRC (Design Rule Check) error.

Screen Shot 2015-08-30 at 15.58.30.png


Remember to "save all" at regular intervals.


After all of this, I miter the corners - I don't want to stab myself when rummaging in the electronics bits and bobs box. I do this last as I have not worked out how to "undo" it.


Click on the "miter wires" button Screen Shot 2015-08-30 at 16.06.21.png then change the radius at the top to about 0.05 (inches). Then left click on the wire (edge of PCB). Do this for all the corners.


I save and run all Ratsnest, ERC and DRC again, just to make sure.


And there is my PCB - all done and ready to send of to a manufacturer. However, many manufacturers like to receive PCB designs in a standard file format - called Gerbers.


Screen Shot 2015-08-17 at 14.58.23.png


The next blog will describe how to save the Gerbers - and (hopefully) include some pics of the manufactured board.


I'd be interested to hear your comments - did you use this blog to make a PCB? Was there anything that requires clarification? Do you do things differently?

Eeek - how do I get started?


For this series of blog posts, I'll be sharing how I make this circuit into a PCB:



The circuit will turn on an LED when it gets dark I am going to make it with a 3V  CR2032CR2032 battery so the finished PCB can be put in a jam-jar and left outside to mark a path or a tentpeg or put in a pumpkin at halloween or used as a nightlight Or anything else where you want a light to come on when it is dark


I prototyped it on a breadboard to make sure everything works together as I expect them to and to select the resistors that made the LED bright and the phototransistor work how I wanted it.:





The photo-transistor is sensitive only in one direction (straight up), so the light from the LED does not effect it.


Parts: (I have included a full Bill of Materials (BOM) later in this post, along with the Farnell part numbers, Eagle library etc.)

Battery 3V  CR2032CR2032

Battery Holder CR2032CR2032

Resistor 330 ohms

Photo Transistor  TEPT5600TEPT5600

Transistor BC548

Resistor 75K ohms

LED amber

Having installed CadSoftusa Eagle PCB design software, the front page you see when you open it is the Control Panel. If you have not loaded the software, have a look at the Intro here.


The Control Panel is where you can load and save projects.


Under "Projects", there is a folder called examples. By clicking on some of these you can get an idea of various PCB's that can be made. There are also tutorials you may like to work through on the CadSoftusa website.


(This is an example from the tutorial)


The .sch files (above) are the schematics - the circuit diagrams very similar as you would draw them in a notebook.


(This is an example from the tutorial)


The .brd files (above) are the actual board layout, including the tracks.


File, New, Project lets you start a new project (un-surprisingly). I have saved my new project as "OnWhenDark". Other projects I have already worked on include the Open Collector (Thingatron) (Blog here) and the Inputs Optoisolator (blog here) - and one called RpiTrafficLight.


Control Panel Screen Shot

Open the Project

Highlight "OnWhenDark"

Right Mouse Click

"Open Project" (This can also be done using the menu options File, Open, Project, "directory", "OnWhenDark".

A green spot appears next to the project name, as shown in the image above.


Create a new Schematic

Highlight "OnWhenDark"

Right Mouse Click - New, Schematic (Or from the menu File, New Schematic)

This brings up a new window:

Screen Shot Add a Part.png

Now to insert the parts, using the "Add a Part" icon:

Add a part.png

This icon can be found half way down the tool bar on the left hand side of the window.

Clicking the "Add a Part" icon brings up a whole library of parts, which I find a little daunting:

Search Term.png

However, there is a search box, which helps a lot.

To find the Transistor BC548 type "BC548*" into the search box. Then click OK.

The device is then highlighted. It can be found in the "transistor" library, filed under "NPN".

Screen Shot 2015-08-03 at 15.14.52.png


Make sure it is highlighted. Click OK. This takes you back to the schematic but now with the BC548 icon attached to your mouse. Click where you want to drop it. If you want more than one, keep clicking. I'll do that for the resistors. Right clicking turns the part through 90 degrees. The escape key brings you back to the library. You can cancel out of the library to see the schematic.


The "trash can" next to the "add a part" icon can be used if you've dropped too many onto the schematic.

It doesn't matter what order the parts are added. They get linked together in the next step.

Clicking the "x" next to the search box clears the search and brings back the full library list.

For resistors I use the device "R-EU_0207/10 (R-EU_)" from the "rcl" library (use R-EU_0207* as the search term). There are many resistor libraries to chose from. Experience and asking advice (thanks @rocketengines) has shown this one works well. I suspect others do too. Two of them are needed on the schematic.

The battery holder and the photo-transistor are not already in the Eagle Library, so I had to make them. Here's a blog post on how I made the battery holder For the photo-transistor I copied a 5mm LED package and a LPT80A(opto-trans-siemens library symbol and made my own device called  TEPT5600TEPT5600


Here's a list of the parts, the Eagle Library they are in, what they are called and their Farnell Part Numbers.



My DescriptionEagle LibraryDevicePackageValue (User input)Farnell Part NumberFarnell Link
Resistor: 330 ohmrclR-EU_0207/10 (R-EU_)0207/10330R9341730

Resistor 75K ohmrclR-EU_0207/10 (R-EU_)0207/1075K9342230

Transistor BC548transistorBC548-NPN-TO92-CBE (*-NPN-)TO92-CBEBC5481574381
Adapt OneAdapt OneAdapt OneTEPT5600TEPT56001497673
LED ledLED5mm (LED)


Battery Holder  CR2032CR2032Adapt OneAdapt OneAdapt OneHU2032-LFHU2032-LF1319749
Battery 3V  CR2032CR2032N/AN/AN/ACR2032CR20322065171


Once all the parts are added, they can be rearranged and then linked together using the "Net" icon Screen Shot 2015-08-17 at 14.40.53.pngin the menu.

Screen Shot 2015-08-17 at 14.39.30.png

The schematic is now done. The next blog post will discuss moving the items around on the "board" view to make a neat PCB.


Remember to keep saving your work! I put version numbers on every time I save, in case I want to go back.

CadSoftusa Eagle PCB design software already has a lot of Farnell Element 14 components in its libraries - and more you can add from here. But what happens if there is something you want to use that isn't there?


Recently I wanted to attach a CR2033 3V battery to a PCB. The battery holder I chose, the Renata Hu2032-LF, did not already have a Eagle device associated with it.


This blog post will explain how I adapted an Eagle library device (LI Battery Varta CR2032H) (below)

Screen Shot 2015-08-04 at 14.57.09.png


for use with a Renata Hu2032-LF (below)

HU2032-LF Data Sheet.png


  1. Open Eagle
  2. Make sure all libraries and projects are closed
  3. Click: File, New, Project (and name project - e.g. Lucy_Library)
  4. Make sure Project Lucy_Library is open (green dot by it)
  5. Right click on Lucy_Library, New, Library
  6. Click back on the Control Panel WITHOUT closing the new library
  7. Expand folder Libraries (this is on the same level as Projects)
  8. In Libraries, expand folder battery.lib - but do not open it
  9. In battery.lib right click on CR2032H, then click on "copy to library"
  10. You can tell from the directory path in the top line the name of the library it has saved it into.
  11. Maximise the Lucy_Library window.
  12. Single click on Description (in blue on left hand side).
  13. Change the Description it is sort of HTML code just substituting the words you don't want should be fine I changed"Varta to"Renata  HU2032-LFHU2032-LF
  14. At the top of the window are three icons like this:

Screen Shot 2015-08-04 at 18.31.39.png

They are:

Device Device.png The device is the combination of the symbol and the package  It is named

Package Package.png The package is the foot print and connections of a real component.

and SymbolSymbol.png The symbol is the symbol you would draw on a schematic.


If you click on the package icon, then select the only one that is there (CR2032H), you will see that it has two green donuts (called vias pads (Thanks Workshopshed for the correction) for the positive pins at the top and one green donut for the negative pin at the bottom (This stops you being able to put the component in the wrong way round - there's a word for it: poka-yoke). The green bit of the via pad is the copper disk on the PCB, the hole in the middle is the hole through the PCB.


The Renata  HU2032-LFHU2032-LF has two positive pins and one negative pin, and so the symbol for the Varta battery holder can be used as it is. However, the package needs to be changed.


  1. Go back to the Device window (click on device icon, select CR2032H)
  2. Right click the CR2032H under package in the middle.
  3. Click edit package
  4. The package will now appear in a window.
  5. Click on the trash can / delete an object icon
  6. Then click on all the outline white lines, leaving only the text, the "+" and "-" and the green vias pads.
  7. Click on the "information" icon Screen Shot 2015-08-04 at 22.28.28.png and then click on the top left green via pad. The drill sizes and positions need checking / changing.
  8. The data sheet for the Renata  HU2032-LFHU2032-LF shows the minimum pin hole diameter to be 0.9mm the"x distance from the centre to the pins to be 13.45mm and the"y distance from the centre line to the positive pins to be 1.27mm
  9. As shown here: HU2032-LF DataSheet .png
  10. The default units on Eagle are inches. However, if dimensions are entered, followed by "mm", it will auto-convert.
  11. The drill size is 0.4 inches, which is near enough to 1mm - a little bit larger than the minimum of 0.9mm, so leave that as it is.
  12. The position for the green vias pads needs to be changed.
  13. Click on "information icon" then the top left via pad, and change the Position to be -0.05 and 0.53 (values given in inches, but you could put in 1.27mm and 13.45mm respectively, as long as you remember to put in the mm.
  14. Click on "information icon" then the top right via pad, and change the Position to be 0.05 and 0.53 (values given in inches).
  15. Click on "information icon" then the bottom via pad, and change the Position to be 0 and -0.53 (values given in inches).
  16. Now we want to draw some white lines. These will appear the silk screen and serve to remind us where the parts go and to not place anything else over them.
  17. Next draw the circle where the battery will go:
    Click the circle icon. Left click to define the circle centre (put this on the cross (not the plus symbol) in the middle of the window). Left click to mark the radius. It doesn't really matter where - we will change it in the next step.
  18. Click on "information icon" then on the circle. Change the width to 0.006 (inches) and the radius to 10mm (remember the mm!)
  19. Click on the "Draw Lines" icon. Change the width (at the top) to 0.006 (inches).
  20. Draw a rectangle - we'll change the dimensions in the next step:
    Click on "information icon" then on one of the lines. Change the From to: -0.138 (next box along) -0.56 and the To to: -0.138 (next box along) 0.56 click OK.
    Click on another line (if you haven't selected another icon, it will remember you are still using the "information icon") Change From to: 0.138 (next box along) -0.56 and the To to: 0.138 (next box along) 0.56 click OK.
    Click on another line - change From to: -0.138 (next box along) 0.56 and the To to: 0.138 (next box along) 0.56 click OK.the click OK
    Click on another line - change From to: -0.138 (next box along) -0.56 and the To to: 0.138 (next box along) -0.56 click OK.the click OK
  21. Save (save regularly!)
  22. You should now have something that looks like this:
    Screen Shot 2015-08-05 at 15.45.29.png
  23. Which if you have some imagination looks like the  HU2032-LFHU2032-LF layout top view from the data sheet
    Layout HU2032 Top View.png
  24. Save
  25. I moved the "name" from inside the layout to outside - so I can see what it is called after I have soldered the component. Do this by using the "Move" command.
  26. Finally I changed the description at the bottom to"Renata  HU2032-LFHU2032-LF
    Screen Shot 2015-08-05 at 16.56.16.png
  27. Save again!
  28. That's it. You now have an Eagle device for the Farnell Element 14 component you want.
  29. When you want to add it to your schematic, remember to look in the library directory that you saved (Lucy_Library). If you cannot see your library, you may need to click "use"  from the control panel.


If you have any problems, please do leave a comment. I am still relatively new to this and would love to hear any shortcuts or improvements.

Huge thanks to @rocketengines, who has a lot of experience using Eagle and is mentoring me.

What do you do when you want to make your first PCB?


This is what I did:


  1. Ask around to see who else has made one and how they did it.
  2. See what free / inexpensive PCB design software is available - I may hate it and only ever make one.
  3. Download some software and have a play.


I have found that the "having a play" is great - up to a point. It is something like an adventure game "There are three options - which do you chose?" (Chose the wrong one and you'll only find it was the wrong choice after 3 hours more work). Also, there's the jargon: what is a ratsnest? Will autoroute actually route everything nicely? Why can't I do x, y or z.


So the next steps became:


4. Get stuck.

5. Google it.

6. Swear.

7. Give up, phone a friend, or keep trying on your own with the help of the internet. Or even Read The ... Manual.

8. Giving up for me is usually only temporary.

9. Finally design the PCB.

10. Get the gerber files ready and send off to a PCB manufacturer.

11. Run around with excitement when my very own PCB turns up in the post.


This series of blog posts will (hopefully) help you to design a simple PCB using CadSoftusa EAGLE PCB design software - without the getting stuck and swearing stages.


First go to CadSoft's site and download the freeware version of Eagle Light. There are versions for Linux, Mac and Windows.


When you first start EAGLE, you will be asked whether you have a personalised license disk, or whether you want to run EAGLE as Freeware. To use the Freeware license select the “Run as freeware” button.


EAGLE Light Edition can do anything the Professional Edition can do - except:


  •     The useable board area is limited to 100 x 80 mm (4 x 3.2 inches).
  •     Only two signal layers can be used (Top and Bottom).
  •     The schematic editor can only create one sheet.


However, you can load, view and print drawings that exceed these limits.


The Freeware version of EAGLE Light adds these limitations:


  •     Support is only available via email or through the forum (no fax or phone support).
  •     Use is limited to non-profit applications or evaluation purposes.


So if you want to sell the PCB you make, for example on Kickstarter, you need to buy the Professional Edition. one of the editions - there are pricing details here. (Thanks to Workshopshed for pointing this out)


The next post in this series <link will appear here> will assume you have Eagle loaded and are now looking at the Control Panel page ...


Last year Workshopshed wrote a good blogpost on starting out on Eagle - where he mentions the pdf tutorial and some videos and a project he made. You may also like to check that out

IMG_6557 (1).jpg



Thingatrons (blog post here) - the open collector driver boards that I (Lucy Rogers) made to control outputs from the GPIO pins on a Raspberry Pi - were great, but I realised I also needed to use various inputs to trigger the outputs.


And because I want my *things* to work out in the real world, and not just on my workbench, I use inputs that trigger on 12V, such as a motion detector or PIR.


If there's any kind of fault on the wiring or in the input, I could easily fry the Pi. Therefore I wanted to electrically isolate my inputs from the Pi. Fortunately there's a cunning way of doing this, using something called an optoisolator (also known as optocoupler or photo-coupler) . These are component that use a light emitting diode to trigger a light sensitive transistor. There's a nice article on optoisolators here.

Although I could make a one-off using some veroboard, I knew one would never be enough ... so I made a couple of PCB's ...


I again used Cadsoft's Eagle PCB Design Software - and again I was very grateful to the help given by James Macfarlane, who uses the software regularly.


Finding which parts to use and their corresponding items in the Eagle libraries was still the most difficult part. I used a dual-channel optoisolator (photo below), which means there are two LED's and two transistors inside the one component - therefore I could run two inputs through one PCB.





Here's the schematic:



Here's what I used, which Eagle library they were in and what they were called and their Farnell Part Number:


My DescriptionEagle LibraryDevicePackageValue (User input)Farnell Part NumberFarnell Link
Header: 4 pins x 1 rowpinheadPINHD-1X41X042356153
Resistor: 680 ohmrclR-EU_0207/10 (R-EU_)0207/10680R9342168
Resistor: 10K ohmrclR-EU_0207/10 (R-EU_)0207/1010K9341110
Terminal Block: AK500/2con-ptr500AK500/2AK500/2PWR1641947
Diode: 1N4148diode1N4148DO35-7 (1N4148)DO35-71N41481081177


Once the schematic was drawn, I could move on to board. I spent ages re-arranging everything so I could use the smallest board possible (the PCB manufacturers charge by the size of board).


I was advised to route the board by hand since the autorouter is overkill for such a simple board. Also, the autorourter needs quite a lot of set-up in order for it not to do strange things.


Some other hints and tips included:

  • If you want to re-route a track you can use the "Rip-Up" icon. Double clicking a track rips-up the whole signal and returns it to the airwires, or yellow straight lines.
  • Use the "ERC" button to check the electrical connections
  • Use the "DRC" button to check if the design fits. This shows things like if the track is too close to the edge of the board.
  • Some tracks can be made thicker, particularly if they have a larger load on them. This can be done a few ways, but I find changing the "width" in "Properties" the simplest. (Use the "i" for info icon).
  • By "smashing" a component, you can separate the name or value from a part. This lets you move the name to a more convenient position.
  • Add mounting holes to the board, so you can secure it later.


Here's the finished board in Eagle:

Screen Shot 2015-07-10 at 12.21.21.png

I then made the gerber files (search online for how to do this) and sent them off to Ragworm. I may have got a little bit over-excited when the boards arrived. I then added the components and ran some tests:


IMG_6545.jpgIMG_6547.jpg IMG_6550.jpg


IMG_6554.jpg IMG_6558.jpgIMG_6557.jpg


Once I was happy that everything worked, I used it in my first application - the Firecrackers - blog post and video here.


The photo below shows the optoisolator in the top left corner of the Firecrackers control box (the three other orange PCB's are the Thingatrons).




UPDATE 6th August 2015

The optoisolator Gerber files are available to buy here.

*Note this PCB is designed to protect the Pi from damage due to Earth Loops - it is not designed to withstand to mains voltage levels between input and output.*


Robotic Dinosaurs

Posted by drlucyrogers Jun 9, 2015

Blackgang Chine Theme Park on the Isle of Wight has always been a place of wonder and imagination.


Their robotic dinosaurs are no exception - here's a video of some of the things we've been up to with them ...




Posted by drlucyrogers Jun 7, 2015

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.


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.



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


More Detailed3.jpeg


It did get a bit neater ...

More Detailed4.jpeg


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!


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!



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;
1635222TRACOPOWER-TBL 030-112-AC/DC, 12V/2.5A/30W, DIN
1122451Connector Type:Circular Industrial; Series:713; Connector Body   Material:Nylon (Polyamide); Gender:Plug; Contact Gender:Pin; Connector   Mounting:Cable; Connector Shell Size:-; Insert
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:Sol
1220789Accessory Type:Gasket; For Use With:RJ Square Flange Panel;   SVHC:No SVHC (17-Dec-2014)
1285850LAPP KABEL-1120233-CABLE, POWER, UV, 3CORE, 0.75MM, 50M
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 CS
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 Area
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.
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)
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 WAY
4109685WALTHER-315306SW-SOCKET COUPLER, 240V, 16A, 2P+E WAY
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:
1123643Box for Fogger
1283804Power Lead IEC 60320 C13
1349721Relay Socket
1392749Fifty way header
1526185ethernet cable
1571656Relay Retaining
1593506Crimp Housing 2 Way

Crimp Housing 4 Way
1772646Bootlace Ferrule Single entry AWG20
1822089Bootlace Ferrule Single entry AWG16

ENTRELEC UK  011849923 DIN Rail Terminal Blocks
236512512V 5.4Amp PSU
9733272Crimp Insert
CPCRemote Control Switch / receiver
CPCFog Fluid
CPC3.5mm stereo jack phono splitter



"I want to connect my *thing* to the internet"

First question:- Why?


For me, Lucy Rogers, it's mainly for fun. I want my toy dinosaur to nod anytime someone tweets #wakedino. But also sometimes for a purpose - I want to be able to turn some lights on in my home from somewhere else. There are as many reasons as there are ideas and people with them.


I went to Lancaster University to study mechatronics - I wanted to play with robots and with "Spitting Image" type puppets and make cool "Great Egg Race"  contraptions.

However, I soon declared "Electronics is black magic" as I got rather low marks in my electronics modules and decided to focus on mechanical engineering instead.


My career path was different than the one I had imagined at 18, and I have managed to ignore the gizzards of all electronic devices for the past decade or two. Ohm's Law (Voltage = Current x Resistance) has stuck in my brain though, and comes out when I am stuck for small talk at parties. (Hint: don't get stuck with me at a party).


But now I have come full circle, and again want to play with robots and with "Spitting Image" type puppets and make cool "Great Egg Race"  contraptions. I want to play with "The Internet of Things". I have formed the company Makertorium Ltd. to make gadgets and gizmos and legitimise my playing.

So the next question is:- How?


The Raspberry Pi is a great starting point for connecting "things" to the internet. It is small in size, low cost, has built-in network connectivity, and has an open-source operating system (Linux) which lends itself to hacking. The really useful bit, and something many other small computers do not have, is the "General Purpose Input Output" (GPIO) port. The GPIO port allows the Pi to control a potentially huge variety of "things" by anyone with some basic knowledge of electronics and programming.


So you can just connect the "thing" to a Raspberry Pi and you are connected?

Sadly, no, it's not that simple.


James Macfarlane stopped me frying my Pi when he caught me about to connect a motor directly to the GPIO pins. I asked him to explain why: -


"The GPIO port only works with logic level signals. This means it can only supply 3.3v and a few mA of current from each pin. This is enough to power an LED but to control anything more powerful (like motors) we will need some additional circuitry to boost the current and/or voltage to a higher level.

One way of doing this is an open collector driver. This is an electronic circuit. Using the circuit, the GPIO pin from the Pi only needs to supply a small current to turn on a transistor via its base terminal. The transistor can then switch a much bigger current via its collector terminal. This big current flows back to a separate power supply, not via the Raspberry Pi, so there should be no risk of damaging the Pi (unless you make a mistake!)

The great thing about an open collector driver is we can choose any voltage and current we want for the load so long as its within the rating of the transistor. "


In a previous blog I described how I connected my standard lamp to the internet, so I can tweet it on and off. To do this I needed to control a 12V relay - so I used an Open Collector Driver.


While doing some of the BlackgangPi projects, Andy Stanford-Clark connected a toy dinosaur ( he got for Christmas to a Raspberry Pi. He used an Open Collector Driver plus resistors to drop down the 3.3V from the Pi to 1.5V, but had some teething problems with the start up current of the motors.

Teething problems and setbacks can really dishearten the newbie electronics hacker (aka me).

I bought myself a toy Dino and simplified Andy's circuit back to the Open Collector Driver to use the Pi to switch it on and off. The Dino is still powered by the 1.5V battery.


So Open Collector Drivers seem to be the answer!


Where can I get one?


After realising the Open Collector Driver is so useful for connecting *things* to the internet,  I wanted loads of them!


And wouldn't it be good if I could just buy them instead of having to make them from scratch?


Searching around, it seems one Open Collector Driver is not an option on the market. I can buy chips with many of them in, but the chips then still need connecting, and look rater complicated. And spider-like.


Making one involved cutting up veroboard and adding bits of wire etc. Although it's fun the first time, I did not really fancy making a lot by hand.


After realising that "I" would have to be the "they" in "they should make one" I started to investigate how to make a Printed Circuit Board (PCB). With a PCB, I'd then only have to solder the components on.

How do you make a PCB?

I decided to use Cadsoft's Eagle PCB Design Software.


Advantages:        Freeware (free and non-commercial use only!)

                            James Macfarlane uses it and offered to help


Disadvantages:    Not particularly intuitive (although there are tutorials).

                              Freeware version limited to 10x8 cm and two layers.

                              Costs if you want to use it commercially.


Loading and setting up the software was relatively pain-free. After that, the first step was to open a new project (File, New, Project) and name it NewProject. Then open the NewProject and make a new schematic.


Finding and adding the right parts was the most difficult thing for me.


Here are the parts I used, and which Eagle library they were in and what they were called - and their Farnell Part Numbers:


My DescriptionEagle LibraryDevicePackageValue (User input)Farnell Part NumberFarnell Link
Header: 2 pins x 1 rowpinheadPINHD-1X21X02Rpi2356153
Resistor: 1000 ohmrclR-EU_0207/10 (R-EU_)0207/101K09341102
Resistor: 330 ohmrclR-EU_0207/10 (R-EU_)0207/10330R9341730
LED: 3mmledLED3MM (LED)LED3MMGreen2322129
NPN Transistor - BC337transistorBC337-16-NPN-TO92-CBE (*-NPN-)TO92-CBEBC3372101808BC337G - ON SEMICONDUCTOR - TRANSISTOR, NPN, 45V, 0.8A, TO-92 | Farnell element14
Terminal Block: AK500/2con-ptr500AK500/2AK500/2LOAD1641947
Terminal Block: AK500/2con-ptr500AK500/2AK500/2PWR1641947
Diode: 1N4001diode1N4004DO41-101N400195649931N4001. - MULTICOMP - DIODE, STANDARD, 1A, 50V, DO-41 | Farnell element14


Here's the circuit:

Screen Shot 2015-03-29 at 14.13.25.png

The diode (1N4001) is required to protect the transistor. If the Load has any kind of inductive coil in it, e.g. it is a relay or motor, when the transistor is turned off there will be a back-EMF produced by the collapsing magnetic field. This can be large enough to damage the transistor. The diode limits this back-EMF and therefore protects the transistor when the transistor is turned off. (For more details on this consult a good electronics book, such as The Art of Electronics.) (Thanks to Mike @TheRealMike for suggesting I comment on this).


Once the schematic was made, I made a board (in Eagle) and re-arranged the bits to get them onto the smallest board I could, without crossing over any tracks. The price of getting the PCB manufactured is dependent on the board size - the smaller, the cheaper. Shaving millimeters off can save pounds.


I only used the bottom side (also known as solder side) for the tracks, which are shown in blue. The PCB manufacturer I used makes two layer boards, so I could have used both sides. I seemed to get lost in this process for many enjoyable hours, wondering if I move this component, can I make the board a little bit smaller etc.



Getting the Makertorium logo on took very many frustrating efforts.


The next step was to make the gerber files. There are numerous instructions on the web for this.


Having heard many Makers praise the PCB prototyping service of Ragworm, I gave them a go. It was a very simple process - I zipped and uploaded the gerber files, said how big the board was and paid. The price for two 20mm x 20mm boards was £4.96 - which probably works out cheaper than the veroboard!


About a fortnight later, my PCB's arrived. This was something I thought only *big companies* could do - not me, from the comfort of my sofa. I admit I did run around in an excited manner.


They were even packaged with love.



Soon it was soldered up and connected to my toy Dino ...



The black wire to the Pi (the board with the raspberry logo) is the power for the Pi. Red and blue jumper cables connect the Pi GPIO pins (Pin 7 and Pin 40 - Ground). A red and black wire goes from the AA battery in its case to the Open Collector Board. Another pair of red and black wires go from the Open Collector board to the Dino. The Pi is connected to the Wifi via an Edimax USB wifi dongle.




As mentioned in a previous blog Andy is helping me learn to use Node-Red - the visual tool for programming and wiring up the Internet of Things.

About 10 months ago, I would have had a brain freeze if asked to do any coding - but I am now quite happy to write a "twitter search and trigger a pin" flow - this took less than five minutes.

Screen Shot 2015-03-29 at 12.59.55.png


Now my Dino nods up and down whenever "#wakedino" is mentioned anywhere on twitter! I also put in a stop command after a five second delay.



After playing with the board for a while, and gleefully tweeting about it, some improvements were suggested (Thanks Chris Robbins (@Grallator) ! )

This version has no fixing holes - it's always useful to secure it to stop wires wobbling out etc.

The current of the Load is limited by the transistor to a maximum of 800mA. So although I could theoretically add something that needed a 24V power supply, if the current it draws is too high it would frazzle the transistor. Calculating the current on the load requires the resistance to be known - sometimes hard to find out - and doing some maths (V=IR) - which is somewhat off putting when you just want to plug and play. However, if I use a Darlington pair (two transistors that act as a single transistor but with a much higher current gain) instead of the single transistor, the current limit should not be a problem.


So - watch this space for Version 2 of the Open Collector Driver - or Thingatron, as it has now been named.


With special thanks to James Macfarlane, Andy Stanford-Clark, Stella and Connor at Ragworm and Chris Robbins (@Grallator)




Dinosaur skeletons, dinosaurs being made and controlling dinosaurs ...


I, Lucy Rogers, was invited to visit an animatronic dinosaur factory in China - the factory that supplies the dinosaurs for Blackgang Chine Theme Park on the Isle of Wight.


The factory is in the "technology" commercial area of the city, which, from the car seemed very like technology commercial areas in the UK. However, not many factories in the UK have a full size apatosaurus (brontosaurus) style dinosaur looming over the workers.
Animatronic Robot Factory.jpg

The dinosaur "skeletons" (frames) are welded and assembled on site, then the motors and cables are added:



The skeleton then is wrapped in foam - this starts with big blocks being cut to roughly the right size and shape: IMG_5164.JPGIMG_5031.JPG

Highly skilled artists then carve the foam to look like skin / wrinkles / dinosaurs. Once the shape is right, what looks like ladies' tights is stuck to the foam with, probably, a latex glue.



And then, in what appears to be a magic process, a dinosaur appears, ready for some finishing touches. Like teeth.


Some of the dinosaurs could be ridden:


IMG_5157.JPG Lucy on Dino.jpg

When I had finished playing in the workshop, I chatted with the engineers.


I described how we had hacked a dinosaur at Blackgang Chine (See #BlackgangPi 2) using a Raspberry Pi and -  a visual method of programming the Pi.


After BlackgangPi 2, I made a dinosaur simulator, which I could use at my desk, rather than moving a 6 foot dinosaur around. I then could use this to make sure the Node-RED flows were correct - the LED's in the tail, body etc. correlating to an actual motor on a dinosaur.




James Macfarlane from Airborne Engineering designed and made a "Dino-8" board for me. This allows the Pi to control up to eight 6 Amp motors, running off anything between 12V and 36V. There are also two inputs, so I can use a switch or motion sensor to trigger the movement. The Dino-8 board was designed so I could just remove the ribbon cable from my model dinosaur and plug it straight into the Dino-8 board, without changing any of the Node-RED code. The dinosaur motors are attached directly to the Dino-8 outputs, and so I can directly control the dinosaur.




The prototype Dino-8 was based on the dinosaur we had hacked at Blackgang. This had four 6 Amp "windscreen wiper" style motors. These were run continuously in one direction as the movement was all connected via cams - the motors did not need to be reversed.


However, the Chinese engineer presented us with a motor for a big dinosaur - 21.4 Amps! He also wanted variable control on the motor speed, reversible, and many sound tracks.



I knew Node-RED could cope with multiple sound tracks - and managed to demonstrate this quite easily. James told us the Dino-8 could not do reversible, but the next design could without a problem. So it was just variable speed. I knew Dave CJ had managed to get PWM working on one pin on the Pi B+ - the question was, could it be done on more? Over night in China, (and during the day in the UK) Dave and Andy Stanford-Clark set to work.  By the time I woke up, they had a working system - AND fool proof instructions for me to follow. These guys rock!


I started with Andy's "Traffic Lights" (LED's moulded with sugru with a connector that attaches straight onto the Raspberry PI GPIO pins.). Once I managed to change the brightness of the LED's, I attached the Dino-8 card with a small 12V motor. Variable speed was go!



We need to do some more work on the next Dino-board so we can control the bigger motors, but it looks like the Blackgang Chine dinosaurs will all be Raspberry Pi and Node-RED controlled soon.

While in China, I also had the opportunity to visit a fibreglass factory:


Just a comment on the food. I'm vegetarian, and I found the food and hospitality wonderful. Others ate a pig's brain.



I had an amazing time in China - I was made to feel very welcome everywhere I went, even after the karaoke session.


#BlackgangPi 2

Posted by drlucyrogers Apr 27, 2015

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



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 …



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.


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.


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



Pi B+ & SD card


Clear Enclosure


Ethernet Cable 1m





Extra Parts needed to connect Pi to external monitor:

Farnell Number











Farnell NumberDescription


Bread Board


LED Yellow

2112106LED Red


12V supply




BC337 Transistor


Resistor Kit


Toggle Switch