For any add-on boards such as VR conditioners, optos and OEM interface boards
User avatar
By digmorepaka
#56704
As many other people I've been impressed with the simplicity of DStage's ETC controller viewtopic.php?f=15&t=4952. However nothing is without it's flaws, major benefit of this approach is it's reliability and ease of testing, major drawbacks are much more complex to integrate non-linear safety modes, lack of secondary position sensor utilization, and lack of non-linear pedal against throttle mapping.

Which is what inspired me to revive El domino's ETC_Control project as all of the core functions were already implemented. My changes are all on my github in the DBW-Control repo.

Current stage of the project is that i have implemented the things that were missing for me, and now require testing on an actual engine. After which I can fine tune these features and begin code cleanup and UI improvements. I have a prototype PCB on the way from china.


If you have any questions, suggestions, or improvements(quite welcome as I'm not a very good programmer, and you will find a good number of spaghetti code) you are welcome to post them here or in the issues/pull requests section.


This is still WIP, if you absolutely need drive by wire on something critical you should consider DStage's controller or an ECU like rusEFI that already has this functionality
User avatar
By digmorepaka
#56833
Up and running! Surprised that I didn't need to add any jumpers or mods other than serial, I ran out of low profile screw terminals so the USB doesn't fit with fullsized ones. I made an error during assembly, flipped the 5V rail zener and swapped around a R5 R6 pulldown and current limiting resistor. Other than that it is functioning.
IMG_20220507_124355.jpg
IMG_20220507_124355.jpg (3.07 MiB) Viewed 6999 times
https://youtube.com/shorts/eQ75ckjJfNY
By JHolland
#56838
Does that code work? this looks highly suspect:

throttlePID.Compute(); // compute PID based correction
analogWrite(HB_PWM,(Output)); // uses the base duty and adds a correction factor with PID
That looks like it just outputs the value from the PID algorithm, unless the PID code is not the standard Arduino library code.
#56840
JHolland wrote: Sat May 07, 2022 5:25 pm Does that code work? this looks highly suspect:

throttlePID.Compute(); // compute PID based correction
analogWrite(HB_PWM,(Output)); // uses the base duty and adds a correction factor with PID
That looks like it just outputs the value from the PID algorithm, unless the PID code is not the standard Arduino library code.

This is the library in use. https://github.com/br3ttb/Arduino-PID-Library Original project used it and it seems to be working fine so far, if there's any benefit to changing over to the standard one I am completely open to it!
By JHolland
#56843
That can't work - the output from the PID algorithm should feed into the motor control algorithm. The motor control algorithm should increase or decrease the PWM value proportional to the error value, you can't use the output from the PID algorithm directly because as you approach the setpoint the error will reduce but you want your PWM to increase if you're driving the motor open.
#56844
JHolland wrote: Sat May 07, 2022 8:58 pm That can't work - the output from the PID algorithm should feed into the motor control algorithm. The motor control algorithm should increase or decrease the PWM value proportional to the error value, you can't use the output from the PID algorithm directly because as you approach the setpoint the error will reduce but you want your PWM to increase if you're driving the motor open.
If I understand it right(I have not touched the PID at all),
Code: Select all
//Define the PID controller
double Input, Output, SetPoint;
PID throttlePID(&Input, &Output, &SetPoint, kP, kI, kD, DIRECT);

This is where it's set that that is the output of it, and then when compute is ran it spits it out.
https://github.com/br3ttb/Arduino-PID-L ... v1.cpp#L85
By flex-ALE
#56845
I had fun integrating the ETB controller into the speeduino code. it has been working for 1 year on a 1.8T 20vt WAG.
my starting idea is to use the idle valve pwm clock as it will not be used in this case.
assign open and close and pwm switching outputs.
then add 3 analog inputs in addition to the tps. the processor just drives a vnh2sp30.
I therefore have 2 reverse inputs for reading the pedal and 2 reverse inputs for the throttle position feedback.
analog position offsets are configurable in tunerstudio with feedback from new gauges.
I control my movement with different settings of the pid which is also configured in tunerstudio.
and checks the deviation of the positions formatted for a possible ETB fault with status indicators in tunerstudio and activation of the engine protection.
for safety the TPS channel which is used for injection is the final instruction of the pedal, if the butterfly remains nevertheless open despite the pedal released the dfco will cut the injection in addition to the securities that I have put.
I can change the pwm frequency, I work at 3khz. I always use idle to make an idle setpoint which is an addition of the minimum setpoint. such as 0-100% idle = 0-10% setpoint.

the control of a motorized butterfly is particular because there are 2 internal springs. one is 8% in opposition to the close and the other is in opposition to the open. a simple PID will not work properly. the direct and reverse PID must be adapted according to the position status.

nice first of all, i read all that crap months a[…]

I rewired a few grounds and tested the TPS and rel[…]

Thanks, car runs great now !!! Going to drift even[…]

sauver moteur v8

bonsoir je m appel jean marie et j habite en Franc[…]

Still can't find what you're looking for?