Adding Vehicle speed sensor to MS1?

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

Post Reply
Quagmire
Helpful MS/Extra'er
Posts: 53
Joined: Tue Mar 29, 2011 10:01 am

Adding Vehicle speed sensor to MS1?

Post by Quagmire »

Hi,

Have been running around with my MS1(v3.0) using the hires 11_d code for some time now and I am very happy.

I am running the latest (registered) beta of Tunerstudio and would like to try out some of the economy gauges - particularly the average mpg gauge. I currently have a fudged MPG gauge to show my economy when I am in 5th gear only.

So, I need to connect a speed sensor up.

The car is a Landrover Defender, and I am using the later digital "TD5" era speedo and associated transducer. This transducer produces a square wave signal with four pulses per revolution- LR documentation states:

The speed transducer (C0195) provides a square wave, pulsed speed signal to the instrument pack (C1060) on a BR wire. The instrument pack uses this signal to drive the
speedometer. The speedometer also doubles the frequency of pulses (from 4100 per mile to 8200 per mile) and provides an output to the ECM (C0658 – Td5 vehicles only) and the overspeed ECU (C1311 – Gulf specification vehicles only) on YK wires.

So I would assume that it would be safer/better to take the signal from the speedo head rather that the transducer itself.

My question is therefore, how do I take a pulsed signal like this and convert it to a 0-5V signal that the MS can use on a spare ADC?

Many thanks!

Jamie
SymTech Laboratories
Super MS/Extra'er
Posts: 2188
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA
Contact:

Re: Adding Vehicle speed sensor to MS1?

Post by SymTech Laboratories »

You can use a chip designed for this purpose, like the LM2917, or roll your own from a monostable multivibrator made from a standard timer chip, like the 555.
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
Quagmire
Helpful MS/Extra'er
Posts: 53
Joined: Tue Mar 29, 2011 10:01 am

Re: Adding Vehicle speed sensor to MS1?

Post by Quagmire »

Many thanks for that - I have an old 555 lying around from a school project I did when I was sixteen! It may get re-purposed. :yeah!:

So would something like this be what you were referring to?:

http://homemadecircuitsandschematics.bl ... uency.html

Thanks again
SymTech Laboratories
Super MS/Extra'er
Posts: 2188
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA
Contact:

Re: Adding Vehicle speed sensor to MS1?

Post by SymTech Laboratories »

Something like this should work:

Image

This circuit generates an analog voltage proportional to frequency. You won't need U2, RV1, R5, or D1, and you should power the circuit with 5V instead of 12V. You might have to adjust the values of R3 and C3 depending on the maximum frequency of the signal. You can replace R3 with a resistor and a potentiometer to make finding the right value easier.
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
Quagmire
Helpful MS/Extra'er
Posts: 53
Joined: Tue Mar 29, 2011 10:01 am

Re: Adding Vehicle speed sensor to MS1?

Post by Quagmire »

Brilliant, thank you!
Post Reply