Tacho options for a petrol dash?

An alchemy of sparks, copper wire and earth

Moderators: User administrators, Moderators

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

That should fit easily - there's about 4-4.5cm between the back of the PCB and the rear of that unused part of the dash.
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
bigbadbob76
Posts: 1727
Joined: 07 Nov 2016, 14:41
80-90 Mem No: 15707
Location: Isle of Skye

Re: Tacho options for a petrol dash?

Post by bigbadbob76 »

Cheers Chris :ok
I've ordered one from China so don't hold your breath. :lol:
'86 1.9 DG, 4 spd, tintop, camper conversion.
Split case club member.

User avatar
bigbadbob76
Posts: 1727
Joined: 07 Nov 2016, 14:41
80-90 Mem No: 15707
Location: Isle of Skye

Re: Tacho options for a petrol dash?

Post by bigbadbob76 »

cjh wrote:I think we'd be looking for speed, rpm, oil pressure, oil temperature, water temperature, fuel level, maybe outside temperature, so we're already up to 7 inputs.

I was thinking we'd want time/date, trip distance, trip time, average trip fuel consumption, maybe average trip speed.
we already have a speedo, a rev counter, a water temp gauge and a fuel level gauge on the dash.
Or do you want to log the data to a memory card.

Hall sensor in the speedo would give you distance.
an RTC module would give you time/date.
Fuel usage could be tricky, maybe need two flow rate sensors, one in feed and one in return.
Using the fuel sender wouldn't give accurate readings due to hills etc.
'86 1.9 DG, 4 spd, tintop, camper conversion.
Split case club member.

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

bigbadbob76 wrote:erage trip fuel consumption, maybe average trip speed.
we already have a speedo, a rev counter, a water temp gauge and a fuel level gauge on the dash.
Or do you want to log the data to a memory card.

Not everybody has a rev counter :wink:

Actually you're right, I was being swayed by what I found in that earlier project. A trip computer just needs distance and time, and some buttons for starting/stopping etc. But whatever code is developed to count Hall sensor pulses could also be used as a digital rev counter, for those poor souls without.

Are there fuel-resistant, Arduino-compatible flow rate sensors out there? One connected to each fuel tank spigot would be enough to monitor fuel consumption, for the 'Deluxe' version.

I found several Arduino Nanos in my Arduino box. And I realised that one end of my unused 'R8' (which should actually be a capacitor) on my tacho board connects to pin2, so should be a good place to tap off an Arduino-compatible coil pulse. Once I get one of these Nanos working with my laptop I may risk one and have a go at capturing a stream of coil pulses to get an idea of how well a pulse counting digital tacho would work.
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

CJH wrote: Are there fuel-resistant, Arduino-compatible flow rate sensors out there?

I don't think there are - not with the required accuracy at the low flow rates we're talking of.

Rough estimate:
30mpg (yeah, I know) at 30mph = 1gallon/hr = ~75ml/min. Actual flow rate could be higher, because a certain amount is returned to the tank, but the net consumption will be around that order of magnitude, and will be subject to two measuring errors (two flow rate sensors). I don't think it's going to be feasible.
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

I got my Arduino Nano working - it's a clone, not a genuine one, so took a bit more effort - and it seems to cope just as well with a 100Hz signal as the Mega board did. The photo shows the Nano clone (the tiny little board bottom left of the photo - mounted on the white breadboard just to make it easy to connect up to the input pins), the £20 signal generator set to generate a 100Hz sine wave, and the laptop display of the real-time input.

Next test will be to feed it with the coil signal after conditioning for input to pin2 on my tacho board - it will be interesting to see how much detail in each coil pulse it can record.

Image
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
bigbadbob76
Posts: 1727
Joined: 07 Nov 2016, 14:41
80-90 Mem No: 15707
Location: Isle of Skye

Re: Tacho options for a petrol dash?

Post by bigbadbob76 »

