# Identifying LED markers by modulating brightness - How?

For a project of mine I need to use infrared LED markers to identify locations of points in space with stereovision algorithms and multiple IR cameras. I also need each LED marker to have a unique recognizable ID, which is my current problem.

My thought was to have each LED flash between two states of brightness (is this possible?) in a recognizable sequence but still be bright enough to track in the lower brightness state.

I don't know how to implement this or really where to start looking. I am a programmer but have never worked with actual circuits before. Can you help me get started?

Thanks.

-

if all your LEDs are being controlled from the same source, consider using a microcontroller + differential Manchester encoding + your high/low LED states to encode bitstrings of repeating sequences like:

id #0: 1000000000000000[10000000000000001000000000000000....]
id #1: 1000000000000001[10000000000000011000000000000001....]
id #2: 1000000000000010
id #3: 1000000000000011
id #4: 1000000000000100


to encode ID numbers as a 16-bit bitsequence consisting of a 1, then 7 zeros, and an 8-bit ID#. Then when decoding, look for a 1 followed by 7 zeros, then take the subsequent subsequent bits. This works for all 8-bit ID#s (even #128 = 10000000 which encodes as 1000000010000000 which can't necessarily be synced properly but for that number it doesn't matter).

(If you have fewer potential LEDs, use fewer bits; this scheme is pretty simple and generalizes to a 1 + (N-1) zeros + an N-bit number)

Manchester encoding is self-clocking so you should be able to synchronize a receiver to it (even if it's another microcontroller not sure of the frequency, sample several times per bit so you can stay locked).

-

If you could flash each LED on and off at a different frequency this would probably simplify things a lot as you could use 555 based circuits to flash each one at the required frequency.

-
simplifies transmitter, but complicates the receiver –  Jason S Dec 28 '09 at 13:26
If he's tracking loads of points, he's probably not going to be using an Arduino or any other microcontroller. –  Amos Dec 28 '09 at 15:18
..for the receiver that is, plus it's not the programming that's the problem it's the circuits so the simpler the circuit the better. –  Amos Dec 28 '09 at 23:58

Everyone seems to be starting off with Arduinos these days, so something like this is probably what you are looking for. However it seems as if you are intending to use a lot of LEDs in this project which would be difficult with an arduino. This is all off the top of my head* here, but it may be possible to use a transistor and a large resistor in parallel so that when the transistor is off, the current flows through the large resistor and you get a dim light. When you turn it on though, current flows through the transistor due to the lower resistance and you get the brighter state. Assuming this works, you could use digital components like microcontrollers to control the transistors and achieve the flashing that you require. Attached is a schematic of what I mean (the values are arbitrary, you will probably have to change them for your circuit):

Whichever way you do it, its going to be quite hard considering you've not done much electronics. Good luck!

*it is late; this could be completely wrong and not work at all. ymmv.

-
Basically OK, but you need another resistor in series with LED and transistor to set the current for the bright state, otherwise your LED will die. –  starblue Dec 28 '09 at 12:12
yes this is true. I figured it was implied but I should have mentioned it anyway. –  penjuin Dec 28 '09 at 12:16

I would do a variation of penjuin's idea. I would use an on and off state to generate the two levels. Rather than trying to track the LED in the off state (or low state) make the off state short and just track in the on-state.

You also didn't mention how many LEDs you need to track and how fast they are moving.

-

Yes, two-state "dim" and "bright" is easy. Given any circuit that blinks a LED hard on and off with a transistor, you add one resistor across that transistor. Then when the transistor is fully off, the resistor allows a dim glow. I would start with a resistor of exactly the same value as the current limiting resistor already connected to the LED. (Every LED needs a current-limiting resistor).

For a few markers, a independent battery and 555 timer at each one is going to be the simplest marker hardware. (plus a few resistors and capacitors).

The overall system simpler if you can synchronize the LEDs: turn all markers on at the start of the cycle, then turn off one marker at a time until they are all off, then turn them all back on and start the cycle over. The amount of energy needed to keep a bunch of LEDs blinking for a couple of hours typically weighs much less in the form of one or two central batteries rather than one battery per LED. (This requires a comparator IC at each LED, or a few shift registers or an Arduino emulating those shift registers at some central location). (This requires lots of wires stringing from one marker to the next, or from each marker to some central point -- so that may not be possible for your application.)

It makes your vision recognition software much simpler if the PC can control the LEDs directly. Then when the PC is searching for LED_5, it can turn off and on LED_5 and be confident that the one LED that blinked must be LED_5. Perhaps using something like a USB to 8 bit parallel port converter, which (with 8 resistors, one per LED) can directly control 8 LEDs or (with 4 resistors, one per column) a 4x4 matrix of 16 LEDs. (This requires yet another wire, a USB cable from the PC to the converter, but it doesn't require any batteries or transistors or additional chips -- this may be the simplest for a programmer non-electronics guy to get working).

-