Car Gear Indicator Abstract

  • Uploaded by: api-3818780
  • 0
  • 0
  • February 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Car Gear Indicator Abstract as PDF for free.

More details

  • Words: 455
  • Pages: 5
Loading documents preview...
Circuit Cellar AVR 2004 Contest

Entry # A3784

Abstract

CAR GEAR INDICATOR

This project is an indicator for the selected gear of 5-speed manual gearboxes. It can be used in cars, with the classical x-y movement of the gearstick. It can also be installed in bikes, where the gearbox lever has a linear movement. In this case only one potentiometer is required. The circuit is based on a ATtiny26 microcontroller. The ATtiny26 is without doubt very well suited to this application. It has everything on chip that we need to detect the current gear selection. And also it is very cheap. The software (written in assembler language) continuously sample the potentiometers position and consequently drives the seven leds. There is one led indicating Null selection (yellow), five leds, one for every speed (red) and one for Reverse speed (green). In addition, there is a microcontroller pin outputs a software serial transmission indicating the current speed selection. This make possible interfacing our indicator with a PC-based telemetry system. The circuit can be adapted to various models of cars and bikes: you should only mount the two potentiometers in orthogonal position and only proceed to the software calibration. The power supply can be derived from the 12 V car (or bike) electric system. Since one led is lit at a time the current draft is only 30 mA.

Figure 1: the block diagram

Figure 2: the Car Gear Indicator Schematic

Figure 3: an example of installation on 5-speed + reverse gearstick Selected speed Null 1 2 3 4 5 Reverse

Transmitted char N 1 2 3 4 5 R

LED Yellow Red Red Red Red Red Green

Listing 1: some assembler source code ;************************************************************ ; RS 232 TX routine ; ; Settings: 19200,n,8,1 ; ; Baud rate = 19200 >> 52uSec ; ; r18= data to send ;************************************************************ TX19200: ;send start bit cbi PORTB,TX232 rcall DEL52US ;send 8 data bits ldi R19, 8 ;this is a counter TX232_L: sbrc R18,0 ;skip if r18,0 = 0 rjmp SETBIT CLEARBIT: cbi PORTB,TX232 rjmp XMIT ;goto transmission SETBIT: sbi PORTB,TX232 XMIT: rcall DEL52US ror R18 dec R19 brne TX232_L ;if not 0 branch ;send stop bit sbi PORTB,TX232 rcall DEL52US ret ;************************************************************ ; Calibration Routine ; ;************************************************************ CALIB: rcall delay CAL_N_l: ;wait for S2 pressed rcall LEDNon sbic PINB,PUSHBUTTON2 rjmp CAL_N_l ;read and store POT1 and POT2 rcall ADCPOT1 ldi EEaddress, EEadrN_P1 mov EEdata, POT1value rcall EEWRITE rcall ADCPOT2 ldi EEaddress, EEadrN_P2 mov EEdata, POT2value rcall EEWRITE rcall delay CAL_1_l: ;wait for S2 pressed rcall LED1on sbic PINB,PUSHBUTTON2

;loop

rjmp CAL_1_l ;read and store POT1 and POT2 rcall ADCPOT1 ldi EEaddress, EEadr1_P1 mov EEdata, POT1value rcall EEWRITE rcall ADCPOT2 ldi EEaddress, EEadr1_P2 mov EEdata, POT2value rcall EEWRITE rcall delay

;loop

Related Documents

Car Gear Indicator Abstract
February 2021 3
Abstract
January 2021 1
Abstract
February 2021 1
Abstract
February 2021 1
Adx Indicator
January 2021 0
Gear
March 2021 0