F to V Converter using LM331 Vout 0-5V (better 0-3.3V) Finput 0-1Khz

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
Hello,

I am having trouble doing the calculation for RlCl for this F/V converter circuit.

The supply voltage will be between 11.9 and 15 V (stabilized to 12VDC), the input frequency from 0-1Khz and necessary output voltage for Teensy use will be 0-5V (with R divider) or even better 0-3.3V.

According to the datasheet I have to calculate the resistance of Rl and the capacity of Cl. The F to V default schema is schema 18 of the datasheet.

The attached image shows the default circuit for 0-10Khz full scale.

Could any help me choosing the right components for 12V supply Voltage, input frequency 0-1Khz and output voltage 0-3.3V (or 0-5V if necessary)?

Thanks!
 

Attachments

bertus

Joined Apr 5, 2008
21,160
Hello,

Did you see the formula on the schematic?

LM331_freq_to_volt.png

When you make Ct 10 times larger the range will be from 0 to 1 kHz.
The output voltage can be adapted with Rs and RL.

Bertus
 

Attachments

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
Thanks a lot!
I knew that it has to be done by the RC setup but I wasn’t sure anymore if I could just multiplicate or divide.
 

jpanhalt

Joined Jan 18, 2008
11,088
You can substitute ceramic for tantalum capacitors in that circuit. Can you get reasonably sized ceramics for that frequency?
 

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
You can substitute ceramic for tantalum capacitors in that circuit. Can you get reasonably sized ceramics for that frequency?
According to the answer of bertus I have to change the Ct 10 times larger, so change from 0,01 uF to 0,1 uF to get the range from 0-1Khz. I want to use here a ceramic one since I do not have any 0,1 uF Tantalum. To order would take a week and I have 100 nF Cera.
 

eetech00

Joined Jun 8, 2013
2,280
Hi...
The selection of component for this circuit will be a trade off between response, linearity and accuracy. I would start with these components, test, and change values if necessary. It may not be very fast... but you’ll need to confirm that when testing on breadboard.

eT
 
Last edited:

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
Hi...

It wont be very fast... but you’ll need to determine that after breadboarding..

eT
Ok, so there will be a significant delay. Do you know How it is reacting on frequency changes than?

A flowmeter is generating 22.000 pulses per liter and the plan is to show from 1l/hr to 100l/hr. (Marine engine)

The initial plan was to count using a Teensy 3.2 to drop the results on the NMEA2K network. But this is problematic since the pulse width is to high in lower consumption. A refresh-rate of 2 seconds would be minimum since other devices use this value for further calculations like distance per liter and so on.

I got the advice to use a external counter for this application, bit I couldn’t find any perfect fitting one. I am missing here also the experiences to choose the correct counter.

What do you think would be a good solution?
 

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
What is the width, frequencies and voltage ranges of the input signal?
Type of input waveform?
The frequency of the flow sensor is from 36.6 Hz to 916.6 (0.1l - 2.5l / minute) pulses per liter 22.000 and wanted range from 1 - 100 l/hr. Pulse width 50/50 according to frequency. Signal square pulses. Voltage output according to Vss 5-24Vdc. Output signal through open collector (NPN sinking)
At 1 - 100L/hr a frequency of 6,111 Hz to 611 Hz. By that a width of 163,64 ms to 16,364 ms.

I know that the lower limit is out of range of the flow sensor but I hope since it is turbine driven that it goes down to 6 Hz as well. Otherwise, the lower limit will be 6l/hr.
 

eetech00

Joined Jun 8, 2013
2,280
The frequency of the flow sensor is from 36.6 Hz to 916.6 (0.1l - 2.5l / minute) pulses per liter 22.000 and wanted range from 1 - 100 l/hr. Pulse width 50/50 according to frequency. Signal square pulses. Voltage output according to Vss 5-24Vdc. Output signal through open collector (NPN sinking)
At 1 - 100L/hr a frequency of 6,111 Hz to 611 Hz. By that a width of 163,64 ms to 16,364 ms.

I know that the lower limit is out of range of the flow sensor but I hope since it is turbine driven that it goes down to 6 Hz as well. Otherwise, the lower limit will be 6l/hr.
So the input freq range is 611 hz to 6111 hz?
Can the output range be 0-5v? The higher the output voltage the less ripple becomes a problem at the lower frequencies..and the better the response..
 

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
So the input freq range is 611 hz to 6111 hz?
Can the output range be 0-5v? The higher the output voltage the less ripple becomes a problem at the lower frequencies..and the better the response..
Sure, that should not be a problem. Could even be higher. I use than just a precisely calculated voltage divider!
 

eetech00

Joined Jun 8, 2013
2,280
HI

Here's what I came up with.
See Attached.

I've added a filter at the output. It also greatly improves the response time.The opamp chip comes with two devices so I used one as a buffer. The reference voltage for the CMPIN pin needs to be stable, so, instead of a Zener regulator, I've shown a LM7809.
The FtoV output is scaled for 7V@7 Khz to cover the desired range and the divider at the output will need to be adjusted for 3.3v. The diode and 18V Zener provides some reverse polarity and overvoltage protection.

Keep in mind that this hasn't been tested on a breadboard, so that still needs to be done.

eT

upload_2019-3-8_9-7-46.png
 

Thread Starter

Thomas Prüfer

Joined Nov 22, 2017
28
HI

Here's what I came up with.
See Attached.

I've added a filter at the output. It also greatly improves the response time.The opamp chip comes with two devices so I used one as a buffer. The reference voltage for the CMPIN pin needs to be stable, so, instead of a Zener regulator, I've shown a LM7809.
The FtoV output is scaled for 7V@7 Khz to cover the desired range and the divider at the output will need to be adjusted for 3.3v. The diode and 18V Zener provides some reverse polarity and overvoltage protection.

Keep in mind that this hasn't been tested on a breadboard, so that still needs to be done.

eT

View attachment 171862

Thanks a lot eetech!
I will try that on a breadboard.

Got delivered the lm2917 today. A F to V converter designed for tachometers. I didn't order this device for this part of the project, but if this is not working like expected I could go for the 2907/2917 as well.
 

eetech00

Joined Jun 8, 2013
2,280
Thanks a lot eetech!
I will try that on a breadboard.

Got delivered the lm2917 today. A F to V converter designed for tachometers. I didn't order this device for this part of the project, but if this is not working like expected I could go for the 2907/2917 as well.
I thought about the LM2917/07 but thought you were set on the LM331. I have the 2917/07's in my junk box:)
Thinking about signal conditioning....do you have info on the flow sensor?

eT
 
Top