From: Jon Slaughter on 24 Nov 2009 19:05 Richard Rasker wrote: > Hi all, > > I'm currently working with a mass air flow sensor (a Honeywell > AWM3100V, see > http://datasheet.octopart.com/AWM3100V-Honeywell-datasheet-57019.pdf), > and I would like to convert the rather non-linear response curve of > this device into a voltage which bears a linear relationship to the > actual air flow. Ideally, I would like to see the air flow converted > in millivolts, so that it can be fed into a 3.5 digit voltmeter > directly. > > These are the values (F=flow): > F (ccm) Vout (V) > 0 1.00 > 25 1.90 > 50 2.67 > 75 3.27 > 100 3.75 > 125 4.17 > 150 4.50 > 175 4.80 > 200 5.00 > > The first problem was simple: finding a suitable mathematical > function which fits the curve; I looked at something along the lines > of Vout=c1*(1-e^(-F/c2))+1, and it turns out that c1=5 and c2=125 > provides a near-perfect fit. The second problem was to find an > inverse function -- no problem there either: F=-c2*ln(1-(Vout-1)/c1) > -- leading to the third and rather trickier problem, which of course > is to implement that inverse function in an actual circuit. > > I've been doing some trial-and-error experimenting with a simple > circuit, based on a simple Si-diode with some bypass and series > resistors in several configurations, but that doesn't produce > satisfactory results -- the best curve I get is easily 10% off at the > extremes, and that's even without temperature instability. All this > is of course no surprise, as the exponential function of a > forward-biased diode is something different than a logarithmic > function, and a simple PN junction has a temperature coefficient of > approximately 2 mV per degree Celsius. > > Does anyone know of designs which provide a better fit for this type > of logarithmic function, and preferably a better temperature > stability? > I don't know but if I had to do it with analog I might simply do averaging. This will produce a spline approximation: for example: 75 3.27 100 3.75 if your input was 80 then your output is (3.75 - 3.27)/(100-75)*(80 - 75) + 3.27. i.e., fitting a line between the two points. now, you implement the analog electronics to compute that equation then use a multiplexer to select the different data points which is simply setup by using appropriate resistors that feed your analog equation calculator. For a large number of data points this is out of the equation as also if linear approximation is bad. (you can use better approximations but the analog circuitry starts to get very complex real quick) You gotta decide when the analog method starts to become more complex than a uC. Alsoa uC will, in general, be much more accurate and be easily changed even after fab.
From: Jan Panteltje on 24 Nov 2009 19:14 On a sunny day (Tue, 24 Nov 2009 15:45:11 -0700) it happened "Paul Hovnanian P.E." <paul(a)hovnanian.com> wrote in <4B0C61F7.769D4D74(a)hovnanian.com>: .-----. .----. .-----. >> | | | | | | >> problem o---->| ADC |----->| uP |----->| DAC |-----> answer >> | | | | | | >> '-----' '----' '-----' >> >> -- >> www.wescottdesign.com > >That's the solution to life, the universe and everything, if you have >the correct coefficient. > >One more advantage to this approach is that one can add an SPI/I2C >output and use lots of stuff other then DVMs downstream. An other advantage is that he wants a digital display, the micro can drive a LCD direcly, no need for a DAC(or PWM).
From: Robert Lacoste on 25 Nov 2009 02:57 "Richard Rasker" <spamtrap(a)linetec.nl> a �crit dans le message de news: 4b0c4dde$0$729$7ade8c0d(a)textreader.nntp.internl.net... > Hi all, > > I'm currently working with a mass air flow sensor (a Honeywell AWM3100V, > see > http://datasheet.octopart.com/AWM3100V-Honeywell-datasheet-57019.pdf), and > I would like to convert the rather non-linear response curve of this > device > into a voltage which bears a linear relationship to the actual air flow. > Ideally, I would like to see the air flow converted in millivolts, so that > it can be fed into a 3.5 digit voltmeter directly. > > These are the values (F=flow): > F (ccm) Vout (V) > 0 1.00 > 25 1.90 > 50 2.67 > 75 3.27 > 100 3.75 > 125 4.17 > 150 4.50 > 175 4.80 > 200 5.00 > > The first problem was simple: finding a suitable mathematical function > which > fits the curve; I looked at something along the lines of > Vout=c1*(1-e^(-F/c2))+1, and it turns out that c1=5 and c2=125 provides a > near-perfect fit. The second problem was to find an inverse function -- no > problem there either: F=-c2*ln(1-(Vout-1)/c1) -- leading to the third and > rather trickier problem, which of course is to implement that inverse > function in an actual circuit. > > I've been doing some trial-and-error experimenting with a simple circuit, > based on a simple Si-diode with some bypass and series resistors in > several > configurations, but that doesn't produce satisfactory results -- the best > curve I get is easily 10% off at the extremes, and that's even without > temperature instability. All this is of course no surprise, as the > exponential function of a forward-biased diode is something different than > a logarithmic function, and a simple PN junction has a temperature > coefficient of approximately 2 mV per degree Celsius. > > Does anyone know of designs which provide a better fit for this type of > logarithmic function, and preferably a better temperature stability? > > Thanks in advance, best regards, > > Richard Rasker > -- > http://www.linetec.nl Of course the microcontroller-based approach proposed in previous posts is very probably the easiest solution. On the "nearly analog" way there are some chips dedicated to signal conditionning and sensor linearization, like the PGA309 from TI (see http://focus.ti.com/lit/ds/symlink/pga309.pdf). However it will probably not be easy to use it in your application as the liearisation is done through a modification of the sensor excitation and is adapted to wheatstone bridges. But may be you could add an external aop or two ? Friendly yours, Robert www.alciom.com
From: Robert Lacoste on 25 Nov 2009 03:01 "Robert Lacoste" <see-alciom-dot-com(a)na.com> a �crit dans le message de news: 4b0ce377$0$936$ba4acef3(a)news.orange.fr... > "Richard Rasker" <spamtrap(a)linetec.nl> a �crit dans le message de news: > 4b0c4dde$0$729$7ade8c0d(a)textreader.nntp.internl.net... >> Hi all, >> >> I'm currently working with a mass air flow sensor (a Honeywell AWM3100V, >> see >> http://datasheet.octopart.com/AWM3100V-Honeywell-datasheet-57019.pdf), >> and >> I would like to convert the rather non-linear response curve of this >> device >> into a voltage which bears a linear relationship to the actual air flow. >> Ideally, I would like to see the air flow converted in millivolts, so >> that >> it can be fed into a 3.5 digit voltmeter directly. >> >> These are the values (F=flow): >> F (ccm) Vout (V) >> 0 1.00 >> 25 1.90 >> 50 2.67 >> 75 3.27 >> 100 3.75 >> 125 4.17 >> 150 4.50 >> 175 4.80 >> 200 5.00 >> >> The first problem was simple: finding a suitable mathematical function >> which >> fits the curve; I looked at something along the lines of >> Vout=c1*(1-e^(-F/c2))+1, and it turns out that c1=5 and c2=125 provides a >> near-perfect fit. The second problem was to find an inverse function -- >> no >> problem there either: F=-c2*ln(1-(Vout-1)/c1) -- leading to the third and >> rather trickier problem, which of course is to implement that inverse >> function in an actual circuit. >> >> I've been doing some trial-and-error experimenting with a simple circuit, >> based on a simple Si-diode with some bypass and series resistors in >> several >> configurations, but that doesn't produce satisfactory results -- the best >> curve I get is easily 10% off at the extremes, and that's even without >> temperature instability. All this is of course no surprise, as the >> exponential function of a forward-biased diode is something different >> than >> a logarithmic function, and a simple PN junction has a temperature >> coefficient of approximately 2 mV per degree Celsius. >> >> Does anyone know of designs which provide a better fit for this type of >> logarithmic function, and preferably a better temperature stability? >> >> Thanks in advance, best regards, >> >> Richard Rasker >> -- >> http://www.linetec.nl > > Of course the microcontroller-based approach proposed in previous posts is > very probably the easiest solution. On the "nearly analog" way there are > some chips dedicated to signal conditionning and sensor linearization, > like the PGA309 from TI (see > http://focus.ti.com/lit/ds/symlink/pga309.pdf). However it will probably > not be easy to use it in your application as the liearisation is done > through a modification of the sensor excitation and is adapted to > wheatstone bridges. But may be you could add an external aop or two ? > > Friendly yours, > Robert > www.alciom.com A variant may be more easily adaptable to your application : http://focus.ti.com/lit/ds/symlink/xtr108.pdf Robert
From: Robert Baer on 25 Nov 2009 03:44
Richard Rasker wrote: > Hi all, > > I'm currently working with a mass air flow sensor (a Honeywell AWM3100V, see > http://datasheet.octopart.com/AWM3100V-Honeywell-datasheet-57019.pdf), and > I would like to convert the rather non-linear response curve of this device > into a voltage which bears a linear relationship to the actual air flow. > Ideally, I would like to see the air flow converted in millivolts, so that > it can be fed into a 3.5 digit voltmeter directly. > > These are the values (F=flow): > F (ccm) Vout (V) > 0 1.00 > 25 1.90 > 50 2.67 > 75 3.27 > 100 3.75 > 125 4.17 > 150 4.50 > 175 4.80 > 200 5.00 > > The first problem was simple: finding a suitable mathematical function which > fits the curve; I looked at something along the lines of > Vout=c1*(1-e^(-F/c2))+1, and it turns out that c1=5 and c2=125 provides a > near-perfect fit. The second problem was to find an inverse function -- no > problem there either: F=-c2*ln(1-(Vout-1)/c1) -- leading to the third and > rather trickier problem, which of course is to implement that inverse > function in an actual circuit. > > I've been doing some trial-and-error experimenting with a simple circuit, > based on a simple Si-diode with some bypass and series resistors in several > configurations, but that doesn't produce satisfactory results -- the best > curve I get is easily 10% off at the extremes, and that's even without > temperature instability. All this is of course no surprise, as the > exponential function of a forward-biased diode is something different than > a logarithmic function, and a simple PN junction has a temperature > coefficient of approximately 2 mV per degree Celsius. > > Does anyone know of designs which provide a better fit for this type of > logarithmic function, and preferably a better temperature stability? > > Thanks in advance, best regards, > > Richard Rasker But..but..but.. Transistors have been used for ages (>40 years i think) to generate log (and anti-log functions). For temp tracking, use a superpair (by National) and use one for reference (emulating log(k) where k is some non-zero constant) and subtract. |