GM Flex Fuel Sensor

All sensor specific discussions! Temperature, pressure, steering angle, brake and throttle, etc. Post adaptations of OEM-style sensors, and also your clever DIY hacks and custom designs here too!

Moderators: JeffC, rdoherty, stieg

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

GM Flex Fuel Sensor

Post by gizmodo »

I have been thinking about adding one of these to my car: http://paceperformance.com/i-10801493-1 ... r-e85.html I could buy the Zeitronix ECA to hook this up to, but before I do that I was wondering if anyone has hooked one of these up to an RCP to convert the frequency to a voltage. Here are details of the sensor's operating according to this page http://www.megamanual.com/flexfuel.htm:
The fuel sensor uses a microprocessor to measure the ethanol percentage and fuel temperature, which it uses to produce and output signal. The fuel sensor signal is a square-wave voltage signal. The signal varies in both frequency and pulse width:

The frequency of the signal indicates the ethanol percentage. The output frequency is linear with respect to the percentage of ethanol content in the fuel. The PCM provides an internal pull-up to five volts on the signal circuit, and the fuel sensor pulls the 5 volts to ground in pulses. The normal range of operating frequency is between 50 and 150 Hertz:
50 Hertz indicates 0% ethanol, and
150 Hertz indicates 100% ethanol.
The pulse width indicates the fuel temperature. The normal pulse width is between 1 and 5 milliseconds:
1 millisecond indicates -40°C (-40°F), and
5 milliseconds indicates 125°C (257°F).

momostallion
Posts: 58
Joined: Wed Feb 12, 2014 1:48 pm
Location: dallas, tx

Post by momostallion »

I haven't installed yet but i bought an AEM flex fuel sensor and want to pull content % and temp off it using RCP's PWM inputs as well.

I never really understood the configuration of PWM side so it should be interesting.

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

Just guessing, but I think you'll only be able to get fuel mix % from the RCP input.. probably can't measure pulse width (or duty cycle) at the same time. Might be able to add the feature in a future firmware update though. I'm not familiar with the timer capture hardware in this micro.

Frequency/Pulse Input 1 - 3
These input channels can be used to time the duration between digital pulses for purposes of measuring RPM, shaft speed, and so on. The input accepts 0-12V (protected up to 400V)
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

It seems like it should be pretty simple setup and configure. I think I am going to order one and start playing with it. I also plan on using an analog out to convert it to 0-5v so I can show it on my Zeitronix display since I don't have a tablet or anything for a dash from the RCP. What's the worst that can happen? :)

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi,

Cool topic. So you want to use the flex fuel sensor as an input to RCP, for logging purposes?

if it outputs different frequencies based on ethanol fuel ratio, then it should work well, and then it can show it on the dash. You'd connect it to one of the timer inputs.

The 4 PWM ports on RCP are configured as outputs only, fyi.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

Mash
Posts: 19
Joined: Sun Dec 27, 2015 7:23 am

Post by Mash »

It would be great to get this information from timer input about frequency and duty cycle at the same time.

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

Alright, I'm finally getting around to giving this a try. I just have a few questions:
1. It says the PCM provides an internal pull-up to 5 volts on the signal circuit. Is this something the RCP can do?
2. It seems to me I should set the sample rate at 200 hz, is that correct?
3. Do the timer speed and pulses per revolution have any meaning in this configuration?
4. It looks like I have to choose either frequency or period so I'm guessing I get ethanol content (frequency) or fuel temp (period).

Any help would be appreciated!

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

You would hook it up like an RPM sensor. at this point you would only be able to measure fuel type, not fuel temperature since we don't have the pulse width portion of the timer exposed.

The RCP timer would measure the interval between pulses and that's recorded as Hz.

Set your RCP timer channel to record frequency, medium speed, and 1Hz is fine (report the current fuel type once per second. One pulse per revolution.

Let us know how it goes!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

I got everything hooked up and setup as suggested. I only see a value of 0 though, I tried logging in lua as well as the dashboard.

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

There's a round-about way you can get both parameters into RCP, but you'd need some extra hardware. The fuel content drives frequency, temperature drives pulsewidth. Both have an impact on the waveform dutycycle (percentage of time it's "on" vs "off").

You can use a resistor/capacitor pair to (roughly) produce an analog signal that tracks duty cycle. Throw that into an analog channel, and the pulse signal into a frequency/digital input, and using math/script you could calculate the pulsewidth (temperature info) from the measured frequency and duty cycle. It won't be linear because of the R/C conversion, so you've have to build it and drive a known signal thru the setup, to see what you got, and calibrate from there. It would also vary with battery voltage, but that should be pretty constant when the alternator is running.

The most accurate way (the OEM way) is to have the microprocessor measure frequency and pulsewidth directly, and skip all the non-linear analog & math stuff.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

If you're getting a zero reading you should probe the input with an oscilloscope to see the waveform being presented to the input pin, referencing the same ground as RCP; just to ensure you're getting a workable signal. Without verifying the signal you're sort of flying blind when troubleshooting!
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

I don't have an oscilloscope but I might be able to track one down. I did verify the sensor is getting 12 volts so I at least know it has power. I wired the sensor to same source for +12v and ground as the RCP.

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

Well I found a super old oscilloscope but I have no idea if it works. I'll try playing around with it tonight to see what I can come up with. Any pointers on using this thing would be helpful!

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

There are some great tutorials out there on using 'scopes. Also, for a cheap, great portable scope get one of the "DSO nano" units off of Amazon. (y)
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

gizmodo
Posts: 138
Joined: Mon Aug 05, 2013 10:22 pm

Post by gizmodo »

I fiddled around with this one I have and on the calibration post I can't get it to show a square wave. It is a Heathkit IO-4550, which from what I've read wasn't a great kit at the time it was made anyway. Unfortunately I can't justify the cost of an oscilloscope since I have no use for one.

I also found this: http://nefariousmotorsports.com/forum/i ... pic=9168.0 According to the install instructions the RCP has 10k pullup resisters on the timer inputs. Could this be part of the problem?

Post Reply