element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs #BlackgangPi 1
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: drlucyrogers
  • Date Created: 18 Oct 2014 12:27 PM Date Created
  • Views 3456 views
  • Likes 1 like
  • Comments 8 comments
  • blackgang
  • drlucyrogers
  • node-r
  • @andysc
  • chine
  • node-red
  • led
  • twitter
  • @tjaap
  • raspberrypi
  • nodered
  • iss
  • switch
  • dinosaurs
  • @drlucyrogers
Related
Recommended

#BlackgangPi 1

drlucyrogers
drlucyrogers
18 Oct 2014
“Help! We need to hack the dinosaurs.”


image

For over a generation, Blackgang Chine Theme Park on the Isle of Wight has been famous for its dinosaurs. In the 70’s the children’s TV program Blue Peter filmed the journey of a group of fiberglass prehistoric creatures as they were flown into the Park. This  image has stuck with many as they have grown up. (Image T-Rex being airlifted into Blackgang Chine, 1972 - Credit: Blackgang Chine)


This year, new, animatronic dinosaurs have been introduced into the Restricted Area 5
 

image

 
Although they are great, Alexander Dabell, the fifth generation of the Dabell family to own and run the Park, believed they could be even better.
 
So he asked me to help adapt the dinosaurs to do whatever our imaginations suggested.
 
Mark Butler, the Park’s Technical Projects coordinator, had already hacked into one of the control panels using a Raspberry Pi and Piface and taught himself enough of the computer language Python to control the dinosaur.
 
Hearing this gave me the inspiration to try. I had tinkered with the Raspberry Pi and Arduino, but, as a mechanical engineer by training, I found the programming and electronics a slog.
 
I had heard Andy Stanford-Clark (@andysc) from IBM talk about Node-RED – an easy-to-use way of programming the Pi.  There’s an 18 minute video of Andy explaining Node-RED here.
 
I knew a Raspberry Pi and Node-RED could be used to control the dinosaurs, but I wasn’t convinced I could do it. 
 
With much virtual hand holding from Andy (Thanks Andy!), mainly via DM’s over twitter, I got Node-RED working on my Pi.
 
Once it was installed (and it really wasn’t that difficult, the hard bit was overcoming my mental block), I was away.
 
By dragging and placing various “nodes” in Node-RED, I soon had the Pi tweeting me when the International Space Station was due to come over. (This required an MQTT data feed written by Jaap Meijers (@tjaap) and @andysc – link available soon).
 
Node-RED and the Raspberry Pi can be used for so much more than Twitter, but it’s what I am familiar with, and so made a good starting point.


image

Then I wanted to use the GPIO pins (General-Purpose Input/Output).
 
On a bread board I connected an LED and resistor to one of the GPIO pins on the Pi. I dragged a couple of nodes and linked them on Node-RED  - and had the LED flashing whenever I received a tweet!
 
(Note:– This took a bit of trouble shooting, as I used the wrong pin numbers at first.)
 
Next, I made a user friendly toggle switch, and used it to control the LED. I connected a resistor to the switch, but Node-RED allows you to specify a pull-up or pull-down resistor in the software, without one being in the actual hardware. The blue stuff on the connectors is Sugru.


imageimageimageimage
This gave me the confidence that I could have any input device control any output device via the Pi and Node-RED. Although I knew I needed a few more steps.
 
The Pi has an output of 3.3V. As I wanted to control something plugged into the mains, I had to use a relay. But my relay needed 12V to work. After a bit of internet surfing, I found I needed an Open Collector Driver. imageimageI didn’t have quite the right components, but Imade do with what I had, and, after a few false starts (I wired the legs of the transistor incorrectly, my diode was in upside down etc.) the switch controlled the relay.
 
Now I can turn a lamp on in my house, just by sending myself a message on Twitter from anywhere in the world!
 
With the confidence that “even a mechanical engineer can do this electronics and programming stuff” I suggested to Blackgang that I bring together a group of hackers / makers / electronic engineers and computer experts to help refine the controls they already have, and train other staff members so they could all join in the fun.
 
#BlackgangPi 2 will discuss how that went!

 

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
2112013
12V supply
9564993
Diode
2101808
BC337 Transistor

2075382

Arduino

9341099

100 ohm Resistor

2128120

Toggle Switch
  • Sign in to reply
  • drlucyrogers
    drlucyrogers over 11 years ago

    Thank you all for your very interesting comments and suggestions image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Many areas have local web-sites like streetlife.com, or free papers like Freeadds, a small comment in one of these that you are interested in old video recorders, printers, etc, will often produce results. There are many people who just keep old items with an intention of getting rid of them, then when they see an add like this they will often do something about it, normallt giving them away for free. One of the best ways to learn about interfacing sensors, motors, etc, is to build robots, printers in particular have all the gears already attached to motors, with rubber rollers, for use as wheels, connected to a shaft or axle.You will also find IR transmitters, receivers, and even micro switches, in printers, video recorders, etc, to use as detectors so a robot can detect an area and move away from it, before hitting it. Although the Raspberry Pi is perfectly okay to be used in such a situation, it does consume quite a lot of power compared with say the Arduino, although the newer Pi model does consume less. Less power means your robot will operate longer, thus if you do not need Internet, HDMI connections, it is better to use just a basic microcontroller like the Arduino. Nod-RED is also available for the Ardunio and the BeagleBone Black. Once the Arduino is programmed, one does not actually need the USB chip or some of the other components for it to operate when it is in its control mode, thus the main controller chip can also be removed and placed on a small PCB board, with a couple of other components, to reduce its power consumption even further. The basic Arduino UNO 3 on its own board uses about 50mA, the original Pi was over 10 times this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 11 years ago

    I have an IR sensor, small motor and switch from an air freshener that the supplier stopped making cartridges from

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 11 years ago in reply to Former Member

    I agree.

    I go to garage sales and get a lot of useful components from old electronics.

    VCR's and Printers are just full of useful stuff.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Many people tends to get hooked on micro controller/computer applications, but then find some of the hardware a bit too expensive to experiment with. I salvage a lot of video recorders and computer printers because they are filled with all types of sensors, switches, motors, gears, and many other components. Ideal to make your own animatronic projects from scratch, or experiment with. Remember to use a fuse with anything you connect to the mains, and keep all the mains circuit away from being easily touched. One might also consider opto isolating the relays with an opto isolator switch, thus separating the low and high power devices. Where your diagram shows an LED coming from the GPIO pin, imagine the light from this being detected by a sensor in a small sealed integrated circuit like device, with the output feeding through to the relay. There is no actual physical contact between the two parts of the circuit, except for a beam of light. Ports on the Raspberry Pi can only take a very small amount of current, and this is a safety measure.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube