What is your electronics, programming, arduino, hardware, combustion, automotive, ECU, engine tuning experience?
What is the algorithm that will connect all the inputs to give you an output?
If all you want to do is cut and paste then call it your work.
Go up to Gigs and Collaborations section of this forum and offer to cut and paste a lot of money from your pocket into someone elses pocket to do the job for you.
Because that is what you are asking and that is not the spirit of the forum
Only control air flow meter signal that its for now.
I take some pictures of the device can do what i want to do whit arduino to see if help me to explain what i want
Well yes my goal is a display but i i know it will be more dificult, so i can correct the values to adjust with my android device but yes a display will be my goal
as I understand it, you want a single output which is a function of several inputs - ie
output = Fn(input1, input2 etc)..........
find an algorithm or a mapping which takes all your input signals and generates the wanted output voltage as a function of all those values. ie fill in the above.
This is the hard bit - and I can't help there
If the inputs are in the range 0..5V the a/d in the arduino will produce a number 0..1023 for each of these.
.
Perhaps a mathematical algorithm as outlined will do the job
eg output = A * input1 + B * log (B' * input2) + C * sin(C' * input3) etc.
where A,B,C etc are constants. You can implement this simply in 'C'.
If a mapping ( ie too hard to do as above) you'll probably need a several look-up tables stored in codespace or in EEPROM. You'll probably need to use the map(.....) function to interpolate between your known data points.
You might need a mixture of these approaches. ..
your calculations should be scaled to a value 0..255 which will produce to 0..5V at the output.
Send that to an output using the arduino writePWM (..) function and a low-pass filter . If you need a 0..12V range you would then need an amplifier to scale the output
as I said , the coding part isn't very hard - it's knowing how the output you want depends on all the inputs. Once you've discovered that, the coding is straightforward.
Let see if i understand,Yes i need to run the car on the dyno and every time the car has a bad mixture of air fuel i had to indicare in the code the exact tps portion and exact rpm and start to play with the ouput correction % and keep doin again and again until i correct the mixture. The only constant i will know will the tps voltage and the rpms the % will eventualy modified, the base will be o% to start on all.
Need to have 0 to 10000rpm in 500rpm increments
Need to have 5 tps referece example 0-5% ,6-25%,26-50%,51-75%,76-100%
Then to specify :
Tps 500rpm 1000rpm 1500rpm 2000rpm ........... 10,000rpm
0-5% -10% -15% -9% +3% +25%
6-25% ??% ??% ??% ??% ??%
26-50% ??% ??% ??% ??% ??%
51-75% ??% ??% ??% ??% ??%
76-100% ??% ??% ??% ??
So first i have to see is the tps voltage on hi to low if low is 2v and hi is 5v then i have to divide by 5, 5% of 3v will be .15 that is 0 to 5% voltage of tps then .7125 for the rest
So will be
0-5% =2v to 2.15v
5-25% = 2.16v to 2.87v
26-50%=2.88v to 3.59v and so
as I understand it, you want a single output which is a function of several inputs - ie
output = Fn(input1, input2 etc)..........
find an algorithm or a mapping which takes all your input signals and generates the wanted output voltage as a function of all those values. ie fill in the above.
This is the hard bit - and I can't help there
If the inputs are in the range 0..5V the a/d in the arduino will produce a number 0..1023 for each of these.
.
Perhaps a mathematical algorithm as outlined will do the job
eg output = A * input1 + B * log (B' * input2) + C * sin(C' * input3) etc.
where A,B,C etc are constants. You can implement this simply in 'C'.
If a mapping ( ie too hard to do as above) you'll probably need a several look-up tables stored in codespace or in EEPROM. You'll probably need to use the map(.....) function to interpolate between your known data points.
You might need a mixture of these approaches. ..
your calculations should be scaled to a value 0..255 which will produce to 0..5V at the output.
Send that to an output using the arduino writePWM (..) function and a low-pass filter . If you need a 0..12V range you would then need an amplifier to scale the output
as I said , the coding part isn't very hard - it's knowing how the output you want depends on all the inputs. Once you've discovered that, the coding is straightforward.
regards
Allan.
Output will be 0v to 5v
So 0 is 0 and 5v is 255
50% will be 127
I will nedd to state
If(the part i have trouble?
output =( input *from -127 to +127) but no more than 255
How can make a map for this?
Correction % = cor
Map(cor,0,255,0,100?
If(the part i have trouble
output =( input *from -50%to +50%) but no more than 255?
This is something to start?
as I understand it, you want a single output which is a function of several inputs - ie
output = Fn(input1, input2 etc)..........
find an algorithm or a mapping which takes all your input signals and generates the wanted output voltage as a function of all those values. ie fill in the above.
This is the hard bit - and I can't help there
If the inputs are in the range 0..5V the a/d in the arduino will produce a number 0..1023 for each of these.
.
Perhaps a mathematical algorithm as outlined will do the job
eg output = A * input1 + B * log (B' * input2) + C * sin(C' * input3) etc.
where A,B,C etc are constants. You can implement this simply in 'C'.
If a mapping ( ie too hard to do as above) you'll probably need a several look-up tables stored in codespace or in EEPROM. You'll probably need to use the map(.....) function to interpolate between your known data points.
You might need a mixture of these approaches. ..
your calculations should be scaled to a value 0..255 which will produce to 0..5V at the output.
Send that to an output using the arduino writePWM (..) function and a low-pass filter . If you need a 0..12V range you would then need an amplifier to scale the output
as I said , the coding part isn't very hard - it's knowing how the output you want depends on all the inputs. Once you've discovered that, the coding is straightforward.
regards
Allan.
Please explain me this from gere im lerning
eg output = A * input1 + B * log (B' * input2) + C * sin(C' * input3)
What is A? The value of input1?
What is log and sin?
There are no magic equations, you have to use what is called mapping which involves quite a bit of memory.
Tom...
Thanks tom
I allready have a full programable ecu on my drift car a haltech like the one on the last video and a mega squirt ecu on my track car so i know what is a map i just does not know how to do the coding
This project will be for my friend cars that doesnt want to spend $ and keep damaging engines
The major car manufacturers spend many many man-years of testing and measuring to produce such
software. And of course they compromise between performance and efficiency - and sometimes they
cheat ( see the recent VW debacle..)
allanhurst:
The major car manufacturers spend many many man-years of testing and measuring to produce such
software. And of course they compromise between performance and efficiency - and sometimes they
cheat ( see the recent VW debacle..)
It's not easy
regards
Allan
Please focus on the project! I know how to tune cars,i do tune how should be done in a dyno with a calibrated wideband senson and a calibrated knock moniror,and then same on the road. i have more than a decade of tuning cars experience
I tune
Microtech
Megasquirt
Haltech
Adaptronic
Apex-i fc comander
Apex-i safc
Perfect power smt6,smt8,smt8L
I have expierence flashing mitsubishi ecu
I dont want to be rude or arrogant
I know how to tune cars please dont keep telling its dificult,ist imposible, i will break engine, maybe you someone that does not know it is will be dificult,for me is no.
What i dont know and i need help is making the code there im a cero
OK, good to know. So we can skip a lot of the discussion. Here is the last thing which you asked which doesn't seem to have been answered directly:
juntekind:
Please explain me this from gere im lerning
eg output = A * input1 + B * log (B' * input2) + C * sin(C' * input3)
What is A? The value of input1?
What is log and sin?
This is just an equation. It seems like a made-up example because it would be very rare to add logs and sines in one equation. (Where did this come from?) Log and sin are just mathematical functions. They take one input and output one number.
This equation is also a function, but it takes 5 inputs. In mathematics the small dash after the letter (') is called "prime" and it denotes a variable which is related to but different to the main one. So "B'" is read as "B prime".