The 1947 - Present Chevrolet & GMC Truck Message Board Network







Register or Log In To remove these advertisements.

Go Back   The 1947 - Present Chevrolet & GMC Truck Message Board Network > General Truck Forums > Engine & Drivetrain > LSx Swaps

Web 67-72chevytrucks.com


Reply
 
Thread Tools Display Modes
Old 01-18-2022, 10:37 AM   #1
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Lightbulb Digital Speedometer, a homebrew idea

I saw a speedometer mod for the 67-72 trucks made popular by ls1nova71 and brad_man_72 on this forum. They were swapping in digital a speedometer from a newer S10 and doing some graphics work to make the range right. I decided that I’m bad at printing graphics and making the hardware side work so I wanted to just make the existing gauge function without a spinning cable. My first attempt was to try using a speed controlled electric motor to ‘spin’ the speedometer input shaft at the right RPM to pretend to be the transmission. That test ended mostly in tears when I couldn’t get the electric motor to produce a consistent speed and it was also extremely noisy. I was ready to give up and get some Dakota digital cluster, but I was dead-set on getting this to work for $40 instead of $1400. Plus I wanted it to look as original as possible.

The idea was born to do something similar to the S10 speedo, but be able to control the exact position of the needle. I did some digging around online and found some guys creating aviation simulators using the X27 stepper motors to drive analog gauges using an Arduino. I also found some code samples of people reading vehicle speed via PWM VSS output with. I picked up a small digital screen to act as the odometer display vs trying again to make a motor spin the physical odometer. I already own a 3D printer so I used that to quickly make some of the components for holding everything, it could be done another way if you didn’t have one. EEPROM on the Arduino chip is used to store the odometer reading and pull it up each time without having to consume constant power.
I have a video of it working https://youtu.be/emJhqhSkUgA and some pictures of the process. I’ll need to follow up on this post with more information as I get the idea fully functional, I still need to get it in the truck and do a road test. Ideally I’d like to make this easy enough for someone to get the parts, put them together, and just make it work without having to get into coding or 3D modeling.

Here’s the material list I ended up with. I ended up shelling out $67, but that left me with extra parts for later projects.
Elegoo Arduino Nano
eBoot Buck voltage converter
Uctronics .96” OLED I2C
Cciyu? X27.168 stepper motor
Delphi 4way connector

I started out taking apart the c10 speedometer to see how much room I would have, I also learned a trick right off the bat to use a dinner fork for removing the dial. These factory gauges are like clockwork inside so you want to be as gentle on them as you can if you’re going to reuse anything. I went ahead and carefully removed the dial, face, odometer, all the gears, and the needle armature. The magnet at the rear spun by the cable was not as easy to remove and I decided to cut the outside end off and then pressed out the brass bushing that was inside. With all that out of the way I made a 3D print that would replace the part holding the gauge face and in doing so would also hold my screen and stepper motor. If you use the same components I did (OLED and Stepper) they should fit right in the model I designed. You’ll need to de-solder the pins from the OLED and replace them with wires right off the board due to clearance. The speedometer needle didn’t quite fit back on the X27 stepper shaft so I did print a new part of that too, alternatively you could drill it out with a 1mm drill bit.
With that all assembled I ran the wiring through the speedometer cable hole to the back of the cluster so it could connect up with the controller. I’ll provide a picture of the wiring diagram and a link here https://crcit.net/c/905a34e381de435d8df352c393757068. I then printed a box to hold the Arduino and buck board while sealing up the wiring with a lid. The connections were soldered to the pins of the Arduino, I’m not very good at soldering that kind of stuff, but it works just fine for now. I did also throw on a Deplhi weather pack connector so that the cluster is easier to remove later. The IO to the vehicle are ground, +12v, sensor ground, and VSS. In my case I’ll be connecting to the IGN circuit for power and then VSS output on my Holley Terminator X. I’ll run my sensor ground to where the engine harness is grounded just to be sure I’m getting the least possible resistance.

For the Arduino coding I went used the x25 stepper library from Guy Carpenter, SSD1306Ascii library from Bill Greiman, and a blog post from Mathew MCMillan about reading the VSS. Later on I switch to using the multiMap function from Rob Tillaart to handle the non-linear printout of the speedometer face.

My code is uploaded to Github here: https://github.com/nsocwx/Digital-Speedometer along with the circuit diagram and some of the 3D STL files.
















nsocwx is offline   Reply With Quote
Old 01-19-2022, 10:14 AM   #2
Rust-O-Matic
Registered User
 
Rust-O-Matic's Avatar
 
Join Date: Apr 2015
Location: Gallatin, MO
Posts: 295
Re: Digital Speedometer, a homebrew idea

This is badass. Thank you for posting!
Rust-O-Matic is offline   Reply With Quote
Old 01-19-2022, 02:35 PM   #3
aknovaman
Registered User
 
