Maker Pro
Maker Pro

Analog Block Nonlinear In Programmable Out

H

Harry Dellamano

I need a circuit that accepts a nonlinear input voltage, two to four volt range of a thermistor output, and outputs a different nonlinear voltage, two to four range to control a battery charger's output voltage over the temperature range. The voltages are within 15% of each other over the temp range but I need 1% accuracy and operate from -40C to +85C ambient. It will operate in a +5VDC and +12VDC universe.
Does anyone make an IC that has a 12 BIT ADC front end, programmable ROM and 12 BIT DAC output to do this function?
What other possibilities are there?
Hey Win, no designs in AoE that I could find.

thanks
harry
 
F

Fred Bloggs

Harry said:
I need a circuit that accepts a nonlinear input voltage, two to four
volt range of a thermistor output, and outputs a different nonlinear
voltage, two to four range to control a battery charger's output voltage
over the temperature range. The voltages are within 15% of each other
over the temp range but I need 1% accuracy and operate from -40C to +85C
ambient. It will operate in a +5VDC and +12VDC universe.
Does anyone make an IC that has a 12 BIT ADC front end, programmable
ROM and 12 BIT DAC output to do this function?
What other possibilities are there?

Something like the MAX1463

http://pdfserv.maxim-ic.com/arpdf/MAX1463.pdf
 
A

Andrew Paule

Easy way to do this -

A/D input to address of 12x12 SRAM (3 4 bit parts), data bus of SRAM to
DAC - need a little glue for a micro to load (will give you control of
your desired transfer function), pretty standard LUT architecture.

Andrew
 
S

Spehro Pefhany

I need a circuit that accepts a nonlinear input voltage, two to four volt range of a thermistor output, and outputs a different nonlinear voltage, two to four range to control a battery charger's output voltage over the temperature range. The voltages are within 15% of each other over the temp range but I need 1% accuracy and operate from -40C to +85C ambient. It will operate in a +5VDC and +12VDC universe.
Does anyone make an IC that has a 12 BIT ADC front end, programmable ROM and 12 BIT DAC output to do this function?

Analog Devices and Cygnal and TI have such devices. They all sport an
8051 and Flash ROM in a corner of the chip to do whatever you like
inbetween. If you can live with 10 bit PWM for the output, there are
other, cheaper, choices.

Best regards,
Spehro Pefhany
 
T

Tony Williams

I need a circuit that accepts a nonlinear input voltage, two to
four volt range of a thermistor output, and outputs a different
nonlinear voltage, two to four range to control a battery
charger's output voltage over the temperature range. The
voltages are within 15% of each other over the temp range but I
need 1% accuracy and operate from -40C to +85C ambient. It will
operate in a +5VDC and +12VDC universe. Does anyone make an IC
that has a 12 BIT ADC front end, programmable ROM and 12 BIT DAC
output to do this function? What other possibilities are there?

Harry, is it neccessary to put the whole width of the signal
through a lookup table?

Since there is only a 15% error from direct control then it could
make sense to use direct control anyway and then just have an
error-corrector, sitting off to one side, summing-in the req'd
correction to the charger. This reduces the resolution/accuracy
required from the error-corrector.
Hey Win, no designs in AoE that I could find.

Thermistors and RTDs are linearised with resistor networks,
and/or tickling the stimulus. There's nothing to say that
a thermistor cannot be similarly 'non-linearised', so that
its output tracks the required battery volts with temperature.

Can you post information on the thermistor tables and the
required battery volts v temperature?
 
F

Fred Bloggs

Chris said:
Wow, that's a trip. What will they think of next?

It's basically a microcontroller, with some added PASC (programmable
analog signal chain). So it could do what Harry wants in close to one
chip. But this could also be done with "ordinary" microcontrollers,
with internal or external A/D D/A etc.

I have just been to a TI MSP430 seminar. It's capable of doing this,
though it would need a few external parts.

What really makes me wonder about the Maxim chip is the development tools?

In that regard, for getting a result quickly, a well established
architecture like the MSP430 or perhaps the Cygnal 8051 parts would be a
good choice. The MSP430 is cool because of it's DMA controllers which
are hooked to the A/D and D/A. But a lookup table index might need some
CPU cycles. The MSP430 might have enough flash ROM to hold Harry's
linearization table (12-bit) and do the work. The Maxim only has 4k of
space.

