T-REX
2006 CR10X Logger – RF Implementation
File Reference:
Word Doc: /net/isff/projects/TREX/doc/TREX_CR10X_Maxstream_Implementation.doc
Web Doc: /net/www/docs/rtf/projets/trex/isff/CR10X_Maxstream_Implementation.html
Contents
Logger / Radio Power Measurements:
Interfacing CR10X - Maxstream:
Interfacing
directly to the CR10X DE-9 I/O port: the 5-Volt Option.
Wiring for 5V
Option: CR10X – 9Xtend OEM direct:
Wiring for RF Modem
Option: CR10X SC23A – 9Xtend, Xstream or XBee modems:
Wiring for RF Modem
Option: NDAQ – 9XTend, Xstream or XBee modems:
CR10 Logger code to
toggle pin-sleep:
This document is a combination of notes taken related to interfacing the Maxstream Radios to the Campbell CR10X loggers as well as Operations Notes relevant to TREX-06. Some of the contents are informational only and will not apply for operational considerations.
For TREX-06, the radiometer stands are connected via a
wireless (Maxstream) link to the NDAQ at each of the 3 tower
installations. A solar panel / charger
inside the logger boxes provide power for the logger, radio and sensors. The NIDS have a separate gray ‘radio box’
that connects via a standard Bulgin cable assembly. These boxes include a switch and LED
indicating when power is applied. They
are configured to remain powered up full time (ie no pin/port-sleep) so that
they receive data continuously from the loggers. The logger radios are configured for
‘port-sleep’ in the case of the 9Xtend and Xstream radios. Each of the tower sites will have different
Maxstream radios (due to inventory limits): Central has XBee radios which
ultimately will have Zigbee firmware installed in the future, but not
presently. The West/South have a pair
of 9Xtend and Xstream radios respectively (I believe). The maxstream radios are interfaced to the
loggers using standard RS232 communications via
1) Maxstream Setup Program: ‘X-CTU’
This is a Windows XP program that lives on both the Panasonic Toughbook and Bison Latitude PC. On the bench you need to connect a power supply and a straight DE-9 serial cable to the maxstream radio. These can be found in the ‘spares’ box. At the station you need to use the ‘DE9 to Bulgin’ cable to the logger box and do two things: disconnect the CR10X logger (best to just unplug it’s power), and move the toggle switch next to the radio to the ‘radio’ position. This allows the console port to talk to the radio instead of to the CR10X. Don’t forget to put the switch back and power to the CR10X when you’re done interacting with the radio.
2) Talking to the CR10X Remotely
It is possible to start a ‘minicom’ or ‘rserial’ session through the NIDS to the CR10X to look at its program and/or calibration table. If needed it is probably better to do this directly rather than via the wireless link because of the ‘sleep’ considerations’ of the radios. It is possible to lock up the CR10X via the wireless method although I did confirm that the logger will automatically restart ‘eventually.’ What happens is if you don’t type commands fast enough, the radio will not get any activity on it’s receive line and will decide to go to sleep; meanwhile the logger is waiting for more commands from you.
3)
The solar panels are fairly closely matched to the expected load. Since the battery voltage is reported by the loggers, it is recommended to monitor how the solar charging system vs load is performing.
4) RF Power / Range / Antennas
To save power the 9Xtends have been
set to 10mW-RF which is the lowest of the sets. The XBee’s are at 60mW (I recall) and the
Xstreams are set at 100mW-RF. This
should be adequate for ranges up to 300-feet without any difficulty assuming
the antennas are visible to each other.
Note the position of the antennas during setup and try to keep them on
the same side of the boxes/towers.
Logger / Radio Power Measurements:
Measured
Loads at 12.5VDC:
.25W 20mA Logger
running simulated code
.29W 23mA Logger/232
running simulated code
.35W 27mA QuasiEstimated
level with sensors (paritally
measured
with 1pyg,1psp,1tsoil,1tp01)
.80W ~60mA Logger/232
+ Radio Modem (10mW-RF,port-sleep 'D'*100mS)
1.2W 90mA Logger/232
+ Radio Modem (100mW-RF), port-sleep
OEM Radio
Option, 5V See notes about how to
interface the OEM module directly.
.15W 30mA OEM
Radio alone (10mW-RF), using CR10X +5
.45W 90mA ditto,
except with full-time receive enabled
.53W 105mA ditto,
with inverting hex buffer (pick another!)
0.5mA pin shutdown of OEM
Estimated
.50W OEM estimated
with 1.5 sec. receive on, then sleep
.88W OEM on full
time receive.
9Xtend modem: measured |
12.5V at |
10mW-RF |
100mW-RF |
1W-RF |
|
9600bps RF |
105mA |
160mA |
|
|
115kbps RF |
88mA |
115mA |
220mA |
|
Receive |
73mA |
|
|
9Xtend OEM : specification |
5V at |
140mA |
270mA |
730mA |
XBee |
12.5 |
240mA |
|
|
Xstream |
12.5 – Rcv |
74mA |
|
|
|
12.5 – Xmit |
140mA |
|
|
CR10 w/ port sleep 0x14 |
Avg |
63mA |
|
|
A nominal
7AH battery has been placed in the logger boxes and a 5-10W solar panel should
be placed flat on top of the box/stand where it will not be seen by the
radiometers. Panel sizes are not much
larger than the logger box itself.
If the
average power consumption remains below 1W, small panels presuming roughly 4W
output during 5 sun-hours should maintain the battery. From measurements above it appears the load
may remain under .8W total average power for 5-sec. messages. For safety if we assume a 1-1.5W load the 10W
panels would be better, at the 'expense' of size.
2 Maxstream 9XTend modems (high-power
units)
4 Maxstream Xstream (19.2) modems (1 set = spare)
6 XBEE (1 = spare)
Interfacing CR10X - Maxstream:
NOTE of
Interest:
Interfacing
the Maxstream RF modem to the 10X / SC23A RS232 module is trivial. Power for the modem is available using the
+12 taps on the logger. The disadvantage
is the added power used for converting to RS232 levels and the +12 supply.
Interfacing directly to the CR10X DE-9 I/O
port: the 5-Volt Option.
Interfacing a Maxstream OEM module directly to the 10X is more involved. Power savings would be roughly .3W at 10mW-RF. There are 3 issues: +5V supply, handshaking and protocol. The +5 on the logger de9 can handle the OEM at 10mW-RF (200mA supply for specified 150mA load max), however cannot run the radio at higher RF levels. For short distances the 10mW-RF should be adequate.
The logger uses handshaking but this should be easily
addressed. The CR10X sets pin-3 (RI)
high indicating it wants to initiate communications and the modem should set
pin-5 (ME) indicating it is ready to receive.
The opposite procedure is needed for the radio to initiate incoming
comms; ie analagous to typical hardware RTS/CTS. During prelim. test, the radio was set to
disable handshaking and the result was incoming communications did not function
although outgoing messages did flow. A bit more problematic, the logger uses inverted logic signals. During prelim. test this resulted in
'garbage' characters being received.
To run the 10X to OEM radio a separate interface is needed. This would provide +5 for the EOM via the
logger 12V supply, allowing higher RF power levels, and would incorporate an inverting
buffer to translate characters back to normal logic. Handshaking should be accomplished via
maxstream setup. For the XBee OEM, the
same is true except using 3.3V logic.
To save power I set the 9Xtend and Xstream maxstreams to use
its port-sleep function which turns off the radio if nothing is received at the
Rx for a certain period. If this time is
set too quickly, then talking to the CR10X can become problematic because if you
type too slowly the logger will not reply within this period and will appear to
lock up. Using setting of 'D' (~2-sec)
appeared to be the best compromise to save power and still worked for normal interaction
with the logger. If we never need to
communicate back to the logger this value can be set lower and there are some
other 'pin-sleep' options that may be better as well. The pin-sleep option could be incorporated
into an OEM interface module. The XBee
doesn't have port-sleep so we would need to use the cyclic sleep or pin-sleep
to save power.
Notes & brief Comparison of Maxstream 9Xtend / XBee
XBee will have
true mesh networking software: due 1stQ.06 (maybe jan-06)
Xtend has some
beta software coming that is a quasi repeater function, using the
source/destination address. Any radio in
the network mask that hears a broadcast that is not for it, will rebroadcast it
until it reaches the dest. Any radio
having done a rebroadcast, will ignore echoes of the same query, but will wait to
receive the 'reply-string' coming back and resend that. ie
probably 25% efficiency loss in small network, 90% in large.
XBee 250kbps RF rate
Zigbee mesh networking
2.4MHz band (has some ability to
occupy alternate freqs in presence of
wifi)
.06,.1W RF output (1-mile
outdoors, 100m indoors)
3.3V operation and cmos i/o
no sio port sleep option, but has
pin&cyclic sleep + pin shutdown
9Xtend 115kbps / 9600 RF rate
quasi-repeater rebroadcast
source-destination addressing.
900MHz band
.001-1W RF output (up to
20Miles@115k, 40@9600)
2.8-5V operation
sio-port sleep option + pin/cyclic
sleep + pin shutdown
Wiring for 5V Option: CR10X – 9Xtend OEM direct:
CR10X DE-9 |
|
9Xtend 2x10 header |
||
Desc. |
Pin |
|
Pin |
Desc. |
+5V at 200mA |
1 |
|
2 |
Vcc (2.8-5.5) |
Gnd |
2 |
|
1 |
Gnd |
RI |
3 |
|
10 (optional RTS) |
GPIn1, RTS, |
Rx, (5V level input) |
4 |
Invert Reqd |
6 |
DO data out |
ME modem enable |
5 |
|
9 (optional CTS) |
GPOut1, CTS, RX485 tx-enable |
PE sync.dev. enable for buss ops |
6 |
|
|
|
Clock / handshake |
7 |
|
|
|
+12V |
8 |
|
|
|
Tx, (5V level output) |
9 |
Invert Reqd |
5 |
DI data in |
|
|
|
7 (+5 or cr10 dio) |
Pin shutdown, active low |
|
|
|
8 (optional pin-sleep) |
GPIn2, Pin Sleep |
|
|
|
11 |
Config (pwr-up), RSSI-pwm |
|
|
|
12-20 |
Reserved |
Wiring for RF Modem Option: CR10X SC23A – 9Xtend, Xstream or XBee modems:
CR10X SC23A DB-25 |
|
RF Modem DE-9 (male) |
||
Desc. |
Pin |
|
Pin |
Desc. |
+5V at 200mA |
1 |
|
|
Vcc (2.8-5.5) |
Gnd |
7 |
|
5 |
Gnd |
Rx, (To …) |
2 |
Invert Reqd |
6 |
DO data out |
+12V |
8 |
|
|
|
Tx, (To …) |
9 |
Invert Reqd |
5 |
DI data in |
Wiring for RF Modem Option: NDAQ – 9XTend, Xstream or XBee modems:
NDAQ Bulgin |
RF Modem DE-9 (male) |
||
Desc. |
Pin |
Pin |
Desc. |
+12 |
1 |
9 |
Optional Power, Vcc (2.8-5.5) |
CTS |
3 |
8 (optional CTS) |
Optional flow ctrl not needed or used |
RTS |
4 |
7 (optional RTS) |
Optional flow ctrl not needed or used for optional binary
commands |
Rx (to NDAQ) |
5 |
2 |
|
Tx (to modem) |
6 |
3 |
|
DTR |
7 |
4 (DO NOT CONNECT) |
Optional Shutdown pin.
Can only be used w/ViperCom1/4 |
Gnd |
8 |
5 |
|
For Xbee RF Modems: Setup
9Xtend:
Hardware sleep is available on the OEM module but not the RF modem: <1microA
Pin-Sleep, SM=1 is available on the RF Modem: DTR DE-9 pin-4, <17mA, off= logic high
Port-Sleep, SM=2, serial port sleep after ST=x*mS of inactivity, easy-probably best to use.
XStream:
Pin-Sleep, SM=1 is available on the RF Modem: DTR DE-9 pin-4, <6mA, off= logic high
Port-Sleep, SM=2, serial port sleep after ST=x*mS of inactivity, easy-probably best to use.
XBee:
Hardware sleep is available on the OEM module but not the RF modem: <10microA
Pin-Sleep, is available on the RF Modem: <25mA,
SM=1 is for pin-hibernate that takes least power and wakes up in 13.5mS
SM=2 is for pin-doze that takes more power but wakes up in 2mS
Logic Level: DTR DE-9 pin-4=high=awake, DTR=low=sleep (opposite others)
Port-Sleep, not available.
CR10 Logger code to toggle pin-sleep:
Add this command at the beginning
of the main program table just as it starts execution:
; go to turn on the maxstream line
1: Do (P86)
1: 7 Call Subroutine 7
Subroutine 7 looks like this:
----------------------------
; Let's use subroutine 7 for delaying for the maxstream radio to turn-on
16: Beginning of Subroutine (P85)
1: 7 Subroutine 7
17: Do (P86)
1: 43 Set Port 3
High ; this turns on port C3 to +VDC
18: Beginning of Loop (P87)
1: 0000 Delay
2: 2000 Loop Count
19: Do (P86)
1: 17 Set Flag 7 High
20: Do (P86)
1: 27 Set Flag 7 Low
21: End (P95)
22: End (P95)
---------------------------
with these simple toggles of the flags (which i couldn't see you using
anywhere) the loop count of 2000 is very close to 2-seconds. i
tried this all the way up to 9999~=10 seconds. then within your
5-second processing loop the first 2 seconds turns the maxstream on, then goes
to process and send the data, maintaining the 5-second loop timing. Finally
at the end of the serial output statement add a turn-off of the line to put the
maxstream back to sleep.
ASTER at 9600 baud
84: Serial Out (P96)
85: Do (P86)
XBee OEM: Maxstream zigbee networking 2.4Ghz module data sheet
XBee RF Modem: bundled modem data sheet
9Xtend OEM: Maxstream long-range radio 900Mhz module data sheet
9Xtend RF Modem: bundled modem data sheet
Morningstar SG4 PV controller: Proper charging of the batteries may not be necessary. For comparison sake we will try two sites with a controller instead of a simple blocking diode.