For anything you'd like to see added to Speeduino
User avatar
By PSIG
#38969
evo_lucian wrote: Fri Nov 08, 2019 4:35 am I have always felt that first step in traction control should be ignition retard and followed by cutting of cylinders if it really gets out of hand. Cutting 1 out of 4 cylinders is an automatic 25% reduction in power.
Correct, and why you may want to expand the range simply, by adding more "n" as I outlined. ;) Well, you're sort-of correct, as 1/5 would be a 20% reduction. Using 1/33 would give an average 3% reduction. 1/17 for 6%. 1/9 in my 2nd example for 11%. Dial-in what you need and works best for your steps, as you could freely adjust both the amount and steps of reduction. Tune it.
warhead wrote: Fri Nov 08, 2019 1:43 pm That's right!. Would have a retard limit or something and if its not enough, could be used rolling cut or progressive cut and hard cut if its necessary depending user's config.
Here's the reason for the optional 1/n alternative — retard works well for reducing power, but also dumps-in a lot of heat. For the racer in the video it's fine, as he's using much better fuel than most of us on the street. For streeters using det-limited pump gas, randomly dropping a load of heat into a system that is already on the edge of the fuel's capabilities can trip them into detonation or preignition. For those users, progressive power-reduction is a safer alternative without the risks that retard can bring.

Use the one that fits your application.

David
By Falcao
#38971
warhead wrote: Fri Nov 08, 2019 10:08 pm Sorry i didn't mention about tunerstudio. That part was copied from other variables, there i learned how works .ini file. I edited it, adding my variables to config pages. Its a great Josh's job, because its all organized and easy to understand. Open the attached .ini and look for "SLIP" or "SPEED" and you will see what i've done.
Oh thank you very much ! Thank you for sharing your work, I will look at your .ini and try to add my own speedometer function 😅
User avatar
By Fera
#40326
warhead wrote: Fri Nov 08, 2019 9:43 pm As simple as this (for now!):

//INTERRUPTS
void vsssetup() {
pinMode(20, INPUT);
attachInterrupt(digitalPinToInterrupt(20), vssdriven, RISING) ;
pinMode(21, INPUT);
attachInterrupt(digitalPinToInterrupt(21), vssundriven, RISING) ;
}

//TOOTH TIME VSS1
void vssdriven()
{
unsigned long dtime2 = currentStatus.dtime1;
currentStatus.dtime1 = micros();
currentStatus.dvsstime = currentStatus.dtime1 - dtime2; //tooth time
}

//TOOTH TIME VSS2
void vssundriven()
{
unsigned long utime2 = currentStatus.utime1;
currentStatus.utime1 = micros();
currentStatus.uvsstime = currentStatus.utime1 - utime2;//tooth time
}

//SPEED
void speedcalc() {
float temp = 60000000 / (currentStatus.dvsstime * configPage2.dvssteeth);
currentStatus.dvsspeed = (temp * configPage2.dvssdiameter * 0.0018846); //dvsspeed=(rpm*diameter*3.141592*60)/1000000;
float temp2 = 60000000 / (currentStatus.uvsstime * configPage2.uvssteeth);
currentStatus.uvsspeed = (temp2 * configPage2.uvssdiameter * 0.0018846);//uvsspeed=(rpm*diameter*3.141592*60)/1000000;

//SLIP
currentStatus.slip = 100 * (temp - temp2) / temp2; //veldif = 100 * (veldriven - velundriven) / velundriven ; //%
if (currentStatus.slip < 0)currentStatus.slip = 0;
if (currentStatus.slip > 255)currentStatus.slip = 255;
}

speedcalc() is executed each 100ms (inside 100ms loop)

Hi, I'm very interested. Would you like to share the code?
User avatar
By MaxRothery
#55613
warhead wrote: Fri Nov 08, 2019 9:43 pm As simple as this (for now!):

//INTERRUPTS
void vsssetup() {
pinMode(20, INPUT);
attachInterrupt(digitalPinToInterrupt(20), vssdriven, RISING) ;
pinMode(21, INPUT);
attachInterrupt(digitalPinToInterrupt(21), vssundriven, RISING) ;
}

//TOOTH TIME VSS1
void vssdriven()
{
unsigned long dtime2 = currentStatus.dtime1;
currentStatus.dtime1 = micros();
currentStatus.dvsstime = currentStatus.dtime1 - dtime2; //tooth time
}

//TOOTH TIME VSS2
void vssundriven()
{
unsigned long utime2 = currentStatus.utime1;
currentStatus.utime1 = micros();
currentStatus.uvsstime = currentStatus.utime1 - utime2;//tooth time
}

//SPEED
void speedcalc() {
float temp = 60000000 / (currentStatus.dvsstime * configPage2.dvssteeth);
currentStatus.dvsspeed = (temp * configPage2.dvssdiameter * 0.0018846); //dvsspeed=(rpm*diameter*3.141592*60)/1000000;
float temp2 = 60000000 / (currentStatus.uvsstime * configPage2.uvssteeth);
currentStatus.uvsspeed = (temp2 * configPage2.uvssdiameter * 0.0018846);//uvsspeed=(rpm*diameter*3.141592*60)/1000000;

//SLIP
currentStatus.slip = 100 * (temp - temp2) / temp2; //veldif = 100 * (veldriven - velundriven) / velundriven ; //%
if (currentStatus.slip < 0)currentStatus.slip = 0;
if (currentStatus.slip > 255)currentStatus.slip = 255;
}

speedcalc() is executed each 100ms (inside 100ms loop)
Sorry to revive this now 3 year old thread, it would this work for a speedometer output? I plan on using a digital-input speedometer and having trouble understanding how to make a speed signal output.
User avatar
By pazi88
#55615
MaxRothery wrote: Wed Mar 02, 2022 9:04 am Sorry to revive this now 3 year old thread, it would this work for a speedometer output? I plan on using a digital-input speedometer and having trouble understanding how to make a speed signal output.
Why aren't you directly putting the input to the speedometer and why you need to get it through speeduino?
User avatar
By MaxRothery
#55674
pazi88 wrote: Wed Mar 02, 2022 10:45 am
MaxRothery wrote: Wed Mar 02, 2022 9:04 am Sorry to revive this now 3 year old thread, it would this work for a speedometer output? I plan on using a digital-input speedometer and having trouble understanding how to make a speed signal output.
Why aren't you directly putting the input to the speedometer and why you need to get it through speeduino?
I thought that’s what you did? The car I took the engine out of ran the speedo through can-bus (Standard Corperate Protocall Network??) by the looks of the wiring diagram so I was just using that as an example that the speed sensors have to run into the ECU.

I’d read a post about using a Megasquirt ( I know it’s not the same) as a “speedo healer” to correct a speedometer input to be more accurate when you change tyre sizes did ratios etc. this was for an MX5 and it uses a small generator to measure speed via frequency. The speed sensor I have in my gearbox is more like a VR sensor.

The MX5 sensor puts out around 22Hz at 10mph but my sensor is around 140Hz at 10mph so I was going to use the speeduino to correct that 140Hz down to 10Hz to use an MX5 speedo.

oh well, that’ll teach me to assume things like that. Thanks for the heads up

Hi, I am trying to assign Signed values to the x-a[…]

Vr Conditioner Noise when cranking

New version 202305 don't fix the issue. Now after[…]

blitzbox

I've finally figured out why MAP and Lambda weren'[…]

Hello, I bring news!! Let me tell you that after […]

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