RayDialer

RayDialer (light [aka.: "reduced", not "bright" {although it is kind of "bright"}])
An optical, local positioning system for robot applications (infrared TX beacons and real-time directional RX photo-receivers).

Features:

  • multiple, distinguishable IR beacons
  • (almost) real-time receiving circuit
  • 4 channel directional receiving pattern
  • beacon messages (pro version)
  • external beacon communications interface (pro version)
  • measuring distance to single beacon (pro version)
  • "easy" (...) to build (reduced version)

This minimal positioning system consists of three parts:

  • TX: transmitting beacons
  • RX: directional receiving circuit
  • MX: omni-directional motor mount (radar; pro version, not presented here)


Note 06/2010: Update in progress...

Hardware TX

The TX part of RayDialer, at least like presented here, consists of 3-12 IR LEDs, emitting base band amplitude modulated light. The modulation can chosen to be:
  • a) pure analog sine waves (standard)
  • b) digital (on/off)
  • c) digital PWM
  • d) single or multi frequency
  • e) ...

Right from the start, RayDialer was planned to emit more than only one frequency component. This reduces detrimental effects from other, interfering light sources and adds a little more confidence to the received and analyzed signal.

Creating a single (aka.: fundamental) frequency would be fairly easy. The circuits on the right, driven by an "amplified" or "boosted" MCU pin, or anything else, satisfy this demand. At least, regarding the sending unit.

To reduce some of the higher frequency components, a simple RC filter can be fed in for a 20dB/dec suppression. I don't want to bother you with any math or formulas, so here are some prepared and easy to understand visualizations:


Imod ~ Uf1 ('single digital')
FFT
Imod ~ Uf1 ('single, filtered digital')
FFT
At a glance, the preceding two sets of measurements may look ugly, but a digital (DFT/FFT, Goertzel, ...) analysis isn't really a problem, as long as:
  • the sampling frequency is high enough to avoid aliasing (also see sampling theorem)
  • the receiver bandwidth is limited (aliasing)
  • all beacons operate inside the frequency band:
    f_lowest < f < 2*f_lowest (below 1st overtone)
  • no external sources interfere
  • ...

What happens if we add a second frequency, "digitally mixed" to the first one?

Imod ~ Uf1 | Uf2 ('digitally ORed')
FFT
Imod ~ Uf1 + Uf2 ('digitally added')
FFT
Without going into detail (math) or commenting the slight differences between the two preceding rows, it is clear to see that the pure digital combination of two (or even more) adjacent frequencies results in a mess...

Although an analysis would still be possible, the signal to noise ratio (we simply treat the unwanted intermodulation and overtone components as "noise") will decrease with every further beacon added.
Additionally, the overall signal integrity "requires" (aka.: "better results") that no frequency is a multiple of another one and the difference between any of them is unique to all others.

Though there are ways and methods to improve the quality of the digitally generated signal (e.g. a narrow bandpass of higher order), a simple, cheap and wide spread solution is in use since ~1960:
Our telephone's DTMF dialing mechanism.

Now, you may guess where the name "RayDialer" results from ;-)

Imod ~ Uf1 + Uf2 ('pure analog')
FFT
The advantageous spectrum of two (or even more) combined sine waves can not be overlooked. The few drawbacks are a higher current consumption, compared to a short pulse-paused ratio of a digital system and a little more complex circuit (offset shifted current source including a regulation).

There are a lot of ready to use DTMF chips available. I decided to use a HT9200. It can be operated in parallel or serial input mode. Parallel mode only requires four pull-up or -down resistors to select one of the 16 different DTMF tone combinations. Additionally, a chip enable pin can turn the output on or off.
In its serial mode, the HT9200 can be hooked up to a microcontroller.


Because the light intensity of an LED is (almost) direct proportional to the current, flowing through it, we need a voltage to current "converter".
The circuit on the right represents the absolute minimum, achieving this requirement.

The signal output of the HT9200 contains a DC offset of about 1/2*Vcc. The overlaying AC "audio" (shall I say optical, here? ;-) signal itself, is about 1Vpp (no load; see screenshot lower left).
A closer view reveals the discrete steps of the internal D/A converter (screenshot mid, right), they will be filtered out be the RC combination R2, C1 (fc=3.4kHz, can be lowered).

Despite the non-linear behaviour of the transistor Q1, the current flow through LED1 will be proportional to the voltage output of the HT9200. A coarse approximation (DC only):

Iled = (Udtmf - Ube) / R1
<=> Iled = (2.5V -0.65V) / 82Ohm
<=> Iled = 23mA

HT9200 signal output; Vcc=5V
a closer view...
just another one

The preceding, minimal circuit has many flaws:

  • the DC voltage offset causes a constant current offset and is not independent from the AC part
  • Q1 will cause unwanted intermodulations and does not provide a regulation
  • only one LED (even it is a high-power type) can not illuminate 360° (except for additional optics)
  • depending on the amount of LEDs, +Ub has to be chosen carefully (power dissipation Q1)
  • ...
But it may help getting quick "lab table results".


The full featured, all-inclusive test layout, which indeed contains much more stuff than a reduced-version-transmitter needs for operation, allows two basic LED orientations. As shown on the image at the right, the LEDs can be mounted horizontally, for direct receiver contact, or vertically, for indirect illumination of, e.g., a table tennis ball (or comparable ;-).

Each of the LEDs can be bypassed with a jumper. This comes in handy if the beacon is positioned in a corner or close to a wall. The circuit will automatically adjust the internal operating voltage to match the amount of LEDs and keep the losses low.

Reduced versions can of course be operated with a single IR power LED, without the need for a switching regulator or all the other fancy stuff...

all-inclusive schematic...
... and test layout
the real TX hardware

6/2010; to be continued...

Hardware RX

to be uploaded...



noisy signal; 5kSps; 0.2s; float

clean signal; 5kSps; 0.2s; integer

real HW/FW sweep; 5kSps; 0.2s; 1Vpp input

like above, enlarged

like above, enlarged

like above, enlarged
The Scilab scripts, whose produced the simulations and the dsPIC captured frequency sweep, can be downloaded here. They may provide a good start understanding (and fiddling around with) the Goertzel algorithm.

Firmware RX

blablabla...

Useless Pics



minimal TX (pure analog)

minimal RX
totally saturating the receiver;
still working ;)
Well, not quite exactly...
The S817 isn't really that large ;-)
the real TX hardware

Download

RayDialer:

Includes:
- schematic (PDF)
- placement (PDF)
- BOM (TXT)
- layout, Eagle (BRD)
DOWNLOAD: RayDialer-TX_V10-hard.zip V1.0; initial HW, all-inclusive version
DOWNLOAD: RayDialer-RX_V10-hard.zip V1.0; initial HW
DOWNLOAD: RayDialer-RX_V10-firm.zip V1.0; initial FW




ASkr 06/2010 initial version