Crispy IR beacon.

As a background, I’ve been working on a Robotics competition to teach the softies from CSH how to do a little bit of hardware and low level programming. The competition is to gather several ping pong balls located throughout a small field, and return them to a base. Whichever team has the most balls in their base (or on the way to their base) wins.

To increase the action a little bit, it needs to be very obvious where the ping pong balls and base are to the inexperienced hardware builder. Considering I’m fronting the cost for organization, it also needed to be cheap. The easiest solution seems to be IR.

To reduce noise, I decided to go with a 38kHz modulated IR receiver (4$ at radio shack.) Hooking it up is really quite simple. Just power and ground to the unit, and it will sink a fair bit of current when a signal is detected. After hooking up the detector to sink the cathode of an LED, just point a TV remote and the light will blink. Pretty simple.

Getting data out of the stream is slightly more difficult. Most IR remote codes consist of an initial pull down for several mS, followed by a PWM-like signal.  For example, in the NEC protocol, a ‘1’ is represented by 560 uS high followed by 1.7 mS low, while a ‘0’ is represented by a 560 uS high followed by 560 uS low. All of this is followed by a high period.  See for more.

I’ve tested a similar approach using strict timing windows rather than edge based timing. It works pretty well, however the students participating aren’t that familiar with micro-controllers.  The majority of them will be using arduinos, and using the needed timer interrupts unfortunately breaks the PWM pins in the wiring language setup.  Because we’re pretty taxed for pins as is, and avoiding using shift registers if I can help it, I’ll just time the widths of the pulses in a similar encoding scheme using edge triggered interrupts. That may be the least processing intensive way to do it anyway.

The beacon itself  should be very straightforward– with one caveat: it has to fit in a ping pong ball. I figure button cells, an ATiny, a cap to supply LED burst current, and some clever packing. The next step to see if I can get remote compatible emitter and maybe mess with the TV in the lounge.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: