Lovely sunbeam

Lovely sunbeam
Lovely Sunbeam (and Annierose) 88-99-PF

Saturday 4 November 2023

GPS speedo

 Toying with some ideas for winter and something to do when I'm away from home - working...

GPS speedo has been a thought, as my speedo needle is a bit vague, has a mind of its own and doesnt do zero.
The mileometer is fairly good though.
Anyway - here it is so far. Using a donor speedo.

with ideas and help from youtube, google and retro-mini.

It may get finished one day.
Or it may just stay on the desk as it is




I took the jaeger gps speedo on holiday to Wales.
It worked rather well I thought. 

If a bit steppy.

Gps speed is updated every second - which can be a long time when accelarating away
Although it matches exactly with google maps speed on the phone.

Miles on the trip meter is calculated every iteration (about 1 second) by the simple method of
distance = speed x time - rather than the haversine method.
In just over a 1000miles it's only 7 miles less than the daily driver so is quite good I think.



I took the jaeger gps speedo on holiday to Wales.
It worked rather well I thought. If a bit steppy.
Gps speed is updated every second - which can be a long time.
Although it matches exactly with google maps speed on the phone.

Miles on the trip meter is calculated every iteration (about 1 second) by the simple method of
distance = speed X time - rather than the haversine method.
In just over a 1000miles it's only 7 miles less than the daily driver so is quite good I think.

The update rate of the gps is every 30s and the arduino has to hang around while it gathers the data so there is always a bit of time when I cant drive the needle.

I'm now working with a Nano ESP32 version, the idea is to use its dual cores and realtime elements to have one core doing the gps and the other doing everything else and consequently able to smooth the step resonse of the needle by using the non blocking update method.and an element of prediction using acceleration.

I should be changing the brake hoses - but its cold outside. :)

The next test version took a while.
The ESP32 is a 3.3v system and I need 5V to drive the stepper motor.
Initially had lots of issues with noise until I replced the 8way voltage converter to a 4way version.
Faster GPS module as well (same 1s update but faster to talk to)

Now I have a smooth pointer drive. Non blocking update every 50ms in its own task.
Also saves the lat long (and other data) to SD card so can view on google maps.

Lower display shows the mileage at low speeds and speed in MPH when moving. can be set to KM/h by switch.




Finally managed to read the saved mileage/trip data back from the SD card on power up.
used this as an excuse to buy a 3d printer. its definiteley and expensive speedo.

Will add a pushbutton on a stalk (similar to the original) to reset the trip and change to display to kmph.

I keep having ideas and it keeps me out of the cold.
  • Lights on reminder.
  • indicators on too long reminder
  • day/night brightness
pointer update rate is now 35ms, was a lot smoother at 50ms but then it would lag behind a little.
Can take 30s to get the minimun number of satelites after a long time powered off.
Pointer tuning at low speed still required.


Worked on it a bit more, now have the glass on the front. The needle initially rattled on the window so another re-design needed.
Also needed to install an end stop more subtle than a cocktail stick.
A sewing needle was just the job.
Made a plug for the back of the speedo.
Original plan was to fit the Arduino inside the speedo but for ease of "continuous update" I'll mount it in a box.
trip reset switch (mini pushbutton) comes out of the original trip reset hole.




there's been quite a few updates to the speedo software.
its still working on trial in the daily driver.

Now Ive updated the circuit from breadboard to veroboard.
And created a black box. There is space for more parts.

I need to add wiring for the digital inputs for Ignition and lighting (green bits in photo)
and analogue input wires from fuel guage and water guage.

I dont need the indicator input anymore, the new LED's are like laser beams.


Finally fitted the speedo to the Sunbeam.
Mileage now set to old speedo value.

The GPS sensor seems to be able to still pickup 12 satelites under the dashboard in the garage so maybe I dont need to put the sensor on the dash top.

Added the analog wires(x) for the water temp and Fuel qty and digital wires for Ignition-on and lights-on.
Water temp not really needed but might as well - roughly worked out that the temp(y) is fairly linear so y=mx+c =-.1157x + 142.7.
but that isnt quite right as currently it says the garage is 28 degrees. so it may be almost linear on the guage display range only
When I top up the tank can then work out the graph for Fuel as well. then can monitor the mpg 8)

a 1 minute video - power on (via extra switch for now), lights on (dim display a bit) and reset trip distance





No comments:

Post a Comment