Notices
E85 / Ethanol This section is dedicated to tuning with ethanol.

E85 Gauge w/ output for under $100

Thread Tools
 
Search this Thread
 
Old Dec 28, 2017 | 08:53 PM
  #181  
Ayoustin's Avatar
EvoM Guru
10 Year Member
iTrader: (2)
 
Joined: Jul 2014
Posts: 2,989
Likes: 648
From: SC
Awesome, thanks for posting this up! I'll give it a shot after I've got my car all back together.
Reply
Old Apr 5, 2018 | 08:35 AM
  #182  
Ayoustin's Avatar
EvoM Guru
10 Year Member
iTrader: (2)
 
Joined: Jul 2014
Posts: 2,989
Likes: 648
From: SC
I've gotten some miles on my car over the past couple weeks, maybe around 100. Gauge has worked without issue the entire time, granted I still need to fix the temperature portion of it.
Reply
Old Apr 6, 2018 | 08:01 AM
  #183  
bubba2533's Avatar
Newbie
 
Joined: Oct 2013
Posts: 2
Likes: 2
From: PA
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:


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);

}
Reply
Old Jul 21, 2018 | 09:24 AM
  #184  
mrb00st's Avatar
Thread Starter
Evolving Member
 
Joined: Jan 2008
Posts: 122
Likes: 15
From: Ohio
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?

Originally Posted by bubba2533
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:

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
}
}
Reply
Old Jul 25, 2018 | 04:31 AM
  #185  
Guilty1s's Avatar
Newbie
 
Joined: Dec 2010
Posts: 1
Likes: 0
Fuel temp

How possibly would it be to write code to output to another pin the fuel temp with a 0.5-4.5v signal. Is there another pin on the Arduino that can do that?
Reply
Old Dec 7, 2019 | 02:18 PM
  #186  
drinky84's Avatar
Newbie
Veteran: Army
iTrader: (2)
 
Joined: Apr 2009
Posts: 73
Likes: 2
From: SoCal
Deleted

Last edited by drinky84; Dec 7, 2019 at 04:21 PM.
Reply
Old Jul 26, 2022 | 12:42 PM
  #187  
Oscar32's Avatar
Newbie
 
Joined: Jul 2022
Posts: 22
Likes: 0
From: brooklyn
Wow. . . Great, if you can use 3D printing to make a complete bracket and mount it directly on the timer. It would be perfect to make a complete finished product and sell it. . . .
Reply
Old Oct 4, 2024 | 11:00 PM
  #188  
black_out's Avatar
Evolving Member
15 Year Member
Liked
 
Joined: Oct 2009
Posts: 139
Likes: 13
From: Casa Grande, AZ
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
Reply
Old Oct 11, 2024 | 03:31 PM
  #189  
LetsGetThisDone's Avatar
EvoM Guru
10 Year Member
Liked
Loved
Community Favorite
iTrader: (1)
 
Joined: Oct 2013
Posts: 15,973
Likes: 1,629
From: Las Vegas
https://www.innovatemotorsports.com/...gauge-kit.html

Output for temp and ethanol % is fully adjustable.
Reply
Old Oct 11, 2024 | 04:59 PM
  #190  
Jaraxle's Avatar
Evolved Member
10 Year Member
Liked
Loved
Community Favorite
 
Joined: Mar 2012
Posts: 1,186
Likes: 261
From: New York
Originally Posted by LetsGetThisDone
https://www.innovatemotorsports.com/...gauge-kit.html

Output for temp and ethanol % is fully adjustable.
That's the one that I run. Directly wired into Evo X fuel tank pressure 0-5v signal and has worked for several years without missing a beat.

Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
tephra
ECU Flash
282
Aug 20, 2019 03:56 AM
xPRimNT
Evo X Engine Management / Tuning Forums
239
Jun 2, 2016 10:40 PM
jcsbanks
ECU Flash
90
Jan 19, 2008 09:01 AM
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




All times are GMT -7. The time now is 11:13 PM.