Ethanol Content Sensor

Hey Guys,

The shop I work at uses a lot of e85 flex fuel for racing purposes. The big problem is, here in AZ, flex fuel from the pump can be anywhere from 54% to 85% ethanol. This makes tuning quite a headache, so we test each car we see. I thought it would be a cool idea to build a rig that has a self contained sensor, pump, power supply etc, so we can pour a little sample into it and get a readout.

The problem is, I can't seem to get accurate data to display, even though we've tested the sensor itself and it's working. Right now I'm using Freqmeasure to just try and display the hz that the sensor is outputting. it seems to be low, the test sample was tested at ~55% ethanol (105hz), but the arduino is reading 64hz. We scoped the sensor and confirmed it's outputting 105 - 110 htz consistently.

I'm using the example script that comes with the freqmeasure library with no other changes and using D49 on my ATmega 2560 as instructed.

Please help, I'm clearly a car guy and NOT a programmer...

Thanks!

Thanks Delta,
Here is the link to the library:

https://www.pjrc.com/teensy/td_libs_FreqMeasure.html

Here is the example:

#include <FreqMeasure.h>

void setup() {
  Serial.begin(57600);
  FreqMeasure.begin();
}

double sum=0;
int count=0;

void loop() {
  if (FreqMeasure.available()) {
    // average several reading together
    sum = sum + FreqMeasure.read();
    count = count + 1;
    if (count > 30) {
      float frequency FreqMeasure.countToFrequency(sum / count);
      Serial.println(frequency);
      sum = 0;
      count = 0;
    }
  }
}

Not sure if I'll be able to get a schematic, but it's quite simple, the sensor is 3 wires, 12v in, signal out and ground. I powered the sensor using a jump box, ran signal to digital pin 49 as per the instruction of the library and used serial monitor to see the result