Home
zigbee data acquisition - ECE
Contents
1. lt 700 6002 25 82d a 1507 1X3 4D JopuaA Nd 4opu A 191 120 4aquinn 1104 Nd 5 1 JO 8 8 xipuaddy 1502 D10 9 0 0 S QN T ISEC E6U UO2IUDIN 90ZT 1019688 Jnor V GN T S60T 66 19119 090 1012ede ssed q NLOVY8NVOTIEOIOD 0405 OT Aexiiq GN 194 100 TWHY wyoy T 90ZT WYON 0 T 1015591 TOOT4HZ38T2IA 0S 0 OT 98 0 wyoy T 9061 uuuO 0Zt 01515 00Zt4dZI8TYIN ZE T c Aexiiq CN LOSE8MS 51u04129 3 UOJWO ON uonng 40007 9 5 S0 0 1 15 1 15 dOSC qISZT 4eysem 086 4005 1815 1 15 9 9 5 125 lt 0 4 206 6805 QN2I8ZVE 831001293 u18u9 urp T 1a2eds 8LVE 1 I Aexiiq 123602 sunog WYO 40Z OT 0 1 3600 88 T 9 81 dwy s21004329 3 001 japeaH 8 01666tS 16 05 I GN LO8EESH prey E9Z OL JULS 1 S01000G008 ZS TTTS T Aexiiq QN 12IQ3 V10v 8 sapoiq VIS VE A0t 1042 polq 3 0 5 I Aexi
2. 22 Appendix B Bill f Materials s 2 23 Appendix C Electrical Schematic et ee m Eee Ei idus 25 Appendix D DAQ Module Physical Layout 33 Appendix E Labview Base Station 34 Appendix F Labview Console Flow 35 Appendix G Design Errata and Future Revision 36 Appendix H DAQ Module Code 37 Appendix I Labview Code Excerpts tetendit oido eed Duet e vade rene o DIRK 41 Executive Summary Each year the Cornell Baja Racing Team competes against colleges from around the world in the Society of Automotive Engineer s SAE s Mini Baja Competition The competition requires college teams to design and construct an off road racing vehicle The vehicles are judged in several categories including a Design Element and Dynamic Element The team is constantly seeking ways to optimize the mechanical performance of their vehicle to gain a greater advantage in the Dynamic Element events as well as points for ingenuity in optimization methods and unique systems The design concept addresses the team s need for a wireless data acquisition system while maintaining low weight low power small size and the versatility for future design expansion The team use
3. ZIGBEE DATA ACQUISITION DAQ MODULE FOR THE CORNELL UNIVERSITY BAJA RACING TEAM A Design Project Report Presented to the Engineering Division of the Graduate School of Cornell University in Partial Fulfillment of the Requirements for the Degree of Master of Engineering Electrical by Joseph S Neiss Project Advisor Professor Bruce Land Degree Date January 2009 Abstract Master of Electrical Engineering Program Cornell University Design Project Report Project Title Zigbee Data Acquisition DAQ Module for the Cornell University Baja Racing Team Author Abstract Joseph S Neiss The project is to develop a sensor data acquisition DAQ module that can communicate with a PC using the IEEE 802 15 4 Zigbee protocol The data collected can be used by the Cornell University Baja Racing Team to assist in optimizing their mechanical design for SAE Mini Baja competitions The technical approach will require the design fabrication integration and testing of a DAQ sensor circuit board the development of a Zigbee data packetization scheme and a user friendly interface to analyze the captured data on a Windows XP personal computer Integration testing consists of DAQ Module POST tests and Base Station Console simulation testing with Baja vehicle system testing occurring in Spring 2009 Deliverables will include a DAQ schematic bill of materials board layout PC interface code and a prototype of the DAQ Modul
4. 6 6102 5011011293 uuop eAA X olN 5991168 y 1012911002 TvO SvOEU 91 07 65 I 2104129 3 1 5 0 9265 31N 3ndino 4o03sisueJ 401e osio1do ST OL ES T QN S ZTv 6U 2104129 902IIALLS OZZ OL YO S AO S SOd 061 944 2I 5 STN 1975 T Aexi Iq GN IGN 1EELV8OTdV sepoiq 02 01 A VS 01 934 21 N 1EELVB8OT dv vin ET v9 c I 8 QN S VEC SCU 21004129 902 IALLS OZZ OL YO S AEE SOd 93191 vIn 9 v I Aay 81d QN 0 s S96ScW1 90 01 1 8 8gdON 0 S S96SZIN1 ETN T AexiSiq QN E SIVSOTIAT 40 9N puod Was Joyeinday A 5 OI 6 8 00715 S 21u04129 3 6180 S2INOW12313 H231q11 3u uu8 s AYMITT TS6E97 6 SN L 69965 I 00 1 209 I8iq LNY dIH2 M 338917 JINGOW V00 1I2ZZ vzdax m 9 88 0 I Aay 310 CN S STS8 96Z squaunsysu Sexe Joyejsued sng Jepo MWVStZVOATPLNS EN S 8 015 T 8 GN ONOTZZZXVIN sjonpoJd 1 31 en v 15 I GN d I S8S 418TIId diu20J5lIN J9 0J30020J9I N d I S8St 41812Id 8215 T 21u04329 3 uolsuns 6002 323 efeg 82d c 000 6002 323 efeg
5. 4 Cost 4 1 The DAQ Module should be designed with cost efficiency in mind 5 Mechanical Design 5 1 The DAQ Module design should consider mechanical mounting considerations 5 2 The DAQ Module should be capable of being mounted to the front dashboard just above the steering column 5 3 The DAQ Module size should be of sufficiently small size to allow installation in the front dashboard 5 4 The DAQ Module should be designed with expected vehicle vibration and operator handler indelicate usage in mind Since the intention of the DAQ is also to be used in SAE competition for Design Element competition the DAQ Module must be compliant to the SAE Baja Competition Rules The relevant rules from the 2009 SAE Baja Competition are listed with corresponding paragraph numbers below Relevant 2009 SAE Competition Rules 21 4 15 Battery Requirements The batteries must be sealed and not leak in the event of a roll over The batteries can only provide power to accessories on the vehicle brake light reverse light amp beeper data acquisitions and other instrumentation Final approval on any batteries used will come from the National Technical Inspectors The battery must be able to provide power to safety items for the duration of the entire event Cars will be black flagged if safety equipment is not functioning Batteries must be mounted with sound engineering practice The mounting must prevent the battery from coming loose du
6. Tuesday October 07 2008 DAQ File and Settir Destopljoe test txt pin Q sof Enable Zigbee Ine Zigbee Xcvr I Joro1o00001 000000190 OF0200000200000300F0 0F0300000300000400F0 0F0100000400000025F0 0F0200000500000600F0 10 eo Speedometer mph 00 gt TW 00 00 03 00 00 04 00 00 05 lt Time ffo Packet size bytes delay before read ns 2 Fuel Indicator Blink Time ms Fuel Indicator Blink Time ms 2 jor Speedometer Flag 02 Tachometer Flag 87 Music length ms SpeedPacket Tach Packet Fuel Packet Packet Data 37 Packet Time 0 0 4 0 Tachometer RPM 1000 768 When the Labview console is first instantiated the user is able to configure certain operating parameters by modifying the parameter values on the right side of the console shown in Figure 7 Console Parameter Section The user then executes the Labview module The module will open a txt file selected by the user to store all received data for analysis at a late 8 Console Parameter Section r time if desired shown in Figure Figure 7 Console Parameter Section Figure 8 Console Data File Entry Field The user would then choose when to Initialize the Zigbee RF Modem Labview will send a few basic commands to ensure the module is present and then continuously
7. 6 000 3 800 7 200 D 1 5 105 160 57 12 000 10 000 8 000 19 000 9v 9 38 22 565 155 400 540 The majority of integrated circuit components require input voltages of 5V or lower such as 3 3V An input voltage of 5V can be broken down with other smaller voltage regulators for 3 3V IC s and signaling so the battery should ideally source 5V The expected power consumption was estimated from the datasheets of the major components see Appendix B Bill of Materials and tabulated in Table 3 Power Consumption Typical bandwidth using IEEE 802 11g 2 Data rate using Bluetooth 2 0 Raw over the air data rate per channel in the 2 4GHz band K Using typical stock antenna line of sight outdoors Not commonly available Not commonly available 7 Not commonly available Voltage is 3V Not commonly available Voltage is 3 6V 10 Table 3 Power Consumption Component Input Current Voltage Source Power PIC18LF4585 200 mA max 5V 1 00 W MAX7221 330 mA typ 5V 1 65 W Zigbee SOmW Transceiver 340 mA 3 3V 1 12 W Total 3 77 W Based on an approximate 4 02 W estimate for the power requirement the calculated current on a 5V battery source is 754mA With a maximum expected continuous runtime of 2 hours without battery replacement the expected power requirement is 1 508 mAh Given this calculation and the power to weight ratio four Alkaline Lithium ion or NiMH AA batteries in series are considered the ideal cho
8. OxOF Write orBan WriteU Writes Writ WriteU 41 Appendix I Labview Code Excerpts Figure 13 Serial Channel Configuration Display Initialization and DAQ Data File Header Writing date string Fog H maj abe DAQ File qi le Termination Char T timeout 10sec 10000 VISA resource name baud rate Fuel Ind ata bits arit Speedometer mph stop bits Tachometer RPM Flow control Speedometer Tachometer RPM Speed Ratio a Reinit To Default Reinit To Default Reinit To Default Hnuumuuuuuuuuuuuuuuuuuumuu Figure 14 Zigbee Initialization Code Enable Zigbee True HUUUUuUUuuuuuum 0 4 4 17 Je Entering Command Mode Initialization Sequence Initialization Sequence l Initialization Sequence Eo fintiateation seauence o Initialization Sequence Packet Time Packet Time 42 Figure 15 Main Code delay before read ms 2 usz1 Speed Packet 952 E TF Tach Packet Ej Packet Size bytes R Instr SIL uns Li g Pu Packet Data Speedometer BE E m Stop Acquiring Data Figure 16 Ending Code TOO 0 1 43
9. a similar fashion As the counter is incrementing to exercise the LED segments the microcontroller will attempt to initialize the SD card by writing a series of configuration commands Note The effective time spent initializing the SD card if unsuccessful will increase the total time the LED s will increment from 0 to 9 If the SD card is able to be initialized the incrementing will proceed quickly If the SD card is unresponsive or not present the incrementing will proceed slowly After these commands have been executed the microcontroller will enter its forever loop In general the forever loop will perform the following high level tasks e 51 new datapoints have been collected write all 51 datapoints to the SD card in a block write f any new datapoints have been collected send them to the Zigbee transceiver e Ifthe driver is depressing the pushbutton for an extended time check the Tire Diameter Tuner signal for a change in the tire diameter as indicated by the user Another depression of the pushbutton will save the new tire diameter value and return to the main function e fthe driver is depressing the pushbutton for a short time interpret it as a lap time stopwatch indication e Otherwise capture the CVT and sparkplug signals calculate the speed and tachometer reading from them and store them as datapoints Datapoints are structs defined with variables indicating the type of data poin
10. is read by a DAQ microcontroller ADC and converted into a wheel diameter value For future development it is recommended to replace the J5 connector with a surface mount potentiometer to reduce the cost of the system J6 is the Misc I O Connector of the DAQ Module The design intent is to channel all 1 0 external to the dashboard enclosure through the J6 connector The CVT sensor Engine RPM signal and driver pushbutton signals are routed through this connector and out of the dashboard An 18 pin connector was chosen to allow ample room for additional sensors in future designs The LCD circuitry of the DAQ utilizes the J7 and J8 connectors for the LCD microcontroller and LCD I O respectively Currently this is a work in progress and considered outside the scope of the DAQ system design The board measures 6 5 x 4 275 which is approximately the size of the LCD display to be used with the LCD circuitry on the DAQ Module The LCD mounting plate has four standoff holes at its four corners The DAQ Module is designed to accommodate standoffs in the same locations for simple mechanical assembly between the DAQ Module and the LCD display The Baja vehicle s dashboard enclosure will provide a bezel faceplate that will mate with the LCD display mounting plate and allow the entire DAQ Module assembly to be mounted securely to the dashboard of the vehicle DAQ Module Microcontroller Operation The DAQ microcontroller provides the interface between the sensor
11. of RAM Address 200 0x297 pragma udata 2 0 200 struct dataPoint ctorBank2 19 Hpracgma udata RHRAAARAAAAAA TAA AA AA AAA ARAN AAA AERA A RARER A RARE RARER n J TAKARA AAA AAA AA ATTA AAA AAA A AAA ACH OA B R CR A AA AAA AAA ARTA AAT TTY SD Card POST SD Card Initialization Sequence UpdateDisplay 0 0 0 0 1 f5pisend delay 20000 counter SD INIT RETRIES Attempt to initialize SD Card blink LED each time counter 0 amp amp fSDCard c _ OK InitSdCard fS fSDCard ctive SD If there was an error blink 5 50000 BlankDisplay fSpiSend SD Card Initialization Initialize SD card in SPI mode unsigned char Init ard unsigned char fSpiSend unsigned char errors CardSend CMDO GO IDLE STATE 0 0 0 0 fSpiSend R1 IDLE if errors gt 254 return 5 ERROR ardSend CMDi SEND OPCOND 0 0 0 0 fSpiSend Ri if errors gt 254 return SD ERROR Set the block size to 512 bytes jendAlt CMDi6 SET 512 fSpiSend D fSpiSend return 5 39 SD Card Writing Write 512 bytes to SD card unsigned char Write unsigned long s unsigned char response loop GEN D ifi Sen
12. 69 768 955 988 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 2 0 0 2 0 0 2 0 0 2 The module will continuously check the serial buffer for data until the user selects the Stop Acquiring Data button This will force the module to complete processing of the remaining serial buffer packets then close the serial port txt file and report any errors to the user The module will then return to an 18 Idle state where the user may restart the process by modifying any configuration parameters as necessary 19 Assembly Simulation and Testing The DAQ Module printed circuit board PCB schematic and board layout was captured using PCB123 software The PCB was purchased through a Baja team sponsorship with Sunstone Circuits After the board and components were received they were assembled and soldered to the board A picture of the assembled board is shown in Figure 12 Assembled DAQ Module The LCD circuitry components on the board left half were not assembled during integration Also note that Figure 12 shows a DAQ module without a soldermask The first was manufactured without soldermask in anticipation of a board re spin due to design errors or improvements Ordering without a soldermask saved 50 of the cost of the board through Sunstone Circuits Figure 12 Assembled DAQ Module The board was compiled using MPLAB IDE software and programmed using a USB based MPLAB I
13. AG 10je nBe3 A 8c JO0J8 OSI 0 d JojeisueJ oDe6jJo0A 10jeJosio d o nouo pJe2 GS 20 Jojejsue4 eBeyoA ec ANININ 4e 04ju02 5 L gt s Ir ioe EA S ot GOT yy ot AS 22 21 DIOS SPTLEDTIPLNS om Liver 0 5 91 Kejdsig jesauay lt NIvOvI NIYOvII1Xx6c21 NIYOvI1X6 21 TE 4e 04ju02042IJA O VG dd ee 92 52 LX l SaL e LL 5 S Db S 1 a U U C f Q EC m EB s NO S8St41812Id in S 22 ct J9AIG2SUOJ 6 Od 3389 x EE SJUQUOAWOZY 95 I FR pen 3 01 t Ico 612 arot Si PLD F F 30 anor 8 2 9 2 SYOLIODVdVD SSVdAG u 0001 b 0001 or 4 Cornell Baja Racing 2009 Rev Digital Display and DAQ Module References 1 ms dq dw m DAQ Microprocessor Zigbee Transceiver LED Driver General LED Display LCD Display Microprocessor Voltage Translator 5 2 E 2 1886111 ome of Di o o o 6 6 oz N Battery and Ignition Switch Connectors 8 SD Memory Card Connector 9 Sensor I O Connector 10 Voltage Regulator 11 LCD Cable Connector 12 Mechanical Standoff Locat
14. CD 2 programmer to the DAQ Module J3 connector DAQ Module Testing Complete DAQ Module testing cannot be performed until the Baja vehicle has been built which is scheduled for Spring 2009 Currently the DAQ Module runs a Power On Self Test which initializes and tests the General Display circuitry SD card and Zigbee transceiver Refer to Appendix H DAQ Module Code Excerpts for sections of POST and initialization code POST as executed in the DAQ Module will initialize and exercise the General Display LED s SD Card circuit and Zigbee Transceiver The user will notice the following activity as POST is being executed 1 Power is applied by the user 2 The Debug LED will blink once to indicate that the microcontroller is alive 20 3 The General Display LED s will count from 0 to 9 and then from 9 to This confirms the SPI channel is opened the LED Driver is functional and will allow the user to check for damaged 7 segment LEDs 4 The General Display will indicate 00001 as the PIC performs the SD Card initialization and POST test Initialization sends basic configuration commands to the SD card to configure it for block writing If any errors are found during the test the Debug LED will blink 5 times before continuing on 5 The General Display will indicate 00002 as the PIC performs the Zigbee POST test If any errors are found during the test the Debug LED will blink 5 times before continuing on Note The u
15. General Initialization Sequence CR CR DEBUG LE 1 OUTPUT Setup pins for debug LED DEBUG blink 1 40000 Let user know uC is alive InitializeVars Open SPI Channel Open Serial Channel YNCH MODE General Display POST Display Initialization Sequence for counter 0 counter lt 10 counter r counter counter counter fSpiSend counter gt 0 counter ateDisplay counter counter counter counter counter f y 20000 Upda 4 y 0 0 0 0 0 fSpisend del 40000 BlankDisplay fSpiSend 38 PIC Memory Declaration J NOR SCR CR AAA AAA AAA AAA CR RC ACA A A ACA CA Ch AAA f AAA A A AAA AAA AAAS RORCRCRCRCRCECRCECRCACRCRCRCRCR ACA CRCRCRCRCA A AA AAA TARA ATTA RAAT CA BOR A A A 8 B A A A A P There are 51 dataPoints per sector on the SD card Each datapoint is 8 bytes Each bank can store up to 256 bytes The array must be divided into multiple banks CRCRCRCRCRCRCR RC RCRCRCA AAA A AAA AAT AAA AAA AAA CR Ch OR AAA RATATAT AA AAAS Banki of RAM Address 0x100 Ox1FF fpragma udata banki 0x100 struct dataPoint ctorBank1 32 pragma udata Bank2
16. I O SD Card Zigbee transceiver and future LCD circuitry The microcontroller code is written in the C programming language and was compiled using Microchip Technology s MPLAB IDE and the C18 compiler The code in main c is designed to run continuously with no exit conditions until power is removed from the DAQ Module Upon application of power the DAQ Module will perform a series of one time initialization commands before entering an infinite while loop in main c The initialization sequence performed is 1 All main c variables are instantiated and assigned initial values as necessary 14 2 Setup the SPI bus This opens the microcontroller s SPI bus and configures the SPI device chip selects as outputs on the microcontroller The LED Display Driver is configured over the SPI bus and the General Display LEDs are cleared 3 Setup the UART bus This opens the microcontroller s UART channel to the Zigbee transceiver The timers and capture registers are opened and configured for capturing time CVT and Engine RPM signals 5 The last stored wheel diameter value is retrieved from the microcontroller EEPROM to be used in speed calculations 6 General Display POST and SD Card Initialization A simple counter is used to exercise all segments on the General Display LEDs to identify bad LED segments The counter will count from 0 to 9 with each 7 segment LED incrementing simultaneously The counter will then decrement from 9 to 0 in
17. by configuring some network parameters over the serial channel during the initialization sequence RF Modem activity was noticed during this test proving that communication was recognized Complete DAQ System Test As mentioned previously the complete DAQ System Test cannot be performed until the Baja vehicle has been built and the DAQ installed in the system Once the sensors are installed in the car the following tests will be performed to ensure proper operation 1 Sensor inputs will be verified using the Debug LED to indicate sampling activity The general display will be used to show calculated values This will be used to verify the calculations are correct and or that the data is in an expected range 2 Verify successful SD card writes of collected sensor data in packetized form This will verify that the data is being captured with a timestamp and packet type and that block writes to the SD card are occuring 21 3 Transmit packets to the Base Station Packetization integrity can be verified using an indicator display on the console This will verify that the data stream and packetization scheme is synced between the DAQ Module and Base Station 4 Verify that the received packets at the Base Station are stored to the data file appropriately This functionality has already been tested with high confidence in the integration phase of the design Based on the testing already performed the remainder of the system should function per
18. by the magnetic field it creates The sparkplug fires at fairly regular intervals increasing as more energy is demanded of the engine The timing of the intervals can be captured to determine the Engine RPM It is important to note that the engine can create very high potentials on the Figure 2 Briggs amp Stratton 10 HP OHV Intek wire this way While the exact amplitude is irrelevant for Engine calculating the Engine RPM it may cause damage to the DAQ Module if not accounted for For this 12 reason the DAQ Module includes an opto isolator on the Engine RPM signal effectively isolating the microcontroller input from any spikes in voltage from the engine The driver input is a simple contact switch pushbutton which can be mounted within reach of the driver The driver pushes the button after the completion of a lap to capture the lap time in the microcontroller With some code modification the button can also be used for future development to crudely communicate with the pit crew through the wireless transceiver When these inputs are processed the data is packetized and sent to the onboard SD card and Zigbee transceiver For development and debug purposes a Maxim MAX7221 LED Driver and a five 7 segment LED array are wired to the microcontroller as well Communication with the SD card and LED Driver is through an SPI bus arranged in a parallel architecture The Zigbee transceiver is connected directly to the UART channel on the
19. d begin transmission flag Writ gt I OxFE write contents of sector array to SD card for loop 0 loop 32 loop I OxOF loop p loop le 13 nki nki rBanki loop torBank1 loop dataLower OxFO for loop 0 100 lt 19 I OxOF 2 1oop loop CARD return 0 struct d taPoint orBanki 1 NOERROR 40 struct d aPoint orBank2 unsigned char 5 12 Zigbee POST Zigbee Initialization Sequence UpdateDisplay 0 0 0 0 2 fSpiSend delay 20000 WriteUSART Ox7E Start Delimiter 1 byte WriteUSART OxOO Length 2 bytes WriteUSART OxO04 WriteUSART 0x08 Send AT Command 1 byte Writel 15 Arbitrary Frame number 1 byte Writel Send NT 2 bytes Send checksum 1 byte XBEE RETRIES tive FAL junter gt fXBee ctiv 11 1 20000 if fXBee cti TRUE If there was an error blink 5 50000 jee struct da oint 1 o t 1 orBank2 unsigned char unsigned char loop temp for loop start addr 1 if loop lt 32 rBanki loop p corBanki loop rBanki loop Writ WriteUSART OXxFO else if loop gt 31 amp loop lt 64 temp loop 32 WriteUSART
20. e The Master of Engineering Design Report will serve as the technical reference and user s manual Report Approved by Project Advisor Date Table of Contents Drugs m 2 Executive 4 System Purpose amp OVerVIGW aae 5 Design Requirements uy LY evi ou Se ve uev uu EE eet 7 Design Considerations 9 Processing E ermm ntu u 9 Wireless Protocol eccentric rnm racine 9 50 ee Nel RG 10 User Interf ee a eate Durs ve pe 11 Technical Approach 12 DAQ Module Physical Design and Construction 12 DAQ Module Mechanical Interface esses entnehmen enn nennen nnne nnne 13 Data Packetizatiori Scheme gue naaie oada 16 Base Station Console Ope atl OF et eee 17 Assembly Simulation and 19 cea 19 20 Complete DAQ System Test iere aseo vetet 20 Appendix DAQ Module Block
21. e 1 Wireless Technology Average Metric Comparison The advantages of Zigbee over Wi Fi and Bluetooth are the lower average power consumption for comparable ranges Zigbee transceivers at higher power can broadcast up to 1 mile line of sight The data rate is substantially lower but will suffice for transmitting at the rate required by paragraph 1 2 Another advantage of Zigbee is the ability to transmit with transparent networking The DAQ Module and PC RF Modem can act as serial buffers transmitting between the two nodes with very little network overhead as comparable to Wi Fi For initialization purposes this is an ideal solution for a team looking to plug n play a wireless DAQ system Table 1 Wireless Technology Average Metric Comparison Wi Fi Bluetooth Zigbee Data Rate 19 Mbps 3 Mbps 250 kbps Output Power 32 mW 2 5 mW 1 2 mW Range 95 10 100 120 Relative Cost High Low Low Power Source The derived power requirements under paragraph 3 and the mobility requirement of paragraph 1 4 focused the choice of power source to be a common type of battery A comparison of commonly used batteries is shown in Table 2 Common Battery Comparison Table 2 Common Battery Comparison Battery Voltage Weight Size Power mAh Type V g cm Alkaline NiMH Zinc Carbon Lithium Coin 1 5 3 3 7 115 NC NC 250 AAA 125 10 13 4 1 200 900 540 500 1 5 21 27 8 2 700 2 300 1 100 2 900 C 65 80 27 8 000
22. e microcontroller selection and architecture Refer to Appendix D DAQ Module Physical Layout for an illustration of the actual board layout A Microchip Technology PIC18LF4585 I P is the centerpiece of the board indicated by marker 1 The microcontroller is connected to three input signals to capture the CVT speed sparkplug ignition frequency and driver dash button activity A Cherry Hill Magnetic Proximity Sensor is mounted securely near the drive shaft of the engine aimed at the drive shaft With each rotation of the drive shaft the CVT rotates With a fixed gear ratio the driven axle speed can be calculated The driven axle speed along with the tire diameter can be used to calculate the number of rotations the tires experience This correlates directly to the speed of the vehicle assuming there is no slip between the tires and the ground This implies that the speed experiences a margin of error when the car is in the air or on slippery terrain The engine used in the Cornell University Baja vehicle is a Briggs amp Stratton 10 m OHV Intek as regulated by SAE Competition rules A picture of the engine is shown in Figure 2 Briggs amp Stratton 10 HP OHV Intek Engine To capture the tachometer data a single wire is wrapped around the base of the sparkplug in the engine As the engine fires the wire will acquire a voltage based on Lenz s Law As the sparkplug fires the current through the engine causes a potential voltage in the wire
23. er hand microcontrollers and most common package ICs can be purchased with sockets for very little additional cost When working on an undergraduate team designing a vehicle for racing it is extremely beneficial to have the ability to replace components that may have been damaged during installation racing or handling A PIC18LF4585 I P Microchip Technology microcontroller is the solution that was selected for the DAQ system It has unique SPI and UART interfaces 24Kx16 program memory size 3 25Kx8 RAM size several integrated Analog to Digital Converters ADC s an industrial temperature range and a 40 pin DIP package When used in conjunction with an Aries Eject a DIP socket the microcontroller is easily replaceable The cost for both the microcontroller and socket as of the printing of this document is 20 which is still about gt the price of a comparable FPGA Wireless Protocol Currently available commercial technology allows for a wide range of wireless solutions including but not limited to IEEE 802 11 Wi Fi IEEE 802 15 1 Bluetooth and IEEE 802 15 4 Zigbee The key metrics to consider between these protocols are data rate power range of transmission cost to implement and complexity in implementation For the purposes of the DAQ system security features are not considered but are recommended as an interesting expansion for any future developers The general trade offs between the technologies are indicated in Tabl
24. i alld ova med 18jnq 5039 alld 4 pue 1 Bd o eje pue 944 jenas 8 4 uode Ova 2 1 181984 E 1 8101S E j ee ss L 4 uol zlJenlul I8uueu eves J8AI82SUEJ einByuog 2 M Ova 129 85 Japeay alld OVE SIUM la Xi sisjeweseg Bunessdo 185 3 5481050 jasay WeIZEIG 9 0suo q Xipuaddy Appendix G Design Errata and Future Revision Notes Errata 1 Analysis The LED Driver U2 on the schematic requires pins 4 and 9 to be tied directly to Ground The LED Driver will not function without this change Temporary Solution Add wire 24 28 AWG from U2 4 to 02 9 on B side of the DAQ Module Add wire 24 28 AWG from U2 9 to U16 4 on B side of the DAQ Module Reglass Solution Update schematic to tie U2 4 and U2 9 directly to Ground Route as necessary on the board Future Revision Notes 1 Connector J4 and the all trace routings to the connector can be removed based on the validation of the J9 socket connector 2 Recommend moving J9 socket connector to board edge to facilitate card installation and removal 3 Connector J5 should be replaced with a surface mount potentiometer and the traces can be re arranged as necessary 37 Appendix H DAQ Module Code Excerpts Initialization of Ports and 1 0 JO n n n s s ek s n t TATA
25. ice and should provide 2 300 to 2 900 mAh Temperature dependent battery performance was acknowledged but considered outside the scope of the design for further investigation For compliance to the SAE competition rule 32 7 regarding the scope of Kill Switches the battery is connected in serial with the kill switch to chassis ground This will effectively turn off the DAQ Module in the event the Kill Switch is used User Interface The goal of the user interface is to provide an intuitive and user friendly interface for initiating data capture and analysis MATLAB Labview and Visual Basic modules were considered as potential solutions for a user interface to the DAQ system MATLAB libraries provide a wealth of computational and analytic tools but they are highly specified and would require a specialized serial driver to interact with the RF modem as a PC I O device A Visual Basic module as well would require a specialized serial driver to interact with the modem It also lacks the available processing tools available in MATLAB Labview is GUI based with easily modifiable flow diagrams and graphical indicators Labview also includes several types of device drivers and file I O blocks that would facilitate storing information retrieved from the RF modem to a file Labview is the solution selected for the DAQ System s PC interface It was chosen primarily for several reasons The Labview libraries contain Serial communication File 1 and g
26. interfaces to sensors on the CVT and engine a wireless transceiver an SD memory card LED circuitry and an LCD display circuit The LCD display circuit design and function is currently in development and is completely separate from the data acquisition storage and wireless transmission functions presented as part of the DAQ system Because the DAQ will be in mobile system it is powered by common AA batteries and controlled by an ignition toggle switch on the dashboard console The DAQ microcontroller performs the necessary calculations on the sensor inputs and packetizes the data appropriately for storage on an SD card display on the LEDs and transmission to the base station system via the wireless transceiver The DAQ microcontroller also has provisions for communication of the same packetized data to the LCD circuitry The Base Station system is designed around a user console interface with a serial connection to the wireless transceiver Through the console the user is be able to initialize the wireless connection choose a text file in which to store the data and view near real time data with graphical indicators The console is designed with considerations for technical expansion to allow for future additional sensors depending on the anticipated needs of the team Configuration parameters are modifiable on the console to assist in troubleshooting and the evaluation of additional sensors in the future A screen capture of the conso
27. ions x4 34 0 00 00 1 50 00 00 1 0 00 00 1 0 30ld 000 ISed ef exea ped ny Ped ye 3epeg paads 5 ugbua aisni 005 0 sajawoyse 20 sajawopaads To z 5 403e ipur sur yug 403e ipur end z sw peas 005 909 azs 10 00 00 20 00 00 0 0 1 a 1 E paads Wd 040090000050000020 0 0 52000000 0000010 0 0 00 0000020000060 10 50 00 00 1 SE 0304 0 00 0000020000020 07 0304 0 6 00000010000010 0 4JajJng jenas ouaq AadnsidoTjs qtaorisBuiy as pue squeunaoqi g yed 0 00 00 1 0 00 00 1 enuajrs aly Jena 20 00 00 1 851517 lqeu3 897 0001X Wad 4 1 eS TQ 10 00 00 0009 0 0055 El Buunb3y 4016 881512 ezieniur 333523 5 pue syuaunaoqg y 3p ova 8002 zol 1800120 Aepsen 9 osuo uone1s eseg 3 xipu ddv 9E eee i opo i i SNN X 510 4 Keld l f i l oney peeds 50113 JeUUeYD jauueyo eyeudojddy Wd jenas leuas 9500 1 2
28. iq QN I vvCT CEL s31004329 3 Un VC t Jamod 10 2npu O 60ZZv V4 0615 I CN T T88 66 4NOZZ 4o32ede jindino 11 565 6165 Aexiiq QN 12ZTv222d 923 21 YSX AQT dn0T ndul IN90T218AH f23 00 05 s duues 2 IM 1 T0 0 T4Z 00 0 s duues 99 Wes 10129902 9 qe2 244 t 00 0 G 0c f4 8 8 I QN OvSV s51u0 329 3 seu 133205 21 1233 3201 Nid OF 01 812 05 06 T Aax131q 4601 169 21004329 3 X04 103211250 0v0 41SXO4 970 4 QN 129 0128 2g AeusiA 902 SF AOS 4 41019882 GHLS4DODSTIOEEM 7905 I Aexidig QN E88C StV uone1odj0 YAL ASA A 9 Jrlzv Joywoedeg Z9LVIOASA9 OH 790 I Aay 310 QN II8E 06p QUON 59 1 99 1 OTF AOS ANT O ousedey ggOVDIOIVOLHTZN3dW vers 6 y iq QN vZ87 Stt uoneJodJo 960L AOL Ario 3901VIMSX9Z34 0 5 S 8 S O OT 1015 5981 XOT 8f0S u42 9c S40 29UUO Age 23 JIPEWIYIS 199 3 3 xipueddy LC 5 3101 OQA AEE gt SIipsOLWn ein 36 vP80IQ1 0S AUvS0LIQ1 ein sin 1
29. ket is intended to allow an SD card to be installed into a common SD socket connector The SD socket datasheet was rather ambiguous regarding its physical layout and the orientation of some SD Card specific signals such as the Card Lock signal and Card Present signal As a risk reduction measure to interpreting the SD socket datasheet incorrectly the 13 J4 connector was added to allow for a modifiable harness between the DAQ Module and an off board SD Card breakout board shown in Figure 3 SD Card Breakout Board Because SPI is not intended for long distance transmission the breakout cable for the J4 connector must be as short as possible specifically no more than a few inches Through integration testing it was discovered that communication would fail intermittently at a cable length of approximately 4 inches The basic operation of the SD Card socket connector J9 has not been verified in integration testing as of the creation of this report For future development the J4 connector may be removed as a risk reduction if J9 is validated operationally The card lock signal and other supplementary signals on J9 currently have no way of being Figure 3 SD Card Breakout Board tested without modification of the DAQ Module hardware and software The J5 connector allows the user to insert and remove a potentiometer to configure the wheel diameter in inches and store the value in the DAQ microcontroller s EEPROM The output of the potentiometer
30. le interface is attached in Appendix E Labview Base Station Console Design Requirements The Cornell University Baja Racing Team did not have any specific quantitative requirements for the design therefore there are no shall requirements After several discussions with the Mechanical Engineering team as to the intended usage and scope compiled at the following derived requirements 1 General Operation 1 1 The DAQ Module should have a method of capturing Engine RPM and Speed data 1 2 The DAQ Module should be able to capture Engine RPM and Speed data with a minimum rate of 2 datapoints per second 1 3 The Engine RPM to Speed ratio should be able to be calculated from the data captured from paragraph 1 2 1 4 The DAQ Module should be capable of operating while the Baja vehicle is actively driving mobile 1 5 The DAQ Module should have a method of communicating wirelessly with a laptop running a Windows XP Operating System 1 6 The DAQ Module design should allow provisions for additional sensors 2 Wireless Communication 2 1 Wireless communication should be designed to allow for maximum transmission range 2 2 Wireless communication should be designed for ease of setup and use 3 Power Consumption 3 1 The DAQ Module should be designed to minimize power consumption 3 2 The DAQ Module should have a replaceable or rechargeable battery 3 3 The DAQ Module should have a commonly available type of battery
31. microcontroller DAQ Module Mechanical Interface There are nine connectors to the DAQ module each with reference designators starting with J The function of each connector is shown in Table 4 Connector Functions Refer to the schematics in Appendix C Electrical Schematic for signal details The battery harness assembly is connected the DAQ via the J1 connector bringing 5V and Ground onto the board The 5V power bus goes off board to the ignition switch via the J2 connector The ignition switch is a simple contact switch activated when the user flips the toggle of the switch connecting the 5V power bus to the majority of the DAQ Module circuitry Without the appropriate harnesses in J1 and J2 the DAQ will not operate at all nor will the microcontroller be capable of being programmed Table 4 Connector Functions Connector Function Connector Type Reference Designator 11 Battery Input Molex shielded 12 Ignition Switch Input Molex shielded J3 Microcontroller Programmer Breakaway Header J4 SD Card off board header Molex shielded J5 Tire Diameter Tuner Breakaway Header J6 Misc Sensor I O Molex shielded 17 LCD Microcontroller TBD 18 LCD I O TBD J9 SD Card on board socket SD Card Socket The J3 connector serves as an onboard programmer header for the DAQ microcontroller The target device voltage is provided at the board connector for recognition by the programmer The J4 connector and J9 socket are redundant connectors The J9 soc
32. ose amp Overview Each year the Cornell Baja Racing Team competes against colleges from around the world in the Society of Automotive Engineer s SAE s Mini Baja Competition The competition requires college teams to design and construct an off road racing vehicle The vehicles are judged in several categories including a Design Element and Dynamic Element The team is constantly seeking ways to optimize the mechanical performance of their vehicle to gain a greater advantage in the Dynamic Element events as well as points for ingenuity in optimization methods and unique systems The team uses several metrics to determine performance including the continuously variable transmission CVT speed engine RPM and the RPM to speed ratio In order to assist in the data acquisition and analysis of these metrics the system design concept addresses the team s need for a wireless data acquisition system while maintaining low weight low power small size and the versatility for future design expansion A high level depiction of the system is shown in Figure 1 System Illustration The data used by the DAQ system would allow the Mechanical Team to optimize their tire pressure CVT weights belts and make other adjustments as necessary Figure 1 System Illustration The system consists of two complementary units the in dash module and the PC base station The DAQ module is a microcontroller based circuit board with
33. perly For future development one may easily include additional data packet types for additional sensors such as accelerometers GPS coordinates and engine temperature with the appropriate code additions Relevant hardware additions would also need to be included A specific example of a data packet is illustrated in Figure 5 Data Packet Example The interpretation of the packet would be a Speed packet captured at 2h 33m 22 56s with a value of 26 mph Table 5 Data Packet Type Values Packet Type Field Value Speed 0x01 Tachometer 0x02 Fuel 0x03 Figure 5 Data Packet Example OF 01 02 21 16 00 38 00 1A FO Y Y Y Start Delimiter Hours Seconds Msecs LSB Data LSB Packet Type Minutes Msecs MSB Data MSB End Delimiter 16 Base Station Console Operation The Labview Base Station Console controls the serial channel interface between the PC and the Zigbee transceiver at the base station It also graphically indicates the values of the data packets received from the DAQ Module and stores those values in a formatted text file on the Labview Console operation is illustrated in Appendix F Labview Consol PC The high level flow of the e Flow Diagram A screenshot of the console is shown in Figure 6 Screenshot of Base Station Console Refer to Appendix E Labview Base Station Console for a larger picture of the console Figure 6 Screenshot of Base Station Console
34. pull 17 any data from the serial buffer for processing per the DAQ Module packetization scheme format The initialization area of the console is indicated in Figure 9 Zigbee Initialization Window Figure 10 Console Graphical Indicators The graphical indicators on the console display the recent data for speed engine RPM and the calculated RPM speed ratio shown in Figure 10 Console Graphical Indicators in blue green and red respectively Figure 9 Zigbee Initialization Window Figure 10 Console Graphical Indicators The module will read the serial buffer stream parse the packet fields convert to decimal and concatenate values as necessary update the appropriate indicators and store the values to the txt file with a pre defined tab delimited format With tab delimited formatting the data headers and the data can be copied and pasted directly into an Excel spreadsheet and plotted using Excel graphing tools It can also be used as an input to a MATLAB program as well for more advanced analysis using MATLAB toolboxes A screenshot of an example DAQ data file produced by the Base Station Console module is shown in Figure 11 Example DAQ File Figure 11 Example DAQ File Baja 10 01 08 Notepad File Edit Format View Help Cornell Baja Racing DAQ Data wednesday October 01 2008 1 59 PM a 3 m Speedometer Tachometer Fuel Ind 191 2 415 768 485 957 559 1024 738 77 768 821 929 968 1024 496
35. raphical indicator blocks available for easy integration in a GUI interface The interaction and flow of data between these blocks is left to the designer With forward planning the designer s architecture can easily allow for additional sensor indicators and file formatting Based on 295mA transmit current and 45 mA receive current peak not continous 11 Technical Approach The DAQ Module and PC interfaces required distinctly separate yet complementary design A block diagram of the DAQ Module is included in Appendix A DAQ Module Block Diagram The purpose of the DAQ Module is to acquire the data from the sensors process it display any debug indications via the LED display store the data to the SD card and transmit the data through a Zigbee transceiver A screen capture of the base station console is included in Appendix E Labview Base Station Console A high level flow diagram of the console functionality is illustrated in Appendix F Labview Console Flow Diagram The purpose of the base station console is to provide a serial interface to a Zigbee RF Modem capture all data to a txt file and to provide some graphical indications in real time of the data The data cannot be displayed in real time because the DAQ Module is programmed to transmit in packet bursts The received data therefore cannot be considered true real time data DAQ Module Physical Design and Construction The basis for the DAQ Module is based around th
36. ring a roll over 21 4 16 Onboard Instrumentation Data Acquisition Onboard instrumentation data acquisition is allowed the power for this instrumentation must be from approved batteries per 21 4 15 32 7 Kill Switches Each vehicle must be equipped with two 2 easily accessible kill switches turning off the ignition and the entire electrical system of the car Brake light reverse light and reverse alarm are required not to be turned off Design Considerations When developing the solution for the DAQ system there were several technical solutions that were considered To help determine the optimal solution trade studies were conducted to determine the weighted benefit of potential solutions The critical areas for design consideration were e Processing element e Wireless protocol e Power source e PC and user interface Processing Element The selection of the processing element is between using various microcontrollers or FPGAs The derived requirements of the project are to have low power draw the necessary support for I O low cost be easily programmable for future expansion and replaceable in the event of damage While FPGA s are favored by supporting more than enough 1 0 there are more advantages by using microcontrollers for this application The standard FPGA QFP or BGA package types do not allow for easy replacement without moderate to advanced soldering skills and expensive solder rework equipment On the oth
37. s several metrics to determine performance including the continuously variable transmission CVT speed engine RPM and the RPM to speed ratio In order to assist in the data acquisition and analysis of these metrics have developed an in vehicle Data Acquisition DAQ Module a complementary base station PC interface to analyze the data and a wireless communication protocol between the DAQ and base station using the IEEE 802 15 4 Zigbee standard Integration testing of the entire system in vehicle will occur when the Baja vehicle has been completed in the Spring of 2009 DAQ Module integration consists of a series of POST tests that exercise the on board circuitry The main microprocessor issues several initialization and configuration commands to the General Display SD Card and Zigbee Transceiver DAQ Module testing has been executed and recorded in a video online at http www youtube com watch v fkLEGHPIz50 Base Station console testing has been performed with simulated serial inputs from an RF modem The Base Station code has been proven to correctly parse identify display and store properly formatted data packets per the intended design An electrical schematic bill of material board layout and prototype module were developed for the DAQ module A base station console and RF modem interface were developed using Labview And code flow charts were developed as an operational aid for the mechanical team and future developers System Purp
38. ser is responsible for troubleshooting the DAQ Module if any errors are indicated Testing of the Initialization and POST code was successful in identifying when the SD Card and or Zigbee were attached or were not attached or initialized properly The SD card code was also successfully tested by writing some dummy packets to the card and verifying the card contents on a PC using an SD MMC card reader A video demonstration of the DAQ Module testing is online at http www youtube com watch v fkLEGHPIz50 Base Station Console Testing of the Base Station Console was done by simulating the serial input from the Zigbee RF Modem and verifying the correct packet parsing interpretation display and data file storage A Demo Serial Buffer was created inside the console to allow the user to simulate a number of packets in the serial buffer An Enable Zigbee toggle switch was also added in the console to bypass the initialization of the Zigbee transceiver and pull the serial data from the Demo Serial Buffer instead In simulation the console performed as expected with all properly formatted packets A serial buffer size of 5 packets 50 bytes was input into the Console code and it was able to parse and interpret the packets graphically display the data and store it to a data file In a separate test the console was also able to successfully initialize the RF Modem over the serial channel in the Zigbee Initialization code This was verified
39. t the course time hours minutes seconds milliseconds and the data point data value The type of data point can currently be a Speed Tachometer or Fuel type As datapoints are collected they are sent in packetized form to the Zigbee transceiver individually and to the SD card in a block write when enough datapoints have been collected to fill an SD card sector 15 Data Packetization Scheme The data capture packetization scheme is used for storing data to the SD card over the SPI bus and to transmit through the Zigbee transceiver over the UART channel The scheme uses a fixed length packet size of 10 bytes Each packet is structured as shown in Figure 4 Data Packet Structure Each field is 1 byte in length Figure 4 Data Packet Structure Start Packet Minute Sec Msec Msec Data Data End Delimiter Type MSB LSB MSB LSB Delimiter Data Packet 10 bytes The structure was designed to allow for all reasonable quantities and values of time data and packet types The design currently uses three unique packet types to capture the data They are defined as listed in Table 5 Data Packet Type Values The field values are easily changeable in both the DAQ module code and Labview Console code The field values are defined in define h for the C code and on the Labview Console as flags They must be identical respectively between the Labview and C code in order to function pro
40. the intended design Errata and design notes are documented in Appendix G Design Errata and Future Revision Notes 22 EC SSIaN ydesor 80 60 21 sng 45 wes6eig OYG 55 jauueyd 4 peog yseq 30431 490 g 9 Ova v xipusddy vc 0025 4 21u04129 3 unpj1eds 24780 1 4 NOON 998 UIdOT 9c 6406 I CN T 972 SSv Ist 1010911100 19 NS 41 81 5 865 SC 56 65 I 21u04129 3 unpj1eds 9 100 1uUd NOON pied 6r vc 000 I 8r ec 90 v I 3 l1uues 0 lt apeaH AQ 9 I0 SCT 314 Lf cc ELS T QN 9S927INM 6100 s21u04329 3 uuop eAA x olN SI utd gT T8T SvOEU or 4075 I Aay 81d CN TLLOEV 51101293 ODA Jeun 2 ct Oc T QN ES9ZINM 405 s21u0129 3 uuop eAA X olN 145 pJe5 qs uid zT 101280005 Vr 6T 0875 I GN vZLOEV dwy s31u04129 3 ODA Jawwelsoid 9 10328uu0 9 9 8T 9116 T 9 81 QN 8792INM 8102 s21u04328 3 1 youms yseq uld z 10322uu0 0 ZT 1975 T 8
Download Pdf Manuals
Related Search
Related Contents
User Manual FIG. 2 - Vetek Weighing AB HAZCAT Chemical Identification System - CLU-IN Service Manual 議会議案(PDF:148KB) Edition de janvier 2015 (N° 389) Istruzioni per l`uso Gato de botella Copyright © All rights reserved.
Failed to retrieve file