Speedo out erratic

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Speedo out erratic

Post by tobmag »

Lance.

This is a thing I spotted arlier this autumn but didnt pay so much attention to since I had a lot of other things ongoing....

Problem is that I cant get the speedo to run to more then 160kph, I thought it was related to the compatability of the out put signal and a 30 year old Electronic speedo.

This is not the case and what I can see looking on the speedo signal is that the duty cylcle jumps all over the Place, I have attached some scope shots displaying this.
The higher the frequense the worse it gets and at 160kph my speedo starts going back wards....
I have a tacho for diesel Engines laying here so I tested that one as well, this particualr gauge uses the "W" signal from the generator so it also frequense based, same thing here workes up to a sertain level and then it whent back wards as well.

As you see my scope has problem picking up the frequncy as well...

Running latest 4135 code.

BR//Tobmag
Attachments
ok duty cycle
ok duty cycle
Image3.png (9.86 KiB) Viewed 10937 times
poor duty cycle
poor duty cycle
Image1.png (9.92 KiB) Viewed 10937 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out erratic

Post by Bernard Fife »

Tobmag,

Sorry, I got pulled away on other urgent projects. I know I already answered, but that is one of the 'missing posts' we have experienced lately. What is the ratio of your input pulse/mile to the output pulse/mile? It has to be fairly high to work properly, this is explained here: http://www.msgpio.com/manuals/mshift/V41tune.html#su Can you post your MSQ?

However, it certainly isn't impossible that the cod is losing track of the count internally, so I will try to have a look at the code shortly.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out erratic

Post by tobmag »

Hi Lance.

It actually looks like the signal on SP1/SP2 in PWM mode, remember?

Attached my .msq

BR//Tobmag
Attachments
CurrentTune.msq
(45.38 KiB) Downloaded 724 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out erratic

Post by Bernard Fife »

It actually looks like the signal on SP1/SP2 in PWM mode, remember?
Tobmag, Yeah, it would look like SP1/SP2 since they are handled in the same bit of code in the same manner (though I don't remember exactly what your are referring to - is it something that came up recently, or are you referring to an older problem?). Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out erratic

Post by tobmag »

Lance.

As far as I remenber I noticed this in May or June last year on the Speedo.

There is no problem today with SP1/SP2 in pwm mode after you fixed the code for that.
Thing is that the speedo out today looks like the pwm signal did before your fix.

BR//Tobmag
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out erratic

Post by Bernard Fife »

Tobmag,

Okay, that's good to know, it will help narrow things down.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out erratic

Post by Bernard Fife »

Tobmag,

I have looked at this in some depth, but without much success.

In my testing, the signal out is somewhat irregular at the highest speeds, due to the granular nature of the count (for the default parameters, one gets two short pulse than a long one (about 30% longer than the short ones), then two short pulses, then a longer one, etc.) But the frequency over any three cycles is correct.

In your case, I don't think the condition above is the issue, and I wonder if the filtering is removing edges at the highest speeds, and this is causing missing edges? You could try loosening the filter conditions slightly (5% or 10%) to see if that helps at all (http://www.msgpio.com/manuals/mshift/V41tune.html#gv).

Also, what is the desired ratio of your input (VSS) signal, the the speedo output signal? There are limitations on this, see: http://www.msgpio.com/manuals/mshift/V41tune.html#su (I know you know this, but I mention it for others that stumble on this thread later.)

Do you have any options for this (i.e. many aftermarket speedometers can take a user settable pulse/mile signal, for example)?

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out erratic

Post by tobmag »

Lance.

Done some testing now on the bench using my signal generator.

Tested changes in the filtering and out put pulses but no changes.
Speedo still just go up to 140kph and then starting working backwards.

My speedo is very stable and liniear, did some test directly with the signal generator and is then working fine!
65kph at 90hz
130kph at 180hz
260kph at 360hz

Tested with a sine wave and then swapped over to square vave to simulate the GPIO signal and then started to play with the duty cycle.
My speedo is working down to a duty cycle of 10% but will stop working as soon as the duty cycle is over 60% !!


I then tested my tacho I have laying that is for diesel engines, signal used for that one is the "W" signal on the generator so its also sine wave.
This one showed the same behavior connected to the GPIO, starts going backwards at a sertain point.
Tested this one as well directly on the signal generator with the square wave and this one will stop working at a duty cycle of 70% !!

So I assume that something goes wrong with the output signal from the GPIO giving a way too high duty cycle at higher frequenses.


BR//Tobmag
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out erratic

Post by Bernard Fife »

Tobmag,

Yeah, the more I think about this, the more I think that something isn't quite right with the code. The 'designed' duty cycle is 50%, but I will make this a user option (so the user can set the target DC). The 50% design value is close to the 60% max your speedo can use, and that value can vary somewhat at high speeds, so it might be part of the problem. I will work on this.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out erratic

Post by tobmag »

Thanks Lance

Also just to make it clear that my speedo is a old electronic style that has a VR sensor hooked into it directly in the car....


BR//Tobmag
Post Reply