LEARN.PARALLAX.COM
Published on LEARN.PARALLAX.COM (https://learn.parallax.com)
Home > IR Remote Controlled Shield-Bot Project

IR Remote Controlled Shield-Bot Project

If you’ve gone through Robotics with the BOE Shield-Bot, there’s lots you can do with what you’ve already learned!  For example, in Chapter 7, you used infrared parts from a TV remote and TV for object detection.  Well, gee, since you’ve already got the IR receiver that’s designed to detect TV remote button presses, why not set your BOE Shield-Bot up for TV remote control?

Better still, make it so that you can configure your robot for different behaviors by just pressing a few buttons.  Press Power and then 3, and it follows objects, just like in Chapter 8, Activity 2.  Press Power than 2, and it will roam and avoid objects.  Press Power and then 1, and you’re back to controlling it with the TV remote’s buttons.


The Shield-Bot needs only one IR receiver and a resistor to receive control signals from an infrared remote.

What’s Needed

(1) Fully assembled and tested BOE Shield-Bot (two options, below):

  • Robotics Shield Kit (for Arduino), #130-35000
    • plus your own Arduino Uno and programming cable
  • Robot Shield with Arduino, #32335
    • includes Uno and cable.

(1) Sony-programmable Universal Remote, #020-00001

 

Program the Shield-Bot and Remote

Prepare your Shield-Bot

  • Build and test your BOE Shield-Bot, following at least Chapters 3 and 4 in Robotics with the BOE Shield for Arduino.
  • Build and test the infrared LED/receiver circuits from Chapter 7, Activity 1.
  • Download the IR Remote Shield-Bot Arduino Code
  • Put the robot’s 3-position switch into position-0, and disconnect the power cable.
  • Connect the Arduino programming cable, and run the ony_IR_Shield_Multi_Bot code.
  • Disconnect the programming cable and put your BOE Shield-Bot on the ground.
  • Reconnect the power cable, and put the power switch into position-2.

 

Prepare your IR Remote

  • Configure the universal remote to be Sony-compatible, using the instructions that came packaged with it.

Important!  The remote you are using MUST be configured to send Sony-compatible infrared signals. 
The Arduino code provided for this project makes the BOE Shield-Bot recognize Sony IR remote signals only!  For example, the BRIGHTSTAR universal remote sold by Parallax is programmed by holding the SET-UP button down until an LED on the remote lights up, then entering the code 605.  Different models of remotes may use different codes and configuration methods. Check your remote’s docs!

Drive the Shield-Bot

Navigation Modes

  • On the remote, push Power, then push 1, 2 or 3 to select a navigation mode. 

Power-1: Remote control

In this mode, use buttons 1-9 to drive the robot in different directions.  Note that the sketch still uses the IR emitter/receiver pairs to check for an obstacle in front.  If you try to drive your Shield-Bot into a wall, it won’t let you.  Smart robot!

 

]

 

Power-2: Autonomous IR Roaming

In this mode, the Shield-Bot uses its IR emitter/receiver pairs to roam autonomously and avoid obstacles.

Power-3: Follow the Leader

In this mode, the Shield-Bot uses its IR emitter/receiver pairs to maintain a set distance from a stationary or moving object in front of it.  The robot will follow your hand or another robot.

 

How the IR Remote Works

The infrared receivers on the BOE Shield-Bot read the infrared signals sent by the remote.  The remote flashes its IR LED on/off very rapidly—at 38.5 kHz—for certain periods of time, with periods of off-time in between. 

The IR receivers on the Shield-Bot are tuned to look for 38.5 kHz signals.  While these IR signals are detected, the receivers send a LOW signal to the Arduino I/O pin. In between these IR bursts when the signal is not detected, the receivers send a HIGH signal to the Arduino I/O pin/.  The Arduino sketch measures the lenghts of the HIGH and LOW signals, and decodes them to know which button on the remote was pressed.  Each button corresponds to different navigation instructions for the Shield-Bot servo motors. Pretty slick!

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024


Source URL:https://learn.parallax.com/courses/ir-remote-controlled-shield-bot-project/
Links