EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: Refrigerator on December 28, 2020, 05:50:22 pm

Title: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 05:50:22 pm
I'm restoring restomodding a 1972 Volga 24 currently and i need to modify the original mechanical speedo to be controlled electronically.
The original engine and gearbox are shagged so i'm swapping a SAAB B204 with a different gearbox, which is why the speedo needs to be modified.
Also i want to preserve the original look, which is why i'm not going to put a screen in place of the speedo.
It's a strip speedometer, which presents it's own challenges.

I'm thinking there's two options right now.
First one is an external speed controlled motor, which would spin the cable input in the speedometer. I think this would be the least intrusive method but it might be a bit noisy depending on how it's done. Also i would be relying on the original mechanism of the speedometer to work and be accurate.

Second would be to tear the speedo apart and connect a stepper motor directly to the mechanism that moves the needle but this would be most intrusive. Of course this way the speedometer needle would be directly coupled to the stepper so i think reliability and accuracy would be better.

Also there are other gauges on the speedometer cluster, such as oil pressure, battery charge/discharge and fuel level, which complicates things, because none of the original electrical system will be left in the car and it would be nice to have these gauges work.
All of these are regular gauges and can be driven directly with PWM from a microcontroller but then i would need to interface remote sensors and i start diving down a bit of a rabbit hole full of CAN and diff pairs.

Would be nice to have some input before i blow this project too far out of proportion with feature creep.  ^-^
Title: Re: Modifying mechanical speedometer to electronical.
Post by: pardo-bsso on December 28, 2020, 06:27:17 pm
That's a nice project.

Do you know how different are the ratios of the differential and the new gearbox to the speedometer input? If they are close enough you might be able to use it as it is and it will still be within the expected tolerance/error of the meter and law regulations.

As for the rest of the oil and water temp gauges, can you use the old sensors (or new but compatible) in the new engine and wire them directly to the cluster? If the threads are different it's a short job with plumbing parts and perhaps a bit with a lathe. Same with fuel level.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 06:58:31 pm
That's a nice project.

Do you know how different are the ratios of the differential and the new gearbox to the speedometer input? If they are close enough you might be able to use it as it is and it will still be within the expected tolerance/error of the meter and law regulations.

As for the rest of the oil and water temp gauges, can you use the old sensors (or new but compatible) in the new engine and wire them directly to the cluster? If the threads are different it's a short job with plumbing parts and perhaps a bit with a lathe. Same with fuel level.

The new gearbox does not have a cable output at all actually.
I don't think the new oil pressure sensor will be compatible with the old gauges. This is a bit of a tricky situation because even if the gauge works with some new sensor there's no guarantee that it will be accurate.

I will have an OBDII port hidden to interface to the ECU so maybe i could add some CAN interface to the gauge cluster to read oil pressure etc.
But then again i might go for a standalone ECU because the original Trionic5 might throw a fit when i try to run it standalone. Anyways that's beyond the scope of this project.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Zero999 on December 28, 2020, 07:19:04 pm
The external motor spinning the cable is probably the better solution. Use a DC motor, with the appropriate gearing, if necessary. Assuming the load doesn't vary much, the speed is roughly proportional to the voltage. You could power the motor off a regulated power supply and vary the speed with PWM.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 07:50:49 pm
The external motor spinning the cable is probably the better solution. Use a DC motor, with the appropriate gearing, if necessary. Assuming the load doesn't vary much, the speed is roughly proportional to the voltage. You could power the motor off a regulated power supply and vary the speed with PWM.

