Page 1 of 2

ETB or 36/1 performance issue?

Posted: Mon Sep 30, 2019 1:33 pm
by rene325
Hi guys,
I'm also experimenting with ETB, in my setup I use a MC33866 H-Bridge and STM32F407VET6 Black.
I have a mechanical test setup with a 36-1 VR Trigger and a 1 Pulse CAM Trigger.

The ETB function works very well without triggers into the ECU (newest Rusefi firmware from Github), but when I simulate a running engine
i will go haywire when I pass around 3200-3700RPM. The ECU looses connection to Tunerstudio and Run and Comm indicators stops.

First I thought of noise from the ETB motor, but no, this even happends without the ETB motor connected. I traced it to : when I enable
"Throttle pedal Position Channel" in Tunerstudio the firmware goes haywire, even I did not configure any ETB outputs and no ETB connected.

I've made a short video of the issue, I hope one of you have an idea.
My coding skills is limited to Arduinos and old PIC's


Re: electronic throttle body control ETB

Posted: Mon Sep 30, 2019 1:57 pm
by NickZ
sharing a pin with something else?

Re: electronic throttle body control ETB

Posted: Mon Sep 30, 2019 2:07 pm
by AndreyB
do you have a 20x4 LCD to mount and read the message? what timezone are you in?

Re: electronic throttle body control ETB

Posted: Mon Sep 30, 2019 2:35 pm
by rene325
No shared pins.

I'm using PC1 as Throttle Pedal Position Channel, ETB Dir1 : PA15, ETB Dir2 : PC12, ETB Control : PD0

No errors in rusEFI console, which also stops communicating at the same RPM

No LCD connected, but I can connect one up, if that helps debugging.

I'm in CET timezone

Re: electronic throttle body control ETB

Posted: Mon Sep 30, 2019 4:16 pm
by kb1gtt
With out other stuff, can you open and close the ETB fully? I wonder if the higher amps at WOT are causing a ground to pull up and for the command bits to get lost as they might not generate enough voltage.

Re: electronic throttle body control ETB - performance issue?

Posted: Mon Sep 30, 2019 4:39 pm
by rene325
It is probably not any gnd problems, because it does not matter if the ETB is connected.
Without ETB current draw is 175mA, with ETB going from closed to WOT around 1A, at steady state 50% throttle, current draw is around 700mA
Did anyone try to rev and hold their engine at 4000 rpms without issues ?

Re: electronic throttle body control ETB - performance issue?

Posted: Thu Oct 03, 2019 12:41 pm
by AndreyB
Funny thing is that connectivity returns once RPM go down - firmware is not hanging, it's just very unhappy.

This looks to be a software performance issue

Ticket created https://github.com/rusefi/rusefi/issues/965

Thank you Rene for reporting this and the troubleshooting session!

Re: electronic throttle body control ETB - performance issue?

Posted: Thu Oct 03, 2019 1:53 pm
by puff
is it at all related to etb?

Re: electronic throttle body control ETB - performance issue?

Posted: Thu Oct 03, 2019 4:02 pm
by AndreyB
probably not related at all. just highest PWM frequency. same could happen with idle solenoid or vvt solenoid

Re: electronic throttle body control ETB - performance issue?

Posted: Thu Oct 03, 2019 8:52 pm
by puff
not my case?
(I seem to have similar disconnects, but caused by noisy cps signal?)
how did rusefi_no_asserts help rene325?

Re: electronic throttle body control ETB - performance issue?

Posted: Fri Oct 04, 2019 1:19 am
by Abricos
I have MRE ... And no problems ...

Re: ETB or 36/1 performance issue?

Posted: Sat Oct 12, 2019 8:48 am
by NickZ
Ive just been testing my new board and using 36-1 and electronic throttle body upto 6000 rpm with no problems, works great. the only thing i find is trying to get the ETB to follow the pedal, I can only use about 50% of the pedal and it will shoot upto 100% throttle body.

Re: ETB or 36/1 performance issue?

Posted: Sat Oct 12, 2019 11:32 am
by Old Grey
Not that I know anything about it, but does it have a variable ratio activation table, ie, 0-50% on the pedal is 1:1, but 50-100 is 4:1. I know it was common in Supercars, but they did it mechanically with changing rate pulleys.
I don't even know about the sensors or actuators, but is there a mech ratio in the travel of either. ie, is the digital valve reported in the ECU linear with travel.

Re: ETB or 36/1 performance issue?

Posted: Thu Oct 17, 2019 4:11 am
by AndreyB
Let's focus this topic on the 36/1 performance issue, not on ETB settings - ETB settings is a different not trivial subject.

