What is the shftBut field in datalogs?

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.
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

What is the shftBut field in datalogs?

Post by Addicted »

What is the field shftBut?

I'm tracking down an intermittent fault where the trans downshifts unexpectedly. I think I've tracked it to noise on shftBut.

The noise is always there, only 0.005v, which causes no issue. But when it sees 0.01v it causes a downshift.

I can't see an explanation for the field in the manual..
Attachments
2015-03-02_11.48.06.msl
(689.34 KiB) Downloaded 448 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: What is the shftBut field in datalogs?

Post by Bernard Fife »

Addicted,

shftBut is the state of the ADC connected shift button in the datalog (only the downshift button is connected to an ADC pin, the upshift button is connected to a timer pin). It is taken from the internal variable butADC which is the shift button voltage (derived from the ADC count).

The shift button voltage uses different voltages on the same input to sense a button being pressed (as opposed to the default input of 2 grounding switches).

Are you using the voltage based shift buttons or the digital inputs (under Shift Input Patterns -> Lever and Shift Buttons Configuration -> Shift Button Mode)?

- If you are using 'Discrete Voltages', you might need to adjust the voltage levels specified on that menu.

- If you have selected 'Grounding Switches' for the shift button mode then:
-- there may be a problem with the digital voltage threshold setting. The default is 0.998 Volts (i.e. less than 0.998 volts is grounded, more than 0.998 V is ungrounded). You might try setting it higher, OR
-- if that doesn't help there may be an issue with the code, so let me know and I will fix it asap.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: What is the shftBut field in datalogs?

Post by Addicted »

Hi Lance,

I'm using Digital Switches (GM) with digital voltage threshold of 0.998v. Shift button mode = grounding switches, Shift button polarity = active high

So shftBut is monitoring (what I have set as) the downshift button? so that if I was using discrete voltages I could use that field to monitor the voltages? OK, cool.

I'll take a look at my hardware to see if I'm letting the input float. If I select "active high" is the input not tied to ground internally?

Martin

P.S I cannot see any other event in the datalog that corresponds with the downshift, its doing it at 20mph in second and downshift to first is a whole column of bins away at 10mph (I have a 15mph column populated with second in between)
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: What is the shftBut field in datalogs?

Post by Bernard Fife »

Martin,

Yes, that shfBut field is telling you what the controller thinks the voltage is on the downshift button, even when using it as a digital input.

No matter which polarity you select, the pin is not tied to ground internally. Instead the pin has a pull-up circuit, and is grounded by the switch.

The difference between the polarities is that when it is 'active low' then grounded (i.e. <0.998 V, in this case) is considered as a shift request if the voltage level is zero, and when it is 'active high' then 'ungrounded' (i.e. >0.998V, in this case) is considered as a shift request. In both cases the switch must ground the circuit externally.

However, there can be quite a number of causes of unexpected downshifts. These can relate to under-rev settings, decel settings, etc., etc.. But the association of such shifts with the shfBut and Dreq (downshift request) in your datalog seem to support your theory. However DWN (the variable to indicate the DWN shift button digital status) doesn't change so there may be something wrong in the code, and I will have a look.

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: What is the shftBut field in datalogs?

Post by Bernard Fife »

Martin,

On second look, it looks like the downshifts I see are associated with the end of hysteresis periods as well.

If you bring up the target gear (tGear) and hyst channels of the datalog together, you'll see that the target gear from the table changes, a shift happens, and then further shifts are locked out until the hysteresis conditions are met.

However, once they are met (a sufficient change in speed or load) then the shift happens, unexpectedly.

So you might want to review your shift hysteresis settings ( http://www.msgpio.com/manuals/mshift/V5tune.html#gs ). You might also want to look at your TCC hysteresis settings ( http://www.msgpio.com/manuals/mshift/V5tune.html#nt ), and the TCC unlocking can cause a shift too, if not tuned in quite right (TCC hysteresis counter is TCChyst in the datalog)

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: What is the shftBut field in datalogs?

Post by Addicted »

Lance wrote:Martin,

No matter which polarity you select, the pin is not tied to ground internally. Instead the pin has a pull-up circuit, and is grounded by the switch.

Lance.
Are you refering to the external pullup circuit built on the GPI circuits? Or an internal pullup? (I suspect you mean the external circuit but can you confirm, I suppose I could check for voltage at the processor pin..)

I'm using a http://proto-pic.co.uk/simple-rf-m4-rec ... tary-type/ to control upshift, its details suggest that its outputs are normally low, but I suspect they may be floating.. I simply have this connected without a pullup (just a 1K in Ra to protect the processor)

(I have hacked the keyfob transmitter and mounted it within the steering wheel hub with membrane switches on spokes of steering wheel)
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: What is the shftBut field in datalogs?

Post by Bernard Fife »

Addicted,

The 5V pull-up resistor for the downshift button is R25 on the GPI5 circuit. The internal pull-ups (within the microprocessor) are disabled for this pin for both the GPIO and microTCU.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: What is the shftBut field in datalogs?

Post by Addicted »

OK cool, the RF unit provides 5v or floating so I'll fit some 10K pull downs..
Addicted
Posts: 188
Joined: Mon Oct 14, 2013 7:14 am
Location: Winchester, England

Re: What is the shftBut field in datalogs?

Post by Addicted »

I've added some 10K pulldowns, the noise is still there, but the random downshifts in 2nd have gone..

What has become clear is that 4th gear doesn't work without TCC engaged so I need to ensure its always engaged.
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: What is the shftBut field in datalogs?

Post by Bernard Fife »

Addicted,

Do you mean that the transmission itself won't stay in 4th with the TCC engaged (i.e. the target gear and current gear are shown as 4, but the actual gear is 3), or that the controller is commanding 3rd when it should be commanding 4th (in which case an MSQ file and datalog would be helpful).

BTW, you can force the TCC to engage in 4th using the Full-Time Lockup settings as described here: http://www.msgpio.com/manuals/mshift/V5tune.html#nt

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