Good day!

Nah- this single chip solution is so far beyond anything that can be
done with a conglomeration of separate components that it is pathetic.
Not only is there a programmable embedded CPU controller, but it also
has quite a bit of configurable analog circuitry with analog mux's,
selectable ADC reference source, programmable gain amps, timers etc. It
also totally HALTs all CPU switching when it goes into ADC conversion
mode for the ultimate interference reduction. The evaluation kit ,
MAX1463EVKIT is a mere $99 and requires minimal programming skills- all
GUI. The CPU instruction set is minimal and straightforward- impossible
to miss. As for the 4Kb flash memory- note that with the CPU smarts,
no-one would be so simple-minded as to use it as look-up table for
12-bit function conversion- it is used to store a FAR SMALLER set of
coefficients used to COMPUTE the function with the CPU. This design is
incredible overkill for the app- but the price and simplicity of
development cannot be beat.
 
H

Harry Dellamano

volt range of a thermistor output, and outputs a different nonlinear
voltage, two to four range to control a battery charger's output voltage
over the temperature range. The voltages are within 15% of each other over
the temp range but I need 1% accuracy and operate from -40C to +85C ambient.
It will operate in a +5VDC and +12VDC universe.and 12 BIT DAC output to do this function?
Analog Devices and Cygnal and TI have such devices. They all sport an
8051 and Flash ROM in a corner of the chip to do whatever you like
inbetween. If you can live with 10 bit PWM for the output, there are
other, cheaper, choices.

Best regards,
Spehro Pefhany
--

Thanks Spehro, Fred and Chris for your digital solutions but as I pointed
out to Tony, my customer hates microprocessors or digital IC>16 pins. He has
spent too much money on programmers in the past so an analog solution would
be preferred.

regards
harry
 
H

Harry Dellamano

Andrew Paule said:
Easy way to do this -

A/D input to address of 12x12 SRAM (3 4 bit parts), data bus of SRAM to
DAC - need a little glue for a micro to load (will give you control of
your desired transfer function), pretty standard LUT architecture.

Andrew
Hi Andrew, I understand the data flow and would like to find the solution
in one small IC with very little software and no glue logic. The function
could fit in a 6 pin analog/digital/analog IC but any larger forces me to
the analog domain and a solution I do not presently have.

thanks
harry
 
H

Harry Dellamano

Don Lancaster said:
PIC?

--
Many thanks,

Don Lancaster
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
voice: (928)428-4073 email: [email protected] fax 847-574-1462

Please visit my GURU's LAIR web site at http://www.tinaja.com

Hi Don, thanks for the reply.

I would like to find the solution in one small IC with very little
software and no glue logic. The function could fit in a 6 pin
analog/digital/analog IC but any larger forces me to
the analog domain and a solution I do not presently have.

thanks
harry
 
T

Tony Williams

Harry Dellamano said:
Thanks Spehro, Fred and Chris for your digital solutions but as I
pointed out to Tony,
/|\
|____??

I never saw the post referred to, so queried Harry directly
and he kindly emailed the V-batt and R-thermistor tables.

Harry's going to kick himself, because he was nearly there
already (with the 2700 ohm R-source for the thermistor) but
did not take the extra step. :)

+---------->Vout
| R-th
Const-Current +-->-----+--/\/\---+
1.855mA | |
+--/\/\---+
2700 |
------------------------------+---0v

The 1.855mA would come from a single opamp Howland
circuit, or something.

Temp Batt-mV R-therm // with 2k7 Vout-mV
~~~~ ~~~~~~~ ~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~
-5 4699 41970 2537 4706 <--- +0.15%
0 4617 32430 2492 4623 <---
5 4519 25260 2439 4524
10 4403 19830 2376 4407
15 4267 15670 2303 4272
20 4113 12480 2220 4118
25 3940 10000 2126 3944
30 3750 8066 2023 3753
35 3544 6545 1911 3545
40 3326 5343 1794 3328
45 3099 4386 1671 3100
50 2868 3620 1546 2868
55 2637 3003 1422 2638
60 2410 2504 1299 2410

Max nonconformity is 0.015% in the 0 to -5C region.
 
