Wireless Data Transmission SAE
Wireless Data Transmission SAE
2013-36-0064
The Design Process of a Wireless Data Transmission System Applied to a Formula SAE Vehicle
Paulo Bosquiero Zanetti Formula UFSC Team, Federal University of Santa Catarina
AFFILIATED TO
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
The appearance of the ISSN code at the bottom of this page indicates SAEs consent that copies of the paper may be made for personal or internal use of specific clients. This consent is given on the condition however, that the copier pay a $ 7.00 per article copy fee through the Copyright Clearance Center, Inc. Operations Center, 222 Rosewood Drive, Danvers, MA 01923 for copying beyond that permitted by Sections 107 or 108 of U.S. Copyright Law. This consent does not extend to other kinds of copying such as copying for general distribution, for advertising or promotional purposes, for creating new collective works, or for resale. SAE routinely stocks printed papers for a period of three years following date of publication. Direct your orders to SAE Customer Sales and Satisfaction Department. Quantity reprint rates can be obtained from the Customer Sales and Satisfaction Department. To request permission to reprint a technical paper or permission to use copyrighted SAE publications in other works, contact the SAE Publications Group.
All SAE papers, standards, and selected books are abstracted and indexed in the Global Mobility Database.
No part of this publication may be reproduced in any form, in an electronic retrieval system or otherwise, without the prior written permission of the publisher. ISSN 0148-7191 Copyright 2013 SAE International Positions and opinions advanced in this paper are those of the author(s) and not necessarily those of SAE. The author is solely responsible for the content of the paper. A process is available by which discussions will be printed with the paper if it is published in SAE Transactions. For permission to publish this paper in full or in part, contact the SAE Publications Group.
Persons wishing to submit papers to be considered for presentation or publication through SAE should send the manuscript or a 300 word abstract of a proposed manuscript to: Secretary, Engineering Meetings Board, SAE.
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
2013-36-0064
The Design Process of a Wireless Data Transmission System Applied to a Formula SAE Vehicle
Paulo Bosquiero Zanetti
Formula UFSC Team, Federal University of Santa Catarina
ABSTRACT
Data analysis is an important way to validate and optimize engineerings designs. With the development of wireless transmission systems, race cars use telemetry as a solution to measure the cars behavior by the analysis of acquired data. Wireless communication systems provide the possibility to analyze data in real-time situations, allowing tactical decision making based on the vehicles embedded signals interpretation. This paper intends to describe the design process of a wireless data transmission system applied to a Formula SAE vehicle. Based on the prototyping microcontroller Arduino and the radio-transmission module Xbee, the wireless transmission system here described is capable of transmitting 16 analog and 54 digital embedded signals and can be easily adapted for the users requirements, through the systems open -source characteristics.
trough real-time data analysis. Telemetry provides the nonphysical connection between the used transducers, and the control unit. This characteristic of wireless communication systems allows the monitoring of moving systems, such as a race car.
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
COMMUNICATION PROTOCOL
In communication systems, a protocol can be defined as a assembly of rules and digital messages formats used for exchanging data between two or more electronic devices. According to Faludi (2010, p. 113) [1], more complicated protocols will define whether there is bilateral communication between the devices to set up the exchange, timing issues, what replies are sent in response to what messages, routing strategies, and so forth. For our purpose, a simple point to point network, where only the radio on board will send data, and the receiver will serially send the information to a computer for analysis, the simpler the protocol the better. To program the Xbee radios, the AT commands [1] will be used. This protocol allows editing the registers found inside the radios. Each register has a name, prefixed by the AT characters. For example, if you want to access the Personal Area Network ID that is currently assigned to the radio, the ATID command will print it in the programming screen.
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
Once the Arduino environment is installed on the development computer, the correct prototype board needs to be selected. The code that will be here explained was tested on an Arduino Mega2560 board, but it can be written also in other Arduino boards.
Figure 03. Arduino Mega 2560 board selected. With the source-code that will be explained in the following section written in the Sketch window, click the Verify button to check for errors. Then, press the Upload button, on the upper left side of the softwares window to write the code into the microcontroller. If no errors are found, the data acquisition and processing system will be ready to be used.
int ea1 = analogRead(0), ea2 = analogRead(1), ea3 = analogRead(2), ea16 = analogRead(15), in1 = map(ea1, 0, 1023, 0, 255), in2 = map(ea2, 0, 1023, 0, 255), in3 = map(ea3, 0, 1023, 0, 255), in16 = map(ea16, 0, 1023, 0, 255), //-------------------------------------------------------------------------brakelight = digitalRead(brakepin); Serial.print('A'); Serial.print(in1, DEC); Serial.print('B'); Serial.print(in2, DEC); Serial.print('C'); Serial.print(in3, DEC); Serial.print('P'); Serial.print(in16, DEC);
Source-code
At this point, before writing the algorithm that will send analog and digital data to the Xbee serial input, it is important to remember that the Arduino board has a 10 bit A/D converter, and the Xbee transmits the information in 8 bit, so at some point of the algorithm, the 10-bit reading must be converted to a 8-bit data format. For example, if all 16 analog inputs are required for the transducers installed on the car, and one digital input will read the break switch, the Arduino board will read the analog and digital inputs, convert to an 8 bit data, and send that information through the serial output to the Xbee module. The issue here is how to divide the number sequence into the 16 analog inputs. This is accomplished by printing between the data sent by the sensors characters that will relate the following number to the transducer responsible for that data. To split the 16 analog signals, we could, for example, print characters from A to P between the serial data. That way, the graphic interface on the computer connected to the receiver divides the serial data by getting the value in-between the sent characters. Considering these two aspects, the source-code can now be presented in the following example.
Page 3 of 6
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
Serial.print('Q'); Serial.print(brakelight); delay(2); } //-------------------------------------------------------------------------The first section of the code initializes the routine, sets the baud rate of 9600 bits per second for the microcontroller and opens the loop for the data reading. To define the variables of each sensor value, and remap from a 10 bit to a 8 bit data format, the second section of the code uses the analogRead() and map() functions. These functions are also described in the Arduino website. Finally, the third section sends the acquired signals alternately with the chosen characters to the serial output pin. After it, the delay function waits two milliseconds before repeating the routine, providing a 500 Hz sample rate. The delay time will define the sample rate of the system, and it must be calculated from the higher frequency read, according to the Nyquist2 Shannon sample theorem [6] .
modem configuration tab, the Always update firmware option, as shown in the figure 04. Every Xbee module has a 64-bit serial address printed on the back. It is important to write the address from each module before connecting it to the USB adapter, so we configure the network on the next step.
Figure 04. Firmware updating. At this point, we must choose which radio will be the coordinator and which one will be the router. Both of them are able to be configured as coordinator and router, but it is important to know that in any network, only one coordinator can exist, so the network can be properly defined and managed. With one of the modules connected, click the Read button on the upper left side of the X-CTU software to list the current firmware. With this first step done, select the function set ZIGBEE COORDINATOR AT, to set this module as the networks coordinator, than, ch oose the correct Xbee modem and version of the firmware (see figure 04). Any version 2070 or greater should work fine, so in general, select the higher hexadecimal number presented on that item. To program the Xbee with the coordinator firmware, click on the Write button. It is also important to identify with a small sticker which one of the modules are configured as the coordinator module. It is possible to change the networks configuration only through the coordinator radio. Remove the first radio from the USB adapter and seat the second module, which is going to be programed with the router firmware. Analogously to the fist programming process, this time we will configure the radio with the ZIGBEE ROUTER AT function set, and also the higher firmware version.
According to the Nyquist-Shannon sample theorem, any band limited signal can be reconstructed if the higher signal frequency is no greater than of the sample rate Page 4 of 6
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
The command mode is used to stop the communication for a moment, to access the configuration of the local radio. In this case, the user wants to communicate to the radio, and not to send the information through the Xbee module [1]. To set the radio in command mode, the user has to wait one second, type +++ and wait another second, in the X-CTU terminal tab. After typing +++, the software will respond OK, meaning that the command mode has been activated, and will be activated for 10 seconds before dropping out the command mode, getting in transparent mode and starts sending or receiving data again.
command will write the current configuration on the radios microprocessor. For the router, the same process must be done. This time, the coordinators high and low address must by written with the ATDH and ATDL commands. Write the configuration with the ATWR command (Figure 05).
AT Commands
In this section, it will be briefly explained some of the most common and important AT commands. Those commands will be used later, when we start programing the Xbee radios.
ATID
With the radio on command mode, typing ATID by itself will show the Personal Area Network (PAN) ID assigned to the module. This hexadecimal number defines the network that the module will join to. To assign a new PAN ID number, type the ATID command followed by any hexadecimal number in the range 0x0 0xFFFF. Figure 05. Programming the Xbee module. At this moment, the point to point wireless network is ready to be used. Once back in transparent mode, the on board radio is prepared to receive data from the Arduino board and transmit to the radio connected to a computer.
ATDH/ATDL
Every radio module has a serial number. The first part of this number is called the high address, and normally the same number is printed on every Xbee. The second part of the serial number is called the low address, and each radio has its own. By typing ATDH, the user is able to read or assign the destinations high address number, while by typing the ATDL command, the destination low address number can be read or assigned.
DATA RECEPTION
At this point, the wireless system described is able to transmit serial data to the receiver. The data format, however, is a sequence of numbers separated by some indicators in this case, the characters from A to P were used as shown in figure 06 below.
ATWR
After configuring the radio through AT commands, typing ATWR will write the current configuration to firmware.
Downloaded from SAE International by Brought to you by RMIT University, Sunday, December 29, 2013 06:08:19 AM
intuitive panel with gauges and displays, showing and recording the transmitted data. An example of this graphic interface can be seen in figure 07.
REFERENCES
1. 2. 3. FALUDI, R. Building Wireless Sensor Networks. USA: OReilly, 2010. 300 p. ARDUINO. Available on <http://www.arduino.cc/> on 10 March 2013. OPEN SOURCE INITIATIVE. About The Open Source Initiative. Available on <http://www.opensource.org/about> on 10 March 2013. DIGI. Xbee module. Available on <http://www.digi.com/products/wireless-wiredembedded-solutions/zigbee-rf-modules/> on 10 March 2013. DIGI. X-CTU software. Available on <http://www.digi.com/support/productdetail?pid=335 2> on 10 March 2013. LATHI, B.P. Sinais e Sistemas Lineares. 2 ed. Brazil: Bookman, 2008. 856p. IEEE 802. 15.4. Available on <http://standards.ieee.org/about/get/802/802.15.html > on 12. March 2013. GUTIRREZ, J. A; CALLAWAY, E, H; BARRETT, R. L. Low-Rate Wireless Personal Area Networks: Enabling Wireless Sensors with IEEE 802.15.4. USA: IEEE, 2004. 149 p. FORMULA SAE. Available on < http://students.sae.org/competitions/formulaserie s/> on 12. March 2013.
4. Figure 07. Graphic interface example The concept of the system described in this paper is the opensource characteristic. The development of a graphic interface that fits to the systems open-source requirements is subject for an upcoming paper. 5.
CONCLUSIONS
The telemetry concept shows itself the most convenient system to measure and transmit information of moving objects. Its capability of transmitting data in real-time situations allows tactical decisions in the automotive racing categories, concedes design validation and optimization. The wireless system introduced in this paper appears to be a good solution for Formula SAE and other categories. The most important characteristic of the presented system is the open-source methodology, which makes the systems adaptation to almost every situation possible. The team can change the configuration of the radio modules or the digital signal processing stage, having complete knowledge of how the system works, without the need to change the hardware or buying new upgrades and firmware. With the data transmission system designed, the next step is the development of a graphic interface for a full open-source telemetry system. On an upcoming paper, the evaluation of the transmitted data must be possible by selecting the sensor value sent in-between chosen indicators on the serial sequence. Each of these separated sensor values is sent to different gauges and displays, providing the user a quick and intuitive interpretation of the cars behavior.
6. 7.
8.
9.
Page 6 of 6