Attack Dyno
Designed and Manufactured By:
Marco Martinez
Logan rutt
Bryce goertz
Robert coloroso
Figure 1: Attack Dyno
Table of contents
Design Summary………………………………………..………………………….…2
System Details………………………………………………………………..….……4
Shell……………………………………..………………………………………...4
Mechanical Movement………………………………………………..………..…5
User Interface and Launch Timer………………….………….….….….…..….…6
Main PIC Code……….………..…………………………………………………7
Launch Timer……….….…………………………………………………………7
Speed Timer……….………………………………………………………………9
Track Timer…………….…..…….….….….….….……………………..………10
Power and Torque………….…………………………………………………….11
Temperature………………….…………………………………………………..12
Functional Diagram………………………………………………….….….……14
Partial Parts List…………………………………………………………………….15
Assembly List…………………………....…………….………..…….…………18
Design Summary
The Attack Dyno is a convenient and affordable way to bring an attack timer and dynamometer right to the comfort of your own vehicle. The whole design is built to fit right into the space of a standard do-it-yourself aftermarket car stereo. With the convenience of concealment and very little user input, the Attack Dyno will calculate many more things than your standard dynamometer or attack timer will. The design of the Attack Dyno is catered to the curious side of any car enthusiasts. With the ability to output vehicle torque, speed, horsepower, 1/4 mile times, 0-60 mph acceleration times, ambient air temperature, and more, the Attack Dyno is perfect for those who want to experience and gain knowledge of their vehicle's full potential without breaking the bank.
Figure 2: Top View of Attack Dyno
Figure 3: Front view of Attack Dyno
Figures 2 and 3 show a complete and thorough overview of the device. The Attack Dyno has a magnetic reed switch that the user needs to first mount to their vehicle. Comprised of two components, the reed switch is attached to the consumer’s wheel using simple double sided automotive tape. The reed switch is attached to the vehicle’s caliper while the corresponding magnet is attached to the actual wheel of the vehicle at no more than 0.5 inches apart.
Along with this, the vehicle’s wheel radius and curb weight are hard coded into the Attack Dyno program and can be changed. Once these two things are complete, the Attack Dyno is ready to be used. Using the buttons shown in Figure 3, the user will navigate through the user interface to the correct program that he or she wants to use. A two pitch launch timer, accompanied by three blinking LED lights cycling through red, yellow, and green, will let the user know when the Dyno will start running and in turn when to step on the gas. As the vehicle is moving, the reed switch attached to the wheel will input data to an Arduino microcontroller, which will in turn perform the needed calculations and display the final values for the user onto the LCD screen.
System Details
As seen in figure 3, the Attack Dyno is small, concealable, and has the potential to fit in many different spots within the user’s vehicle, including an after market stereo or just right on the dash. The Attack Dyno performs all of its work with just the input from a magnetic reed switch and user input. Serial communication between a PIC16F88 and an Arduino Uno microcontroller allows the Attack Dyno to communicate start and stop times within the subroutine programs described below, including the launch timer. A complete user interface and menu is displayed on a 16x2 LCD display, driven by a shift register, to reduce the wiring from the Arduino to the Attack Dyno’s front face.
Shell:
Covering the entire assembly, the acrylic shell of the Attack Dyno is made to serve as a protection to the electronics and also provide the user with a convenient and easy way to take the Attack Dyno with them anywhere and place it anywhere within their vehicle.
The front faceplate of the acrylic shell houses three vertical LED’s: one green, one yellow, and one red. These LED’s, in sync with an electronic buzzer, notify the user when to start and when the Attack Dyno will start receiving data. Adjacent to the button display, Figure 4 shows an area where the LCD screen accompanied by housing will swing in and out. Starting at a position flush with the shell, and controlled with two buttons and a four bar linkage, the LCD display will swing forward and out hinged on its left side and back flush with the faceplate at the users command. On the far right, a double pole, double throw, on-and-off switch controls power to the entire assembly. When flipped up, the unit will turn on, accompanied by mini tune from the speaker, to notify the user that all components have powered on correctly.
Figure 4: Front Faceplate
Mechanical Movement:
The pivot motion of the LDC display screen is attributed by the motorized slide potentiometer seen inside of the acrylic casing in Figure 2. Power supplied by an H bridge driven motor controller allows bidirectional rotation of a DC motor that controls the track movement allowing the motor to rotate clockwise and counterclockwise to bring the track forward and backward respectively. The right corner of the LCD screen is attached to a four bar linkage that is in turn attached to a metal tap on the motorized pot. The position of the track is monitored by PIC, using the value given by the potentiometer. This position allows the PIC to set limits on the motion of the LCD, preventing the user from moving the LCD out of range of the four bar linkage. By using the buttons to navigate to the “LCD Adjust” menu and pushing the back button, the H bridge shown in Figure 2, along with the PicBasic code shown in the appendix, will engage the forward movement of the track swinging the LDC out while the forward button will move the slide back and retract the LCD screen. The Attack Dyno will remain in this subroutine until the user presses and holds the “return” button.
User Interface:
The user interface is a simple menu – allowing navigation through menu options and sub-menus with ease. This enables the use of only four push buttons, in a directional-pad configuration to read user input. Because of the space requirement of the design, it would be ineffective to use dedicated buttons for each of the Attack Dyno functions. The use of the menu driven user interface optimized both the push buttons and the limited size of the LCD display.
Figure 5 shows a flow chart for the user interface programmed on the Arduino Uno.
Figure 5: User Interface/Menu Software Flowchart
Main PIC Code:
A PIC16F88 microcontroller was used to control all LED and sound functions, as well as the LCD position adjustment. The PIC simply waits for the Arduino to send a character via serial communication. When a character is received, the PIC will execute a corresponding subroutine. For the launch timer and LCD adjustment, the PIC will send a ‘D’ character back to the Arduino, informing it to continue operation.
A flow chart for this software is shown in Figure 6.
Figure 6: PIC Software Flowchart
Launch Timer:
Once the LCD screen is brought to the desired position, the user can navigate throughout the entire menu with the use of four different push buttons as seen in Figure 2. The enter button will allow the user to go further into the options of the user interface, while the forward and back buttons will go through different menu options and the return button on top will go back.
Whenever any of the programs are selected to run, the Attack Dyno will first ask the user if they are ready. The user must then press the enter button, telling the Arduino they are ready to begin. With the use of serial communication between the Arduino and the PIC16F88, the launch timer software flow chart shown in Figure 6 shows that, when engaged, the Attack Dyno will cycle through three colors of LED’s accompanied with buzzer sound. In order, the program will cycle through one blink of the red LED with a ‘C’ note buzz, followed by one blink of the yellow LED with a ‘C’ note buzz, flowed by one blink of the green LED with a ‘C’ note buzz, and finally one last blink of the green LED with a higher ‘A’ note buzz.
This countdown timer is based off what is used at an actual drag strip. After this the Attack Dyno will start to receive data from the magnetic reed switch, displaying relevant data on the LCD display.
Figure 7: Launch Control Subroutine Software Flowchart
Speed Timer:
The first option to appear is the speed timer. When activated, the Attack Dyno will first go through the process of the speed sensor to acquire real time mph speed. The software flow chart for this program is shown below as Figure 8.
As the wheel rotates, the reed switch mounted to the wheel will come into proximity of the magnet that is mounted on the caliper, creating a closed circuit and a digital 1 than can be read by the Arduino. Every time there is a reed switch close, one revolution of the wheel has been made. As the program is running, every wheel rotation is read while keeping a timer count of the previous reed switch close. The program then uses this change in time between wheel revolutions (reed switch pulses) along with the wheel diameter to calculate speed.
Figure 8: Speed Subroutine Software Flowchart
The output of the speed sensor will be used by the Arduino Uno to run the speed timer program shown below in Figure 9. As long as the input speed is below the target speed, upon starting, the program will continue to keep track of time until the speed finally exceeds the target speed. At this point the program will stop and the time will be displayed on the LCD screen.
The Attack Dyno can calculate and display 0-60 mph speed times as well as 0-20 and 0-10 mph speed times (these values were selected for bicycle demonstration). One function, depicted in Figure 9, is used to calculate all of these times. The desired mph value to be used is simply passed in as a function argument.
Figure 9: Speed Timer Subroutine Software Flowchart 0-60 MPH Time
Track Timer:
Allowing the user to record their 1/4 and 1/8 mile track time, the next Attack Dyno function is the Track Timer. When enabled, the Attack Dyno will first begin the launch timer. The Arduino will then run the speed sensor program and use the inputs in the track timer program shown in Figure 9.
Figure 10: Track Timer Subroutine Software Flowchart
Power and Torque:
Power and torque applied at the wheels of the vehicle can also be calculated by the Arduino Uno and is the last menu function that the Attack Dyno menu offers. By inputting the vehicle curb weight and the wheel diameter, the Arduino Uno will preform simple calculations for power and torque based on the wheel's revolutions per minute data gathered from the magnetic reed switch. The values of power and torque will be displayed in two rows on the LCD simultaneously.
Figure 11: Dynamometer Subroutine Flow Chart
Temperature:
Internal combustion engines preform differently depending on ambient air temperature – making temperature an important variable to be able to track when recording power, torque, and speed. While the LCD display screen can display two different values on two different rows, the functionality of the Attack Dyno was maximized by providing ambient air temperature readings on the main screen with the use of a simple temperature sensor.
The temperature sensor software flow chart is depicted by Figure 10 and will display the most recent temperature on the LCD screen every 3 minutes, or whenever the LCD display is updated.
Figure 12: Temperature Subroutine Software Flowchart
Functional Diagram
Partial Parts List
Motorized Slide Pot: The purpose of the motorized slide pot is to provide mechanical motion to the system. This system benefits the user in multiple ways. When the device is powered on, the LCD screen can be pivoted out providing ease of access to the screen and user interface. The user can adjust the screen to their liking, and return it to its ‘zero’ position when finished. This gives the user full control of the position of the LCD.
Slide Pot – Motorized (10k Audio Taper)
Arduino Uno: The purpose of the Arduino Uno in the system provides a simple, user-friendly way to control the multiple functions within the Attack Dyno system. It provides functionality and control by self-containing all the necessary components with which to support the microcontroller. The 16 MHz clock speed, and onboard processing, were needed for accurate sampling of the reed switch pulses.
Arduino Uno R3 Board with ATmega328P Microcontroller, ATmega16U2 and USB
595 Shift Register: The purpose of including this part in the Attack Dyno is to change the number of inputs and outputs required to drive the LCD display. By including the shift register, it is possible to drive the LCD with only three outputs instead of the six which would normally be required. This simplifies the wiring required between the two boxes of the assembly.
74HC595 8-bit Shift Register w/ 3-State Output Registers
Magnetic Reed Switch: The reed switch is vital to the successful operation of the Attack Dyno. It is being used as a functional sensor in order to determine vehicle speed and distance traveled. By relaying the on-and-off timing of the reed switch, and knowing the radius of the wheel, the Attack Dyno can relay the user information from 0-60 times, 1/4 mile times, and even torque/horsepower at the wheels.
Magnetic Reed Switch
Temperature Sensor: The temperature sensor is included to help the user gauge road conditions. This is a simple addition to the Attack Dyno that will give the user an edge when trying to break personal records, as well as allow accurate comparisons of data collected in different weather conditions.
TMP36 – Temperature Sensor
PIC 16F88 Microcontroller: The PIC microcontroller, in conjunction with the Arduino board, provides the basis for the robustness offered by the Attack Dyno’s functionality. The microcontroller is responsible for storage and retrieval of data regarding times, as well as the calculations necessary to take transform that data into information the user can retrieve through the interface.
Microchip PIC 16F88-I/P IC, 8 bit MCU, 20MHz, DIP-18
Assembly List
Part Type / Properties10k Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
10k Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
10k Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
10k Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
10k Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
1k Ω Resistor / resistance 220Ω; package 1206 [SMD]; tolerance ±5%
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
330 Ω Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
3k Ω Resistor / resistance 220Ω; package 1206 [SMD]; tolerance ±5%
Momentary Switch / package ksa_sealed_tac_switch; variant ksa_sealed
Piezo Speaker
Diode / package diode-1n4001; variant pth
Diode / package diode-1n4001; variant pth
Diode / package diode-1n4001; variant pth
Diode / package diode-1n4001; variant pth
SWITCH-DPDT / package eg2211; variant eg2211
Momentary Switch / package ksa_sealed_tac_switch; variant ksa_sealed
LEDs / package led10mm; variant 10mm
L293D / package THT; variant L293D
LCD screen / type Character; pins 16
DC Motor
Momentary Switch / package ksa_sealed_tac_switch; variant ksa_sealed
Arduino Uno (Rev3) / type Arduino UNO (Rev3)
PIC16F88-DIP / package dil18
Momentary Switch / package ksa_sealed_tac_switch; variant ksa_sealed
NPN-Transistor / package TO92 [THT]; type NPN (ECB)
TRANSISTOR_NPN / package to-92; variant to92
Trimmer Potentiometer / package THT; type Trimmer Potentiometer; size Trimmer - 6mm; maximum resistance 10kΩ; track Linear
LEDs / package led10mm; variant 10mm
Reed switch / package THT
TMP36 Temperature Sensor / package TO92 [THT]; type TMP36
74HC595 / package DIP16 [THT]; type 74HC595
SLIDER / package slider
Optocoupler / package THT; part 4N35
Optocoupler / package THT; part 4N35
Voltage Regulator / chip LM317; package to220-adj; variant sink; voltage 1.25 – 36 V
Battery block 9V / voltage 9V
Battery block 9V / voltage 9V
LEDs / package led10mm; variant 10mm
Acrylic Sheet / 18” x 24” sheet
Shopping List
Amount / Part Type / Properties5 / 10 kΩ Resistor / package 0805 [SMD]; resistance 330; tolerance ±5%; pin spacing 400 mil; variant variant 1
1 / 1kΩ Resistor / resistance 1000Ω; package 1206 [SMD]; tolerance ±5%
7 / 330Ω Resistor / resistance 330Ω; package 1206 [SMD]; tolerance ±5%
1 / 3 kΩ Resistor / resistance 3000Ω; package 1206 [SMD]; tolerance ±5%
4 / Momentary Switch / package ksa_sealed_tac_switch; variant ksa_sealed
1 / Piezo Speaker
4 / Diode / package diode-1n4001; variant pth
1 / SWITCH-DPDT / package eg2211; variant eg2211
3 / LEDs / package led10mm; variant 10mm