Introduction: A Very RobotGeek Halloween

Picture of A Very RobotGeek Halloween

Are you ready to add a little Arduino to your Halloween decorations? Using the RobotGeek Floor Mat Experimenter's Kit and a few extra parts and props you can automate scaring all your trick or treaters. This project will show you how to read from a Floor Mat Switch or PIR motion sensor and then activate a relay. You can activate a RobotGeek Relay to turn on DC devices like vibrating Halloween props and sirens, or you can use a PowerSwitch Tail to turn on AC loads like strobe lights, leaf blowers and boom boxes.

Our examples are all Halloween themed, but these examples can be applied to a variety of projects like security systems, pranks, entry logging, and more.

This Kit will require you to solder wires to the floor mat switch. You may also need to solder extensions depending on what kind of external device you are trying to control.

Step 1: Setup Your Arduino / Geekduino

Picture of Setup Your Arduino / Geekduino

Our intractable will be using the RobotGeek Geekduino board and the RobotGeek SensorShield. If you've never used an Arduino or the RobotGeek Sensor Shield, these guides will get you up to speed.

RobotGeek Hardware Primer

RobotGeek Sensor Shield Wiring Primer

Geekduino Getting Started Guide

We'll also have some wiring diagrams for a standard Arduino Uno if you're not using a RobotGeek kit.

Step 2: Parts List

The exact parts you will need will depend on how you want to activate your decorations and what kind of decorations you want to activate.

If you want to activate DC devices (like battery operated props, sirens etc) from a Floor Mat Switch, then everything you need is included in the floor mat switch experimenter's kit. Items with a * are items that we'll be using in this instructable.

If you want to activate AC devices (up to 15A) then you should add a PowerSwitch Tail to your kit

If you want to control devices from a PIR motion sensor, then you should add a PIR sensor

Step 3: Wiring a RobotGeek Relay to Simulate a Pushbutton

Picture of Wiring a RobotGeek Relay to Simulate a Pushbutton

Many props are activated by a button - often you'll see this on props with a 'TRY ME' sticker. This option will work with any of these props that can be turned on by pressing the button. You will need to keep the batteries in your prop. We used the Hanging Vibrating Plague Doctor.


  1. Identify the main control unit on your prop. The pushbutton should be connected to the main control.
  2. Cut the pushbutton cable
  3. If you need the prop to be further away from the Geekduino / Relay, we recommend that you extend the 2 button wires at this time.
  4. There should be 2 leads that connected to the pushbutton. Strip about 4mm off of each lead.
  5. Connect the 2 leads to the middle and right (NO) screw terminal on the RobotGeek Relay. There is no correct orientation, so either wire can go in either screw terminal.
  6. Attach a 3-pin cable to the RobotGeek Relay. Attach the other end to pin 4 on the RobotGeek Sensor Shield

Step 4: Wiring a RobotGeek Relay to Directly Power a Prop

Picture of Wiring a RobotGeek Relay to Directly Power a Prop

If your prop doesn't have a pushbutton or you want to power your prop externally (not from the build in battery pack) you can alternatively use the relay to power the main control unit. This will require that the prop automatically turns on whenever it gets power.


  1. Open your Main control unit. Usually you'll need to remove screws, though other units may have tabs or glue.
  2. Locate the power leads from the battery compartment to the main circuitry
  3. Solder 2 wires to the power leads.
  4. Drill a hole or use an existing hole to thread your wires out of your unit and close it up
  5. NOTE: Your power supply voltage needs to match the voltage that the batteries were providing to the unit. For example, a unit that uses four 1.5 AA cells in series needs 6v. Applying too little voltage may not activate the prop and applying too much voltage may damage the unit. Reversing the power polarity will damage the unit.
  6. Solder the black wire from your control unit to the black wire on a female DC jack pigtail. Leave the red wires unsoldered
  7. Connect the red lead from the DC jack pigtail to the middle screw terminal. Connect the red lead from your DC Device to the right screw terminal (NO) on the RobotGeek Relay. There is no correct orientation, so either wire can go in either screw terminal.
  8. Plug the pigtail into a appropriate power supply
  9. Make sure your props power button is set to 'On'

Step 5: Powering a Siren or Other DC Device

Picture of Powering a Siren or Other DC Device

You can use a RobotGeek relay to power a DC device from 1-24 volts.

  1. Find the negative and positive leads on your device. Solder a red and black lead to these cables. NOTE: if your device has a DC jack or other female type connector, you can also solder extensions onto a male type connector to preserve the DC device's jack
  2. Solder the black wire from your DC device to the black wire on a female DC jack pigtail. Leave the red wires unsoldered
  3. Connect the read lead from the DC jack pigtail to the middle screw terminal. Connect the red lead from your DC Device to the right screw terminal (NO) on the RobotGeek Relay. There is no correct orientation, so either wire can go in either screw terminal.
  4. The most sure-fire way to get everything working is to plug the DC pigtail into its own power supply. However you can also use a DC Squid cable to power the Geekduino and the DC device from the same DC power supply on 2 conditions: 1) the DC power supply is between 6 and 24 v and 2)the power supply can supply enough amperage to power both the geekduino and the DC device.

