Create an IR Beacon or Virtual Wall or an IR Receiver

IR Transmitter / Virtual Wall

compatible with the iRobot Create and Roomba IR Protocol.

I needed a way to have uniquely identifiable beacons for the Create to pass while on it's journeys through the house/office.  I've posted the schematics and source-code here so you can make your own.

This project could be used to make a full-function remote for the Create/Roomba.  Each beacon is assigned a number (you probably want to use any IR byte not used by the remote or Dock).  The beacon transmits the byte every 200ms (configurable).

On the right you'll see the Schematic for connecting to a PIC16F690 and a link to the Source Code.

The source has a default IR Beacon # of 10.  It can be set to anything.  If you connect to the PIC's serial port on pin 12 then you can change the Beacon #, xmit interval, or disable the beacon and just send any IR byte it receives on the serial port.

Here is the latest version on a custom Printed Circuit Board powered by a 3v Lithium Battery.  (I didn't have any 20 pin sockets and didn't need those four dangling pins anyway.)

IR Receiver with a Parallax Propeller chip and an IR Receiver module from Radio Shack

Using a Radio Shack IR Receiver module (which demodulates the 38khz IR signals to nice 1/0 signals) and a Parallax Propeller chip I am decoding the iRobot Create/Roomba remote control.  My plan is to use a couple of these IR Receivers to be able to detect my IR Beacons (above) to determine waypoints and help with localization.

My current version doesn't decode the Virtual Wall and Docking Station IR signals since they are not transmitting "bytes" like the remotes do.  Future versions will be able to detect the walls and docking stations, but for now I'm not interested in those since the Create detects those itself just fine.  I built this receiver to detect my IR Beacon to aid in navigation.

 

Create's IR Specifications...

An "ON" is a 38khz PWM signal.
Each byte is 8 bits.
Each bit is 4 ms long.
A 0-bit consists of a 1 ms ON followed by 3 ms OFF.
A 1-bit consists of a 3 ms ON followed by 1 ms OFF.
The end of a byte is marked by 4 ms OFF.

I didn't realize what they meant by a "38khz Carrier Frequency" until I tried to implement an IR Transmitter.  A "Carrier Frequency" means when you are transmitting an ON signal, it is actually Pulsed On and Off at 38000 times per second.  If you don't do this, then the receiver will see a single pulsed ON at the beginning of your ON time but then the receiver will interpret the rest as OFF.  When transmitting an OFF signal, simply don't transmit anything.  It's only the ON signals that have to be pulsed at 38khz.

This is a capture of byte 130 (10000010) received from the Create/Roomba remote (forward button).  The PWM signals has been removed by a Radio Shack IR Receiver module.

You can see the 3ms ON and 1ms OFF for the 1-bits, and 1ms ON and 3ms OFF for the 0-bits, then 4ms OFF for the Stop-bit.  (9 bits total including the Stop bit)  The byte is then repeated about 27ms later while the button is held down.  One byte is transmitted every 62ms (begin byte to next being byte) while the remote button is held down.
(NOTE: My ON/OFF's are inverted here, normally you have a high-output and the IR Receiver pulls low when receiving bits)

Virtual Wall:

The Virtual Walls generate a 1ms ON, 1ms OFF signal continuously.  The 1ms ON is a 38Khz PWM pulse.

IR Transmitter for a PIC16F690 - transmits a Byte every 200ms which is detected by the Create and indicated in the IR Sensor packet

Latest Version can be configured as an Always-On Virtual Wall.


 

Parts:

  • PIC16F690
  • 100ohm Resistor
  • IR LED

optional parts:

  • 1K Potentiometer to adjust LED intensity
  • 1K Resistor and a standard LED for Status LED
     


CreateIRBeaconMain.c
updated 4/14/08 to allow programming of the Beacon #, Beacon Interval, or to disable the Beacon so you can send IR chars via Serial Port.

Serial Protocol:
Send $FF SOH Command Mode
Send $01 Set/Enable Beacon #
  Send 1-byte Beacon #
Send $02 Set Beacon Interval
  Send High Byte (milliseconds)
  Send Low Byte
Send $03 Disable Beacon so you can just use the serial port to send bytes without the Beacon interfering.

Any other characters will be send out via IR, even in Beacon Mode.

Propeller Chip
IR Receiver

Receives Create and Roomba Remote Control IR bytes (can be used to receive from the above IR Transmitter)

Create_IR.spin