Gear indicator for motorcycle

Well i know this is a little different. But i just got a boke and am looking to make a gear indicator, It seems very easy im just not the best when it comes to designing circuits.

I found one that lights up LED’s but i would like it to operate a character led display from 1-6 and an N for neutral.

Basically there is one wire comming from the tranny that indicates what gear im in.

1st gear = 1.782v

2nd gear = 2.242v

3rd gear = 2.960v

4th gear = 3.630v

5th gear = 4.310v

6th gear = 4.660v

Neutral = 5.000v

If it would be possible to wire up a circuit that can switch from 1 to 2 when lets say the voltage goes above 2v. Just because im sure after time the voltages will float around a little.

I would really appriciate any help with this and am willing to pay anyone if they would be able to come up with a working circuit. Please let me know if you can help me out or have any other questions.

Here is one that a guy came upi with that lights up LED’. I would just like numbers instead of counting lights.

~~Thanks!

You will need a ADC to convert the voltage in numbers.

Most micro controllers have ADCs built in.

You should look here to see how to start working with a micro:

http://www.sparkfun.com/commerce/hdr.php?p=tutorials

at the “PIC Tutorials”

I’d use a pic from here:

http://www.sparkfun.com/commerce/catego … Path=51_22

With a programmer like:

http://www.sparkfun.com/commerce/produc … ducts_id=8

and a serial enabled LCD:

http://www.sparkfun.com/commerce/produc … cts_id=814

I’ve designed one for my SV1000S, using a small 8 pin PIC, which just indicates top gear. It works on the bench. It uses the PIC ADC and could easily be adapted to give each gear position. I’m working in France for a few days and don’t have the code with me, you are welcome to it when I get back.

Leon

leon_heller:
I’ve designed one for my SV1000S, using a small 8 pin PIC, which just indicates top gear.

Doesn’t it drive you nuts when you can’t shift into 7th gear?

-Bill

circuits and code for a seven segment LED for your motorcycle:

http://www.avrfreaks.net/index.php?name … motorcycle

thank you guys soo much. This helps alot!! I have no programming knowlege, but if i were looking into learning to program stuff like this what would you guys recommend?

I actually have the PIC code for the GPI I mentioned with me on my laptop:

;gpi.asm
;Gear position indicator program for PIC12F675
;measures voltage on AN0 (pin 7) with ADC
;if voltage is between 2.93 V and 3.42 V, LED (pin 2) is on
;otherwise it is off
;ADC is 10 bits, and has a max. value of 0x3FF or 1023.
;With a 5 V reference, this gives a resolution of 5/1024
;or 4.88 mV.

	list      p=12f675	;list directive to define processor
	#include "p12f675.inc"	;processor specific variable definitions

;-----------------------------------------------------------------
;defines
;-----------------------------------------------------------------

	#define LED 5
	#define	ADC 0
	#define UPPER_LIMIT .700	;3.42 V
	#define LOWER_LIMIT .600	;2.93 V

;------------------------------------------------------------------
;macro definitions
;------------------------------------------------------------------

;macro compares the 16 bit value stored in fr,
;fr-1 to a 16 bit literal number. It jumps to
;an address if the value in the registers is higher
;than the literal.

cjalwd	macro fr1,L1,L2,addr
	movf	fr1,W
	sublw 	L1
	btfss 	STATUS,C
	goto 	addr
	movlw 	L1
	subwf 	fr1,W
	btfss 	STATUS,C
	goto 	$+5
	movf 	fr1-1,W
	sublw 	L2
	btfss 	STATUS,C
	goto 	addr 
	endm

;-----------------------------------------------------------------
;variables
;-----------------------------------------------------------------
	cblock	0x20
	ADC_value_lo
	ADC_value_hi
	endc

;------------------------------------------------------------------
;initialisation
;------------------------------------------------------------------

	org	0
	banksel ANSEL
	movlw 	11h       	;AN0 as analog input,conversion clock Fosc/8
	movwf 	ANSEL
	bankseL	CMCON
	movlw 	07h			;comparators off
	movwf 	CMCON 
	movlw	0x81		;ADC on, right justified
	movwf 	ADCON0
	banksel	TRISIO
	movlw	0x0F		;LED output GPIO5 (pin 2), AN0 input GPIO0 (pin 7) 00001111
	movwf	TRISIO

;-----------------------------------------------------------------------
;main program loop
;-----------------------------------------------------------------------
loop:
	call	read_ADC	;read ADC
	banksel	GPIO
	cjalwd	ADC_value_hi,HIGH UPPER_LIMIT,LOW UPPER_LIMIT,LED_off	;compare ADC value with upper limit
	cjalwd	ADC_value_hi,HIGH LOWER_LIMIT,LOW LOWER_LIMIT,LED_on	;compare ADC value with lower limit
LED_off:
	bsf		GPIO,LED		;LED off
	goto	loop
LED_on:
	bcf		GPIO,LED	;LED on
	goto	loop


;---------------------------------------------------------------------
;read_ADC
;function to read ADC
;returns high and low bytes (10 bits) in ADC_value_hi
;and ADC_value_lo variables. Value is right-justified.
;---------------------------------------------------------------------

read_ADC:
	banksel ADCON0
	bsf 	ADCON0,1	;start conversion
WaitADC:
	btfss 	PIR1,ADIF
	goto 	WaitADC		;wait for ADC to finish
GetADC1:
	movf 	ADRESH, W	;get high byte
	movwf 	ADC_value_hi
	banksel	ADRESL
	movf 	ADRESL, W	;get low byte
	movwf 	ADC_value_lo
	banksel	PIR1
	bcf  	PIR1,ADIF	;clear conversion flag
	return

;----------------------------------------------------------------------

	end

I didn’t write the macro, I filched it from somewhere.

Leon

Well i tried to figure this out, but i have no programming knowlege at all…

If anyone want to throw together a schematic and a PIC code i will gladly pay for it.

All i want is it to read the voltage off one wire and have a +12v voltage source for power. All it needs to do is be hooked up to a numerical LED display and be able to display 1-6 and N.

Please email me at xboxonly@comcast.net if you can do this.

~~Thanks!!

Buying one will cost you less than paying someone to design it for you.

Leon