Instruments4Chem

High Performance, Low Cost…

Wireless Communication Devices and Applications

Stacks Image 654
Here we describe a feasibility project investigating the use of both Propeller and XMOS development boards to quickly get low cost Nordic Semiconductor nRF2401+ modules on-air in the 2.4 GHz ISM band.

The ultimate aim will be to incorporate a host of these low cost modules in a laboratory data acquisition system, capable of collecting data from many different instruments in a large undergraduate teaching laboratory.
Wireless modules (such as this one based on the Nordic Semiconductor nRF24L01+) are readily available on Ebay for just a few dollars. The PCB shown opposite interfaces one of these modules to a Parallax P8X32 Propeller chip.

Code running on the Propeller and a companion LabVIEWTM vi controls the module, setting the on-air address, the RF channel, the power and the data transmission rate.
Stacks Image 4166

Initial tests of an nRF24L01+ Wireless data link


These same wireless modules are easily interfaced to an XMOS Startkit. Here, an experiment is performed with one Startkit connected to a MacBook Pro and the other to a PC. XMOS executables generated from compiled nRF24L01.xc code are running on each Startkit.

Mac-Tx, PC-Rx


Here, the Mac-connected module is configured as the transmitter. A transmit buffer consisting of 4096 bytes is first filled with 16-bit sine wave data and the points are then transmitted as upper and lower byte pairs - organised as 128 packets each of 32 bytes. The resulting waveform is transmitted periodically in this manner with a 750 μs post-packet delay. After transmitting each waveform, a message is printed and a 4 second pause is inserted to allow a simple means of synchronization at the Tx end.

On the PC side a LabVIEWTM vi (XMOS_Startkit_Wireless_Shield_Rx.vi) is configured to receive the data, as shown in the image below. This vi is launched as soon as the post-transmission sentinel message is seen on the Mac Tx. The received data can be seen in the figure below.

Using a logic analyzer the time taken to receive the 4096 byte dataset is found to be ~150 msec, giving an effective data transfer rate approaching 30 kBytes/sec. Although the code is not implementing the nRF24L01’s enhanced shockburst mode, the error rate is fairly low when the Tx and Rx modules are in close proximity. RF Channel 2 was used on both the Rx and Tx nodes in these tests.

PC-Tx, Mac-Rx


The same wireless link has also been tested but now with the PC end acting as the transmitter. XMOS_Startkit_Wireless_Shield_Tx.vi shown opposite sends 64 x 32 byte packets and the Mac end receives these packets, displaying some of the data on screen.

In this test the TX flag in the .xc file was set to 0 to make the Mac-connected nRF24L01+ the receiver.

A Propeller-Based 2.4 GHz ISM Band Spectrum Analyzer


During the course of these investigations a simple means was sought to monitor wireless activity when working with wireless modules.

This led to a small project in which a Parallax Propeller chip was interfaced to a Cypress Semiconductor CYWM6935 transceiver module to monitor the airwaves and display activity across the RF channels in the popular 2.4 GHz ISM wireless band.

Here, Spin code running on the Propeller manages transactions with the CYWM6935, while the signal across 128 RF channels is uploaded and displayed as a histogram by a LabVIEWTM front panel.

The resulting low cost spectrum analyzer has proven to be an extremely useful tool when checking/verifying/monitoring the output of nRF2401+ wireless modules described above.
The screen grabs show below some typical results obtained using the LabVIEWTM front end. The left-most trace shows the background activity measured by the CYWM6935 receiver across 128 channels, co-adding 50 sweeps. A 5 bit signal measurement is recorded on each channel.

In the middle trace, an nRF2401 wireless module is transmitting on channel 16 in proximity to the spectrum analyzer and the same measurement is repeated for comparison. Here, activity is seen to peak on channel 16 but some leakage is also detected on adjacent channels. When the wireless module is moved up to output on RF channel 32 the spectral output does indeed shift up by 16MHz, but the spectral bandwidth and characteristics are otherwise seen to be rather similar to the previous result.
Stacks Image 4749
Stacks Image 4752
Stacks Image 4755