Please try the 36/1 again since we have just made https://github.com/rusefi/rusefi/issues/973 fix

Re: ETB or 36/1 performance issue?

Posted: Sun Oct 20, 2019 10:53 pm
by rene325
I'll try it on monday :)

Re: ETB or 36/1 performance issue?

Posted: Mon Oct 21, 2019 4:52 pm
by rene325
I just testet with latest precompiled binary.
I still have communication loss at 3500 rpms, when pedal sensor channel is active.

Re: ETB or 36/1 performance issue?

Posted: Mon Oct 21, 2019 4:57 pm
by AndreyB
rene325 wrote:
Mon Oct 21, 2019 4:52 pm
I just testet with latest precompiled binary.
I still have communication loss at 3500 rpms, when pedal sensor channel is active.
It looks like you are confident that this is related to ETB while our theory was that this only relates to trigger shape and trigger type, regardless of ETB.

Can you please change from 36/1 trigger to "one tooth" trigger and use self-stimulation 5000 RPM? I wonder if things would change if much simpler trigger shape is used.

Re: ETB or 36/1 performance issue?

Posted: Mon Oct 21, 2019 9:04 pm
by NickZ
I believe rene325 problem is hardware related, mine is running fine 36-1 all the way to 6000 rpm. it will be a noise issue with the hardware.

Re: ETB or 36/1 performance issue?

Posted: Mon Oct 21, 2019 9:45 pm
by rene325
I can't justfy it as a noise problem. on the oscilloscope I have a super clean signal from the max9926. All problems disappear when disabling pedal sensor channel. Then it easily go to 9000 rpm. To test noise sensivity I did run it with 4 injectors and 4 coils connected om my workbench ,
No change, even with All close to the board (2-3 cm)
I Will test with one pulse like Andrey suggested
and report back

Re: ETB or 36/1 performance issue?

Posted: Mon Oct 21, 2019 10:11 pm
by Abricos
Pedal ...
Do you have chance chenget potenciometro ? And how many oms your potentiometer ???

Re: ETB or 36/1 performance issue?

Posted: Mon Oct 21, 2019 10:32 pm
by AndreyB
rene325 wrote:
Mon Oct 21, 2019 9:45 pm
All problems disappear when disabling pedal sensor channel. Then it easily go to 9000 rpm.
Please post your CurrentTune.msq file

Please try increasing your ETB control period to 100ms and lowering your ETB PWM frequency to 10Hz.

I am still wondering if that's some kind of performance related issue, so I am trying to lower the CPU usage associated with ETB by having longer PID cycle and longer PWM cycle.

If it the same behavior on "debug" and "no_assert" versions of the firmware? You are using stm32f407 right?

Re: ETB or 36/1 performance issue?

Posted: Tue Oct 22, 2019 5:48 am
by NickZ
im currently running 300hz and 50ms
Screen Shot 2019-10-22 at 4.47.21 pm.png
Screen Shot 2019-10-22 at 4.47.21 pm.png (125.73 KiB) Viewed 4649 times
and running the standard firmware version.
A little video.

Re: ETB or 36/1 performance issue?

Posted: Wed Oct 23, 2019 8:26 am
by rene325
Yes I'm using STM32F407VGT6 as a processor.
This i what I have tested :
36-1 Trigger Wheel - Standard firmware
PWM Frequency : 500Hz
Control period : 10ms max RPM before loosing comms : 3370
Control period: 100ms max RPM before loosing comms : 3650
Control period: 1000ms max RPM before loosing comms : 4650
PWM Frequency : 10Hz
Control period : 10ms max RPM before loosing comms : 3650
Control period : 100ms max RPM before loosing comms : 3910
Control period : 1000ms max RPM before loosing comms : 5390

36-1 Trigger Wheel - No Asserts firmware
PWM Frequency : 500Hz
Control period : 10ms max RPM before loosing comms : 7000
Control period: 100ms max RPM before loosing comms : 7600
Control period: 1000ms max RPM before loosing comms : 8800
PWM Frequency : 10Hz
Control period : 10ms max RPM before loosing comms : 7075
Control period : 100ms max RPM before loosing comms : 8200
Control period : 1000ms max RPM before loosing comms : 9200

I certainly seems like a performance issue.
All test are made with a real Trigger Wheel and VR sensor, with ETB disabled, all firmware versions easily runs to 16000 rpm


CurrentTune.msq included

NickZ could you send me your tune to test ?

Re: ETB or 36/1 performance issue?