If i did that i would most definitely add an optical speed sensor for closed loop control because i don't trust the DC motor speed to be stable especially in an automotive environment (temperature, vibration etc.). Also i think the cable rotates at a pretty low RPM so if i needed a gearbox for the motor that would also add more noise.
Cars are inherently very noisy but i find noise made by DC motors inside a car to be very noticeable and very annoying. Not to mention the Volga 24 is a massive rattle can, so if any vibration from the drive motor got coupled to the stamped steel panels it would amplify.
Steppers sound pretty cool when they make "cnc" noises so i kinda lean the more intrusive way of modifying the speedo. Also i do have a reasonably small 1.8 deg/step stepper, which is pretty much silent with micro stepping.
And let's not forget that this speedo was made in 1972 and it probably needs a good servicing by now, not to mention the bug that found it's way inside and died on the front glass  >:(
I haven't yet looked inside the speedometer mechanism so i can't say whether it will be easy or hard to modify it but i'll look inside, because right now it seems like the biggest factor is my preference, rather than the feasibility of such mod (second option).
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Benta on December 28, 2020, 07:54:08 pm
Staying with the speedometer:

As you don't have an output from the gear box, my suggestion would be an ABS ring on the drive shaft with associated sensor. Rugged and proven over decades. Now at least you have a speed signal :)
Square it up (analog amplication/limiting) and you have a nice frequency proportional to your speed.

For the speedometer itself:
Forget the stepper motor, the sound will drive you nuts (OK, I know a Volga isn't a Roll-Royce, but still)
I like your idea of driving the old mechanism with a controlled DC motor. BLDC would be preferable for noise reasons.

Now you just need to translate frequency (ABS sensor) to voltage and BLDC control. A job for an Arduino or whatever.

Sounds fun.

Let us know how you proceed.

Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 07:57:47 pm
I think it would be possible to also make an external drive with a stepper motor but i don't know it will be able to spin fast enough.

And now that i think of it i would also need limit switches for the speedo needle if i went to modify it with the direct drive to avoid crashing the speedo needle and subsequently ruining the entire assembly.
So yeah the external drive seems like the better choice currently.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Benta on December 28, 2020, 08:00:38 pm
If i did that i would most definitely add an optical speed sensor for closed loop control because i don't trust the DC motor speed to be stable especially in an automotive environment (temperature, vibration etc.). Also i think the cable rotates at a pretty low RPM so if i needed a gearbox for the motor that would also add more noise.

Nothing forces you to place the speedo motor next to the meter. It could also be in the engine compartment using the original (shortened) speedo cable.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 08:04:57 pm
Staying with the speedometer:

As you don't have an output from the gear box, my suggestion would be an ABS ring on the drive shaft with associated sensor. Rugged and proven over decades. Now at least you have a speed signal :)
Square it up (analog amplication/limiting) and you have a nice frequency proportional to your speed.

For the speedometer itself:
Forget the stepper motor, the sound will drive you nuts (OK, I know a Volga isn't a Roll-Royce, but still)
I like your idea of driving the old mechanism with a controlled DC motor. BLDC would be preferable for noise reasons.

Now you just need to translate frequency (ABS sensor) to voltage and BLDC control. A job for an Arduino or whatever.

Sounds fun.

Let us know how you proceed.

I think it would be best to add a ring to the driveshaft instead since it would be simpler.

I will have to experiment with steppers and DC motors to see which is quieter but first i will need to find out what RPM the speedo needs to work and, most importantly, if it works at all.

The external drive comes with the benefit that it does not devalue the speedometer assembly. I say this because the Volga 24 is a rare car here and a strip speedometer is even more rare so i would prefer to not ruin it.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 08:11:47 pm
If i did that i would most definitely add an optical speed sensor for closed loop control because i don't trust the DC motor speed to be stable especially in an automotive environment (temperature, vibration etc.). Also i think the cable rotates at a pretty low RPM so if i needed a gearbox for the motor that would also add more noise.

Nothing forces you to place the speedo motor next to the meter. It could also be in the engine compartment using the original (shortened) speedo cable.

There won't be much space in that area in the engine bay because of the brake booster, which was originally not meant to be there.
Previously the brake cylinder would actuate an external brake booster cylinder, which was in the opposite side of the engine bay, which would then boost the brakes but this meant there were two hydraulic systems that were somehow meant to share one reservoir. Also the entire system was broken so i threw it away in favor of something more modern.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 09:06:43 pm
There was a back door in the speedo assembly so i scraped off the white "warranty" paint off the screws took a look inside.
The entire magnet/speed cup (yep that's what it's called) assembly was attached to this cover and it did not come out very gracefully so i don't think i was meant to pull it out from the back.
Anyways it looks like it would be very easy to modify this assembly for direct drive but i noticed another problem and that is that the odometer would need a separate stepper, which adds complexity.
So the odds are against direct drive.
I can go from external drive to direct drive but not the other way around, so i will first try making an external motor to drive the cable input first.
Also the speedo works and it does require quite a low RPM to work and there's also noticeable resistance when spinning the input.
To make the strip go up the input is spun counter clockwise when looking at the back of the speedo assembly.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: pardo-bsso on December 28, 2020, 09:42:52 pm
Well, mine is from 1981 but works fine. The odometer even rolled over at least once.

Perhaps I explained myself wrong but can't you make/buy an adapter if needed and use the old sensors for water and oil in the new engine?
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 09:59:12 pm
Well, mine is from 1981 but works fine. The odometer even rolled over at least once.

Perhaps I explained myself wrong but can't you make/buy an adapter if needed and use the old sensors for water and oil in the new engine?

Of course you can, the threads are standard. When i was still trying to start the engine i even replaced the original oil pressure sensor with a regular pressure gauge i bought at the hardware store and it threaded right in.
But the problem is that the original pressure sensors i have don't work anymore and i don't think finding a new one will be easy. Also i don't trust old sensors in general.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 10:16:33 pm
I gave the speedo a spin and my drill in reverse can only get me to about ~150kph. The strip is a bit bouncy but if i went from 0 to 150 kph in less than a second i would probably have other things to worry about. I don't have a way to measure the rpm yet but i think the top range on the speedo is no more than 2k RPM.
I think a regular (360-ish sized) DC motor will have problems spinning the input especially at low RPM. I do have a couple 540(?, they're big) sized low RPM DC motors from some printers that i could maybe use but this entire thing is getting a little sketchy, bulky and inefficient.
A gearbox would help but it would add noise. I do have a belt assembly from a printer with a short belt and matching toothed pulleys but the input is not meant to take radial load so i can't hook it up directly so i would need to make an external assembly, which is pretty messy as well.

I'm starting to lean more towards direct drive again.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: langwadt on December 28, 2020, 10:24:47 pm
I gave the speedo a spin and my drill in reverse can only get me to about ~150kph. The strip is a bit bouncy but if i went from 0 to 150 kph in less than a second i would probably have other things to worry about. I don't have a way to measure the rpm yet but i think the top range on the speedo is no more than 2k RPM.
I think a regular (360-ish sized) DC motor will have problems spinning the input especially at low RPM. I do have a couple 540(?, they're big) sized low RPM DC motors from some printers that i could maybe use but this entire thing is getting a little sketchy, bulky and inefficient.
A gearbox would help but it would add noise. I do have a belt assembly from a printer with a short belt and matching toothed pulleys but the input is not meant to take radial load so i can't hook it up directly so i would need to make an external assembly, which is pretty messy as well.

I'm starting to lean more towards direct drive again.

is noise really an issue at speed in such an old car?


Title: Re: Modifying mechanical speedometer to electronical.
Post by: Zero999 on December 28, 2020, 10:32:26 pm
How long is the speedo cable? Can you put the motor outside the cabin, in the engine bay?
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 10:40:56 pm
I gave the speedo a spin and my drill in reverse can only get me to about ~150kph. The strip is a bit bouncy but if i went from 0 to 150 kph in less than a second i would probably have other things to worry about. I don't have a way to measure the rpm yet but i think the top range on the speedo is no more than 2k RPM.
I think a regular (360-ish sized) DC motor will have problems spinning the input especially at low RPM. I do have a couple 540(?, they're big) sized low RPM DC motors from some printers that i could maybe use but this entire thing is getting a little sketchy, bulky and inefficient.
A gearbox would help but it would add noise. I do have a belt assembly from a printer with a short belt and matching toothed pulleys but the input is not meant to take radial load so i can't hook it up directly so i would need to make an external assembly, which is pretty messy as well.

I'm starting to lean more towards direct drive again.

is noise really an issue at speed in such an old car?

I think yes, especially because this car counts as a "classic car" and i want to keep it as classy as i can with the lowest amount of noise possible. Just because it's already noisy doesn't mean that i can just pile more noise on top.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 10:45:26 pm
How long is the speedo cable? Can you put the motor outside the cabin, in the engine bay?

I would have to find it to measure since it's been tucked away into storage somewhere in the attic. The exhaust of the engine will be on the driver side so i try to keep things there scarce to avoid getting cooked.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 28, 2020, 11:13:34 pm
I dug around in my stepper box and found some small pancake steppers with 3.75 deg/step angle.
Here's a datasheet for one: https://pdf1.alldatasheet.com/datasheet-pdf/view/176408/MITSUMI/M35SP-11NK.html
I could easily fit one of these inside the speedometer enclosure to drive the strip pulley directly. Not sure if 3.75deg/step is good enough because these stamped steel steppers don't like microstepping.

Edit: assuming 40mm roller diameter for the strip (i forgot to measure), a 3.75deg/step would get me about 1.3mm strip movement per step, which is not great. With 1/4 microstepping i could get these numbers down to 0.33mm, which i think is good enough but these steppers don't like microstepping, at least the 7.5deg/step ones don't.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 29, 2020, 04:54:45 pm
Quite fortunately all of the gauges are their own individual modules and can be removed from the back side.
I have exams coming up so i'll put this project on the back burner for a week, after that i'll start experimenting some more with the motors.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Zero999 on December 29, 2020, 05:41:29 pm
How long is the speedo cable? Can you put the motor outside the cabin, in the engine bay?

I would have to find it to measure since it's been tucked away into storage somewhere in the attic. The exhaust of the engine will be on the driver side so i try to keep things there scarce to avoid getting cooked.
I think it will be fine, as long as it's not too near anything hot. The starter motor, alternator, battery etc. don't cook and in this case the motor will have minimal loading. Another thing you could consider is, putting the motor and gearbox in an enclosure lined with polystyrene foam, or cotton wool for sound insulation.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on December 29, 2020, 06:38:39 pm
How long is the speedo cable? Can you put the motor outside the cabin, in the engine bay?

I would have to find it to measure since it's been tucked away into storage somewhere in the attic. The exhaust of the engine will be on the driver side so i try to keep things there scarce to avoid getting cooked.
I think it will be fine, as long as it's not too near anything hot. The starter motor, alternator, battery etc. don't cook and in this case the motor will have minimal loading. Another thing you could consider is, putting the motor and gearbox in an enclosure lined with polystyrene foam, or cotton wool for sound insulation.

On the SAAB B204 the starter and alternator are both on the intake side so they don't get any heat actually. The problem with the exhaust manifold is that it radiates heat, it's not just hot air.
Oh and it's a turbocharged engine (forgot to mention) so there's only a limited amount of space on the driver side.
But anyways, the motor assembly would need a custom enclosure because i wouldn't expect a printer belt (or a GT2 belt) to hold up very long in the elements, especially in the engine bay.
I would need to make a custom enclosure and common materials like acryllic and 3D printed plastics (PLA, ABS) might deform under the heat.
Also wrapping the assembly in anything would be counter productive because even if it kept the heat from getting in there would be no way for the heat to get out.
Additionally this would only delay the heat-soak of the module, not prevent it.

I'm slowly leaning more and more towards the direct drive approach, even though it is very intrusive and likely non-reversible.
I would have to weigh the pros and cons of both approaches.
Also the will be very different both ways, because the external drive will be running constantly when i'm driving and the direct drive will only be stepping when the speed changes.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: minifloat on January 01, 2021, 07:07:14 pm
For the speedometer, would it be possible to attach a rugged RC car servo instead of the eddy current bell?
For the odometer, a electromechanical counter would save the look'n'feel.
Both could be controlled by a microcontroller based circuit, which could also convert signals.
What do you think?

Happy new year,
br, mf
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on January 01, 2021, 07:36:58 pm
For the speedometer, would it be possible to attach a rugged RC car servo instead of the eddy current bell?
For the odometer, a electromechanical counter would save the look'n'feel.
Both could be controlled by a microcontroller based circuit, which could also convert signals.
What do you think?

Happy new year,
br, mf

Servos are horribly inaccurate, especially the cheap ones, also the bell rotates more than 360 degrees through the entire speedo range so a servo wouldn't work.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: minifloat on January 01, 2021, 10:14:41 pm
Servos are horribly inaccurate, especially the cheap ones, also the bell rotates more than 360 degrees through the entire speedo range so a servo wouldn't work.
Understood, but does the pulley, which is moving the ribbon, also rotate more than 360°?
I've seen from your photos, the bell is driving the pulley via gears.
My idea was to replace the speedometer cable and bell mechanism by a servo or 270° motor potentiometer.
Of course, with custom gear ratio, so the full servo/motorpot range equals the speedometer range. The gear ratio may be e.g. 2:1 :D

It looks as if this kind of modification is reversible.
br, mf
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on January 25, 2021, 10:18:09 am
Ok let's get back to this project.
As it turns out my uni only gives enough time for boring bachelors degree final projects so i had to say bye-bye to my quadruped robot.
Anyways i've decided to use this project for my finals, might as well get two birds with one stone.
But that means i also have to get more technical about it.
Also i've since decided to go for direct drive without the external motor.
I've read that these speedometers were a little unreliable so i'll have to see how i can improve it and i've also found a guy who sells these speedometers (for parts) so reversibility of the mod is no longer important.
Servos are horribly inaccurate, especially the cheap ones, also the bell rotates more than 360 degrees through the entire speedo range so a servo wouldn't work.
Understood, but does the pulley, which is moving the ribbon, also rotate more than 360°?
I've seen from your photos, the bell is driving the pulley via gears.
My idea was to replace the speedometer cable and bell mechanism by a servo or 270° motor potentiometer.
Of course, with custom gear ratio, so the full servo/motorpot range equals the speedometer range. The gear ratio may be e.g. 2:1 :D

It looks as if this kind of modification is reversible.
br, mf
I want to avoid any wear items like potentiomenets as much as possible. Also i've seen a couple videos where servos were used to modify old mechanical speedometers and the servos were quite noisy.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on March 29, 2021, 05:14:04 pm
So my internship is nearing its end and it looks like it would be about time to get back to this.
If i remember right the roller on the strip is 42mm in diameter, so with a 3.75 deg/step stepper i would get about ~1.4mm of movement per step.
On top of that i could also microstep but these stamped steppers don't like microstepping, at least the 7.5 deg/step ones don't.
But if i can get at least 1/2 or maybe 1/4 microstepping then the movement would drop below 1mm, which i think is acceptable for a speedometer that has about ~200mm of total travel.
Are there any standards for speedometers defining the acceptable step size for the indicator/needle?
The odometer will also need a stepper to drive it since it's driven by the throttle cable, which will no longer be there. I have a bunch of stepper motors from DVD drives and i think they'll be allright.
There isn't much space for the odometer drive so the small stepper should fit just right.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on March 29, 2021, 05:34:23 pm
Also regarding voltages i found this helpful document here:
https://www.ti.com/lit/ug/tiduc41a/tiduc41a.pdf?ts=1611552876695&ref_url=https%253A%252F%252Fwww.google.com%252F (https://www.ti.com/lit/ug/tiduc41a/tiduc41a.pdf?ts=1611552876695&ref_url=https%253A%252F%252Fwww.google.com%252F)
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on March 30, 2021, 06:23:04 pm
So the key parameters for the project have been decided (a long time ago actually).
*Supply voltage 5-48V.
*Speed error less than +/- 4% (SAE J1226)
*Odometer error less than +/- 4% (also SAE J1226)
*Control signal is PPS (regular tach signal basically)
*Speed resolution no less than 1 km/h. IIRC there's about 20mm per 20km/h so that makes for around ~1mm/ km/h.
*There has to be a way to calibrate the speedometer controller. Basically two buttons and saving some value to EEPROM.

The above are practically set in stone, i can't change them but that doesn't mean i can't work around them if it so happens that i've painted myself into a corner.

I think it will be best to add a single DC-DC converter to meet the supply voltageChanged my mind. It's kind of a wide range but i think it's only because of the transients (see attached pic).
But the low voltage operation would be problematic since i don't think any DC-DC converter has a dropout voltage low enough for the stepper driver to still work on 5V supply voltage on the input of the DC-DC.
If the high supply voltage range is necessary because of transients then i can just pop in a linear regulator and call it a day right?
Anyways, 5V seems a bit low for a stepper driver i hope i don't have to finagle another DC-DC converter to boost the voltage. The drive current for the stepper motors will be low since they only need to move a rather lightweight movement.
Efficiency is also not critically important considering the application, but power dissipation is because the components will need to dissipate it obviously.
Also any stepper driver recommendations?

Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on March 30, 2021, 07:12:29 pm
Found the A4990 "Automotive Dual Full-Bridge Driver" but it's not much of a stepper driver. What i ideally want is something that takes STEP and DIR signals but i can make this work also if need be.

Ps: Man the search on Digikey is so bad i can't select my supply voltage range but have to click through preset ranges that aren't even in any sensible order, what a pain.  |O
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on March 30, 2021, 08:46:01 pm
Ok so i have my list of stepper drivers with STEP/DIR controls and from what i see Trinamic stepper drivers look the most attractive because of their sensing capabilities.
This would allow me to detect lost steps and do other cool stuff especially the silent stepping but i'm not sure all these features are strictly necessary and i don't want to feature-creep my design.
Also i don't know how well those drivers cope with stamped steel stepper motors instead of the regular machined ones.

As for the brains of the operation i still have some SAMD10 MCU's and some ATmega's, at this point i just want something i'd be comfortable working with.

Stepper driver list:
http://www.farnell.com/datasheets/2549178.pdf (http://www.farnell.com/datasheets/2549178.pdf)
http://www.farnell.com/datasheets/3119151.pdf (http://www.farnell.com/datasheets/3119151.pdf)
http://www.farnell.com/datasheets/2815804.pdf (http://www.farnell.com/datasheets/2815804.pdf)
https://www.ti.com/lit/ds/symlink/drv8834.pdf?ts=1617134868217&ref_url=https%253A%252F%252Fwww.google.com%252F (https://www.ti.com/lit/ds/symlink/drv8834.pdf?ts=1617134868217&ref_url=https%253A%252F%252Fwww.google.com%252F)
http://www.farnell.com/datasheets/3119145.pdf (http://www.farnell.com/datasheets/3119145.pdf)
http://www.farnell.com/datasheets/3119141.pdf (http://www.farnell.com/datasheets/3119141.pdf)
http://www.farnell.com/datasheets/2914769.pdf (http://www.farnell.com/datasheets/2914769.pdf)

I'll pick whichever i feel like using, max input voltage is not necessarily important as long as it's around the 12V (or more) mark since i can put a voltage regulator to knock it down.
And whatever needs knocking down will on be a transient so i'll throw a filter on the input of the regulator as well (LCL T? CLC PI? RC? i'll think about it).
Max input voltage will remain 48V just might not be continuous.  ::)

Also i don't know what sensors gearbox speed sensors use but wheel sensors use reluctance sensors so gearboxes should be the same so i'll need some circuitry to make the signal micro-friendly, which i'd have to do anyways since i don't want to feed automotive noise straight into my GPIO.

Ps: i'll be spamming this thread a lot, it's kind of my place to dump ideas as i go.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: james_s on March 30, 2021, 09:53:48 pm
I think I would have gone with a good quality DC motor driving the original speedo, a piece of vinyl tubing makes a decent low torque shaft coupler.

If you want a more direct approach, how about taking the electronic speedometer out of a newer car and transplant the mechanical bits behind the existing faceplate? With a bit of luck you might even find one that has the odometer in the same location. IIRC the speedometer in my Volvo is essentially a moving coil meter.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on March 31, 2021, 05:49:41 pm
I think I would have gone with a good quality DC motor driving the original speedo, a piece of vinyl tubing makes a decent low torque shaft coupler.

I read in some article that these strip speedometers were notoriously unreliable so direct drive would let me bypass most of the mechanical components that may be contributing to this reputation.
If i were to drive the speedo cable with a motor i would not only add a wear item, but it would need to be constantly running and whirring in the background. I would also be trusting a mechanism from the early 70's to be operating accurately and reliably.
And i don't think that's a good solution.


If you want a more direct approach, how about taking the electronic speedometer out of a newer car and transplant the mechanical bits behind the existing faceplate? With a bit of luck you might even find one that has the odometer in the same location. IIRC the speedometer in my Volvo is essentially a moving coil meter.
I think that's a bad idea actually. For starters what i have is a strip speedometer and i don't think there are any electronic strip speedometers around.
I would then have to shoehorn a dial speedo in, which would ruin the aesthetic (that retro strip speedo vibe) and before that i would have to find one that even fits and looks right.
After that i would have to somehow reverse engineer the interface for said speedo and chances are it wouldn't work with my gearbox/ gear ratio combo so i would need a custom interface to convert the signal to match anyways. So i would be making some kind of control board brainbox regardless.
So basically i would be doing the same thing except it would be more work, more convolution, less reliability (imo) and the result wouldn't look as good in the end also.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: james_s on March 31, 2021, 09:04:08 pm
Oops yes I missed the part about the strip speedo. Well you could use a servo to drive that. Doesn't have to be a cheap hobby servo, you can get very high quality servos that are precise and reliable. The electric motor drive does have the problem of relying on the original mechanism, but the motor itself does not have to be unreliable. I have seen some of those solar powered air vents for example that have run for decades, the motors are almost silent and last a very long time. They are designed for that low torque application and have good bearings and beefy brushes that have a light tracking force so it doesn't wear the commutator.

The rest is pretty trivial though. All of the electronic speedos I've seen use a reluctance sensor, essentially a guitar pickup that reads slots or teeth in a metal wheel. The only difference is the calibration and that can usually be adjusted or you can buy or build an adapter that reads whatever signal you have, and puts out pulses at the correct frequency.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 01, 2021, 03:24:29 pm
I don't feel like spending money on expensive servos, especially when they wouldn't even fit the application.
The roller for the strip rotates more than once over the entire range of the speedometer, so a servo wouldn't work. And if i tried to make it work i'd be adding gearing and it would become a huge mess.
Right now my plan is to replace the original shaft of the roller with a stepper motor, so that the roller is directly coupled to the stepper motor.
I think this way it would be the simplest and most reliable.

But one problem with a stepper is that i don't know the position of the strip and i can't assume it to always be where it left off last time.
So i think i might glue a little piece on the strip to protrude slightly and use either a micro switch or an IR sensor.
To home the speedo i could make it run to max range and back to zero, kind of like motorbike speedos do. I think that would be neat.
Suggestions for any other kind of simple sensor for the strip position are welcome also.
Currently i'm leaning more towards a microswitch, this way there would be a hard stop for the strip and sort of act like an end stop. The servo would be adjusted to skip steps if the strip jams.
Opto sensor would not stop the strip from rolling over too far in case of a fault or error. There are teeth on the roller that fit into holes in the strip to keep it from slipping and might damage the strip if it were to get misaligned.
Also the ends of the strip are joined by springs that hold onto aluminum end pieces that are pressed on the strip and these aluminum pieces would definitely interfere with the roller if the strip were to go too far.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: james_s on April 01, 2021, 08:44:45 pm
Use a Hall effect sensor and glue a small magnet onto the roller, or use a slot type opto sensor with a small tab connected to the moving roller. Another option is to use a stepper with an absolute encoder on it.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 02, 2021, 04:28:22 pm
Use a Hall effect sensor and glue a small magnet onto the roller, or use a slot type opto sensor with a small tab connected to the moving roller. Another option is to use a stepper with an absolute encoder on it.
The stepper would make more than one revolution so the absolute encoder wouldn't work.
I think a slot sensor would work with an endstop to keep the strip from rolling too far.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 04, 2021, 12:54:03 pm
In case the gearbox doesn't have a speed sensor i should add two pulse inputs for the ability to run wheel sensors.
If the gearbox does have a speed sensor the single sensor output will be fed into both inputs.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: james_s on April 04, 2021, 06:08:09 pm
The gearbox must have had some sort of output to drive a speedometer, at least every FWD gearbox I've seen does, either to drive a cable or an electronic sensor. For cable drives you can get retrofit sensors that connect to the original mechanical drive and give you pulses, or you could build something.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 04, 2021, 07:26:14 pm
The gearbox must have had some sort of output to drive a speedometer, at least every FWD gearbox I've seen does.

My 90's SAAB doesn't have a speed sensor in the gearbox, rather ir relies on the wheel speed sensors, which are necessary for the ABS also (it's there so why not use it, right?)
This shows that not all cars are built the same so to keep my design more future proof i'll add two inputs.
It should be relatively easy, since they will both be the same so i'll just copy and paste, then (A + B)/2 = my speed.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: james_s on April 08, 2021, 04:38:34 am
My 90's SAAB doesn't have a speed sensor in the gearbox, rather ir relies on the wheel speed sensors, which are necessary for the ABS also (it's there so why not use it, right?)
This shows that not all cars are built the same so to keep my design more future proof i'll add two inputs.
It should be relatively easy, since they will both be the same so i'll just copy and paste, then (A + B)/2 = my speed.

Hm that's interesting, I wonder how they average the input from the two wheels? My ex had a Saab, it was a 1988 900s, fantastic car. I could swear that had a speedometer cable drive on the gearbox but it's been quite a few years since I worked on that car. Every car I can remember working on had either a speedo drive cable from the gearbox or a reluctance sensor in the differential housing, which in the case of FWD cars is also the gearbox.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 08, 2021, 02:59:09 pm
My 90's SAAB doesn't have a speed sensor in the gearbox, rather ir relies on the wheel speed sensors, which are necessary for the ABS also (it's there so why not use it, right?)
This shows that not all cars are built the same so to keep my design more future proof i'll add two inputs.
It should be relatively easy, since they will both be the same so i'll just copy and paste, then (A + B)/2 = my speed.

Hm that's interesting, I wonder how they average the input from the two wheels?

Probably just average the individual speed values, maybe only from the rear wheel sensors since they're mostly tangential to the turning circle and because they're not driven (in fwd) so their readings will be more accurate.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 16, 2021, 06:21:19 pm
Found this nifty buck-boost converter IC. Quite expensive though.
https://www.ti.com/lit/ds/symlink/lm5118.pdf?ts=1618575613071&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLM5118 (https://www.ti.com/lit/ds/symlink/lm5118.pdf?ts=1618575613071&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLM5118)
This would open up more possibilities for stepper drivers because it would make the voltage range wider.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 16, 2021, 06:35:38 pm
Ok so i just had a little outside the box idea.
Basically i could use a negative voltage DC-DC converter that would take whatever voltage came from the 12V line and convert it to -12V.
And then use the -12V line as a virtual ground for my electronics and 0V as the +12V rail.
This way i would get the buck-boost functionality without actually needing a buck-boost converter, which should cut the cost down (imo).
The current should be low enough for this to work, i'll have to do more research.
Only problem would be coupling a digital output in case i wanted to add anything in the future that needs to know the speed.
The inputs should be easy enough, a capacitor in series with the sensor output to AC couple it should do the trick.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 16, 2021, 06:49:08 pm
The idea is kind of like this but now that i think of it this converter would nuke my circuitry if it ever stopped working so it might not be the best choice.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 16, 2021, 06:53:27 pm
farnell component search could not be any more of a pain in the ass if it tried
EDIT: AND THE STUPID WINDOW KEEPS CHANGING SIZE EVERYTIME I CLICK ON A VOLTAGE (to refresh results) SO I CAN'T EVEN MULTI-SELECT BY HAND  :rant: :rant: :rant: :rant: :rant:
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 16, 2021, 07:05:50 pm
Well it doesn't look like there are any suitable LDO's anyways. Most are low power jobbies.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 17, 2021, 04:13:41 pm
Ok so i came up with a quick and dirty discrete-ish LDO that should do the trick in case i find a suitable stepper driver.
It's not complete but works as a proof of concept.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 27, 2021, 11:25:31 am
Ok so i came up with a quick and dirty discrete-ish LDO that should do the trick in case i find a suitable stepper driver.
It's not complete but works as a proof of concept.
Oh yeah and forgot to explain what it does to those who don't see it.
One opamp is used to make a linear regulator while another is used to make a charge pump.
Schmitt trigger would have been better but opamps come in dual-per package, most commonly (Eg. TL082, LM358, JRC4558 etc.)
Compared to a schmitt trigger this only increases the part count my three resistors and allows me to use 1 less IC (the schmitt trigger)
The charge pump is there to increase the drive voltage for the main pass element, which is N-type because it's easier to make the regulator stable this way.
MOSFET is used as the main pass element because a BJT is current driven and my little charge pump can only supply so much.
Efficiency is not important considering the application, as long as it's not excessively inefficient it's not a concern and the charge pump adds very little to that.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on April 27, 2021, 12:12:58 pm
Ok so since buck-boosting or staging regulators and converters is a bit of a mess i've chosen to stay away from any stepper driver that can not operate at 5V.
Drivers with 4.5 or 4.75V min input are on the edge of being opted out, such as TMC2209/8 and MP6600.
So far i have three candidates: STSPIN220, DRV8834 and TMC2300, which i really like for its feature set.
Also seems like Farnell is completely out of stock on almost everything and TMC2300 can only be found on Digikey.
Is shipping through Digikey in EU expensive? I've heard there can be gotcha's with which warehouse you ship from.
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on May 06, 2021, 03:30:58 pm
Boards have been ordered, although i was in a bit of a rush and at 2AM i forgot to fix the silkscreen so it's a little ugly once you get closer.
The board turned out pretty snazzy and the shape is extra funky for more cool points.
But this kinda did make the board double the cost because it didn't fit in the 100x100mm size, oh well.
Components need to be automotive so the cost doubles again and yeah it gets expensive once it all adds up.

Also did you guys know there's raytracing in KiCAD?
Title: Re: Modifying mechanical speedometer to electronical.
Post by: Refrigerator on May 12, 2021, 01:48:29 pm
Fixed the silkscreen to make it look nice in the report.  >:D