Introduction
Much of the following information has already appeared in my recent post ‘Narrow-Band Radio Telemetry ‘ in this section. Whilst that project covered FSK modem techniques for use with a wide range of communications and storage devices (walkie-talkies etc) this posting is aimed at specific low power radio modules. The RF Solutions low-power 433MHz Transmitter & Receiver Pair available in the UK from Maplin Electronics (order code VY48C) for £9.99.
FSK Modulation
The telemetry data is Frequency Shift Key (FSK) modulated to make it suitable for transmission over a narrow-band radio link, without having to resort to specialised communication routines (e.g. pre/post -amble code and other data padding). FSK modulation is a well-established method of reliably transmitting and storing digital information on general-purpose audio equipment. It was used with early generation home computers for storing programmes on audiocassettes and for digital communication over dial-up telephone lines. Many amateur radio operators still employ FSK modems (sending to a mic input and receiving from a speaker output) for long distance digital communication over voice quality links. Although they increasing use PC sound cards in place of dedicated hardware to process and demodulate the received signals.
PICAXE -14M code to scan three digital and five analog inputs at a rate of 15Hz.
setfreq m8 ‘8MHz operation
let dirsc = %000 'Change C0-3 from outputs to inputs
pause 2000 ‘Pause for 1 second
serout 2,N600, ("!RSET",CR) 'Automatically selects the StampPlot operating mode….
serout 2,N600, ("!RSET",CR)
serout 2,N600, ("!ERRT",CR)
serout 2,N600, ("!TMAX 20",CR) ‘N.B. set-up parameters must be received before dataserout 2,N600, ("!SPAN 0,255",CR) (or entered via the PC keyboard).
serout 2,N600, ("!SHFT ON",CR)
serout 2,N600, ("!FLSH ON",CR)
serout 2,N600, ("!NUMB 6",CR)
serout 2,N600, ("!CSUM ON",CR)
serout 2,N600, ("!PLOT ON",CR)
serout 2,N600, ("!USEB ON",CR)
pause 2000
scan:
b0=pins AND %00001110 * 16 'Shift digital inputs 1-3 into 7-5
readadc 0, b1 'Analog input, leg 7
readadc 1, b2 ' ,, ,, ,, 10
readadc 2, b3 ' ,, ,, ,, 9
readadc 3, b4 ' ,, ,, ,, 8
readadc 4, b5 ' ,, ,, ,, 3
b6=b0+b1+b2+b3+b4+b5 'Generate checksum
serout 2, N600, (b0,b1,b2,b3,b4,b5,b6) 'Send digital and analog channels in binary format @ 1200bps
goto scan 'Next frame
Modulator
The 1200 bps modulator employs a CMOS Schmitt trigger RC oscillator to generate the two standard FSK frequencies of 1200 and 2200Hz. This is achieved by switching in a second capacitor via the collector of a transistor that is driven from the serial output of a PICAXE-14M. The trimmer must be adjusted to obtain the lowest error rate at the output of the FSK demodulator. Adequate long-term stability was achieved by operating the circuit from a regulated supply and using polycarbonate capacitors. By using a 5-pin CMOS devices (and other SM components) rather than part of a 14-pin DIL, the circuit can be made much smaller than would be possible with a dedicated FX614 modem chip.
Demodulator
A second FX614 demodulates the audio FSK signal from the radio receiver output and presents the digital data to a PC serial port. In addition to demodulator circuitry the FX614 also has a band-pass filter, which is able to extract data from signals that sound like noise only. Although the FX614 is quite tolerant of input signal amplitude variations, it may still be necessary to initially adjust the receiver’s output for minimum data dropout. The demodulator is powered from the RTS output (pin7) of the PC serial port using a 5.1V zener diode and series resistor.
PC Display software
An ideal way to display and archive the received serial data is to use the StampPlot Pro application from SelmaWare Solutions. This Windows software accepts serial data and presents multiple channels on a real-time scrolling display. Selected blocks of data may also be exported to a spreadsheet for processing. An evaluation version of StampPlot may be downloaded from www.selmaware.com. This site also provides extensive documentation, including how to use the optional on-line maths functions (using this feature is much easer than trying to perform PICAXE maths before transmission.)
StampPlot expects to receive ASCII values by default but also has the option of accepting data as binary values. To make the most efficient use of the available bandwidth, the latter format is used and selected by the set-up parameters at the start of the PICAXE programme. The binary operating mode offers the option of including a checksum byte with each transmitted frame. StampPlot rejects frames that fail the checksum test and retains the last set of acceptable points on the chart, until updated by the next acceptable frame. This is a particularly useful form of display when sending data over interference or dropout prone links. The above software therefore attaches a checksum to each data packet before transmission.
Results
I developed the above telemetry system some years ago for model rocketry and obtained good results over a range of several hundred metres, using a directional receiving antenna. The output from the receiver was often fed into a camcorder audio input and re-played to the FSK demodulator and PC. In order to video the flight and record data for later analysis.
Much of the following information has already appeared in my recent post ‘Narrow-Band Radio Telemetry ‘ in this section. Whilst that project covered FSK modem techniques for use with a wide range of communications and storage devices (walkie-talkies etc) this posting is aimed at specific low power radio modules. The RF Solutions low-power 433MHz Transmitter & Receiver Pair available in the UK from Maplin Electronics (order code VY48C) for £9.99.
FSK Modulation
The telemetry data is Frequency Shift Key (FSK) modulated to make it suitable for transmission over a narrow-band radio link, without having to resort to specialised communication routines (e.g. pre/post -amble code and other data padding). FSK modulation is a well-established method of reliably transmitting and storing digital information on general-purpose audio equipment. It was used with early generation home computers for storing programmes on audiocassettes and for digital communication over dial-up telephone lines. Many amateur radio operators still employ FSK modems (sending to a mic input and receiving from a speaker output) for long distance digital communication over voice quality links. Although they increasing use PC sound cards in place of dedicated hardware to process and demodulate the received signals.
PICAXE -14M code to scan three digital and five analog inputs at a rate of 15Hz.
setfreq m8 ‘8MHz operation
let dirsc = %000 'Change C0-3 from outputs to inputs
pause 2000 ‘Pause for 1 second
serout 2,N600, ("!RSET",CR) 'Automatically selects the StampPlot operating mode….
serout 2,N600, ("!RSET",CR)
serout 2,N600, ("!ERRT",CR)
serout 2,N600, ("!TMAX 20",CR) ‘N.B. set-up parameters must be received before dataserout 2,N600, ("!SPAN 0,255",CR) (or entered via the PC keyboard).
serout 2,N600, ("!SHFT ON",CR)
serout 2,N600, ("!FLSH ON",CR)
serout 2,N600, ("!NUMB 6",CR)
serout 2,N600, ("!CSUM ON",CR)
serout 2,N600, ("!PLOT ON",CR)
serout 2,N600, ("!USEB ON",CR)
pause 2000
scan:
b0=pins AND %00001110 * 16 'Shift digital inputs 1-3 into 7-5
readadc 0, b1 'Analog input, leg 7
readadc 1, b2 ' ,, ,, ,, 10
readadc 2, b3 ' ,, ,, ,, 9
readadc 3, b4 ' ,, ,, ,, 8
readadc 4, b5 ' ,, ,, ,, 3
b6=b0+b1+b2+b3+b4+b5 'Generate checksum
serout 2, N600, (b0,b1,b2,b3,b4,b5,b6) 'Send digital and analog channels in binary format @ 1200bps
goto scan 'Next frame
Modulator
The 1200 bps modulator employs a CMOS Schmitt trigger RC oscillator to generate the two standard FSK frequencies of 1200 and 2200Hz. This is achieved by switching in a second capacitor via the collector of a transistor that is driven from the serial output of a PICAXE-14M. The trimmer must be adjusted to obtain the lowest error rate at the output of the FSK demodulator. Adequate long-term stability was achieved by operating the circuit from a regulated supply and using polycarbonate capacitors. By using a 5-pin CMOS devices (and other SM components) rather than part of a 14-pin DIL, the circuit can be made much smaller than would be possible with a dedicated FX614 modem chip.
Demodulator
A second FX614 demodulates the audio FSK signal from the radio receiver output and presents the digital data to a PC serial port. In addition to demodulator circuitry the FX614 also has a band-pass filter, which is able to extract data from signals that sound like noise only. Although the FX614 is quite tolerant of input signal amplitude variations, it may still be necessary to initially adjust the receiver’s output for minimum data dropout. The demodulator is powered from the RTS output (pin7) of the PC serial port using a 5.1V zener diode and series resistor.
PC Display software
An ideal way to display and archive the received serial data is to use the StampPlot Pro application from SelmaWare Solutions. This Windows software accepts serial data and presents multiple channels on a real-time scrolling display. Selected blocks of data may also be exported to a spreadsheet for processing. An evaluation version of StampPlot may be downloaded from www.selmaware.com. This site also provides extensive documentation, including how to use the optional on-line maths functions (using this feature is much easer than trying to perform PICAXE maths before transmission.)
StampPlot expects to receive ASCII values by default but also has the option of accepting data as binary values. To make the most efficient use of the available bandwidth, the latter format is used and selected by the set-up parameters at the start of the PICAXE programme. The binary operating mode offers the option of including a checksum byte with each transmitted frame. StampPlot rejects frames that fail the checksum test and retains the last set of acceptable points on the chart, until updated by the next acceptable frame. This is a particularly useful form of display when sending data over interference or dropout prone links. The above software therefore attaches a checksum to each data packet before transmission.
Results
I developed the above telemetry system some years ago for model rocketry and obtained good results over a range of several hundred metres, using a directional receiving antenna. The output from the receiver was often fed into a camcorder audio input and re-played to the FSK demodulator and PC. In order to video the flight and record data for later analysis.