circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

February 2005, Issue 175

Flexible Wireless Telemetry System


by B. Sobczyk, V. Formica, W. Sebastian, & K. Wertz
Start Mavric-II Board Sensor Board LCD Panel Board Sensor & Thermocouples Two-Axis Accelerometer Radio Radio Packet Stategy Data Logging Adaptable System Sources and PDF

RADIO PACKET STRATEGY

The heart of the system is a packet strategy that keeps the data timely, accurate, and organized. The formula race car team set the real-time requirements to be nearly instantaneous with the pit crew’s (a sample every 0.5 s). Most of the measurements didn’t require a lot of sampling (e.g., temperature). The time-critical measurements (e.g., wheel speeds) simply had to be accurate enough so the pit crew wouldn’t notice any time lag.

Our packet strategy is depicted in Table 1 (on page 44). The data and command packets are shown in Figures 4a and 4b (on page 44). The packets are distinguished by the code in a packet type look-up table. The strategy was based on packets being correctly transmitted and received once every 0.125 s. Both axes’ acceleration and all four suspensions are sampled eight times in 1 s. The wheel speeds are accurately sampled once per second. RPMs and temperatures are sampled from the engine four times. The four temperatures are sampled twice per second. The 0.125-s intervals ensure that accurate data is constantly sent to the PC without flooding the wireless serial connection. 

(Click here to enlarge)

Figure 4a—Data packets are sparse and flexible. The ID byte immediately indicates what will follow is data. The payload is self-contained. The packet schedule allows you to assemble the full packet from any number of sensors without having to reinvent the packet structure. The total packet size is 1 + m reports × (1 ID byte + 2 bytes), where m is the number of sensors reporting, and n is the number of bytes of data or bytes of payload. b—We kept the command packet as simple as possible to keep the overhead low for sending a command to the car unit. This packet also accommodates messages to the LCD with a variable-sized field to contain the text string. The total packet size is equal to n bytes of data divided by the settings.

A ping to the base end’s PC is transmitted after the eighth packet and a reply is expected within another second. The ping-pong handshake tells both units if the connection is up, if they are in sync, and if there is an error. An error or dead connection leaves the car unit searching for the base unit before sending more data. This prevents the data from getting out of sync because only in-sequence data is sent. This strategy allowed the pit crew unit to use stock Visual Basic serial port functions to control the radios without extra connections to the radio.