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, 03:44 PM   #51
nsocwx
Registered User
 
nsocwx's Avatar
 
Join Date: Jan 2022
Location: NE
Posts: 9
Re: Mechanical speedometer drive solution

I found an encoder motor on amazon and removed the 10:1 transmission from it to get a 6000RPM motor. After finding that didn't quite have enough torque I made a 4:1 gear for it, but the noise was pretty intense as I don't think it was perfectly round. This motor in particular does 12 pulse per rotation, 120 if you leave the transmission on.

I see what you mean about the VSS signal, it seems like you're kinda stuck on that. In my case I'm reading a 4000 PPM signal from a Holley Terminator and the low speed resolution of that seems to be acceptable. It's a PWM- output so I'm having to use a pull-up resistor circuit and interrupt on the descending change (this thread). I do notice some jitter where one cycle may catch 1 more pulse than another changing the speed by a few MPH. On that front I might suggest calcautating the frequency given method 2 shown here in the video. They count millis between pulses to calculate the frequency immediately and it can be updated with every pulse.

Funny that you mention the LM2907 I just came across that in my research today. I was having an issue understanding how you might calibrate the readings from that device and I also didn't see any prebuilt PCBs. I'm also not reading directly from a sensor.
nsocwx is offline   Reply With Quote
Old 01-18-2022, 05:16 PM   #52
Second Series
Registered User
 
Second Series's Avatar
 
Join Date: May 2015
Location: Tukwila Washington
Posts: 371
Re: Mechanical speedometer drive solution

Thanks for the links, nsocwx, that’s quite a bit of information to digest. It looks like you have a working solution. I’ll be using a DRAC, and I found that when I connected the speedo driver to my ’90 chevy on the 2kppm line to the ECM it may have caused problems with the ECM, I’m not sure, it seemed hard to start. The 128kppm signal goes to the RWAL module so I’m less concerned with that. I could use any of the signals as there is a dedicated line for the speedo on the DRAC module. The LM2907 is set for operating range with a capacitor. The output is a voltage, for my Arduino I don’t want to go above 5v, so I use a 5v supply. The output is 0 to 3.98v with 3.98v at 4kHz with a 2200pF cap. The voltage is fed to an Analog in and scaled to 1023. This is read every iteration. There was some fluctuation so I add the reading to itself for a number of iterations and then divide by that number and get a smooth reading. The 0 to 1023 value is converted to the input frequency through an equation.

I just got that working by itself last week, and will set one up for the optical frequency and then implement both in the main code. I’m using a bench signal generator for now, eventually I’ll try it with the vehicle signals. I want to get away from using interrupts. I could also use the chip registers to count frequency, but that’s a whole other can of worms I’ll avoid for now. The issue is with reading more than one frequency. The motor encoder is one frequency, and the control signal is another frequency. I don’t know if using registers will work with more than one frequency input.
__________________
'47 Panel to '88 K2500 Frame Swap
Mechanical Speedometer Drive Solution
1947.2 1 ton Chevy Panel
1955.2 Chevy 6700 Bus/RV
1990 Chevy K1500
Second Series is offline   Reply With Quote
Old 05-13-2022, 03:06 PM   #53
Second Series
Registered User
 
Second Series's Avatar
 
Join Date: May 2015
Location: Tukwila Washington
Posts: 371
Re: Mechanical speedometer drive solution

I have been experimenting with frequency counting. I tried a hardware solution with a frequency to voltage convertor I.C. the LM2907. I tried a software solution using the Arduinos internal registers.
A fair amount of mathematical acrobatics is required with the LM2907. The control frequency is fed into the LM2907(35Hz to 2844Hz). The LM2907 outputs a voltage(0.02v to 2.16v). That voltage is scaled in the software to a value the Arduino can use(3.6/1023.0). That value is counted and divided by the count to get a smooth average. That average is run through a polynomial equation to get a close match to the control frequency.
The LM2907 solution requires about 20 counts to transition from one frequency to the next when read each iteration of the code. Adding the readings 200 times and then dividing by 200 gets a smooth result, but perhaps discarding the first 20 reads after a change in input is detected would be more accurate and counting would not be required. Even at that, the code iterates 200 times in 54mS.
The Arduinos internal registers can be used for counting frequency with the expense of disabling the millis function. This is not a problem as timing requirements can be based off the register timer. The register timer uses interrupts. Since I was using interrupts for the optical disk, I set up one register counter for the control frequency. The two different interrupt routines did not appear to interfere with each other.
The use of a register counter appears to be more accurate. That may be due to the direct nature, and the lack of mathematical acrobatics. The accuracy seems to degrade below a 200mS sample time, so the hardware solution would appear to be faster.
So far I have been experimenting with the use of a signal generator for both the control frequency, and the optical disk frequency. The next step is to implement both counter types connected to the speedometer. I have also acquired an FET to drive the motor instead of the BJT that I had originally used. I’m building two circuit boards, one for each system. I’ll have to calibrate the code for each and see which one performs the best.
All this because I’m going from using the 2,000 pulse per mile signal to using the 128,000 pulse per mile signal. After I get the frequency counting situated, I will work on getting a smoother needle response.
__________________
'47 Panel to '88 K2500 Frame Swap
Mechanical Speedometer Drive Solution
1947.2 1 ton Chevy Panel
1955.2 Chevy 6700 Bus/RV
1990 Chevy K1500
Second Series is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 02:30 PM.


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