Hall effect to dc motor speedometer adapter

2orsome

New Member
Hi so my project is LS1 T56 6 speed manual into a old Holden. I would like to keep the original dash and gauges and program a mirco controller to receive the two pulse count per rotation Hall effect sensor to drive a small 5v dc 2000rpm max dc motor. My plan is to also have feed back from the dc motor via optocoupler. The mechanical speedometer works out that at 60mph 1000rpm is required. I also require some fine tuning. I can PWM from a frequency but I can't really figure out the complex maths required to convert the opto feed v Hall effect and convert to duty cycle.
Your help would be greatly appreciated
 

premelec

Senior Member
Welcome to this forum... I am not quite understanding what you are trying to do - perhaps substituting and electronic speedometer drive instead of a mechanical cable? Perhaps give more detail on what your project is - Does "LS1 T56 6 speed manual into a old Holden" mean you are trying to install something different into the Holden?
 

2orsome

New Member
Sorry (in my head I wrote an explanation but not on this page) the ls1 is a efi v8 and the t56 is a gearbox this gearbox gives a 2 pulse count per revolution the Holden is a recipient vehicle for these from 1978 in order to keep the interior looking original I want to keep the gauges in tacked and in the car so I thought if I could count the pulses from the gearbox and then pwm that to a 5v dc motor issue solved after doing research a device does exists but it is far to costly for me and seeing as I'm pretty good with electronics and a bit average with programming I have attempted to make it but I'm stuck now with the feedback pulses well pretty much all of it
 

hippy

Technical Support
Staff member
program a mirco controller to receive the two pulse count per rotation Hall effect sensor to drive a small 5v dc 2000rpm max dc motor. My plan is to also have feed back from the dc motor via optocoupler.
Reading input pulses and driving a motor at a speed proportional to the input rate seems like something which may be possible, but it is not clear why you would need any feedback from the motor being driven.
 

2orsome

New Member
IMG_1036.JPG
This is a cable-x unit it is the unit I am trying to build but on a budget the feedback i think is to make sure the out put rpm is precise I wouldn't like a speeding ticket because it was out by 10km/h that and as I don't know the tyre size yet and the axel ratio I don't know if I will get 1000 pulses at 60m/h or 100000 pulses but I do know the input speed for mechanical speedometer is 1000rpm @60m/h
 

premelec

Senior Member
That looks like a pretty hefty motor to drive a speedo head... probably start your design 100 RPM 6 mph... do you have a suitable motor? i think making the thing widely adjustable will be key to your success... best to find out some range for the pulse input as it's hard to know where to start without that... I suppose the speedo indication is pretty linear with motor rpm [magnet & eddy current + spring?].
 

AllyCat

Senior Member
Hi,

Alternatively you could drive the speedo head by a stepper or synchronous motor. Maybe a little harder to drive (several coils, etc.) than a simple dc motor, but the output speed should be completely predictable and stable. A dc motor really needs to be operated "closed loop" (via the PICaxe) with a rotation sensor on its output shaft, maybe magnetic (Hall or Reed), optical, or possibly directly from the commutator (brushes or brushless).

Of course the highest accuracy could be obtained by connecting a bidirectional stepper via a gear train (or band/belt) directly to the display needle (as most modern instruments use). That could remove all "analogue" variables such as spring-rate, magnet strength and friction, etc..

Whatever method you use will ultimately need some calibration (dependent on your available data and test equipment), but only "single point" calibration (plus zero of course) could be sufficeint if you can keep the basic operation "linear" (i.e. proportional) or fully digital.

Cheers, Alan.
 

bluejets

Senior Member
Perhaps a different approach to consider..?
I built a tacho into a scale model boat.
The original was a series of leds around a semi-circular face. Hall effect on the crank, fed to an LM2917 frequency to voltage converter.
As it was not scale I decided to change using a picaxe, small servo with additional external gearing to give 270 degree movement for full servo travel.
Took the original voltage and mapped in the picaxe to give the servo drive to the readout needle.
Short simple program, works well.
Have a couple of pics somewhere if you are interested.
 

2orsome

New Member
Hi allycat thank you I have considered stepper motor but to pass over the pits (vehicle inspection in oz) I can not disassemble the speedometer legally the speedometer and odometer must work and be within the year of manufacturings accuracy +-10% the resolution on the gauge is 180km/h which is appropriately 2000rpm on the input of the speedometer and I looked around to find a fast enough stepper motor but they were very expensive and few and far between I do appreciate the idea
 

2orsome

New Member
Hi bluejets I am interested in your idea if you would share your images that would be great. I like to think outside of the box
 

