Tickle Robot

This is just a regular ticklish robot in a rocking chair. Come to think of it, that does not sound very regular at all. Tickle the robot on its heart and it will start to wiggle like crazy.

Materials


  • 1 Arduino Uno board
  • 1 Education Shield
  • 1 breadboard
  • 1 standard servo
  • 1 1M ohm resistor
  • 3 jumper wires
  • Tickle Robot kit
  • Aluminum foil
  • Masking tape
  • Thread

Instructions

  1. Attach the shield onto the top of the Arduino board
  2. Assemble the TickleRobot.
  3. Make a capacitive sensor by cutting a 5cm x 5cm square of aluminum foil. Wrap the foil around the heart, use masking tape around the edges to keep it firm. From the back of the heart, wrap foil to a loose jumper wire – the metal of the wire must contact the foil.
  4. Connect the servo to D9.
  5. Using a separate breadboard, connect a 1M ohm resistor between digital pin 2 and digital pin 3.
  6. Connect the loose jumper wire of the capacitive sensor to digital pin 3.
  7. Connect your Arduino to the computer and upload example ‘TickleRobot’. Make sure the servo moves when you touch the aluminum foil.
  8. Put the electronics inside Tickle robot, at the bottom.
  9. Place the servo on the left side.
  10. Turn the servo by hand until the end. Turn it by hand to the position of 90 degrees. Fixing the rod-shaped arm along the servo.
  11. Tie a string to the left arm and leg, through the end hole of the servo arm. Do the same with the right arm and leg and tie them to the same place.
  12. Your robot is ready to be tickled.

Code

Find the code in File>Examples>EducationShield>Block4-Robots>Projects>TickleRobot

How it works

  • The EducationShield, Servo and CapacitiveSensor libraries are included.
  • The Servo and CapacitiveSensor objects are declared, pull and sensor.
  • In setup(), the sensor and servo are configured and initialized.
  • In loop(), if the read value from sensor is true, it means that the capacitive switch is touched, and the servo position is set to 0 degrees so it pulls the strings.
  • If the read value is not true, the servo position is set to 90 degrees so it stops pulling the strings.
  • The program pauses for 30 milliseconds.
  • loop() continues to loop.

Troubleshooting

  • Refer to the illustration and double check your connections. Make sure the shield and jumper wires are firmly connected.
  • If it does not react to tickling or the servo does not move to the correct angle, see Standard Servo reference for debugging standard servo.
  • If still not working, see the Capacitive sensor reference to for debugging.

Learn by doing

  • Try to make the Tickle robot dance according to a predefined way or make it dance just after it is touched.
  • Add another servo so it gets more advanced dancing moves.
  • Make the robot rock the chair by itself. Use the capacitive sensor to turn it on and off.