Firmware live stream happening this weekend: viewtopic.php?f=13&p=43195
For anything you'd like to see added to Speeduino
By jrbe
#38743
Don't forget, pulling timing dumps huge amounts of heat into the engine, coolant, and exhaust.
Depending on how the engine is setup, skipping injection pulses or ignition events might be a better choice. Skipping ignition events can be troublesome though too.
A potentiometer on the dash, 1% -15% or so allowed slip could make your setup an instant drifter.
By evo_lucian
#38745
warhead wrote:
Wed Oct 23, 2019 1:41 pm
Thanks to all, i've been looking for how megasquirt reads VSS and does traction control. Parameters needed are these:

Image

I will try to code something like that, but first, with only a VSS input and then see if it is useful. If i get something will show you.
Lovely. Keep us updated for sure
By warhead
#38944
Hi everyone.

I've been working on a custom code (based on 05/2019 firmware). Consists in add to code to read one or two VSS (Vehicle speed sensor). I 'll explain you what i've done.

- I used arduino pins 20 and 21 (external interrupt features) for front and rear wheels.
- One of them (undriven wheel) is used for measure real speed. This is done by reading a trigger wheel.
- The other input is used to calculate slip between both inputs.

Added to code:

-Enabled external interrupts to read sensors.
-Created variables, structure, a 2D table and integrated them to config4 (page4) unused bytes.
-Created a function to calculate wheels speeds and slip. (With wheel diameter and teeth "hardcoded" for now).
- I've coded a 2D table(slip percentaje / ignition retard degrees) to control traction, as more traction loss, less ignition angle.
-Edited ini file to communicate and customize settings in Tuner Studio.

I tested it and is working!!. Here i leave you a video of a first simulation with proteus. Its not running in real time. You will see very slow response but is normal due a high cpu usage (Actually never goes fast). VSS frequencies are controlled by signal generators at the left. There shows how ignition angle lowes as slip rises.

https://www.youtube.com/watch?v=YAHtW0zJhSE

This is a first test version.

To be continued...
User avatar
By PSIG
#38949
I'm hoping you have good results with the timing retard function. :) Not as harsh opposition to that, but as a desirable alternative, I hope you consider simple 1/n "rolling" or "progressive" ignition cut as a method to reduce power safely.

With this mode of power reduction, 1 ignition firing in n-firings is cut. If you have 4-cylinders, you could cut 1 firing in 5, causing the misfiring cylinder to roll to a different cylinder on the next cycle. This would cut cylinder 1, then cylinder 3 next cycle, then 4, and so on, following firing order.

For progressive power reduction, the "n" is reduced, so for example it could begin as 1 cut in 9, then 1 in 7 (no even multiples of cylinder count initially), 6, 5, 3, 2, then full-cut if-necessary. The n-value is selectable in some systems to allow best control of the number and range of power-reduction steps available. This was the original intention of the Speeduino progressive rev-limiting feature, but isn't working correctly at this point. Perhaps your system could help both to work effectively. ;)

David
By evo_lucian
#38950
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.
By warhead
#38957
Falcao wrote:
Thu Nov 07, 2019 7:57 pm
Great work ! How did you do to read vss signal from another pin than crank or cam ?

Arduino Mega has 6 external interrupts inputs (pins 2, 3, 18, 19, 20, 21), pins 18 and 19 are for crank and cam signals. I've used 20 and 21 for both vss. I'm working on what happens with the other interrupts, crank and cam signals must have priority. I have to check if there are delays.

PSIG wrote:I'm hoping you have good results with the timing retard function. :) Not as harsh opposition to that, but as a desirable alternative, I hope you consider simple 1/n "rolling" or "progressive" ignition cut as a method to reduce power safely.

With this mode of power reduction, 1 ignition firing in n-firings is cut. If you have 4-cylinders, you could cut 1 firing in 5, causing the misfiring cylinder to roll to a different cylinder on the next cycle. This would cut cylinder 1, then cylinder 3 next cycle, then 4, and so on, following firing order.

For progressive power reduction, the "n" is reduced, so for example it could begin as 1 cut in 9, then 1 in 7 (no even multiples of cylinder count initially), 6, 5, 3, 2, then full-cut if-necessary. The n-value is selectable in some systems to allow best control of the number and range of power-reduction steps available. This was the original intention of the Speeduino progressive rev-limiting feature, but isn't working correctly at this point. Perhaps your system could help both to work effectively. ;)

David
evo_lucian wrote: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.

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. There are a lot of ways! and variables to consider, like speed, boost, etc. I will continue working, testing and sharing you any progress.

https://www.youtube.com/watch?v=FembJNagxOE

That is what i want!!. :D
By Falcao
#38961
warhead wrote:
Fri Nov 08, 2019 1:43 pm
Arduino Mega has 6 external interrupts inputs (pins 2, 3, 18, 19, 20, 21), pins 18 and 19 are for crank and cam signals. I've used 20 and 21 for both vss. I'm working on what happens with the other interrupts, crank and cam signals must have priority. I have to check if there are delays.

Yep sure, no problem for the hardware but how did you add the functionality in both TunerStudio and Speeduino ? Did you "just" copy/past the crank/cam function and use it on new aux input on TunerStudio ?
By warhead
#38966
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)
By warhead
#38967
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.
Attachments
(278.62 KiB) Downloaded 35 times
Startup Jaguar V12

This stall issue when computer is disconnected, […]

Hi folks, I have a couple of 14point7 Spartan 2 O[…]

I specifically "tie" unused timing input[…]

Hayabusa advice

Hello! I'm new here and this is my first post. I'm[…]

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