Step 6: Controlling an AC Load With the PowerSwitch Tail

Picture of Controlling an AC Load With the PowerSwitch Tail

You can use the PowerSwitch Tail to control 120V AC loads up to 15A. In our example we'll be connecting the PowerSwitch Tail to an electric leaf blower.

  1. Cut one end off of the 12' Sensor Cable
  2. Connect the a white lead to the left / +in screw terminal on the PowerSwitch Tail.
  3. Connect the a black lead to the middle / -in screw terminal on the PowerSwitch Tail.
  4. Connect the other 3-pin connector end of the 12' sensor cable into port 4 on the sensor shield.

Step 7: Arduino Code - Floor Mat

Picture of Arduino Code - Floor Mat

All of our Code for this instrucable can be downloaded here.

Note on all demos This code will activate 3 digitial pins (4/7/8). If you are not using the second and third relays, you can still use this code without modification, just follow the wiring diagram from your prop setup above. If you need those 2 pins for other purposes remove the applicable pinmode() and digitalWrite() code in the setup and loop functions (see comments)

Floor Mat Switch - Direct Control

You can find the code for this sketch in thefloorMat_direct folder

This code will act as a very simple pass-through from the floor mat to the relays. Whenever the mat is active, the relays will turn on.

This project will wire the floor mat directly to the geekduino without any resitors. This means that the mat must be read using the internal pullup resitor on the geekduino. When the floor mat is inactive, the geekduino will read a HIGH and when the mat is inactive, it will read a LOW. This is inverse from the normal HIGH(active)/LOW(inactive) convention. This code will invert the signal from the floor mat before sending it to the relay.

Floor Mat Switch - Delayed Control

You can find the code for this sketch in the floorMat_delay folder

This code will look for a transition from the mat being inactive to active (i.e. the mat is stepped on). When this happens the relays will turn on for 5 seconds.

By changing the DELAY_BEFORE_START define you can change the time between the floor mat being pressed and the relays activating. By changing the and DELAY_AFTER_START define you can change the time that the relays stay HIGH for.

Step 8: Arduino Code - PIR Sensor

Picture of Arduino Code - PIR Sensor

The code for the PIR sensor is also induced in the zip file you downloaded in the last step.

Note on all demos This code will activate 3 digitial pins (4/7/8). If you are not using the second and third relays, you can still use this code without modification, just follow the wiring diagram from your prop setup above. If you need those 2 pins for other purposes remove the applicable pinmode() and digitalWrite() code in the setup and loop functions (see comments)

PIR Sensor - Direct Control

You can find the code for this sketch in the PIR_direct folder

This code will act as a very simple pass-through from the PIR sensor to the relays. Whenever the mat is active, the relays will turn on. The PIR sensor will stay HIGH for several seconds after it has activated, even if the heat source has gone.

PIR Sensor - Direct Control

You can find the code for this sketch in the PIR_delay folder

This code will look for a transition from the PIR sensor being inactive to active (i.e. a heat source is sensed). When this happens the relays will turn on for 5 seconds.

By changing the DELAY_BEFORE_START define you can change the time between the floor mat being pressed and the relays activating. By changing the and DELAY_AFTER_START define you can change the time that the relays stay HIGH for.

Step 9: Bread Board Wiring

Picture of Bread Board Wiring

You can also wire these projects up using a:

Step 10: Other Project Ideas

We've shown you some basic ways to wire up different devices to your Halloweeen setup, but you can expand your control center to do even more! Here are some ideas to get you started.

  • Use an MP3 Module to add your own custom spooky sounds
  • Use LEDs and a motor with an off-balanced load to make your own vibraiting halloween prop
  • Use a distance sensor or a laser and light sensor to set up a laser trip wire
  • Connect to a cassette play loaded with spooky sounds
  • Use a random number for how long the system should wait between pressing the mat and turning the relays on.
  • Edit the code so that different devices activate at different times / for different times

You can find even more RobotGeek Projects at learn.robotgeek.com.

Comments

seamster (author)2015-10-14

Nicely done, thanks for sharing this. Welcome to instrucables!

About This Instructable

396views

8favorites

License:

Bio: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our ... More »
More by robotgeek_official:Dropping Halloween SpiderJumping Halloween SpiderWater Monkeys
Add instructable to: