Digital Speedo Project

Loom, lights, gauges, indicators & wiring

Digital Speedo Project

Postby Bidz » Sat Dec 10, 2016 12:10 pm

So here's something a little different I've been working on - but first, some background.... When I first bought Charlie, the speedometer kind of nearly worked - it read wrong and wavered a little, but at least it was consistently out by percentage. I put this down to the fact I had a Sierra 5 speed installed! I tried switching to a 1000tpm speedo, but this didnt really help - I couldn't buy a good second hand one. Eventually the cable snapped.

So I've been driving around for a long time using SatNav speed and whilst it's very good, it's faffy getting it out and putting it away, and oh-so-steal-able unless I take it with me. So I started gathering bits to build a digital speedo based around an Arduino - that's a little microcontroller aimed at teaching hobbyists to learn code for their own projects - not dissimilar to the slightly more well known Raspberry Pi.

The idea is simple - have a way of counting the mechanical input from the gearbox, convert that to MPH, and display it on the speedometer. And here's the clever bit - at the push of a button, I can have the speedometer scale display other information gathered from analogue sensors, like temperatures and pressures of the engine. The Arduino would also be capable of monitoring these values, and providing a warning if they strayed from an acceptable range.

I could of course have used a GPS sensor to calculate the speed - but I figure counting pulses of rotation is a 100% reliable way of measuring the speedo that will work even when it is cloudy! So the first thing to do was work out how to do this, and I opted to use a rally 'universal' speed sensor spliced on to an existing sierra-minor cable that Andy Wilson kindly gave to me. I bought a Terratrip T006 sensor.
Photo 09-12-2016, 16 29 26.jpg


This type of sensor is designed to sit in line, but I only needed it to work one end. It basically works using a Hall effect sensor, which uses magic to count pulses of rotation - two pulses for every single rotation of the speedometer drive from the Gearbox. So all I need to do is measure how many pulses I get for a known distance, do the maths and work that out per mile and input that data into the speedometer programme - but more on that later...

Photo 07-12-2016, 14 15 30.jpg

I disassembled the speedometer. I want the scale to read out of 100, so I can show percentage (perhaps of fuel level, at a later date...)

Photo 06-12-2016, 19 19 28.jpg

Using Adobe Illustrator, a newly purchased maths set (remember those? Compass, protractor.... and so on) and some measuring, I managed to draw an arc and populate it with MPH marks, which I printed out to test...
Photo 06-12-2016, 19 57 18.jpg

Looks about right!

Photo 07-12-2016, 14 21 25.jpg

Sanded all the numbers off. No going back now!

Photo 07-12-2016, 15 16 23.jpg

Using my vinyl plotter, I cut the design on some scrap red vinyl to test it. I plan to spray the metal face gold and put new black numbers on eventually - this is just for testing!
User avatar
Bidz
.
 
Posts: 102
Joined: Mon Jul 28, 2014 5:53 pm
Location: Coventry, for some reason.

Great Britain (GB)

Re: Digital Speedo Project

Postby Bidz » Sat Dec 10, 2016 12:13 pm

Photo 09-12-2016, 16 23 35.jpg

Photo 09-12-2016, 16 23 36.jpg


More testing. Here I've placed an OLED screen - that's organic light emitting diode - where the odometer would sit. This display has a resolution of 128 x 64 pixels, and with a serif font quite neatly replicated the Smiths logo.
User avatar
Bidz
.
 
Posts: 102
Joined: Mon Jul 28, 2014 5:53 pm
Location: Coventry, for some reason.

Great Britain (GB)

Re: Digital Speedo Project

Postby Panky » Sat Dec 10, 2016 1:45 pm

This looks brilliant, I want one :D
Image
User avatar
Panky
.
 
Posts: 882
Joined: Sun Mar 22, 2015 6:00 pm
Location: Cheshire

United Kingdom (uk) UK England (.g)

Re: Digital Speedo Project

Postby tickman » Sat Dec 10, 2016 6:04 pm

This is a great little project, well impressed so far!
User avatar
tickman
.
 
Posts: 1421
Joined: Fri Mar 14, 2008 10:15 am
Location: Deepest Darkest Dundee.
Awards: 2
Contributions 2012 (1) Contributions 2013 (1)

Scotland (sf)

Re: Digital Speedo Project

Postby woodywoodchipper » Sat Dec 10, 2016 7:11 pm

clever, wish i had smarts, but can lift heavy weights :lol: :lol:
Image

When its done its done (for now)
Derv Turbo Power (Joosed)
User avatar
woodywoodchipper
.
 
Posts: 3463
Joined: Sun Nov 07, 2010 5:11 pm
Location: up to my neck in dudu
Awards: 6
Contributions 2011 (1) Contributions 2012 (1) Contributions 2013 (1) Contributions 2015 (1) Contributions 2016 (1)
Contributions 2017 (1)

United Kingdom (uk) UK Lancashire (lk)

Re: Digital Speedo Project

Postby ruairidh » Sat Dec 10, 2016 8:54 pm

Very good like this. :D
Be all you can be
User avatar
ruairidh
.
 
Posts: 1908
Joined: Mon Jun 27, 2011 7:46 pm
Location: ochiltree, scotland
Awards: 2
Contributions 2012 (1) Contributions 2013 (1)

Scotland (sf) UK Northern Ireland (ek)

Re: Digital Speedo Project

Postby Gavin3659 » Sat Dec 10, 2016 10:43 pm

Fantastic. Old meets new!
Gavin3659
.
 
Posts: 35
Joined: Mon Jun 13, 2016 4:07 pm
Location: Dalry

Great Britain (GB) UK Scotland (.j)

Re: Digital Speedo Project

Postby Bidz » Sun Dec 11, 2016 12:15 pm

Part of the point of this project is calculating the actual TPM (turns per mile) of the gearbox. I could of course get a speedo calibrated, but if I changed wheel size or reverted back to the original Minor gearbox, I'd have to change speedo again. This of course is not ideal!

I created a basic Arduino sketch to count the pulses and display them on the OLED screen I mentioned earlier. The code looks a bit like this...
Screen Shot 2016-12-11 at 12.14.37.png


Photo 11-12-2016, 12 09 01.jpg

The Arduino communicates is only drawing power from the Macbook, all the programme data is stored on the board - which means with a 9V battery as a power supply I can use it anywhere!

So here we go. I've used the Terratrip counter connected up to the speedo cable, driven by a drill. I apologise for the dog toy squeaking in the background!
phpBB [video]


The TPM calculation is very simple, it just divides the number of pulses by the number of times the counter trips per 360degree turn of the speedo cable. In this case, the Terratrip counts at 2 pulses per rotation, so the TPM count is half whatever the counter counts.

The little drill I'm using here spins at 660rpm or so, which is 11 revs per second, or 22 pulses per second. The screen displays 220 after ten seconds turning - hurrah! Based on 1000TPM, I calculate this to be about 40MPH.
User avatar
Bidz
.
 
Posts: 102
Joined: Mon Jul 28, 2014 5:53 pm
Location: Coventry, for some reason.

Great Britain (GB)

Re: Digital Speedo Project

Postby BrianHawley » Sun Dec 11, 2016 12:45 pm

Wow, that's amazing.

I like a roughly original look inside and out, so I always had the dream of replacing the central speedo with a round display showing a purely digital rendering of the normal instrument, but able to switch over to a reversing camera image or a SatNav display when required. The main thing thwarting me is that larger round displays seem to be totally unavailable. Most of them seem to be for watches. TomTom do a round SatNav for scooters (https://www.tomtom.com/en_gb/sat-nav/scooter-sat-nav/) but it's not clear where they get the displays. Might even be a rectangular one and just masked off to appear round.

On the subject of GPS speedos, Dakota Instruments do a nice range. With an additional antenna they even recommend them for cruise control - so I guess they can be fairly accurate (other than in tunnels!)

What's your plan for the outer ring? A circle of LEDs?

Your design has inspired me. A ring of LEDs on the normal bezel and a rectangular display in the middle masked to look round might be the way to go. Although I'd probably go with the 'pi as I'm happier with Python than C.

(Sorry if this post looks like Chinese to any non-nerds!)
User avatar
BrianHawley
.
 
Posts: 105
Joined: Sat Nov 19, 2016 5:03 am
Location: Yanbu Al-Sinaiyah

Saudi Arabia (sa)

Re: Digital Speedo Project

Postby Bidz » Sun Dec 11, 2016 2:17 pm

BrianHawley wrote:Wow, that's amazing.

I like a roughly original look inside and out, so I always had the dream of replacing the central speedo with a round display showing a purely digital rendering of the normal instrument, but able to switch over to a reversing camera image or a SatNav display when required. The main thing thwarting me is that larger round displays seem to be totally unavailable. Most of them seem to be for watches. TomTom do a round SatNav for scooters (https://www.tomtom.com/en_gb/sat-nav/scooter-sat-nav/) but it's not clear where they get the displays. Might even be a rectangular one and just masked off to appear round.

On the subject of GPS speedos, Dakota Instruments do a nice range. With an additional antenna they even recommend them for cruise control - so I guess they can be fairly accurate (other than in tunnels!)

What's your plan for the outer ring? A circle of LEDs?

Your design has inspired me. A ring of LEDs on the normal bezel and a rectangular display in the middle masked to look round might be the way to go. Although I'd probably go with the 'pi as I'm happier with Python than C.

(Sorry if this post looks like Chinese to any non-nerds!)


No extra LEDs, but maybe some where the warning lights ordinarily go. I think extras look a bit tacky and the idea is to display any data using the 0-100 scale and the OLEDs.

That technology from Dakota isn't cheap. It could be implemented cheaply with an Arduino and GPS sensor I suppose - you'd never need to recalibrate then! I'd just be worried how reliable hobbyist technology is, and the speed sensor is [theoretically] bulletproof.

That said, I'm a bit worried about the reliability of the code at higher pulse counts. At 70mph the pulse rate will be around 40Hz, and with the screens and servo sensor I'm not sure the Arduino will handle it reliably - a GPS chip would just output a speed integer, so this might be the way to go........
User avatar
Bidz
.
 
Posts: 102
Joined: Mon Jul 28, 2014 5:53 pm
Location: Coventry, for some reason.

Great Britain (GB)

Re: Digital Speedo Project

Postby Panky » Sun Dec 11, 2016 2:39 pm

Sounds good :) Just remember to fit a normal bulb in the ignition light position, the charging circuit doesn't like LEDs
Image
User avatar
Panky
.
 
Posts: 882
Joined: Sun Mar 22, 2015 6:00 pm
Location: Cheshire

United Kingdom (uk) UK England (.g)

Re: Digital Speedo Project

Postby BrianHawley » Sun Dec 11, 2016 3:53 pm

Bidz wrote:No extra LEDs, but maybe some where the warning lights ordinarily go. I think extras look a bit tacky and the idea is to display any data using the 0-100 scale and the OLEDs.


Yes, I missed something obvious there. You still have the original needle mechanism and can use that. Stepping motor? Would make a cool multi-function indicator.

Bidz wrote:That technology from Dakota isn't cheap. It could be implemented cheaply with an Arduino and GPS sensor I suppose - you'd never need to recalibrate then! I'd just be worried how reliable hobbyist technology is, and the speed sensor is [theoretically] bulletproof.


A lot of cool things about Dakota, but the price certainly isn't one of them.

Bidz wrote:That said, I'm a bit worried about the reliability of the code at higher pulse counts. At 70mph the pulse rate will be around 40Hz, and with the screens and servo sensor I'm not sure the Arduino will handle it reliably - a GPS chip would just output a speed integer, so this might be the way to go........


Can you run the counter in a different thread? I don't really know the Arduino. Alternatively, maybe external electronics with a divider to send out one pulse to the Arduino for every ten in?

It's a fascinating project and I look forward to seeing the end result.
User avatar
BrianHawley
.
 
Posts: 105
Joined: Sat Nov 19, 2016 5:03 am
Location: Yanbu Al-Sinaiyah

Saudi Arabia (sa)

Re: Digital Speedo Project

Postby Custard » Sun Dec 11, 2016 4:26 pm

All good stuff I like it.

Not sure if it would give more or less pulses than your set up, but the one I had on a kit car had 4 magnets that were clamped to the propshaft, then a hall effect sensor mounted close by.

All close to the gearbox end of the prop as it does not move much there and the sensor located at the side of the prop too so it could be close but safe from contact as the prop should not move sideways at all.

The one I have not yet fitted has a disk with fifteen holes in it and that is supposed to sandwich between the prop and diff, but it could be vulnerable so I am slow to fit it.

If you could mount a sensor to pick up wheel speed rather than gearbox output that would reduce your pulses a fair bit too.

Sean.
User avatar
Custard
.
 
Posts: 2185
Joined: Fri Jan 06, 2012 11:17 pm
Location: Blackpool
Awards: 4
Contributions 2012 (1) Contributions 2013 (1) Contributions 2016 (1) Contributions 2017 (1)

Ireland (ie)

Re: Digital Speedo Project

Postby BrianHawley » Sun Dec 11, 2016 4:46 pm

Custard wrote:All good stuff I like it.

Not sure if it would give more or less pulses than your set up, but the one I had on a kit car had 4 magnets that were clamped to the propshaft, then a hall effect sensor mounted close by.

All close to the gearbox end of the prop as it does not move much there and the sensor located at the side of the prop too so it could be close but safe from contact as the prop should not move sideways at all.

The one I have not yet fitted has a disk with fifteen holes in it and that is supposed to sandwich between the prop and diff, but it could be vulnerable so I am slow to fit it.

If you could mount a sensor to pick up wheel speed rather than gearbox output that would reduce your pulses a fair bit too.

Sean.


A pulse per wheel revolution would indeed be cool - and immune to diff ratio changes.

Or if you want to make it weird, sense gear position and rpm, then work it out mathematically in the processor. ( I once knew a chap with four speed scales marked on his rev counter in biro!)

I think I'd probably cop out and go GPS, but where's the fun in doing it the easy way.
Brian

"Jodie". '67 Traveller, 1275, discs, vert shocks, arb etc.
User avatar
BrianHawley
.
 
Posts: 105
Joined: Sat Nov 19, 2016 5:03 am
Location: Yanbu Al-Sinaiyah

Saudi Arabia (sa)

Re: Digital Speedo Project

Postby Bidz » Mon Dec 12, 2016 12:13 pm

Panky wrote:Sounds good :) Just remember to fit a normal bulb in the ignition light position, the charging circuit doesn't like LEDs

I thought so, although I figure the important thing is the resistance of the excitation circuit for the alternator - the lamp only lights in the case of potential difference between the two sides. If the correct resistance is replicated, it should work.

BrianHawley wrote:Yes, I missed something obvious there. You still have the original needle mechanism and can use that. Stepping motor? Would make a cool multi-function indicator.

Yes, I I'll be using a Switech x27 'air core' stepper motor as used in the instrument clusters of General Motors vehicles.

BrianHawley wrote:Can you run the counter in a different thread? I don't really know the Arduino. Alternatively, maybe external electronics with a divider to send out one pulse to the Arduino for every ten in?

You can use "interrupts" for the counter, which is a little complicated but allows a very high rate - I've just yet to test it. I don't entirely understand (yet), but I think the code stops whatever else it's doing to log the pulse, and then carries on. Obviously the monitoring side of this application does need to be running at 16MHz, one update per second will be fine for temperature etc. As I say, it just needs testing.

Thanks everyone else for the kind words. I'm not an expert at any of this - I work with low voltage electronics daily but I'm new to programming C and Arduino. I'm learning and updating here as I go!
User avatar
Bidz
.
 
Posts: 102
Joined: Mon Jul 28, 2014 5:53 pm
Location: Coventry, for some reason.

Great Britain (GB)

Next

Return to Electrics, Instrumentation & Security



Who is online

Users browsing this forum: No registered users and 1 guest