Join Date: Aug 2013
Location: Tecumseh
Posts: 355
Cool Re: Digital Speedometer, a homebrew idea

The OLED will fail after about a year of operation. A TFT would work much better and last forever.

This was done back in 2016.


https://retromini.weebly.com/blog/arduino-speedometer
__________________
Current project 1959 Willys = GEZR TRUK
Geezer is a Latin compound word made up of two roots.
Gee meaning Urine Stain and Zer meaning your pants are open!
FMCDH GBU and GBA
http://www.youtube.com/user/aknovaman/videos
aknovaman is offline   Reply With Quote
Old 01-19-2022, 03:32 PM   #4
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Re: Digital Speedometer, a homebrew idea

OLED life is a concern, the screen will only be on when the key is in run to prolong it as much as possible. I found a test of these screens showing they had over a year of continuous run time in them here: https://hackaday.com/2019/04/23/a-ye...-oled-burn-in/.
Given how much I use the vehicle I'd estimate it will only be on about 50-100 hours a year.

I did come across that Retromini blog a few times in research, but I guess until now I didn't notice how similar it was. Looking at it now, that code could be improved quite a bit by removing the various doubles and floats replacing them with unsigned longs. I'm going to check out this FreqMeasure library though and see if that may be better at reading VSS than the interrupt.
nsocwx is offline   Reply With Quote
Old 01-20-2022, 12:13 AM   #5
Factory Guy
Senior Member
 
Factory Guy's Avatar
 
Join Date: Jun 2019
Location: Midway USA Kentucky
Posts: 566
Re: Digital Speedometer, a homebrew idea

Very nice.

I love the clean photos without the Photobucket logo stamped across them!
Factory Guy is offline   Reply With Quote
Old 01-20-2022, 04:32 PM   #6
Davidf
Registered User
 
Join Date: Nov 2014
Location: Austin
Posts: 749
Re: Digital Speedometer, a homebrew idea

Quote:
Originally Posted by nsocwx View Post
... My first attempt was to try using a speed controlled electric motor to ‘spin’ the speedometer input shaft at the right RPM to pretend to be the transmission. ...
But, wait! Dakota Digital has such a device on the market already and it works awesome. Cost is about $315. ECD-200BT. Fine tuning via your phone (the BT part). Just needs a connection to power, ground, and the VSS signal. Or, you can choose to connect it directly to the OBDII port.
Davidf is offline   Reply With Quote
Old 01-21-2022, 12:33 AM   #7
Billyburban
Registered User
 
Join Date: Nov 2013
Location: Oxnard,ca
Posts: 98
Dude this is super bad ass I need this, So how much to build mine and when can I mail it ?
Posted via Mobile Device
Billyburban is offline   Reply With Quote
Old 01-23-2022, 10:30 PM   #8
bsampson
Registered User
 
Join Date: Jul 2012
Location: Central IL
Posts: 63
Re: Digital Speedometer, a homebrew idea

This is really cool. I’ve been wanting to try something like this myself, but haven’t made it happen. I’ll be trying this in a few months. Thank you for sharing!
bsampson is offline   Reply With Quote
Old 01-24-2022, 01:32 PM   #9
aknovaman
Registered User
 
Join Date: Aug 2013
Location: Tecumseh
Posts: 355
Cool Re: Digital Speedometer, a homebrew idea

more info for the guys wanting to build your own gages for oil and water temp.
it has enough info to get you started and become dangerous.
https://www.instructables.com/Lancas...duino-Project/

and another.

https://www.hondatwins.net/threads/c...-gauge.130878/

And another.

https://www.youtube.com/watch?v=1BZD57Ts6O0&t=0s

Can someone send me a pic or determine the degree swing on the speedo needle cluster?

I can adjust the code to make it work almost as a plug and play.
__________________
Current project 1959 Willys = GEZR TRUK
Geezer is a Latin compound word made up of two roots.
Gee meaning Urine Stain and Zer meaning your pants are open!
FMCDH GBU and GBA
http://www.youtube.com/user/aknovaman/videos

Last edited by aknovaman; 01-25-2022 at 07:26 PM.
aknovaman is offline   Reply With Quote
Old 01-26-2022, 04:50 PM   #10
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Re: Digital Speedometer, a homebrew idea

Quote:
Originally Posted by aknovaman View Post
Can someone send me a pic or determine the degree swing on the speedo needle cluster?

I can adjust the code to make it work almost as a plug and play.

Are you talking about the sweep of the factory gauge? Keep in mind, it is not linear as the E/W positions are compressed compared to the N. The total sweep is 270 degrees pretty much spot on. If you look at my code for the stepper position variables, divide each position by 3 to get the degrees. This is because the stepper has 3 steps per degree.

