updated 15 January 2011

working with IR sensors...

Robotics systems require feedback in the form of sensors.

In many instances robots will copy humans with touch, temperature, light, sound and visual sensors among others.

Infra red light is a great way for a robot to interact with the environment.

Infra red light is not visible to the human eye, but can be seen by sensitive electronic equipment.

Infra red light behaves in a very similar fashion to visible light.

One example is that infra red (IR) reflects (bounces) off certain surfaces just like ordinary light from a torch.

In this example we show you how to connect up any IR sensor to receive IR light from for example a TV remote.

Please also take a look at how to SET UP AN IR LED TRANSMITTER in the HOW TO section of this website.

WARNING: If you do not take the proper precautions you can burn out the IR receiver part featured on this page.

01. This is what the complete IR sensor (receiver) circuit looks like once built up on the SKiPPy breadboard area. Please note that we've used a different IR sensor to the standard PARALLAX sensor.

WARNING: Each IR may have different pin out connections and if you connect them wrong they will burn out - that meas the IR sensor won't work again!

02. View from the top. WARNING: Note that this circuit is slightly different to the PARALLAX IR receiver circuit on page 239 of "Robotics with the Boe-Bot" from the "Stamps in Class" series and the IR receiver circuit on page 9 from the book "IR Remote for the Boe-Bot" from the "Stamps in Class" series. Both these books can be downloaded free. Find instructions on how to download these useful reference texts on this website.

If you look at the above photo you will see the IR sensor in the middle of the white "breadboard" prototyping area. The IR sensor is the small black part with three legs. Often they are covered with a small metal casing. You can find them inside old (broken) TV sets and video (VCR) and DVD players. Do not open up or tamper with working electronic equipment. Your robotics career will come to an early end if you strip the IR sensor out of dad's new big screen TV.

WARNING: Do not open up mains powered electronics equipment as you may get an electric shock. Mains electricity can kill! Opening up electronic equipment invalidates all warranties.

Notice in this instance the middle pin of the IR sensor when viewed from the top (with the "bubble" or round part facing forwards/right) is positive (red) and the pin at the top of the photograph is negative (blue) and the pin at the bottom is the SIGNAL (yellow).

Note the picture below is of the IR sensor type that Parallax supplies with SIGNAl pin on the left (when viewed from the front) then NEGATIVE (blue) in the centre and POSITIVE (red) to the right.

Generic types often swap the positive and negative pins so connection could be left pin SIGNAL middle pin positive and right pin (device viewed from in front) is negative.

Here's a drawing for a Molex connector type IR sensor on a SKiPPy pRoTotYpe followed by pictures of the actual...

Front view...

Back view...

WARNING: Always connect a 680 ohm resistor to the positive power rail and then connect power to the sensor. This will limit the current and prevent burning out the sensor in case you get the connections wrong.

The signal pin connects through a 220 ohm resistor (red-red-brown-gold) to the P9 connector on the MICROCONTROLLER inputs and outputs rail. The signal pin is the pin towards the bottom in this photograph. After the resistor you will see there's a yellow wire that jumps to P9.

The middle pin connects to the positive (red) power rail through a 680 ohm resistor (green-blue-brown-gold). The reason why we put in the resistor is to help prevent blowing the IR sensor in case we connect it incorrectly.

The top pin connects to the negative power rail through the blue coiled wire. The reason I coil spring the hook up wires is to put a bit of tension into the circuits so they make good contact and to make the breadboard look tidy.

To test this circuit you need to load a program like the IR REMOTE CONTROLLED ROBOT into the microcontroller and then point a SONY TV remote at the IR sensor. You will find a basic explanation of this program in our PROGRAMMING section.

For a SKiPPy Kit with everything you need contact Michael 082 962 2772.

Once you've built it please email us pictures.