|
RayDialer (light [aka.: "reduced", not "bright" {although it is kind of "bright"}])
Features:
This minimal positioning system consists of three parts:
Hardware TXThe 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:
What happens if we add a second frequency, "digitally mixed" to the first one?
Although an analysis isn't problematic, even for signals like this, the signal to noise ratio (we simply
treat the unwanted intermodulation and overtone components as "noise") will decrease with every further beacon added.
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: Now, you may guess where the name "RayDialer" results from ;-)
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.
Complete DTMF Frequency Table
=================================
1209Hz 1336Hz 1477Hz 1633Hz
697Hz 1 2 3 A
770Hz 4 5 6 B
852Hz 7 8 9 C
941Hz * 0 # D
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
The preceding, minimal circuit has many flaws:
RayDialer TX Channel Settings
===========================================
Note: Switch pulls low, if ON.
DIGIT 4 3 2 1 frequencies [Hz]
1 ON ON ON OFF 697 + 1209
2 ON ON OFF ON 697 + 1336
3 ON ON OFF OFF 697 + 1477
4 ON OFF ON ON 770 + 1209
5 ON OFF ON OFF 770 + 1336
6 ON OFF OFF ON 770 + 1477
7 ON OFF OFF OFF 852 + 1209
8 OFF ON ON ON 852 + 1336
9 OFF ON ON OFF 852 + 1477
0 OFF ON OFF ON 941 + 1336
* OFF ON OFF OFF 941 + 1209
# OFF OFF ON ON 941 + 1477
A OFF OFF ON OFF 697 + 1633
B OFF OFF OFF ON 770 + 1633
C OFF OFF OFF OFF 852 + 1633
D ON ON ON ON 941 + 1633
Hardware RXRX1, The Beginning RX1 detects the direction of one or more sender(s) by rotating up to four photodiodes and measuring the signal intensity at different angles. Thanks to a tiny, but powerful dsPIC, all channels are sampled simultaneously and analyzed by a real-time Goertzel-Algorithm.
The photodiodes used, have a 50% intensity angle of +-20°. Each of them is mounted with an angular offset
of 40° to the adjacent one. Theoretically, this results in a constant, summed up signal level across rotation. The differential signal input of two (or more) adjacent diodes is not used for position detection, only for a quick, first "guess" across an angular span of 160°. For operation, only one diode would be required, but four speed up things dramatically...
The circuit consists of four equal detection circuits (CH1-4).
Because only a single supply is available, R2, R5 and C4 provide an 1.65V offset for the circuit.
The output signal, including the offset, is filtered by R4 and C5 (arithmetic mean,
time constant ~10s (a little large, I agree ;-)) and fed back to the negative input of the photodiode
amplifier via the second half of the MCP. The dsPIC provides a serial (115k, 8N1), as well as an I2C interface. For NXT compatibility, choose R23 and R24 to 82k. For real world I2C interfaces, reduce them to ~2k2-10k. The processor had some spare pins left, so a tiny LCD was added to the test layout. It has to be mounted via IC-sockets or stuff like this. to be continued... (11/2010)
Firmware RXRX1to be documented... (11/2010)
HOTKEYS (via serial, 115200,8N1):
=================================
ESC stop (after current operation)
d DTMF mode, all channels (4), all frequencies (8)
D DTMF mode, single shot
s sweep mode
S sweep mode, single shot
a sweep output for all channels (only serial)
0 sweep output for one channel only
c sweep channel selection (one channel); requires IDLE_STATE; followed by:
1 select channel 1
2 select channel 2
3 select channel 3
4 select channel 4
ESC aborts channel selection
f sweep frequency range selection; requires IDLE_STATE; followed by:
1 select tone 1; sweep f1-47Hz..f1+48Hz
2 select tone 2; sweep f2-47Hz..f2+48Hz
...
8 select tone 8; sweep f8-47Hz..f8+48Hz
a select tone 1..8 sweep f1-47Hz..f8+48Hz
ESC aborts range selection
r reset max marker (horizontal bar resolution) for LCD value normalization
l linear intensity axis on LCD
L logarithmic intensity axis on LCD
1 250 steps per Goertzel analysis
2 500 steps
3 1000 steps
4 1250 steps
5 1500 steps
6 1750 steps
7 2000 steps
8 2250 steps
9 2500 steps
? show help message
h show help message
Number of Goertzel steps (samples) and effects. Download this Scilab script here, or use SiSeLi ;-) Notice that the output values are NOT NORMALIZED (divided by the number of samples)! Use the source ;-)
OUTPUT FORMAT IN DTMF MODE:
=============================
<channel>,<f1>,<f2>,...<f8>
START_DTMF
1,1982,1559,974,14,284,2,96,518
2,1985,1508,978,19,289,2,103,511
3,1774,1487,281,473,788,377,557,117
4,1793,1433,291,468,718,370,552,110
STOP_DTMF
OUTPUT FORMAT IN SWEEP MODE (ALL CHANNELS):
===========================================
<channel>, <frequency>, <intensity>
START_SWEEP
1,650,2221
1,651,2149
1,652,1356
1,653,347
1,654,10
1,655,614
1,656,1583
1,657,2030
2,650,2103
2,651,2046
2,652,1284
2,653,319
2,654,24
2,655,667
2,656,1650
2,657,2062
3,650,1926
3,651,1501
3,652,483
3,653,0
...
1,1002,10
1,1003,614
1,1004,1583
...
4,1703,1501
4,1704,483
4,1705,4353
STOP_SWEEP
OUTPUT FORMAT IN SWEEP MODE (ONE CHANNEL):
==========================================
<channel>, <frequency>, <intensity>
START_SWEEP
1,650,2131
1,651,2093
1,652,1332
1,653,315
1,654,21
1,655,658
1,656,1633
1,657,2084
1,658,1640
...
1,1704,1344
1,1705,112
STOP_SWEEP
Firmware channels
==================
CH f[Hz]
1 697
2 770
3 852
4 941
5 1209
6 1336
7 1477
8 1633
Useless Pics
Download
RayDialer:
|