From: Rich Grise on 24 Nov 2009 18:23 On Tue, 24 Nov 2009 15:30:47 -0600, Tim Wescott wrote: > On Tue, 24 Nov 2009 22:19:26 +0100, Richard Rasker wrote: >> >> 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 >> .... >> >> Does anyone know of designs which provide a better fit for this type of >> logarithmic function, and preferably a better temperature stability? > > .-----. .----. .-----. > | | | | | | > problem o---->| ADC |----->| uP |----->| DAC |-----> answer > | | | | | | > '-----' '----' '-----' .-----. .-----. .-----. | | | | | | problem o---->| ADC |----->| LUT |----->| DAC |-----> answer | | | | | | '-----' '-----' '-----' ;-) Rich
From: Jan Panteltje on 24 Nov 2009 18:34 On a sunny day (Wed, 25 Nov 2009 00:06:16 +0100) it happened Frank Buss <fb(a)frank-buss.de> wrote in <8ztnmdvdii48.qvbmwoy9mods.dlg(a)40tude.net>: >http://www.frank-buss.de/vco/ Is not a 74HC4046 a much simpler VCO with a lot bigger range? hehe
From: Paul Hovnanian P.E. on 24 Nov 2009 17:45 Tim Wescott wrote: > > On Tue, 24 Nov 2009 22:19:26 +0100, 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 > > .-----. .----. .-----. > | | | | | | > 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. -- Paul Hovnanian mailto:Paul(a)Hovnanian.com ------------------------------------------------------------------ "Grant me the strength to change what I can, the ability to accept what I can't, and the incapacity to tell the difference." -- Calvin (of Calvin and Hobbes)
From: a7yvm109gf5d1 on 24 Nov 2009 18:46 On Nov 24, 4:30 pm, Tim Wescott <t...(a)seemywebsite.com> wrote: > > > 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 > > .-----. .----. .-----. > | | | | | | > problem o---->| ADC |----->| uP |----->| DAC |-----> answer > | | | | | | > '-----' '----' '-----' > > --www.wescottdesign.com Comedy gold right there!
From: Frank Buss on 24 Nov 2009 18:52
Jan Panteltje wrote: > On a sunny day (Wed, 25 Nov 2009 00:06:16 +0100) it happened Frank Buss > <fb(a)frank-buss.de> wrote in <8ztnmdvdii48.qvbmwoy9mods.dlg(a)40tude.net>: > > >>http://www.frank-buss.de/vco/ > > Is not a 74HC4046 a much simpler VCO with a lot bigger range? > hehe But the requirements were lower limit and upper limit for the voltage, which would require more parts. BTW: The new ATtiny10, mentioned in comp.arch.embedded, is interesting for such applications, because it has some interesting PWM modes and other timer goodies, which makes it even more trivial to solve such problems. -- Frank Buss, fb(a)frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de |