E85 Gauge w/ output for under $100
I also had a problem with my gauge because I didn't use a voltage regulator, so I would recommend that everyone add a cheap voltage regulator to prevent the Arduino from seeing voltage spikes from the car. Once I added that it works great again.
I made up a simulator to test out my gauge and make sure it was working correctly.
You need another Arduino board, but they are cheap and nice to have around. All you need are a couple potentiometers, or it could be reprogrammed to output a set value if you don't have any.
https://www.tinkercad.com/things/5GuC0ttOOgD
Code from the simulator:
I made up a simulator to test out my gauge and make sure it was working correctly.
You need another Arduino board, but they are cheap and nice to have around. All you need are a couple potentiometers, or it could be reprogrammed to output a set value if you don't have any.
https://www.tinkercad.com/things/5GuC0ttOOgD
Code from the simulator:
Code:
int percentanalog = A0; // 0-5 Volt input from pot
int tempanalog = A1; // 0-5 Volt input from pot
int outputpin = 8; // output pin assignment
int val = 0; // place holder to read analog inputs
int outputState = LOW; // set output to false
unsigned long previousMicros = 0; // save the last time the output was switched
void setup() {
Serial.begin(9600); // setup serial comms
pinMode(outputpin, OUTPUT); // setup output
}
void loop() {
// convert analog input to flex fuel percent 0-100 %
val = analogRead(percentanalog);
float flexpercent = (val*0.0977517);
// convert analog input to ms of low time for fuel temp 1-5 ms (1ms -40c and 5ms 125c)
val = analogRead(tempanalog);
float fueltemp = (val*0.00391007) + 1;
// calculate period from the frequency (flex percent + 50) and converted to microseconds
float period = (1 / (flexpercent + 50)) * 1000000;
// low time is calculated from the fuel temp and converted to microseconds
float lowtime = fueltemp * 1000;
// subtrack lowtime from the signal period time
float hightime = period - lowtime;
// grab current time in microseconds
unsigned long currentMicros = micros();
// determine the elapsed time since the last time the output was switched
unsigned long elapsedtime = currentMicros - previousMicros;
if (outputState == LOW){
if(elapsedtime >= lowtime){
digitalWrite(outputpin, HIGH); // sets the output high
outputState = HIGH;
previousMicros = currentMicros; // save the "current" time
}
}
else {
if(elapsedtime >= hightime){
outputState = LOW; // "toggles" the state
digitalWrite(outputpin, LOW); // sets the output low
outputState = LOW;
previousMicros = currentMicros; // save the "current" time
}
}
// printing causes timing issues, so these were only used for debugging
// if (outputState)
// Serial.println(1);
// else
// Serial.println(0);
// Serial.println(period,4);
// Serial.println(hightime,8);
// Serial.println(lowtime,8);
// Serial.println(flexpercent);
// Serial.println(fueltemp);
}
I added this to the code. Sorry for never replying. I sold my evo awhile back and havent had anything to run e85 on. If there is any other info that needs to be changed or added on the main page, please let me know. I think some people were adding regulators and that was fixing alot of issues?
Don't have an EVO, but I used this to build my own little gauge for my truck so thanks to the OP for the information.
I did a little bit of testing and found the same problem with the temperature. So I read some more about the sensor and how it outputs the temperature reading and looked at the code and didn't think the code made any sense for what I found.
So I coded up my own way to get the temperature and it seems to be correlating correctly with the coolant temp and intake air temp of my truck while in the garage.
Here is just the portion of the code that gets the temperature:
I did a little bit of testing and found the same problem with the temperature. So I read some more about the sensor and how it outputs the temperature reading and looked at the code and didn't think the code made any sense for what I found.
So I coded up my own way to get the temperature and it seems to be correlating correctly with the coolant temp and intake air temp of my truck while in the garage.
Here is just the portion of the code that gets the temperature:
Code:
void getfueltemp(int inpPin) { //read fuel temp
tempPulse = pulseIn(inpPin, LOW, 25000); // Measure the low pulse time (timeout after 25ms if no pulse is detected)
if (tempPulse > 0) { // If we get a pulse then update the temperature measurement
lowTime = tempPulse;
float celsius = ((41.25 * (float(lowTime) / 1000)) - 81.25); // Calculate temp in celsius from lowTime pulse
float fahrenheit = ((celsius * 1.8) + 32); // Convert to fahrenheit
temperature = fahrenheit; // Update temperature with specified unit
}
}
Anyone have the libraries for this? Links are all dead and I've tried a few from other posts online with similar issues. My nano works fine and outputs fine, but the LCD doesn't. thanks
https://www.innovatemotorsports.com/...gauge-kit.html
Output for temp and ethanol % is fully adjustable.
Output for temp and ethanol % is fully adjustable.
https://www.innovatemotorsports.com/...gauge-kit.html
Output for temp and ethanol % is fully adjustable.
Output for temp and ethanol % is fully adjustable.
Thread
Thread Starter
Forum
Replies
Last Post
xPRimNT
Evo X Engine Management / Tuning Forums
239
Jun 2, 2016 10:40 PM
CrimsonShadow
Vendor Service / Parts / Tuning Review
1
Nov 14, 2007 09:15 PM
Kc2Buk
Evo Engine / Turbo / Drivetrain
61
May 5, 2006 11:39 AM









