I need help converting Frequency and Pulse width to Voltage.

I need to take a single signal and convert it into two 0-5v outputs that I can use to drive some other devices. For now I am going to dump them into the A0 and A1 ports and drive some LED number segments just to validate that everything is working. Currently I am using an LM2917-8 for the frequency conversion which still is not working but I am getting close. The next part converting the pulse width to voltage I have no clue how to do.

Sensor
0-12v DC
Pull Up 10k ohm to 12v DC
Square Wave
50Hz-150Hz Frequency
1ms-5ms Pulse width

The frequency will adjust as well as the pulse width.

A little background on me, I am super new to this. I have had my Arduino now for 2 months, and have completed the basics. Temp sensor, Shift Register, basic PWM of a RC Car motor, LED Number Segments, Web Server using the Ethernet Shield, and a few other odds and ends. I have zero training in electronics and just started this as a fun play time thing. So just assume that I am handicapped when it comes to electronics.

Thanks for any help.

I need to take a single signal and convert it into two 0-5v outputs that I can use to drive some other devices. For now I am going to dump them into the A0 and A1 ports

I'm confused by these sentences.
Why does a single signal need to be converted to two?
What is the nature of the signal - digital or analogue?
What is the bandwidth?
Why are you involving analogue input pins?
What does "dump" mean?

Quote from another site about the Flex Fuel Sensor.

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

To answer your questions.

  1. I want to use the ethanol percentage, and fuel temp, for car ecu modifications, however the ecu only takes 0-5v inputs.
  2. Digital, -- remember I am new so not fully up to speed on the naming of things.
  3. Not sure what you mean by bandwidth, but here is what the sensor outputs 50-150hz
  4. Analog pins are to be used for LED number segment display of the data
  5. Dump means using it somewhere for now, and maybe use it somewhere else later.

Did you ever get anywhere with writing the code for this? I saw on YouTube a vid of a arduino displaying percentages from. A flex fuel sensor. I asked to see the code for it but got no reply from the guy who posted the video.

Seriously interested in making this work.

Nothing to do with a fuel sensor but attached is a simple sketch I wrote to measure frequency & duty cycle that may adapt to your needs.

Frequency_Counter.ino (2.74 KB)

Thx much. I just figured out the math to calculate the alcohol percentage and also the fuel temp based upon frequency and pulse width measurements. Need to build a prototype with a 16x2 display and test it further. Looks like it can be done for less than $10 not including the e85 sensor. I can get those for free at the local u wrench it. Progress, whoo-hoo!

How are you getting along with this project?

I am pursuing the same project however my needs are standalone. I am in need of a 16x2 displaying 2 lines of text 1 displaying the ethanol content and the other displaying fuel temp which will be mounted in the cabin.

Any guidance will be appreciated.

Anyone make any progress on this project? I know a ton of people that could use this device

Anyone have any coding yet? Diagrams?

I'm trying to build one as well

Please pm or respond here if you don't mind