Challenge Four – Self-sufficient Alarm (v2)

Goal:

  • Add a power supply so your robot doesn’t need to be connected to a computer to operate.

Materials:

  • 1x 9v battery and holder,
  • 2x light sensors (from Challenge Three),
  • 1x Arduino microcontroller,
  • 1x piezo buzzer,
  • Red & black M/M jumpers (from Challenge Two),

(To learn more visit www.ZombiebotHQ.com/components )

Overview:

We’re going to use the 9v battery to power our Arduino so that we can use it anywhere we like, without it having to be plugged into a computer for power.

Instructions:

For complete visual instructions, click here.

  1. A Phillips Screwdriver

    A Phillips Screwdriver

    Put the 9v battery into the holder (you’ll need a small Phillips screw-driver) and make sure it’s snapped in there well and the cover is screwed back on. Connect the red and black leads from the battery holder to the red and black power rails, matching the colours. This means the red/black power rails are supplying 9 volts of power: the perfect amount to run an Arduino!

  2. Use the red M-M jumper to connect the red power rail to J16 (this is the ‘Voltage in’ pin of the Arduino, which is another way to provide it power). Now complete the circuit by using a black M-M jumper to connect the black power rail to A19 (GND or (-) for the Arduino). Turn the battery on to see if your Arduino lights up. Your Night-time Alarm should work because the Arduino remembers the last sketch uploaded to it. We now have a portable, battery-powered Arduino! You can hit the road with your Night-time Alarm-which means you can take it anywhere you like -very handy in the event of a zombie attack!

    Click the image for detailed instructions.

  3. Time to begin building our robot. Leave everything set up as it was for the last challenge, but move your L.E.D.s so the long legs are in A21 and A23 and the short legs are in the black power rail.
  4. Make a second light sensor like Fig.2 & 3 in Challenge Three. Our light sensor has been getting 5 volts of power from J19, but we’re going to need more slots now- we’re going to set up a whole power rail to supply 5v. You guessed it, we’re going to use the yellow power rail for this. Remove the light sensor’s yellow jumper from J19, and use a yellow M-M jumper to connect J19 to the yellow power rail. Use a black M-M jumper to connect the black power rail (on the yellow side) to the black power rail on the red side. This means we’ve got one power rail supplying 9v of power (the red/black power rail) and one power rail supplying 5v of power (the yellow/black power rail). Now connect the yellow and black jumpers from the light sensors to the yellow and black power rail, matching the colours. Connect the green jumpers from the light sensor to J26 and J27. This gives us two light sensors so your robot can look left and right to find where the strongest source of light is coming from.
  5. Download, open and upload to the Arduino, this sketch: http://bit.ly/ZOMBIE-5A Your Arduino will now compare both light sensors and turn on a different L.E.D. depending on which is receiving more light. Cover each light sensor in turn to test it out. This is a big step forward because we’re eventually going to replace these L.E.D.s with motors, and get the Arduino to turn the motors on and off. This will be how we will eventually control our robot.

You will use these skills later by:

Your Zombiebot will eventually be let loose into a room so cutting the ties with your computer is pretty important. Battery power = Freedom!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s