Posted: Wed Oct 23, 2019 11:35 am
by NickZ
i could send you my tune but my hardware is way different to yours and none of my pinout will match. My whole brain board is the ecu all custom.
CurrentTune.msq
(135.75 KiB) Downloaded 96 times

Re: ETB or 36/1 performance issue?

Posted: Wed Oct 23, 2019 11:56 am
by NickZ
I see im using a different H bridge, im using a VNH2sp30 where I have on or off for directions and a PWM signal, your PWM is coming from the Direction outputs only. from what i can see from your video.

Re: ETB or 36/1 performance issue?

Posted: Thu Oct 24, 2019 1:54 am
by AndreyB
rene325 wrote:
Wed Oct 23, 2019 8:26 am

Control period: 100ms max RPM before loosing comms : 3650
Control period: 1000ms max RPM before loosing comms : 4650
...
Control period : 100ms max RPM before loosing comms : 3910
Control period : 1000ms max RPM before loosing comms : 5390
...
with ETB disabled, all firmware versions easily runs to 16000 rpm
Thank you for quality data! I cannot explain this but your data is definitely showing that ETB is somehow blocking CPU for too long to cause problem.

I hope to look into this in a few days / maybe weeks :( Because life. But the data is very convincing and valuable, really appreciate it!

We have a know performance issue https://github.com/rusefi/rusefi/issues/974

@mck1117 has made progress on profiling tools but we need to wait for him to document his process under https://github.com/rusefi/rusefi/issues/972

Re: ETB or 36/1 performance issue?

Posted: Fri Oct 25, 2019 10:09 am
by rene325
Thanks NickZ for the CurrentTune.msq
My H-Bridge are wired so it can use both modes.

I had a bit of an ??? experience. I loaded Nick's tune and rewired my brainboard.
Funny thing is, it now without any problems runs 8500 RPM's with standard Firmware and running ETB.

I guess some configurations can upset the firmware

Re: ETB or 36/1 performance issue?

Posted: Fri Oct 25, 2019 1:12 pm
by AndreyB
rene325 wrote:
Fri Oct 25, 2019 10:09 am
Funny thing is, it now without any problems runs 8500 RPM's with standard Firmware and running ETB.
is it sequential VS batched injection by any chance? Or can you do the analysis of config differences?

Re: ETB or 36/1 performance issue?

Posted: Sat Oct 26, 2019 11:16 am
by rene325
NickZ are running wasted spark and batch injection. I tried to change to sequential injection and individual coils. I realized it is not possible with 36-1 as crank and 1 pulse on cam. I used cam signal as primary and crank signal as secondary, no ignition and no injection.
I selected 1/60-2 instead and i got ignition and injection, but of course only at half the speed.
If I use 36-1 without Cam I got ignition and injection, but the phase of the engine is random.

Trying different settings, I also got this setup to loose comms at 3500rpms. If I go to Base Engine ->Trigger ->Print verbose sync details >true

Re: ETB or 36/1 performance issue?

Posted: Sat Oct 26, 2019 11:47 am
by rene325
And the difference between my and NickZ's pinout:
My Pinout NickZ Pinout
MAP PA0 PA0
CLT PC2 PC2
IAT PA4 PC1
VBatt PC4 PC4
TPS PA3 PA2
E-Throttle PC1 PC3
CRK PA5 PC6
CAM PC6

injector 1 PE0 PE6
injector 2 PE1 PE5
injector 3 PB8 PD7
injector 4 PB9 PC13
injector 5 PB7 PE3
injector 6 PB3 PE4
injector 7 PB5 PD6
injector 8 PD7 PE2

Ignition 1 PA8 PC9
Ignition 2 PC7 PC7
Ignition 3 PC8 PE14
Ignition 4 PD13 PE12
Ignition 5 PD10 PE10
Ignition 6 PD11 PE8
Ignition 7 PD12 PE9
Ignition 8 PD9 PD8

F Pump PD4 PD10
Fan PE5 PD11

Warning LED PE14 PD15
Comms LED PE7 PD13
Running LED PE9 PD12

CAN RX PB12 PB12
CAN TX PB6 PB6

SPI2 MOSI PB15 PB15
SPI2 MISO PB14 PB14
SPI SCK PB13 PB13

ETB#1 Dir#1 PA15 PC5
ETB#1 Dir#2 PC12 PB0
ETB#1 Control #1 PD0 PC12

CJ125_CS PE15 PE15
HIP9011_CS PB0 PB1
HIP9011_IntHold PB11 PB11
HIP9011_Output PC0 PC0