Wireless Car Breathalyzer Ignition Lock System Matt Lorch & Joshua Fajardo-Frink
At A Glance Breathalyzer Unit Instructs User to Blow Breathalyzer Unit Takes Reading Sends Data to Dash Unit Dash Unit Displays BAC If Sober, Dash Unit Allows Ignition to Start for 5 Seconds Two Device System
Breathalyzer Transmitter
Receiver & LCD Interface
Major Components
Alcohol Gas Sensor MQ-3 Analog Biometric Sensor * Fast response and High sensitivity * Stable and long life * Simple drive circuit From HANWEI ELETRONICS CO.,LTD
ADC Initialization void initADC(void) { ADCSRA |= (1 << ADPS2) | (1 << ADPS1) |(1 << ADPS0); // Set ADC prescalar to KHz // Set ADMUX Register // Makes AVCC the ADC reference val. ADMUX = 0b ; //Use ADC0 (No MUX adjustment required) ADCSRA |= (1 << ADATE); // Set ADC to Free-Running mode ADCSRA |= (1 << ADEN); // Enable ADC ADCSRA |= (1 << ADSC); // Begin A2D conversions } void initADC(void) { ADCSRA |= (1 << ADPS2) | (1 << ADPS1) |(1 << ADPS0); // Set ADC prescalar to KHz // Set ADMUX Register // Makes AVCC the ADC reference val. ADMUX = 0b ; //Use ADC0 (No MUX adjustment required) ADCSRA |= (1 << ADATE); // Set ADC to Free-Running mode ADCSRA |= (1 << ADEN); // Enable ADC ADCSRA |= (1 << ADSC); // Begin A2D conversions } For grabbing all 10 bits: Long bob = (ADCH << 8) | (ADCL); / / store all 10 bits from ADC For grabbing all 10 bits: Long bob = (ADCH << 8) | (ADCL); / / store all 10 bits from ADC Code Snippets
Data Graphing 0.00 BAC Impaired BAC ADC Value Sample Sample
XBee® Radio An Elegant and Effective Wireless Solution * UART for Easy Data Transfer (256kps Transfer Rate) * Uses 2.4Ghz Frequency Band *Range of 100 ft. in doors. * Low Power Consumption * Runs on V From HANWEI ELETRONICS CO.,LTD
Receiving Data Code Snippets Dash Unit Continuously Listens for Characters in RX Dash Unit Continuously Listens for Characters in RX Standard UART with 8 Bit Data, No Parity, & 1 Stop bit Standard UART with 8 Bit Data, No Parity, & 1 Stop bit Baud Rate Set to 9600 Baud Rate Set to 9600 Characters Used as Commands: Characters Used as Commands: ; – Clear LCD & Allows Characters to Write to LCD ; – Clear LCD & Allows Characters to Write to LCD * – Runs Ignition Unlocking for Short Time * – Runs Ignition Unlocking for Short Time / – Stops Displaying Characters on LCD / – Stops Displaying Characters on LCD
Time for a Demonstration! Its just mouthwash.
Marketability Rental Cars Rental Cars Truck Drivers Truck Drivers Court Orders Court Orders