Advisor : Professor Steven Gutschlag Ahmed Albitar John Gertie Bradley University Electrical Engineering Department SAE Formula Car Data Acquisition & Display System April 9, 2015 Advisor : Professor Steven Gutschlag Ahmed Albitar John Gertie Justin Ibarra Sean Lenz
Agenda Problem statement Background System block diagram Division of labor Project non-functional requirements Project functional requirements Discussion of individual contributions System test results Summary & conclusion
Problem Statement Every year the Mechanical Engineering department at Bradley University designs and constructs a formula racing car. Past performances have proven to be inconsistent due to engine failures and structural breakdowns. To improve future performance, an advanced data acquisition system will be employed to indicate problems before a failure occurs. Unlike the existing system, data will be monitored by both the driver and the crew. A touch screen mounted in the vehicle will display data and warning signals to the driver. The same data will also be transmitted to a computer, where it will be recorded for diagnostic evaluations. Multiple indicators will be used to warn the driver and crew if data readings exceed a safe limit.This system will provide the necessary information to optimize the formula cars performance, giving Bradley’s mechanical engineering department an edge over the competition.
Problem Description Acquire 5 Key data values from SAE Formula Car RPM Speed Oil Pressure Water Temperature Battery Voltage Aggressive Notification system to alert driver if data exceeds threshold values Multi-mode touch screen display Wireless transmission of data to off-track computer Data Logger
Background Design goals '07-'10 Honda CBR600RR engine Aesthetically pleasing Economically viable Race ready performance User friendly for all levels '07-'10 Honda CBR600RR engine Total budget of $10,000 Add what previous groups have accomplished.
System Block Diagram 5V Power Supply Amulet LCD Microcontroller (ATmega128) Amulet LCD UART Sensors Wireless Transceiver Laptop (LabVIEW GUI) UART RS-232 Change rs-232 to UART
Division of Labor Ahmed Justin Justin & John Sean Sensor selection & interfacing Justin Amulet display Justin & John Interface microcontroller with HyperTerminal Test microcontroller with simulated sensor data Interface microcontroller with LabVIEW Sean Prepared LabVIEW to receive wireless data Interface microcontroller with Amulet Setup external power supplies for the microcontroller, Amulet, and Op-Amps Update for whole project. Add Amulet stuff.
System Block Diagram Sean 5V Power Supply Ahmed Microcontroller (ATmega128) Amulet LCD UART John & Justin Sean Sensors UART Wireless Transceiver Laptop (LabVIEW GUI) RS-232
Project Non-functional Requirements
Project Functional Requirements
Ahmed's Agenda Subsystem block diagram Pressure and Temperature Sensor Circuitry Project functional requirement and specification Sensors Test result
Subsystem Block Diagram Engine 12V Temperature Sensor ATmega128 Pressure Sensor RPM Sensor Velocity Sensor Voltage Measurement
Pressure and Temperature Sensor Circuitry
Functional Requirements and specification 12 volts from the car's battery Water temperature measured by a temperature sensor Oil pressure measured by a pressure sensor Velocity and RPM measured by a speed sensor Data acquisition maximum error of 5% Sensors compatible with engine
Temperature Sensor ProSense TTD25N-20-0300F-H Analog output: 4 to 20mA Operating Voltage: 10 to 30VDC Temperature range: 0-300 F ¼ NPT Cable : CD12L-0B-020-A0 Remove price
Pressure Sensor ProSense PTD25-20-0100H Analog output: 4 to 20mA Operating Voltage: 9.6 to 32VDC PSI range: 0 to 100 ¼ NPT Cable : CD12L-0B-020-C0 Remove price
RPM and Velocity Sensor Supply Voltage: 4.5 - 24 V DC Supply Current: 10 mA Output Signal: Pulse 0-50 V Maximum output current: 20 mA Sensing distance: From 0.5 to 2 mm Maximum operating Frequency: 100KHz Add maximum operating frequency
Temperature Sensor Result Maximum 5% error T = m × Io +k m = 10418.75 k = -59.48 C Linear Sensor V = Io × Rf (Rf=250 ohms) T= temperature m = slope k = Temperature offset Graphs Indicate units
Pressure Sensor Result Maximum 5% error P = m × Io +k m = 6250 k = -25 C Linear Sensor V = Io × Rf (Rf=250 ohms) P = Pressure m = slope k = pressure offset Add units
RPM Sensor Result Maximum 5% error F = Frequency RPM = F(cycle/sec) (60sec/1min) (1rev/2cycles) Linear Sensor
Justin’s Agenda Subsystem block diagrams Project functional requirements Hardware and software used Amulet touch screen Subsystem test results Wireless transmission
Subsystem Block Diagrams Water Temp Input Amulet Touchscreen Home Page Oil Pressure Input Demo Mode MPH Input Aerocomm AC4790 Practice Mode Race Mode RPM Input Batt. Voltage Input ATmega128 As discussed I worked on both the amulet display and the wireless communication. Go over my block diagram. Go over John’sand mine block diagram. However, formy portion of the presentation I will just be discussing the touchscreen display and be handing off the wireless communication portion of the project to john to discuss. ATmega128 Aerocomm AC4790
Project Functional Requirements Data acquisition sends data for display Display accessible to driver Specification Data can viewed on the touchscreen Can be easily seen by driver without posing as a distraction from driving Amulet touchscreen functional requirements
Hardware and Software Used Amulet touchscreen Laptop Atmega128 Software Gemstudio Atmel Studio
Amulet Touchscreen Pseudo data used for demo mode Aggressive warning system Demo mode sweep Navigation between modes
Amulet Display Results Aesthetics Navigation Widgets Microcontroller communication Aesthetically pleasing – I made a home, demo, practice, and race mode visually appealing. This was done for both the judges of the competition the formula car will be in and the driver. While the amulet visually appealing it is also well organized so the driver can easily read the values that need to be seen while racing. The different modes can also be easily navigated through. Each mode can be returned to the home page and then a new mode can be chosen The widgets were programmed the to sweep from the maximum and minimum value in the demo mode These widgets then flashed red when hazardous values were reached to alert driver While flashing red everything else on the screen disappeared so the driver can easily focus on the hazardous value The practice and race mode were then set up to receive data from the microcontroller. After I initially set the modes up sean continued with the testing and debugging which he will later discuss.
Home Page Here is the homepage. As you can see it has three different buttons each going to it’s specified mode
Practice Mode In the practice mode all data that is collected is displayed and our aggressive notification system is still being used
Demo Mode Here we have a picture of the demo mode. As you can see there are now pseudo values assigned to each widget that is representing the sensors value. When this page is viewed in real-time the values are sweeping from their maximum value to their minimum value. Next up is a picture of the demo mode with our aggressive notification system in full effect
Demo Mode Here you can see the hazardous value is red and all other values on the screen have disappeared. This hazardous value is flashing between red and white when viewed real-time to alert the driver as effectively as possible
Race mode Lastly, here is a screenshot of the race mode. As of right now this is the same as the practice mode since all values displayed in the practice mode are necessary for the driver to see. However, if more sensors were to be added that the driver didn’t need to see while racing this page would stay the same and those sensor values would be added to the practice mode. I will now be leaving the floor to my colleague john to discuss our portion of the wireless communication
John's Agenda Subsystem block diagram Project functional requirements Hardware & software used Wireless transmission testing Testing with simulated data Interfacing with LabView Subsystem test results
Subsystem Block Diagram Water Temp Input Oil Pressure Input MPH Input RPM Input Aerocomm AC4790 LabVIEW Display Batt. Voltage Input ATmega128 Aerocomm AC4790 Mention that Aerocomm is wireless transmission
Project Functional Requirements
Hardware & Software Used Atmega128 Aerocomm AC4790 Laptop Software Atmel Studio HyperTerminal LabVIEW
Wireless Transmission Testing Board to board Board to HyperTerminal Microcontroller to HyperTerminal Fill empty slide space
Testing with Simulated Data Linear Output Oil Pressure, Water Temperature, Battery Voltage Simulated with Power Supply Pulse Output Tachometer, Speedometer Simulated with the Wave Generator include sampling rates
Interfacing with LabView Communication Protocol Universal Asynchronous Receiver/Transmitter(UART) Transmission Type Ascii Sent using packets more discussion of packets
Subsystem Test Results Wireless communication established Microcontroller communication with HyperTerminal Data displayed is current Values displayed in ascii equivalent
Sean’s Agenda Functional requirements Subsystem block diagram Equipment used Interface Amulet with microcontroller Prepare LabVIEW to display wireless data Results
Functional Requirements & Specifications Display data to driver and pit crew Touchscreen display Store data for review UART communication Does not interfere with driver performance 5 V power supply No loose or exposed wires Display real time data
Subsystem Block Diagram 5V Power Supply Microcontroller (ATmega128) Amulet LCD UART Data From Wireless Transceiver Laptop (LabVIEW GUI) RS-232
Hardware & Software Equipment Software Amulet LCD ATmega128 (microcontroller) DC/DC converter (±5 𝑉 , ±15 [𝑉]) Level shifter (+5 [V] to +3.3 [V]) Laptop Oscilloscope GemStudio Pro (Amulet display software) Atmel Studio 6.1 (microcontroller software) LabVIEW 2014
Amulet Subsystem Bl0ck Diagram 5V Power Supply Microcontroller Put Sensor Data in Array to Transmit Send Data Array Amulet Touchscreen UART 100 ms interrupt
Amulet LCD Serial Protocol Microcontroller is master Amulet is slave UART Ascii 9600 bps baud rate Transmit specific protocol to access variables Microcontroller is master Initializes communication Amulet is slave Full Protocol- Responds only if Amulet receives valid message Add slide to prove that 9600 baud is fast enough.
Amulet LCD Internal RAM (IR) is memory on the Amulet. 256 byte variables 256 word variables (word = 2 bytes) Can receive 14 different command messages from microcontroller Can access internal RAM on Amulet Changing and copying variables Jump to different pages on display Draw pixel, line, or box
Amulet Serial Communication Flow Chart Op-code = Tells Amulet what type of variable is being accessed (byte or word) Address = The variables location on the RAM of the Amulet LCD Value = The data to be displayed on the Amulet LCD Op-code Variable Address (High nibble) Variable Address (Low nibble) Variable Value (High nibble) Variable Value (Low nibble) Figure 1 – Transmit protocol for a byte variable.
LabVIEW Subsystem Bl0ck Diagram Put Sensor Data in Transmission Array Send Array Data LabVIEW I/O Assistant (Parse Data) LabVIEW Gauge Display RS-232 100 ms interrupt Log Data
Instrument I/O Assistant LabVIEW Display Serial Protocol RS-232 Ascii 9600 bps baud rate Transmit packets of data Instrument I/O Assistant Front Panel vs. Block Diagram Connect blocks to data type and viewing method Aerocomm Transceiver Laptop (LabVIEW Display) Instrument I/O Assistant Display Data Save Data Technically EIA-232 but everyone refers to standard as RS-232.
Front Panel
Serial Communication Setup
Block Diagram
Subsystem Results Successful interface between ATmega128 and Amulet LCD Data sent and displayed on the Amulet LCD Successful interface between Aerocomm Transceiver and LabVIEW GUI Data sent, displayed, and stored on the LabVIEW GUI
System Test Results Display data to driver with aggressive notification system Race, demo, and practice modes Wirelessly send data to pit crew’s laptop to be displayed on LabVIEW Data logged via LabVIEW Sensor’s acquire data with max error under 5%
Summary & Conclusion BU ME’s require more advanced notification system for driver Requires data logging, multiple display modes, and wireless transmission System is functional Requires installation and further testing
Sources http://cegt201.bradley.edu/projects/proj2011/pjacher/SAEDAQ/Deliverables_files/SAEDA Q_final_report.pdf http://www.atmel.com/images/doc2467.pdf http://www.amulettechnologies.com/images/stories/Downloads/mk480272cdatasheet111 2.pdf https://www.dropbox.com/s/l8abp41iru83oqg/Datasheet_carspd_eng_101.pdf?dl=0 http://www.automationdirect.com/static/specs/prosensettrans.pdf http://www.automationdirect.com/static/specs/prosensetransmitters.pdf
Appendix
Initialization
ISR
.C/.h files
to_ascii
Amulet Ascii Transmit Protocol Example Microcontroller Set Byte Variable Amulet Response Microcontroller Set Word Variable Amulet Response Figure 2 – Serial communication flow chart
Amulet Protocol Ascii Example: microcontroller sets internal RAM (IR) word variable to specific value (0x02C9) Figure 3 – Serial communication flow chart
UART Transmit 1V per division 0.5ms per division Transmission contains: {0x00, 0xD6, 0x31}
Maximum data log time Limited by max rows in excel Max rows about 1 million Log data every 100 [ms] Max time = 27.8 hours 0.1 [sec/row] *1.2E6 [rows] = 100,000 sec 100,000 [sec] /60 [sec/min] /60 [min/hr] = 27.8 hrs
Max Transmission Rate with 9600 bps Baud Rate 1 bit sending time: 1/9600 = 104 us Assume 16 byte packet 8 bits + 1 start_bit + 1 stop_bit = 10 bits/byte_sent 104 [us/bit] * 10 [bits/byte] * 16 [bytes/packet] = 16.6 [ms/packet]
Research Amulet serial communication protocol LabVIEW Instrument I/O Assistant Troubleshooting errors Eliminate???