2orsome

New Member
I was incorrect in saying 2 pulse per revolution it is 17 pulses per revolution at the gearbox output shaft and doing the maths for tyre size and axel ratio there will be 41695.3152 pulses per mile or 695(694.92192) pulses per second at 60 miles per hour. So a frequency of 695hz to pwm a dc motor to 1000rpm and now I can see why I need the opto coupler on the output now to figure out the resolution of my opto I'm going to say perhaps 10 holes for ten pulses for simpler maths
 

2orsome

New Member
11.582032hz @1m/h pulses. 16.6666666rpm @1m/h = 0.276666666666667Hz motor speed x 41 feedback pulses from opto = 11.34333333333333hz feedback from motor to mechanical speedometer so now to be able to adjust the small amount of error between the two and I'm good to go I will post some code I was going to use shortly and see if the people of this great forum can help me
 
Last edited:

tmfkam

Senior Member
Didn't Silicon Chip (Jaycar) do a couple of designs for something similar? I thought I'd seen one or two articles for this type of circuit over the years. {Edit: It turns out that these projects I've seen are for 'Speedo Correctors' and they allow for calibration of existing (electronic) speedometers to make them more accurate, they aren't for mechanical speedometers and so of little use for 2orsome.}

I also thought that another member had made a similar device for a motorbike.

If I was starting this design I might be tempted to start with the bare minimum:

Do
If axlepulse=high then
Let motorpulse=high
Else
Let motorpulse=low
Endif
Loop

I'd see where that took me and either look for more axle pulses before pulsing the motor, or pulse the motor more for individual axle pulses. Assuming this gave some sort of useable results I'd put my thinking head on and start to complicate things by attempting to add in the feedback from the motor shaft in order to provide some calibration.
 
Last edited:

2orsome

New Member
bluejets that is some nice work there neat clean simple and functional thank you so very much

below is my code so far
Code:
;                                    08M2
;                                    --u--
;                             +V -|     |- V0
;           (in)serial in/C.5 -|     |- C.0/serial out(out/hserout/DAC)
; (touch/ADC/out/in)C.4 -|     |- C.1 (in/out/touch/hserin/SRI/hi2c scl)
;                        (in)C.3 -|     |- C.2 (in/out/touch/pwm/tune/SRQ/hi2c sda)
;                                     -----

'(***********************************************************************************************)
'(*					Start Up Code									*)
'(***********************************************************************************************)	
	disconnect										'turn off look for program
 	#picaxe 08m2									'sets pic type to program
	 	
'(***********************************************************************************************)
'(*					Constant Definitions Below							*)
'(***********************************************************************************************)
	
	'symbol coms_in		= c.5
	 symbol pulse_count	= c.4
	 symbol feed_back		= c.3
	 symbol motor		= c.2
	'symbol coms_out		= c.1
	
'(***********************************************************************************************)
'(*					variable Definitions Below							*)
'(***********************************************************************************************)

	Symbol gearbox 	= w0
	Symbol speedo 	= w1
	symbol error 	= w2
	
'(***********************************************************************************************)
'(*					StartUp Code Below								*)
'(***********************************************************************************************)

	PWMout motor,199,1 								'start pwm pulses
'(***********************************************************************************************)
'(*					Subroutines Below									*)
'(***********************************************************************************************)
'16.6 revolutions per second (hertz) @ 1000rpm = 60MPH or 96.5606KPH
'(***********************************************************************************************)
'(*					Actual Program Below								*)
'(***********************************************************************************************)

	 
 Main:
 count pulse_count,100,gearbox 							'measure the pulse count at gearbox
 count feed_back,100,speedo 								'measure the demand

 If speedo > gearbox then
 error = error + 1 MAX 800 								'increase up to maximum value 
 else
 error = error MIN 1 -1 								'decrease down to minimum
 endif

 pwmduty motor,error
 Pause 250 											'experiment with this value
 Goto main

'(***********************************************************************************************)
'(*					End Of Program Nothing Below							*)
'(***********************************************************************************************)
 
Last edited:

hippy

Technical Support
Staff member
If you put your code in [code]...[/code] tags that will retain the original formatting and spacing. I would have added them for you but it seems the original spacing may have already been lost.
 

2orsome

New Member
So I've stumbled across another problem I worked on 17" wheels with a side wall of 1 3/4 (45mm) but my mate tells me he is getting new wheels and tyres 22" rims and 1" (25.4mm) side wall which means I have to recalculate my maths (rolling diameter x axle ratio x 17)
 
Last edited:
Top