Voltage Based shifter issue

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.
Post Reply
jamies
Posts: 5
Joined: Fri Nov 11, 2011 9:50 pm

Voltage Based shifter issue

Post by jamies »

Lance,

In regards to Ford - voltage based shifter, there seems to be a bug in the code in relation to ADC and manual gear, this seems present on both v2 and v4 code bases and i have replicated it both in the car and on the bench.

Basically using the default thresholds (as they are correct for my vehicle) the voltage reported will be correct, for example 2.5v, however the gear will be bouncing between 3rd and 4th.

There are two logs attached from bench testing, adc.msl is a v2 log and adc_v4 is a v4 log
look at input1 vs manual gear in the logs and you will see what i mean.

I also have a couple other logs from on the car if you want them, showing the same issue.

This happens immediately after a firmware upload and only changing the input parameter to ford voltage based, and no other changes to the default settings

Regards
jamie
adc.msl
2.202
(70.56 KiB) Downloaded 515 times
adc_v4.msl
v4
(155.85 KiB) Downloaded 571 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Voltage Based shifter issue

Post by Bernard Fife »

Jaimie,

I will have a look when I get a chance. I have an initial idea what may be happening, and it should be an easy fix.

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: Voltage Based shifter issue

Post by Bernard Fife »

Jaimie,

Sorry, I forgot about this issue, mostly because it was in the code release thread, which I generally only check when I post new code. I will have a look over the weekend and respond here.

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: Voltage Based shifter issue

Post by Bernard Fife »

Jaimie,

It looks like 3rd is being indicated whenever the voltage is =2.499, so I suspect that's on a threshold, and with rounding, etc. the code is getting confused. I will dig into the code next, and should be able to sort this out fairly quickly. I'm not set up for testing the voltage based shift right now though (the bench is set up for testing the microTCU solenoid driver's right now, and I don't want to interrupt that), so I will likely post some code for you to test.

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: Voltage Based shifter issue

Post by Bernard Fife »

Jaimie,

Here is some code for you to try:
2202_test_only_Monitor.abs.s19
This code smooths the ADC signal whenever the voltage based gear is set (only 1/16th of the change in INI from one sampling to the next is applied), and it assigns a 'dead band' to the ADC count that is considered invalid and ignored. The dead band is set in the code at about 0.05V, but I could easily make this a user defined value if it helps.

So try this, and let me know what you see. If it's not better, I have some other ideas.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
ashford
Posts: 89
Joined: Mon Oct 24, 2011 3:41 pm

Re: Voltage Based shifter issue

Post by ashford »

i was wondering how this would work for a ford as well since they don't have a physical shifter position for 3rd. they have 1-2-D and a switch to disable od. since the inputs for gear position have a 3rd ant a 4th how would this be set up in software? setting them at the same voltage i would assume would cause confusion in software.
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Voltage Based shifter issue

Post by Bernard Fife »

ashford,

It should still work. The code is designed to pick the first gear that matches, so multiple matches are allowed (in theory, it's been a wile since I tested this). I can't recall if the code looks from high to low, but I expect that it does. So the same value for 4th and 3rd would set the lever as 4th.

If it was mine, though, I would probably set the 'missing' gear lever position to an 'out of range' value (one that the lever never outputs). Then you would only have the actual positions as inputs.

Also, recall that the shift lever just sets the highest gear that the code will select in the forward positions. The actual shifting is intended to be done with the sift buttons. So even if you only had D (Drive) as a signal from the lever, you would still be able to shift through all the gears.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
ashford
Posts: 89
Joined: Mon Oct 24, 2011 3:41 pm

Re: Voltage Based shifter issue

Post by ashford »

interesting, i thought they had to be inline voltage wise so the code could figure out "deadband" of gears and make the limits of each inbetween.

on a side note if it does not need to be linear assigning 3rd to 5v would work nice as a failsafe if you lost sensor connection so you would still have 3 forward gears
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Voltage Based shifter issue

Post by Bernard Fife »

ashford,

The code doesn't expect the voltages in any particular order (like ascending or descending). It was done this way to make it as 'generalized' as possible.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Post Reply