int out[] = {0,75,155,245,325,408,486,568,658,740,810}; //stepper positions for each 10mph
int in[] = {0,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000}; //each 10mph x 100
nsocwx is offline   Reply With Quote
Old 01-26-2022, 05:34 PM   #11
aknovaman
Registered User
 
Join Date: Aug 2013
Location: Tecumseh
Posts: 355
Re: Digital Speedometer, a homebrew idea

I was not aware of the scale non-linearity; thus why I was asking for a pic of the cluster. Most of the code I have seen is overly complex to perform basic functions. I guess I am to lazy to write complex code. There have been so many improvements over the past several years that it almost seems easy now, OR I may possibly be getting smarter (eyes roll).
__________________
Current project 1959 Willys = GEZR TRUK
Geezer is a Latin compound word made up of two roots.
Gee meaning Urine Stain and Zer meaning your pants are open!
FMCDH GBU and GBA
http://www.youtube.com/user/aknovaman/videos
aknovaman is offline   Reply With Quote
Old 01-30-2022, 10:14 PM   #12
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Re: Digital Speedometer, a homebrew idea

As an update to this thread, I've had some nice weather over the last few days to road test the truck and speedometer project. I finally reached a point of confidence in the speedo that I put the Terminator's screen away that was showing me the speed before.

I did replace the 10k ohm resistor in my diagram with an optoisolator from Amazon to reduce noise, that removed all of the noise so.. score! It connects to +12v and PWM- from the terminator and fires a transistor that cleanly signals the Arduino each pulse without any background noise.


I've also found a few issues with the original code. 1- the multiMap module doesn't work as expected. I was going to re-write that module, but it turned out to be really short and so to make it easy I just embedded it in my code instead of updating that library. 2- counting the VSS pulses isn't very precise at 4k ppm, the easy fixes would be to increase the sample time (jumpy/laggy speedo) or to increase the PPM (not everyone can do that). To fix 2 I added a 2nd file to the Git repo,DigitalSpeedoMode2.ino. This file uses a different method of sampling the VSS where it measures the time between pulses to determine the frequency instead of counting pulses in a known time period. It's a little more complex, but results in a lot higher speed resolution and it's instant.

I'm hoping to get some more of the code nuances ironed out over the next few weeks barring any snow and I'll update with a video once I'm happy with how it looks. Thanks for the support and ideas folks!
nsocwx is offline   Reply With Quote
Old 01-31-2022, 08:57 PM   #13
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Re: Digital Speedometer, a homebrew idea

Quote:
Originally Posted by nsocwx View Post
I'm hoping to get some more of the code nuances ironed out over the next few weeks barring any snow and I'll update with a video once I'm happy with how it looks. Thanks for the support and ideas folks!
Video as promised https://youtu.be/_0MRYaJ2MKI
nsocwx is offline   Reply With Quote
Old 06-27-2022, 08:31 AM   #14
Jbalgiere
Registered User
 
Join Date: Jun 2016
Location: Houston
Posts: 11
Re: Digital Speedometer, a homebrew idea

I’m a little confused about the optoisolator. With a factory ls computer would the vss go to input -? Does the vcc on the optoisolator go to the 5v pin? Any help is appreciated
Jbalgiere is offline   Reply With Quote
Old 02-10-2023, 12:26 PM   #15
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Re: Digital Speedometer, a homebrew idea

Sorry for the delay Jbalgiere. With a factory PCM your output should still be the same type of grounding signal. I was able to verify this by attaching a factory cruise unit to my Terminator VSS out and it works.

The Optoisolator board that I got is this one here. Looking at my circuit diagram, it looks like I showed the original connection to A3 which is wrong. The center OUT pin on the optoisolator should connect to D3. VCC connects to 5v power, could be VCC on your ardiuno. GND is self explanitory. Then on the other isolated side of your isolator you'd connect one pin to 12v vehicle power and the other to your VSS signal wire. The polarity is marked on some of the boards so just know that 12v is + and your VSS is -. I would suggest using the Mode2 code for this since it just works a lot better.



As an aside, I've now been using this speedo for over a year and about 2k miles. Only issue I've had is that the home command for the stepper sometimes leaves the needle a degree off and the speedo may read 1-2mph low for that drive as a result. Fix would be to probably put a stopper for needle to rest against when being put to the home position. The miles are still being recorded accurately though.
nsocwx is offline   Reply With Quote
Old 09-05-2024, 04:32 PM   #16
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 10
Re: Digital Speedometer, a homebrew idea

Thought I'd just throw out an update that I have over 5k miles on this setup and it's still going strong. I made a small code update to help with speedo needle bounce and to save to EEPROM more often when moving, but it works just fine without that too!
nsocwx is offline   Reply With Quote
Reply

Bookmarks

Tags
arduino, digital, electronic, speedometer, terminator


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:15 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 1997-2022 67-72chevytrucks.com