# Voltage conditioning circuit

Discussion in 'General Electronics Discussion' started by conway, Mar 2, 2014.

1. ### conway

9
0
Mar 2, 2014
New here and looking for some advice. I am trying to find a way of linearizing a 1-5vdc signal that is currently non linear, its more like a log curve.
Its the output from a car airflow meter, at present zero flow = 1 volt / 300kg/hr = 4v / 600kg/hr = 5vdc. Ideally the output signal would be zero flow = 0v / 300 kg/hr = 2.5v / 600kg/hr = 5v

Any ideas appreciated

2. ### Merlin3189

250
69
Aug 4, 2011
What I think you need is an anti-log or exponential amplifier, which uses the.exponential relationship between current and Voltage of a diode.
A brief description of the principle is in Wikipedia, but I don't know where there is a description of a working circuit. Google may help.

3. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011
Hello and welcome to Electronics Point

What are you doing with the signal after it's been linearised? If you're converting it to digital, it would be better to do the linearising in the digital domain.

You said that the mapping is "more like a log curve". So it isn't actually a log curve? In that case, you could use a microcontroller with a lookup table, and an ADC and a DAC to convert from analogue to digital and back.

You can optimise the lookup table if you approximate the translation curve to a series of points and use linear interpolation to convert the input value to the output value. Use more points for the parts of the curve that are furthest from straight lines. In other words, divide the curve up into segments that are "close enough" (for your purposes) to straight lines, and build a table of the X and Y values of the points where they join. Then your micro can do a binary search of the input values to find the two closest to the input measurement, calculate the relative distances between the actual input measurement and each point, and apply the same ratio to the output values (linear interpolation) to calculate your actual output value. A small micro such as a PIC or an AVR could do it.

If you want to avoid programming, you can probably do this with an array of diodes and resistors, and a few op-amps, but the transfer will be somewhat dependent on temperature, and I can't tell you how to calculate the values. There's probably information out there somewhere though!

4. ### conway

9
0
Mar 2, 2014
Thanks for the suggestions so far. It is possible to convert the signal inside the engine ECU but because of various transfer codes it is not easy, this is why I want to crate a small devise that takes the curve input signal and linearises it before the signal gets to the ECU.

690
25
Oct 2, 2011
6. ### conway

9
0
Mar 2, 2014
So many options on the ti.com link, is it one of the circuits in section 3?
The input signal is shaped like a small r or inverse parabolic curve i.e the voltage rises quickly initially then flattens off at higher airflow. I cant attach the pdf data sheet, it can be seen on Google.... Hot-film air-mass meter, Type HFM 5

7. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011

It's interesting that the data sheet doesn't give formulas for calculating airflow from output voltage. It just gives a list of points on the curves for various airflow figures. Have you looked for application notes on the HFM 5 sensors? Bosch may have advice on converting voltage to airflow, either using a formula or using a calculated table.

8. ### conway

9
0
Mar 2, 2014
Thats the datasheet Kris! I haven't seen application notes. Maybe the output curve could be made linear by changing the existing circuit, more likely I need to make a linear convertor, but still stumped on how to do it...

9. ### KrisBlueNZSadly passed away in 2015

8,393
1,271
Nov 28, 2011
You can't "change the existing circuit" since it's built into the module.

Unless Bosch have a suggested circuit (which I doubt), you probably won't find a circuit that will implement any of those translations. We don't even have a formula for them. That's why I suggested the microcontroller approach.

Instead of saying that you're stumped on how to do it, how about commenting on the suggestions that have been made already in this thread, and answering any questions that have been raised. You could also tell us which model you're using - they all have different curves.

Have you searched for Bosch application notes?

10. ### Harald KappModeratorModerator

11,316
2,593
Nov 17, 2011
For the sensor type 1 the curve can be well approximated by
y=0.7617*x^0.3206
(just enter the x/y values from the datasheet into excel, create an x/y graph and add the trendline, showing the equation on the diagram.
You can linearize this by applying
y2=y^(1/0.3206)
Here's one example of an exponential amplifier that could do the conversion when supplied with the right parameters.

11. ### conway

9
0
Mar 2, 2014
My excel skills are limited Harald, no idea how to do those things such as trendlines etc. The sensor I have is curve 3 or 0-640kg/hr.
The exponential-amplifier you link seems to be the opposite of what I need i.e its linear signal input with a exponential output.

12. ### conway

9
0
Mar 2, 2014
Kris, I was hoping a simple op amp and conponent solution would be viable but I see the micro controller idea is good, although I am brand new to this and have no idea how these are programmed. Maybe I will pop down to maplin and have a browse to see what off the shelf items will work.