×

PC Control These demos and projects allow the robot to be controlled via a computer.

ArbotiX Commander Control - These demos and projects control the Robot using the ArbotiX Commander, the handheld Arduino based remote control.

Direct Control - These demos and projects control the Robot directly from sensors connected directly to the Robot's control board.

Pose Control - These demos and projects allow you to create and playback a sequence of poses.

Serial Control - These demos and projects control the robot using a serial packet protocol.

Standalone - These demos and projects are deisgned to let your robot function without a computer or additional microcontroller.

Wireless Control - These demos and projects allow you to control the robot wirelessly - usually by replacing the Serial Connection with XBee modules.

Reference - These articles have technical details regarding the control and operation of the robot.

×

More info here

RobotGeek Halloween Floor Mat How-To

mt_ignore
Direct Control
mt_ignore
Standalone

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.

RobotGeek 101

Are you ready to dive even deeper into the world of Arduino? Then take a look at Robotgeek 101! RobotGeek 101 is a step by step guide that will teach you how to build, wire, and program your Geekduino/Arduino. Through RobotGeek 101 you will learn the basics of Arduino like digital input and output, and move on to more advanced topics like PWM and servo control. By the end of RobotGeek 101 you'll be well equipped to start modifying our demo code and creating your own custom applications.

RobotGeek 101

Projects Part 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

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

Setting up the Hardware

There are a lot of different output devices you can use for your project. Below we have some tips on wiring and setting up a Moving/talking Halloween prop, a Siren, and a Leaf blower. These wiring tips can apply to a wide variety of devices. In the following steps we'll show the devices plugged into Digital Output pin 4 - however towards the end of the project we'll show 3 devices all hooked up to the geekduino using pins 4, 7 and 8. All three of these pins will work identically.

Floor Mat Switch Soldering Video

To use the Floor Mat Switch you will need to solder wires onto it - the following video will show you one way how to do that.

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.
b_400_400_16777215_00__images_tutorials_halloween_photos_010.jpg
010.jpg 020.jpg 030.jpg 040.jpg 060.jpg 070.jpg
  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
b_500_500_16777215_00__images_tutorials_halloween_relayButton_bb.png

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.
b_400_400_16777215_00__images_tutorials_halloween_photos_080.jpg
080.jpg 090.jpg 110.jpg 100.jpg 117.jpg 120.jpg 130.jpg
  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
b_500_500_16777215_00__images_tutorials_halloween_relayPower_bb2.png

Powering a Siren or other DC device

You can use a RobotGeek relay to power a DC device from 1-24 volts.
b_400_400_16777215_00__images_tutorials_halloween_photos_113.jpg
113.jpg 115.jpg 117.jpg 120.jpg 130.jpg
  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.
b_500_500_16777215_00__images_tutorials_halloween_relayPower_bb.png

Controlling an AC load with the PowerSwitch Tail

You can use the PowerSwitch Tail to control 120V AC loads up to 15A
b_400_400_16777215_00__images_tutorials_halloween_photos_140.jpg
140.jpg 150.jpg 160.jpg
  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.
b_500_500_16777215_00__images_tutorials_halloween_powerTail_bb.png

Download the Firmware for Your Geekduino

Geekduino firmware

All of the code for this project can be downloaded here. Once you unzip the file, rename halloweenRobotGeekSketches-master folder to halloween Robot Geek Sketches. Put the halloween RobotGeek Sketches folder in your RobotGeek sketches folder.

Documents -> Arduino -> RobotGeek Sketches

Now start/restart your IDE. Once the IDE is open, you'll be able to open the code for the following demos.

Floor Mat Switch Demos

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)

b_500_500_16777215_00__images_tutorials_halloween_powerTailRelay2_bb.png

Floor Mat Switch - Direct Control

You can find the code for this sketch here:

File -> Sketchbook -> RobotGeek Sketches -> halloween RobotGeek Sketches -> floorMat_direct

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 here:

File -> Sketchbook -> RobotGeek Sketches -> halloween RobotGeek Sketches -> floorMat_delay

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.

PIR Demos

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 leave the other pins unplugged If you need those 2 pins for other purposes remove the applicable pinmode() and digitalWrite() code in the setup and loop functions (see comments)

b_500_500_16777215_00__images_tutorials_halloween_pirProp_bbq.png

PIR Sensor - Direct Control

You can find the code for this sketch here:

File -> Sketchbook -> RobotGeek Sketches -> halloween RobotGeek Sketches -> PIR_direct

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 here:

File -> Sketchbook -> RobotGeek Sketches -> halloween RobotGeek Sketches -> PIR_delay

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.

Other Project Possibilities

  • 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
×

PC Control These demos and projects allow the robot to be controlled via a computer.

ArbotiX Commander Control - These demos and projects control the Robot using the ArbotiX Commander, the handheld Arduino based remote control.

Direct Control - These demos and projects control the Robot directly from sensors connected directly to the Robot's control board.

Pose Control - These demos and projects allow you to create and playback a sequence of poses.

Serial Control - These demos and projects control the robot using a serial packet protocol.

Standalone - These demos and projects are deisgned to let your robot function without a computer or additional microcontroller.

Wireless Control - These demos and projects allow you to control the robot wirelessly - usually by replacing the Serial Connection with XBee modules.

Reference - These articles have technical details regarding the control and operation of the robot.

×

More info here

Feedback Form


Search