Hartcran House, 231 Kenton Lane, Harrow, Middlesex, HA3 8RP, England Tel: +44 (0) 20 8909 9595, Fax: +44 (0) 20 8909 2233, www.radiometrix.com M48-144-SHX1 Issue 1, 31 October 2012 500mW VHF NBFM multi channel radio modem The M48-144-SHX1 presents M48 modem IC combined with a SHX1 radio module and suitable interface circuits, power supplies, connectors to provide a complete RS232 radio modem interface. Optionally, the board can be housed in an EAS120 extruded aluminium housing. In the simplest case, a pair of these units (with suitable aerials and power supplies connected, of course) can be connected directly to the serial ports of a pair of industrial PCs and the resulting wireless data link used without any further installation or programming. The M48A is a simple, half duplex, transparent data link device. It provides a basic 4800 baud RS232 compatible path without the user needing to format, code, detect or otherwise worry about modifying his existing datastream or providing extra 'control' lines. The user interface datarate, addresses and operating parameters can all be easily reprogrammed via the serial port. Figure 1: M48A-144-SHX1 It ought to be emphasised that the M48A is a very simple, easy to use, device. As supplied, it operates as a 4800 baud, transparent half-duplex data link. If required, there is an extensive range of programming options, allowing user interface speed from 1200 to 76800 baud, hardware flow control, one to one, one to many and broadcast addressing options, and acknowledge/re-transmit error handling protocols. Simple store and forward repeater operation is also provided. A good demonstration can be had by connecting a pair of PCs by their serial ports and a null-modem cable, and setting up terminal emulators (4800 baud, asynchronous, local echo on) on both computers. Confirm that good RS232 communication is present, and then replace the cable with a pair of M48A modems. The resulting 'radio teletype' can be entertaining to play with. Features Usable range over 5km (@ 500mW RF power) 255 serial select channels 5kbps pulse duration coded protocol Synchronisation codes and checksum to reduce false triggering on noise Programmable transmit address and four receive addresses Programmable timing parameters (preamble length, etc) Programmable auxiliary serial output (to program radio modules) Programmable serial modem baud rate (1200 - 76800 bps, half-duplex) Addressable point-to-point and point to multi point Packet acknowledge/resend (ACK) mode Store and forward repeater function Applications Amateur Radio Automatic remote Meter Reading (AMR) PDAs, organisers & laptops Multi-Use Radio Service (MURS) Remote operated vehicles Data loggers Industrial (SCADA) telemetry and M2M systems Fleet management, vehicle data acquisition Radiometrix Ltd, M48A-144-SHX1 modem manual page 1 User Interface 5 1 9 Figure 2: DB9F RS232 connector pin arrangement Pin description Pin 1 2 3 4 5 6 7 8 9 Name RX_FLOW RX_DATA TX_DATA RX_HOLD 0V ENABLE N/C TX_FLOW +5V out Jumpers LK 1. LK 2. I/O out out in in in out out Function RS232 'DCD' output. Active (+ve level) when data is present in rx buffer RS232 'RXD' data out RS232 'TXD' data in RS232 'DTR' input. Take -ve to interrupt rx data output Ground RS232 'DSR' Pull low to enable unit. (Internal 20K pullup to Vraw) (RTS pin on standard RS232) RS232 'CTS' output. Active (+ve level) when the tx buffer is nearly full Regulated supply output. 500mA max. (switched by pin 6) link to hold unit permanently on (disables pin 6 switching) link to enable rx dataflow inhibit (DTR) input. As supplied, all links are open Power This is a 2.1mm power connector. Center pin is positive. Supply requirements are: 6-15v normal operation NOTES: 1. All Input pins will tolerate true +/- RS232 levels. No buffering is required. 2. The modem provides a half duplex link: Provided no two devices attempt to transmit at one time (a 'high' on RX_FLOW may be used as a primitive 'other user on channel' indication) no further restrictions on data transmission need be made, as all transmit timing, valid data identification and datastream buffering is conducted by the unit. There is no 'transmit enable' pin. Sync and framing words in the packet prevent the receiver outputting garbage in the absence of signal or presence of interference 3. If the user interface rate has been set to greater than 4800 baud, then the modem cannot empty the 128 byte tx data buffer as quickly as the user can fill it. In this case it is either necessary to limit the average data throughput, or to monitor the TX_FLOW (CTS) output, and interrupt the dataflow when this pin signals a full buffer. TX_FLOW activates when the buffer is 3/4 full, and deactivates when it is empty 4. A fairly complex addressing structure is included in the datastream. Units have four independent (OR'ed) receive addresses and a separate transmit address. (all units are supplied set to tx address =1, rx addr1 = 0, rx addr2-4 = 1) Note: For details relating to the radio module fitted on board, see SHX1 datasheet http://www.radiometrix.com/files/additional/SHX1.pdf Radiometrix Ltd, M48A-144-SHX1 modem manual page 2 Condensed specifications Frequency Frequency stability Channel spacing Number of channels Supply voltage Current Operating temperature Size Spurious radiations Interface User Power RF Indicators Any 3MHz segment in 140 - 175MHz (TX and RX frequencies need not be the same) ± 2.5kHz 12.5 or 25kHz (depending on the version) 1 of 255 user programmed 6 - 15V 320mA transmit 27mA receive / idle (plus up to 20mA into RS232 port) ο ο -20 to +70 C (Storage -30 to +70 C) Board version: 120 x 55 x 18mm (excluding connectors) EAS version: 123 x 64 x 30mm (excluding connectors) (case is an EAS120, silver from Evatron) Compliant with EN 300-220 9 pin D type 2.1mm connector SMA Transmitting (red LED) Intended approval ETSI EN300-220 Transmitter Output power TX on switching time Modulation type Deviation Adjacent channel TX power TX spurii Inputs 500mW (+27dBm) ± 1dB <50 ms (from TXE transition) FSK (F3D) +/- 3kHz -37dBm -40dBm data (CMOS/TTL compatible) Receiver Sensitivity image / spurious blocking spurii, adjacent -113dBm -65dB -86dB -65 dB Modem Baud rate Format Radio channel data rate Coding Packet length Addressing Buffers Flow control 4800 baud (transparent, half duplex) 1 start, 8 data, 1 stop, no parity 5.1 kbit/sec peak (maximum transmitted frequency: 3.2KHz) variable period phase coded 1-16 bytes 1 of 254, user programmed. Multiple rx addresses 128 byte tx, 64 byte rx CTS, DCD and DTR Radiometrix Ltd, M48A-144-SHX1 modem manual for 0.1% data error page 3 Application Information What can you do with an M48A ? The M48A is a 4800 baud radio modem, compatible with narrowband radios. Just a faster i1200, or a simpler RPM1 ? ....... not quite. What does an M48A do ? In the simplest possible sense, the M48A is just a radio modem baseband device. It provides an interface between a user's asynchronous (“RS232 type”) serial port and the audio channel of a low power radio module. The M48 will transparently handle a half duplex serial stream at 4800 baud, buffering framing and coding the data into a baseband signal that a narrowband wireless module can handle. At the receive end it decodes the audio signal back into serial data. The timing requirements of the radio are allowed for with internal FIFO buffers, while the noisy imperfect radio baseband path is hidden from the user behind S/N efficient bit coding and data packetisation, with frame synchronisation and a CRC error detection protocol. The interface An M48 can be used with just two serial data lines (TXD, RXD). In many applications that is sufficient. If data is being sent in both directions (half-duplex) however, it is necessary to allow for the turnaround time (transmit to receive or vice versa) as the M48 cannot handle transmit data input while it is decoding receive data. (Also, in advanced modes, such as when user interface data rate is higher than 4800 baud (see later), then transmit data hand-shaking is needed) In these cases it is useful to have more information as to the status and timings of the link. The M48 provides additional 'handshaking' lines: RX flow. Goes 'high' when the device has valid data to output (“DTR” out) TX flow. High when the transmit buffer is ¾ full, low when empty (“CTS” out) RX hold. When pulled low, prevents device from outputting data (“RTS” in) Buffers As alluded to earlier, data into and out of the M48 is buffered through a pair of small FIFOs. On the transmit path a 128 byte buffer is used, while on receive a 64 byte buffer is implemented. These buffers actually occupy the same memory space on-chip, so the part cannot receive and output serial data . Transmit operations will always over-ride receive. A byte sent to the device will clear the receive buffer, even if it contains valid data. (An algorithm which reads the 'RX flow' signal can prevent this occurring) In simple, transparent mode these buffers are invisible to the user. Speed In normal usage the M48 uses a 19.6608MHz crystal for a basic 4800 baud transparent throughput. However, elementary communication theory tells us that ultimate range and S/N performance (sensitivity) relates to bandwidth, and hence data rate. In applications where ultimate range matters more than a fast data path the M48 can be fitted with slower clock crystals. In these cases the fundamental link data rate is reduced (and other timing parameters scaled accordingly) but the link range will be increased. Crystal frequency 19.6608MHz 9.8304MHz 4.9152MHz 2.4576MHz Data rate 4800 baud Data rate 2400 baud Data rate 1200 baud Data rate 600 baud Sensitivity +0dB Sensitivity +3dB Sensitivity +5dB Sensitivity +7dB [ slower clock frequencies will also allow operation on lower power supply voltages than the basic +5v normally specified, See Microchip PIC16F648A data sheet for more information ] Radiometrix Ltd, M48A-144-SHX1 modem manual page 4 Radio interface The raison d'être of the M48 device is to insulate the user from the peculiarities and limitations of the radio module's audio path. While a detailed analysis of the over-the-link signals is not intended, a basic overview may be useful: Three signals connect the modem chip to the radio: tones_out, tones_in and n_txe. All are digital levels (so connection must be made to the digital baseband pins of the radio, not the low level analogue connections). At the bit-level the radio link signal generated by the M48 is a proprietary biphase (synchronous) bitstream with a maximum frequency component of 3.2KHz. There is a pseudo-random data whitening function applied to the data, but the code still does not have a perfect 50:50 mark space balance, so should be considered a DC coupled signal. At the receiver end a conventional averaging data extractor will function but a quasi-dc coupled (peak detecting) type, such as the Radiometrix QR96, will give optimum performance. The data stream is further formatted into packets. Each packet contains a framing sequence, address and status information, a CRC and 1-16 data payload bytes. Transmitter on-time delay is allowed for by the addition of a preamble sequence, while during continuous data transmission the packets are transmitted end-to-end. [ Unless otherwise programmed, all units send on address 1 and receive on address 0 (broadcast) and address 1 ] M48 also has an auxiliary serial output (only) pin, which is used to allow the user to send serial programming strings to the associated radio module through the device. Programming the M48A In the simplest case an M48 can be used 'as supplied' as a straight forward transparent data link. There are, however, a number of further options and features which require the user to program parameters into the device. Normal transparent data mode is referred to as 'data' mode. To program the device, it is necessary for it to be in 'setup' mode. The device is programmed through the RS232 port (without needing extra 'pgm mode' switching pins or extra hardware). The command set uses simple readable ASCII words, and decimal or hex numbers. All commands are in upper case. When in setup mode the usual radio data communication functions are suspended, but limited one-packetat-a-time non-transparent operation is possible, via special commands. The setup mode is activated by means of a 'break / respond' protocol entering setup : user generates a 'break' (long 'space' condition) M48 sends two characters, an @ and a random printable ASCII character user sends back the random character M48 replies with a login message “M48 SETUP” and enters setup mode There is a 5 second timeout following the break within which the response must be sent , or the device reverts to data mode. An ASCII 1 (ctrl A) resets the timeout and generates a new @ and random character sequence. [ 'Break' conditions can be generated in several ways. Some terminal emulators have alt or ctrl key sequence. Dedicated hardware can be used to force a long (50-100mS) logic zero onto the TXD pin. Or an ASCII zero can be sent at a much lower baud-rate ] Once in setup mode, input bytes are stored in a 32 byte (maximum) command buffer and echoed back to the serial output. Space characters are echoed back, but are not loaded into the buffer. Commands are either short words or single command characters. (For example, a <cr> character is the evaluate/process command). After successful execution of a command the device will reply with an 'OK' message. Commands which program a value into the internal non-volatile E2PROM take around 50mS for the write cycle, Radiometrix Ltd, M48A-144-SHX1 modem manual page 5 The unit will only respond to certain command strings: Upper case characters are used for all commands Spaces are echoed, but are ignored by the parser Single character command COMMANDS Enter Escape ? / & delete ASCII 13 27 63 47 54 38 127 FUNCTION processes the input buffer contents (and clears the buffer) terminates setup mode and returns to normal 'data' operation prints the current contents of the command buffer (as above) shortcut for the STATE command (see later) shortcut for the RX command clears the input buffer General commands COMMANDS DEFAULT STATE LOCK EXIT TEST RX FUNCTION The unit self-reprograms with ALL original factory preset values Prints out the current operating parameters (a single minus sign, ascii 54, does the same) The unit now defaults to setup (rather than data) mode on power up Return to data mode (same effect as an escape (ascii 27) byte) If a LOCK command is in force, an escape byte has no effect, but EXIT overrides LOCK Turns on the transmitter, and outputs a continuous 200Hz tone This mode is disabled by any activity on the TXD input Turn on the receiver/decoder (as if in data mode) and output received packets as normal This mode is disabled, and command mode re-entered, by any activity on the TXD input Baud rate commands As supplied, the main interface is set to 4800 baud, and the auxiliary port to 2400 baud . COMMANDS BAUD b1 BAUX b2 FUNCTION Set main port baud rate set aux port baud rate NOTES b1, b2 are baud rates Only the first two digits are needed, i.e. BAUD 12 iss valid Main port (b1) supports 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800 Aux port (b2) supports 1200, 2400, 4800, 9600 only These setup parameters are immediately stored in E2PROM, and take effect right away. Remember that baud rate scales with changes in crystal frequency (for example, if a 4.9152MHz crystal is fitted then BAUD 2400 will set a baud rate of 600). When the interface baud rate is higher than the (4800 baud nominal) radio link interface speed, the system is no longer truly transparent. As the modem is removing bytes from the buffer slower than the user interface is supplying them, it is possible to over-fill the buffer and lose data, unless the user carefully controls the timing of the data stream or uses the TX_flow signal. This pin allows the status of the transmit buffer to be monitored. It begins low. It goes high when the buffer reaches ¾ full, and is then re-set (to low) when the buffer is empty again. It can be used to provide a simple 'CTS' signal. [ It is possible to 'lose track' of the baud rate of a unit while manually programming it. In this case an easy way of 'finding' the speed can be used: a byte should be sent to the device at each of the valid baud rates, and the echoed character monitored. Only at the correct rate will a correct echo be seen ] Timing commands COMMANDS DELAY dd PREAM pp TXOFF oo FUNCTION Set the initial delay between first byte arrival and transmit start (20mS default) Set the number of (620uS long) preamble bits (80 bits / 50mS default) Set the tx ramp-down period (20mS default) Note: Variables dd, pp and oo are all two digit hexadecimal values (00 to FF). These timing parameters are immediately stored in E2PROM, and take effect right away. Radiometrix Ltd, M48A-144-SHX1 modem manual page 6 The timing commands directly affect the way the modem device controls the radio module. Beware! If they are set incorrectly then data errors or unreliable operation will result. The default settings are a safe, conservative setup for a typical 50mS set-up time multi-channel transceiver. For faster (usually single channel) radios the PREAM value can be reduced. Do not reduce this parameter too far, as it must deal with the settling times of the receiver data recovery circuit as well as the transmitter turn-on time. The DELAY and TXOFF parameters are primarily concerned with optimum channel usage with intermittent user data streams. DELAY is a duration between first byte received (into an empty buffer) and the transmitter key-up, while TXOFF holds the transmitter on after a packet has finished sending. If a user is controlling their serial data stream more closely, and sending data in discrete, well organised bursts, then DELAY and TXOFF can be set to zero. Addressing The M48 data packet includes an address byte. It will only communicate with a unit set to the same address. There are four receive addresses (of which ADR1 is usually set to zero as a 'broadcast' mode) and a separate transmit address. Multiple receive addresses can be useful for multiple node systems, and for setting up simple (manual routing) repeater networks COMMANDS ADR1 aa ADR2 aa ADR3 aa ADR4 aa ADTX aa ADDR aa FUNCTION set receiver address 1 set receiver address 2 set receiver address 3 set receiver address 4 set transmitter address set rx address 1 to zero and set tx address and rx addresses 2, 3 and 4 to a Notes: 1. aa is a two digit hexadecimal value (00 to FE). Address FF (255) is not permitted. 2. Address commands write to volatile memory. To transfer programmed addresses to the power-up settings, the PROM command must be used. 3. As supplied: adr1 is zero, and adr2, adr3, adr4 and tx address are all set to 1. Mode commands Beyond it's usual 'transparent data' mode, the M48 can also operate in an 'extended' mode. In this case the maximum packet size is reduced from 16 bytes to 14, and a 'burst identifier' word is included (obviously this slightly reduces overall throughput). On transmit, a different burst identifier is attached to each new packet. The receiving unit ignores the second (and subsequent) packet with the same identifier. This allows a receiving M48 to ignore multiple copies of the same data packet (as will be encountered in multiple transmission or repeater/network systems) COMMANDS MEXT AKN TRIES rr TIMEOUT tt STAF FUNCTION Extended mode (burst ID on, multiple transmissions set by TRIES) The unit now operates in acknowledge/resend (extended) mode Number of transmissions attempts allowed in AKN and MEXT modes Duration of AKN resend timeout (tt x 0.41mS) Operate as a store and forward repeater (with MEXT set, or not) Notes: Variables rr and tt are all two digit hexadecimal values (00 to FF) Extended mode (MEXT) is used with repeater systems. With TRIES set to two or more, this mode sends each packet several times (increasing the chance of reception at extreme range). Lastly, the M48 has an ' AKN/re-transmit ' mode. In this case, after each packet is sent, the receiving unit sends back an knowledge message. If this message is not successfully decoded, at the transmitting end, it will re-send the packet. The knowledge timeout period and the number of permitted re-tries are both user programmable. [ Do not use AKN mode with STAF repeaters. Timing conflicts occur ] AKN mode provides the greatest data transfer reliability, although the overall data throughput is markedly reduced. Radiometrix Ltd, M48A-144-SHX1 modem manual page 7 COMMANDS NORM PROM DEFAULT DIAG FUNCTION The unit returns to standard, transparent mode Writes the current volatile settings (addresses and operating modes) into the E2PROM as the new power-on settings The unit self-reprograms with ALL original factory preset values Enter a diagnostic mode, where the address, length, checksum and decoder status byte for every received burst are printed Additional info on the M48 DIAG mode Takes effect when returning to data mode (an EXIT or <escape> command) The unit then does not output the received data burst. Instead, it outputs a status line whenever ANY valid M48 packet is received A:xx L:ll C:cc F:ff Where, xx destination address of the burst || length of the burst data payload (minus one) cc checksum byte value ff is a function byte, showing the status of the receiver decoder (ff=07 indicates a correct address and checksum match) DIAG mode is deactivated by either re-entering setup mode and executing a NORM command, or by poweron-reset String commands There are a series of special commands which allow whole strings of characters to be sent via the transmitter, or the auxiliary serial port (usually connected to the radio module programming input) Auxiliary port output operations Square brackets (ASCII 91, 93) delineate the string. Serial data routed to the AUX pin [ (1-30 byte data string) ] Outputs the text string between the [ ] characters [ (1-30 byte data string) <cr> As above, but with an added CR (13) appended to the end of the outputted string Command mode transmit operations $ (length byte) (1-16 byte data string) ( Note: $ is ASCII 36 ) This function output a data packet to the transmitter, then returns to setup mode. The (length byte) is a single hex character. It sets the length of a transient data buffer, The actual buffer length is one more than the value of the length byte, so 0-F corresponds to a buffer between 1 and 16 bytes long The (data string) is a string of bytes equal in number to (length+1) After the length byte, the M48 sends back a colon character (ASCII 58) When the final byte is received, the modem goes into transmit, and sends the packet. By careful use of the & and $ command bytes, the M48 can be used in a non-transparent mode, without ever leaving command mode. This is especially useful for the master node in point to multi-point operation. Radiometrix Ltd, M48A-144-SHX1 modem manual page 8 Timings The data throughput of the M48A is limited by the radio path. In continuously streaming (transparent) mode a baud rate of 4800 baud is supported without any buffer overflows. Byte latency is influenced by the switching performance of the radio (and the programmed DELAY and PREAM values). In default mode (20mS delay, 50mS preamble) the single byte in to out latency is of the order of 110mS (20+50+40mS burst length and processing delays) although in streaming data this is reduced to around 30mS If radio switching times are faster, then the preamble duration and the tx off delay can be reduced (crystal controlled radios such as NiM2 work well with 15mS of preamble, 5mS tx off) and latency falls to around 40mS In ANK mode, the switching speed of the radios, and the time absorbed in sending and decoding the acknowledge burst dominate the data throughput. The acknowledge in itself requires only 20mS, but the requirement to switch both radios between receive and transmit (to send the data packet, and then the akn packet) adds a significant overhead. Referring to the default timing setup this results in 1 packet per 150mS, and a peak data throughput of only 900 baud, although if radios with faster switching performance are used then this is significantly increased. (With NiM2 or BiM1 radios, the preamble duration can be significantly reduced, and an acknowledged mode data rate of well over 1200 baud is achievable) Unless only short data bursts are used, we recommend the use of CTS flow control if AKN is selected RS485 to RS232 Adaptor Figure 3: RS485 to RS232 Adaptor connections M48 Applications Board can be supplied with RS232 DB9F, 2.1mm DC Jack connectors replaced with 3-wire RS485 to RS232 Adaptor and power terminal blocks. http://www.ti.com/lit/ds/symlink/ds3695.pdf Jumper Link JP13 is provided for 120Ω termination. USB-RS485-WE-1800-BT adaptor cable can be used to evaluate M48 RS485 Application Board on a PC/laptop running HyperTerminal Terminal Emulation Program via virtual COM serial port. http://www.ftdichip.com/Products/Cables/USBRS485.htm http://www.hilgraeve.com/hyperterminal/ Radiometrix Ltd, M48A-144-SHX1 modem manual page 9 Figure 4: RS485 to RS232 Adaptor Schematic Ordering Information Part No. Description M48-144-SHX1-EAS M48-144-SHX1 M48-151-SHX1-12K5-MURS-EAS M48-151-SHX1-12K5-MURS M48-169-SHX1-EAS M48-169-SHX1 For Amateur Radio (e.g. APRS) For Multi-Use Radio Service (MURS) in USA, Canada For AMR and Asset Tracking and Tracing Frequency band (MHz) 144.000 - 146.000 CH0: 151.820 – CH4: 154.600MHz CH0: 169.4125 - CH7: 169.5875, CH8: 169.6250 - CH15: 169.8000 When ordering R485 Radio Modem application boards, -RS485 suffix should be added above part numbers Radiometrix Ltd, M48A-144-SHX1 modem manual page 10 Radiometrix Ltd Hartcran House 231 Kenton Lane Harrow, Middlesex HA3 8RP ENGLAND Tel: +44 (0) 20 8909 9595 Fax: +44 (0) 20 8909 2233 [email protected] www.radiometrix.com Copyright notice This product data sheet is the original work and copyrighted property of Radiometrix Ltd. Reproduction in whole or in part must give clear acknowledgement to the copyright owner. Limitation of liability The information furnished by Radiometrix Ltd is believed to be accurate and reliable. Radiometrix Ltd reserves the right to make changes or improvements in the design, specification or manufacture of its subassembly products without notice. Radiometrix Ltd does not assume any liability arising from the application or use of any product or circuit described herein, nor for any infringements of patents or other rights of third parties which may result from the use of its products. This data sheet neither states nor implies warranty of any kind, including fitness for any particular application. These radio devices may be subject to radio interference and may not function as intended if interference is present. We do NOT recommend their use for life critical applications. The Intrastat commodity code for all our modules is: 8542 6000. R&TTE Directive After 7 April 2001 the manufacturer can only place finished product on the market under the provisions of the R&TTE Directive. Equipment within the scope of the R&TTE Directive may demonstrate compliance to the essential requirements specified in Article 3 of the Directive, as appropriate to the particular equipment. Further details are available on The Office of Communications (Ofcom) web site: http://www.ofcom.org.uk/ Information Requests Ofcom Riverside House 2a Southwark Bridge Road London SE1 9HA Tel: +44 (0)300 123 3333 or 020 7981 3040 Fax: +44 (0)20 7981 3333 [email protected] European Communications Office (ECO) Peblingehus Nansensgade 19 DK 1366 Copenhagen Tel. +45 33896300 Fax +45 33896330 [email protected] www.ero.dk