From: Uwe Hercksen on


Rich Grise schrieb:

> .-----. .-----. .-----.
> | | | | | |
> problem o---->| ADC |----->| LUT |----->| DAC |-----> answer
> | | | | | |
> '-----' '-----' '-----'

Hello,

works well for 8 bit ADCs, also for 10 or 12 bits. With large EPROMs
also for 14 or 16 bits.

Bye

From: krw on
On Thu, 26 Nov 2009 16:24:40 +0100, Uwe Hercksen
<hercksen(a)mew.uni-erlangen.de> wrote:

>
>
>Rich Grise schrieb:
>
>> .-----. .-----. .-----.
>> | | | | | |
>> problem o---->| ADC |----->| LUT |----->| DAC |-----> answer
>> | | | | | |
>> '-----' '-----' '-----'
>
>Hello,
>
>works well for 8 bit ADCs, also for 10 or 12 bits. With large EPROMs
>also for 14 or 16 bits.

These days it works for any A/D or D/A you can find.
From: Nico Coesel on
Richard Rasker <spamtrap(a)linetec.nl> 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 use Excel for that purpose. If you choose an X-Y graph you can
choose to show a math approximation.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
"If it doesn't fit, use a bigger hammer!"
--------------------------------------------------------------
From: Spehro Pefhany on
On Thu, 26 Nov 2009 19:39:20 GMT, nico(a)puntnl.niks (Nico Coesel)
wrote:

>Richard Rasker <spamtrap(a)linetec.nl> 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 use Excel for that purpose. If you choose an X-Y graph you can
>choose to show a math approximation.

Matlab etc. (if you have it) or Excel can help with this kind of
design. I took the solution to the diffeq for capacitor charging from
an intial voltage

v(t) = Vf * (1- exp(-(t-a)/tau))

and fit that to the data points to find a, Vf so as to minimize the
sum of errors squared from each data point.

With Excel 2003+ I think solver is not loaded by default, just a less
powerful function that will only change a single variable.

From: Fred Bartoli on
Fred Bartoli a écrit :
> Richard Rasker a écrit :
>> Fred Bartoli <" "> wrote:
>>
>>> Spehro Pefhany a écrit :
>>>> On Wed, 25 Nov 2009 16:10:31 +0100, Fred Bartoli <" "> wrote:
>>>>
>>>>> Hmmm, even simpler...
>>
>> [snip great, simple antilog circuit]
>>
>>> Thanks for calculating the values I was to lazy to compute.
>>>
>>> Now I can reveal the whole world the last simplification bit (ahem) :
>>> that is, if you make sure the duty cycle is far enough from 100%, which
>>> sure would be with a 100Hz clock, then you can just delete the 1V
>>> reference and make it a simple resistor (with a small bypass cap) so
>>> that the 6.02V reference with the 24K9/Rsource divider just gives you
>>> the wanted 1V at the capacitor top.
>>> Adjust the source bypass cap to optimize the circuit behavior WRT the
>>> mosfet charges. A value from the low tens of pF to maybe 1nF.
>>>
>>> Also, please applause the effort I made in disclosing the resistor's
>>> secret value (just had a cup of coffee :-).
>>>
>>> That would be:
>>> 24K9 10n
>>> ___ ||
>>> 6.02V >--|___|--+--||---.
>>> | || |
>>> | ===
>>> Vout >---------. .--------+ GND
>>> | | |
>>> .-----. |
>>> \+ -/ +-||
>>> comparator \ / ->|| optim.
>>> V +-||---. .---||-----.
>>>
>>> | | | | ___ |
>>> | '--------+--|___|---+
>>>
>>> .--o--. | 4K96 |
>>> GND -|D S Q|-------------' ===
>>> | | GND
>>> 100Hz Clk >---|> -| ___
>>> | R Q|---|___|--+-----> Flow
>>> '--o--' | 200mV full scale
>>> ---
>>> ---
>>> |
>>> ===
>>> GND
>>>
>>
>>
>> Absolutely wonderful, I'm truly amazed how even elegant, simple
>> circuits can
>> often be optimized and refined even further!
>> Now talking about optimization: from this design, it would appear that
>> one
>> could swap the MOSFET and 4K96 resistor -- which would mean that the
>> internal discharge FET (using an ICM7555) can be used, doing away with an
>> external MOSFET altogether.
>>
>
> Of course you're absolutely right (I guess one cup of coffee wasn't
> enough this morning).
> Now you've really squizzed the last remaining bit of optimization out of
> this.
>
>

Argh... And also don't forget to shift the 6.02V by one volt too and
make it 7.02V, which makes the resistor's secret value 4K14


--
Thanks,
Fred.