Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Frequency to Voltage Converter for Ethanol Sensor

Status
Not open for further replies.

Carbibbles

New Member
Hello all, I have a basic understanding of electronics. I have built circuits and designed a couple simple schematics for myself in the past. But I have come across something that is a little above my knowledge and I was wondering if I could get some help with it.

I am reprogramming a Subaru ECU to take input from an ethanol content sensor and use it to adjust fuel trims and ignition timing. I have an available port on the ECU that takes a 0v-5v input, but the problem is the ethanol sensor outputs in square wave frequency. The output of the sensor is 50hertz for 0% ethanol and 150hertz for 100% ethanol. So I need to build a small circuit to convert this into 0v-5v so that the ECU can read it. I did some searching and found a handful of people talking about various schematics but I couldn't find anything close enough to my exact situation that I could build from or tweak. So I was hoping somebody here might be able to give some insight to a schematic or at least get me pointed in the right direction.


Here is a link to info about the sensor (about halfway down the page under "Fuel Composition Sensor Description" https://www.megamanual.com/flexfuel.htm



Thank you

Jason
 
Last edited:
Just Google 'frequency to voltage'; you'll get loads of hits.
 
Where on earth do you get 100% ethanol instead of gasoline? Some of the gasoline I buy contains 10% ethanol and my car's engine doesn't notice. I think it smells a little different than real gasoline.
 
I can buy 100% ethanol in Cleveland, Ohio, no problem. But, it is too expensive to use as an automobile fuel. I believe the OP is just talking about various mixtures and mentioned the upper calibration limit is 100%, not that he would ever use that.

John
 
I have seen a sign on some cars saying, "85% ethanol compliant". I think it is a scam so that car makers can charge more for the extra complication.
When the complication fails then the car buyer will pay again to fix it.
 
Actually its in the form of E85 (85% ethanol 15% gasoline). Its been getting more popular in the midwest and any car that is flex-fuel can run it. Its really not a gimmick, but cars that are not optimized for it will generally get 3-4mpg less (although the fuel is about $0.60 cheaper a gallon so it makes up for the difference). The benefits are that it is a much cleaner fuel, both for the environment and your engine (less carbon deposits). And in the case of high performance cars, it can be used as a race fuel substitute because of its high octane and heat of vaporization.

Some people tune their subarus to run E85 all the time. But if they want to run gasoline again they need to reflash their ECU back to a gasoline tune. That's why I am integrating a flex fuel (ethanol) sensor so the ECU will automatically compensate for the amount of ethanol that is in the fuel tank.



Ive been looking at the lm2917 or lm2907, it looks like a simple IC to use. Based on the fact that I want a 0v-5v output would it be better to use 12v for the Vcc or 5v? Also what would you guys recommend for R1 and C1 values?
 
Last edited:
E85 simply has less energy than gasoline. No amount of optimization will change that. If your mileage is the same, you aren't comparing apples to apples. Also, E85 is highly subsidized by a government that is quickly running out of money. No one knows what that future will look like, but we do know it will be different. The USA is not Greece or Italy. It is simply is too big to be bailed out by Germany.

https://e85.whipnet.net/e85.price/index.html

Back to your questions, present your circuit and we can help you calculate the component values and the best Vcc.

John
 
I found a diagram that I think would work well (attached below). But I read the manual and it says there are some guidelines to follow when choosing R1 and C1 (and C2 i guess). Thanks for the help btw.


Heres a pdf with the IC info - https://www.electro-tech-online.com/custompdfs/2011/11/LM2907.pdf

"There are some limitations on the choice of R1 and C1 which should be considered for optimum performance. The timing capacitor also provides internal compensation for the charge pump and should be kept larger than 500pF for very accurate operation. Smaller values can cause an error current on R1, especially at low temperatures. Several considerations must be met when choosing R1. The output current at pin 3 is internally fixed and therefore Vo/R1 must be less than or equal to this value. If R1 is too large, it can become a significant fraction of the output impedance at pin 3 which degrades linearity. Also ouput ripple voltage must be considered and the size of C2 is affected by R1. An expression that describes the ripple content on pin3 for a single R1C2 combination is. (equation here)

It appears R1 can be chosen independant of ripple, however response time, or the time it takes Vout to stabilize at a new voltage increases as the size of C2 increases, so a comprimise between ripple, response time, and linearity must be chosen carefully. As a final consideration, the maximum attainable input frequency is determined by Vcc, C1, and I2: (equation here)"


**broken link removed**
 
Last edited:
The equations to calculate those components are on page 7 of the datasheet.

John
 
If I use 5v as the Vcc, will it be possible for Vout to reach 5v?


How about these values?
Vcc=5v
R1=200k
C1=.033uF
C2=.47uF(just pulled this off a similar diagram, not really sure about it)
150hz would output 4.95v
 
Last edited:
Output will not reach 5 V with Vcc = 5V. There is a transistor in the output and you will see a drop across that transistor. The datasheet (page 3) says Vee = Vcc -2V at 10 mA.

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top