Crudely...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 thereIf 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 outputas 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.regardsAllan.
Hi,Please look at this excellent youtube.https://www.youtube.com/watch?v=3Vi4M2qJueQhttps://www.youtube.com/watch?v=f7bvv4LaNrcThere are no magic equations, you have to use what is called mapping which involves quite a bit of memory.Tom...
Then stay away from a homemade Arduino ECU. It would be normal and expected to damage several engines while experimenting.
Ha, I was just going to say the exact same thing - I hope he has a few spare engines sitting around. [/quoteQuote from: OldSteve on Today at 01:15 pmHa, I was just going to say the exact same thing - I hope he has a few spare engines sitting around. I do have spare engineBut i will experiment on non modified engines so it will not brake anything.
Ha, I was just going to say the exact same thing - I hope he has a few spare engines sitting around.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16