All fair enough Chris. :ok
I agree about the fuel consumption sensors, probably not worth the hassle and expense.
VW AFA gave a rough estimation based on vacuum and RMP I think, but we allready know a rough estimation. :lol:

I have done some previous projects developed using Arduino nano clone and then transferred to a dedicated chip rather than tie up the nano.
One such was an on-screen display of sensor data for my mini ROV. it used a MINIMOSD board which is basically an arduino chip and a video overlay chip on one tiny board.
If you're feeling adventurous you could have something similar to a reversing camera screen that displayed vehicle data on a dark screen which then showed the reversing camera picture when required.

I'm not going to implement a trip computer myself but will help out where I can. :ok
'86 1.9 DG, 4 spd, tintop, camper conversion.
Split case club member.

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

bigbadbob76 wrote: VW AFA gave a rough estimation based on vacuum and RMP I think, but we allready know a rough estimation.

...display of sensor data for my mini ROV. it used a MINIMOSD board which is basically an arduino chip and a video overlay chip on one tiny board.
If you're feeling adventurous you could have something similar to a reversing camera screen that displayed vehicle data on a dark screen which then showed the reversing camera picture when required.

I'm not going to implement a trip computer myself but will help out where I can. :ok

Thank you - sounds like you'll be a good source of advice. Currently wrestling with getting an SD card reader to work with the nano, so that I can log some data from the vehicle and then play with the digital tachometer algorithm offline.

Carb vacuum could be an interesting thing to explore later. Even if it won't give an accurate fuel consumption rate it could give a kind of 'economy' scale, like a traditional vacuum gauge.
The Minim OSD board looks interesting. I'll keep learning to walk first and if I master that I may attempt to run.

Do you have any experience of Hall sensors?
CJH wrote:Looking for advice on Hall effect sensors.

Would something like this be suitable? The supply voltage can be between 3 and 24VDC, so would suit a 12V or 10V feed from the dash. It has a 20mA switching current - is the speedo likely to generate that? Would the output be suitable for direct connection to pin2 of a SAK215?

Image
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

SD card up and running - I soldered a 2x3 pin header to the ICSP connections. So now I just need to try and tweak the code from the 'SD Datalogger' example, so as to read from the tacho board Pin2 signal (green wire to pin A0 in the photo) and add a timetag to the output. Should be a good little exercise for a novice Arduino coder.

Image
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
bigbadbob76
Posts: 1727
Joined: 07 Nov 2016, 14:41
80-90 Mem No: 15707
Location: Isle of Skye

Re: Tacho options for a petrol dash?

Post by bigbadbob76 »

I like the datalogger idea, would be handy to know what was happening before the van ground to a halt. :lol: seriously though, it would. :)
Sorry, no experiances of hall sensors but looks like it just puts out a digital pulse stream that the Arduino would cope with. :ok
I'm tempted to add a vacuum gauge to my dash, just cos I like gauges. :lol:
Teeing into the brake servo vacuum pipe might be fun though.
Anyone know the inside diameter of it?
'86 1.9 DG, 4 spd, tintop, camper conversion.
Split case club member.

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

I think I'd prefer to put a sensor on one of the carburettor vacuum spigots, and then run a wire.
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
bigbadbob76
Posts: 1727
Joined: 07 Nov 2016, 14:41
80-90 Mem No: 15707
Location: Isle of Skye

Re: Tacho options for a petrol dash?

Post by bigbadbob76 »

Yeah, probably safer that way. :ok
and I have an unused carb vacuum spigot.
The gauges are usually mechanical though so it would need to be a homebrew gauge/sensor arrangement.
Running a multicore cable from engine bay to dash is no bad thing anyway.
'86 1.9 DG, 4 spd, tintop, camper conversion.
Split case club member.

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

I attached a couple of wires to my tacho circuit board so that I can monitor the input to pin 2 directly (the yellow and black wires in the photo):

Image