T

Tim Shoppa

Harry Dellamano said:
I need a circuit that accepts a nonlinear input voltage, two to four
volt range of a thermistor output, and outputs a different nonlinear
voltage, two to four range to control a battery charger's output voltage
over the temperature range. The voltages are within 15% of each other
over the temp range but I need 1% accuracy and operate from -40C to +85C
ambient. It will operate in a +5VDC and +12VDC universe.
Does anyone make an IC that has a 12 BIT ADC front end, programmable
ROM and 12 BIT DAC output to do this function?

I'm a bit confused by apparently contradictory requirement. You say you
need 1% accuracy, but then say you need 12 bit ADC, which would be
smaller than 0.025% full-scale precision.

Maybe you want 0.5% precision to get your 1% accuracy (as you seem to be
throwing away half your scale in the most naive use of the ADC.)

Don't write off Flash EEPROM PIC's. You could even customize the nonlinear
function for each thermistor and load it into the EEPROM at calibration
time, with the calibration done by the PIC itself (and a help from an
external linear temperature probe). With a 10-bit A/D (which I think
could fit your requirements) and PWM for D/A it'd all fit on a 8 pin SOIC
with a small RC for the output PWM filter.

Tim.
 
S

Spehro Pefhany

Don't write off Flash EEPROM PIC's. You could even customize the nonlinear
function for each thermistor and load it into the EEPROM at calibration
time, with the calibration done by the PIC itself (and a help from an
external linear temperature probe). With a 10-bit A/D (which I think
could fit your requirements) and PWM for D/A it'd all fit on a 8 pin SOIC
with a small RC for the output PWM filter.

Unfortunately, there are no 8-pin PICs with hardware PWM, AFAIK, but
an 18-pin package isn't so bad. It would be pretty trivial to write
the program. The hardware would be the chip, a few ceramic caps, and a
couple of resistors, using the power supply for the PWM reference.

OTOH, Tony's solution is very nice, and appropriate for the task, IMO.

Best regards,
Spehro Pefhany
 
H

Harry Dellamano

Tim Shoppa said:
I'm a bit confused by apparently contradictory requirement. You say you
need 1% accuracy, but then say you need 12 bit ADC, which would be
smaller than 0.025% full-scale precision.

Maybe you want 0.5% precision to get your 1% accuracy (as you seem to be
throwing away half your scale in the most naive use of the ADC.)

Don't write off Flash EEPROM PIC's. You could even customize the nonlinear
function for each thermistor and load it into the EEPROM at calibration
time, with the calibration done by the PIC itself (and a help from an
external linear temperature probe). With a 10-bit A/D (which I think
could fit your requirements) and PWM for D/A it'd all fit on a 8 pin SOIC
with a small RC for the output PWM filter.

Tim.

Hi Tim,
I misspoke on my accuracy statement. I need better than 1% but most ADC are
12 bits or larger these days which as you correctly point out is 0.025%. A
10 Bit would be a perfect fit.
The function could be done in a 6 pin SOIC. 10 bit ADC, EEPROM and DAC. I
thought that I might get lucky and it was off the shelf but not so.

regards
harry
 
S

Spehro Pefhany

Hi Tim,
I misspoke on my accuracy statement. I need better than 1% but most ADC are
12 bits or larger these days which as you correctly point out is 0.025%. A
10 Bit would be a perfect fit.
The function could be done in a 6 pin SOIC. 10 bit ADC, EEPROM and DAC. I
thought that I might get lucky and it was off the shelf but not so.

The PIC solution wouldn't be too bad (essentially what you're asking
for, with VERY LITTLE programming required for the setup, read the
ADC, fetch from a LUT, and output. < $2. US in 100's.

But have a look at this:


+12.00
+
|
.-.
| |
| | 482K
'-'
|
+--------------------o Vcell
|
|
.-.
| | 119.9K
| |
'-'
|
+----- +
| |
.-./ |
| | .-.
Rt |/| | | 120.7K
'-' | |
/ | '-'
+------+
===
GND


I get a maximum error of -31mV at -5'C and +20mV at 60'C, which might
be 1% if you figure error some funny way. You can fiddle the value of
the 119.9K to center the error if you like.