Then I hooked up the Arduino to see what the coil pulses look like by the time they've been through the tacho PCB resistor and Zener diode. It turns out there's not much left of them! The number on the y-axis is proportional to voltage, where a value of 1023 would represent 5V. So a value of 50 on that graph represents about 0.25 volts. In fact, the signal is perhaps too small, as a few coil pulses have obviously been missed.

Image

Apparently there's a trick for monitoring lower voltages, by specifying a different 'reference voltage'. In fact, in my first attempt, before I realised how low the signals would be, I tried to apply an external 12V reference voltage, but ended up killing an Arduino Nano because I missed out a crucial line of code to disconnect the internal 5V reference.

So I might have another go with a 1V internal reference, to see if the coil pulses register more reliably.

I also didn't get very far with a data logger - it seems that writing to an SD card is a (relatively) slow process, so while it's doing that it's missing coil pulses. I will have to investigate more creative ways to log the data. In a working digital tacho it wouldn't be necessary to record all the pulses, but I need to do that to develop the algorithm offline.
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
CJH
Posts: 3018
Joined: 15 Jul 2013, 06:51
80-90 Mem No: 12576
Location: Nottingham

Re: Tacho options for a petrol dash?

Post by CJH »

Ask me how I know that you lot aren't paying attention. I'll tell you. If you were, you'd have told me to stop faffing about trying to log high rate coil pulse samples to a slow old SD card and to just capture the serial data stream on my laptop. But it's ok, I figured it out myself. :roll:

So now I have a reliable way to capture test data for use in developing the digital tachometer algorithm. I've also managed to adjust the voltage reference to 1.1V, so hopefully there'll be more to see with the real coil pulses.

In the meantime, I went back to the voltage output of the SAK215 chip, thinking it might be easier to just measure that voltage and convert it to a calibrated RPM. But the problem is that the chip doesn't output a steady voltage that varies with RPM, it seems to use some sort of pulse width modulation - basically a series of ones and zeros, the average of them making a voltage. The ones and zeros are very high rate, so a multimeter or a tachometer needle simply sees the average voltage.

Here's an example. This is the output when the input pulse rate is 33Hz. The length of the sample is 200ms, and you can see that each pulse is about 3ms long, and the pulses are spaced at 30ms intervals. The voltage of each pulse is 2.4V. So the proportion of time that the output is at 2.4V is ~3/30. So the average voltage is approx. 2.4*3/30 = 0.24V. My multimeter measured .28V
Image

When the input was at 100Hz, the output looked like this. The peak voltage is still 2.4V, the pulses are still 3ms wide, but the interval between them is now ~10ms. So the average voltage is 2.4 * 3/10 = 0.72V. My multimeter measured 0.90V
Image

Finally, when the input was at 200Hz, the output looked like this. The interval between the pulses is now ~5ms. So the average voltage is 2.4 * 3/5 = 1.44V. My multimeter measured 1.79V
Image

So if I'm going to use these 'voltage' measurements to calculate RPM, I'm going to have to average the output over an integer number of cycles. I still prefer the approach of counting and timing the actual tacho (or speedo Hall sensor) pulses - less hardware, direct measurement so nothing to calibrate - but this is a fallback option.
"I'm a man of means, by no means....King of the Road!"

1983 Viking Xplorer, 2.1DJ

User avatar
bigbadbob76
Posts: 1727
Joined: 07 Nov 2016, 14:41
80-90 Mem No: 15707
Location: Isle of Skye

Re: Tacho options for a petrol dash?

Post by bigbadbob76 »

It's not something I've ever done TBH.
I still don't see how to avarge out the duty cycle to produce a voltage, that's calculus teritory. :shock:
Area under the graph and all that.
If the peak voltage is constant then the avarage current must change, possibly using an inductor to smooth it would work but I'm in the dark I'm afraid.
E D I T- you could try looking at frequency to voltage converter chips, I did use one years ago in a 400Hz servo system but that's probably obsolete now.
'86 1.9 DG, 4 spd, tintop, camper conversion.
Split case club member.

Post Reply