Temp Error (mV)
-5 -0.031
0 0.032
5 0.019
10 0.015
15 -0.004
20 -0.009
25 -0.006
30 -0.015
35 -0.008
40 -0.006
45 -0.011
50 -0.003
55 0.008
60 0.020

Best regards,
Spehro Pefhany
 
T

Tim Shoppa

Spehro Pefhany said:
Unfortunately, there are no 8-pin PICs with hardware PWM, AFAIK,

But there is so little to do that there shouldn't be any problem using
the timer and some software to do the same thing.
but an 18-pin package isn't so bad. It would be pretty trivial to write
the program. The hardware would be the chip, a few ceramic caps, and a
couple of resistors, using the power supply for the PWM reference.

At the 1% level maybe it'd be better to use a small 3-pin reference. If
I'm following Harry's comment about use in a battery charger correctly, 1%
(or better) really is a good idea.

Are there any small (8-pin?) microcontrollers with good precision references
built in?

Tim.
 
S

Spehro Pefhany

But there is so little to do that there shouldn't be any problem using
the timer and some software to do the same thing.

Sure, but the LPF frequency will be MUCH less. It's possible to get an
~8kHz 10 bit PWM timebase with the internal clock on an F819, so a
simple single pole filter with a ceramic cap could do the trick.
At the 1% level maybe it'd be better to use a small 3-pin reference. If
I'm following Harry's comment about use in a battery charger correctly, 1%
(or better) really is a good idea.

Sure, or using a cheap regulator (with good stability) adjusting it at
some point may be cheaper than going with a precision reference,
precision resistors etc. etc. A microcontroller would allow the
possibility of digital trimming, at the expense of more programming.
Are there any small (8-pin?) microcontrollers with good precision references
built in?

None that I know of. In fact, there are only three manufacturers of
such micros that I know of- Motorola, Microchip and Fairchild.

Best regards,
Spehro Pefhany
 
H

Harry Dellamano

Tim Shoppa said:
An 8-pin SOIC PIC12F675 and an external RC low-pass (for PWM DAC) come real
close to off-the-shelf. Coding effort would be measured in hours. I did
it exactly this way for a lead-acid charger I built last month (I also
had a precision reference for voltage, but that was a necessity for the
sub-1% tolerance I had to achieve for float voltage tolerance).
Are you doing lead-acid or NiMH or something else?

I had the luxury of a few square inches of board real estate available. Are
you worker under much tighter contraints?

Tim.
Hi Tim,
This is for VRLA batteries in an avionics environment, rear of commercial
aircraft. These batteries are more restricted than lead-acid which can vent
more readily. The solution looks like it must be analog since <1% looks
feasible and the minimum software restriction. Size and power dissipation is
not critical.

regards
harry
 
S

Spehro Pefhany

On Tue, 19 Aug 2003 16:04:23 GMT, the renowned Spehro Pefhany


Correction to the values and the error table..
+12.00
+
|
.-.
| |
| | 481.610 K
'-'
|
+--------------------o Vcell'
|
|
.-.
| | 121.180 K
| |
'-'
|
+----- +
| |
.-./ |
| | .-.
Rt |/| | | 120.777 K
'-' | |
/ | '-'
+------+
===
GND


T (°C) Vcell' Error (V)
-5 2.883 -0.117
0 2.802 -0.018
5 2.734 -0.006
10 2.676 0.006
15 2.628 -0.002
20 2.589 -0.001
25 2.557 0.007
30 2.531 0.001
35 2.510 0.010
40 2.493 0.013
45 2.479 0.009
50 2.468 0.018
55 2.459 0.029
60 2.451 0.041

Not so good, especially at low T, but between 0 and 55° it is
within about +/-1% of cell voltage.

Best regards,
Spehro Pefhany
 
T

Tony Williams

Harry Dellamano said:
Sorry for not being too clear. The thermistor's resistance must
be converted to the cell voltage over the temperature range. The
resistance changes from 41.97K to 2.504K while the cell voltage
must change from 3.00V to 2.410V. Jim T. correctly points out
that it takes a third order polynomial to track it accuracy. I
would like to do it in the analog domain and achieve <1% accuracy.

Sorry about that Harry. I thought volts/cell was nearest
the '4.699' and started from there. Ok, back to the
drawing board.
 
Top