Discussion:
AD8218 spice model is messed up.
(too old to reply)
w***@dialup4less.com
2013-07-19 18:15:15 UTC
Permalink
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here

http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html

I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.

* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end

Thanks
w***@dialup4less.com
2013-07-19 18:56:10 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I think line 129 is wrong

E03 70 0 Value={ IF( V(ENB) == 0, V(65) + V(600) + .08 + V(ref), IF( V(ENB) != 0, V(65) + V(600) + V(ref), V(65) + V(600) )) }

v(ref) is already added in on line 56. I think the line should read.

E03 70 0 Value={ IF( V(ENB) == 0, V(65) + V(600) + .08, V(65) + V(600) ) }

V(ENB) is either equal or not equal to zero, there is no third state and adding the V(ref) is redundant. Changing this line gives me the results I expect. But maybe I'm expecting the wrong results:)
Fred Abse
2013-07-20 14:12:02 UTC
Permalink
Post by w***@dialup4less.com
V(ENB) is either equal or not equal to zero, there is no third state and
adding the V(ref) is redundant. Changing this line gives me the results I
expect. But maybe I'm expecting the wrong results:)
Doesn't make it work for me. With + and - inputs strapped, and a common
mode stepped voltage applied, and a 2.5V Vref, offset is 2.5V, up to 5.6V
applied, then jumps to 5.2V.

Unused inputs grounded via 1T resistors, to make the solver happy.

"if" syntax differs between Pspice and LTspice. That may have something to
do with it.

AD is a TI subsidiary, now. I wonder if that subcircuit behaves properly
in TINA?

If I get the time, I'll draw the subcircuit out as a schematic. I find
that's the easiest way of debugging.
--
"For a successful technology, reality must take precedence
over public relations, for nature cannot be fooled."
(Richard Feynman)
Joerg
2013-07-20 14:25:23 UTC
Permalink
Post by Fred Abse
Post by w***@dialup4less.com
V(ENB) is either equal or not equal to zero, there is no third state and
adding the V(ref) is redundant. Changing this line gives me the results I
expect. But maybe I'm expecting the wrong results:)
Doesn't make it work for me. With + and - inputs strapped, and a common
mode stepped voltage applied, and a 2.5V Vref, offset is 2.5V, up to 5.6V
applied, then jumps to 5.2V.
Unused inputs grounded via 1T resistors, to make the solver happy.
"if" syntax differs between Pspice and LTspice. That may have something to
do with it.
AD is a TI subsidiary, now. ...
WHAT? Seriously? When did that happen?

[...]
--
Regards, Joerg

http://www.analogconsultants.com/
Fred Abse
2013-07-20 14:37:34 UTC
Permalink
Post by Joerg
Post by Fred Abse
Post by w***@dialup4less.com
V(ENB) is either equal or not equal to zero, there is no third state
and adding the V(ref) is redundant. Changing this line gives me the
results I expect. But maybe I'm expecting the wrong results:)
Doesn't make it work for me. With + and - inputs strapped, and a common
mode stepped voltage applied, and a 2.5V Vref, offset is 2.5V, up to
5.6V applied, then jumps to 5.2V.
Unused inputs grounded via 1T resistors, to make the solver happy.
"if" syntax differs between Pspice and LTspice. That may have something
to do with it.
AD is a TI subsidiary, now. ...
WHAT? Seriously? When did that happen?
[...]
I was confusing them with Burr Brown.

They appear to be one of the few remaining independents.

Sorry,pardon.
--
"For a successful technology, reality must take precedence
over public relations, for nature cannot be fooled."
(Richard Feynman)
Joerg
2013-07-20 14:49:49 UTC
Permalink
Post by Fred Abse
Post by Joerg
Post by Fred Abse
Post by w***@dialup4less.com
V(ENB) is either equal or not equal to zero, there is no third state
and adding the V(ref) is redundant. Changing this line gives me the
results I expect. But maybe I'm expecting the wrong results:)
Doesn't make it work for me. With + and - inputs strapped, and a common
mode stepped voltage applied, and a 2.5V Vref, offset is 2.5V, up to
5.6V applied, then jumps to 5.2V.
Unused inputs grounded via 1T resistors, to make the solver happy.
"if" syntax differs between Pspice and LTspice. That may have something
to do with it.
AD is a TI subsidiary, now. ...
WHAT? Seriously? When did that happen?
[...]
I was confusing them with Burr Brown.
They appear to be one of the few remaining independents.
Sorry,pardon.
Whew. Don't give us such as scare again this early in the morning :-)

TI swallowed a lot of companies. Burr-Brown, Unitrode, and then National
Semiconductor. I hope there won't be much more consolidation because
that reduces our options. Or at least if there is, then there should be
new players coming up.
--
Regards, Joerg

http://www.analogconsultants.com/
Jim Thompson
2013-07-20 15:48:47 UTC
Permalink
On Sat, 20 Jul 2013 07:12:02 -0700, Fred Abse
Post by Fred Abse
Post by w***@dialup4less.com
V(ENB) is either equal or not equal to zero, there is no third state and
adding the V(ref) is redundant. Changing this line gives me the results I
expect. But maybe I'm expecting the wrong results:)
Doesn't make it work for me. With + and - inputs strapped, and a common
mode stepped voltage applied, and a 2.5V Vref, offset is 2.5V, up to 5.6V
applied, then jumps to 5.2V.
Unused inputs grounded via 1T resistors, to make the solver happy.
"if" syntax differs between Pspice and LTspice. That may have something to
do with it.
AD is a TI subsidiary, now. I wonder if that subcircuit behaves properly
in TINA?
If I get the time, I'll draw the subcircuit out as a schematic. I find
that's the easiest way of debugging.
I don't like "IF" statements in models or circuits. They provoke
convergence issues.

The only time I use "IF" statement is to set Parameters when doing
STEP operations. These occur only during establishment (in LT
parlance) of the Spice directives, thus have no effect on convergence.

For voltage bounding, I use the following subcircuits...

******************************************************************
.SUBCKT MOST_POS A B OUT PARAMS: W=0.1
E OUT 0 VALUE {(TANH(V(A,B)/(0.679*W))*V(A,B)+V(A)+V(B))/2}
.ENDS MOST_POS
******************************************************************
.SUBCKT MOST_NEG A B OUT PARAMS: W=0.1
E OUT 0 VALUE {(TANH(V(B,A)/(0.679*W))*V(A,B)+V(A)+V(B))/2}
.ENDS MOST_NEG
******************************************************************

I developed these last year while doing a gig with Synaptics in
Rochester, NY. They have actual circuits that perform these functions
to cope with multiple supplies and unknown power sequencing events...
preventing, as Joerg would say, "PHUT!" ;-)

So I made the subcircuits to speed up simulation of circuits
containing many of these elements.

(These should work just fine in LTspice, as well as in any other Spice
variant which adheres to Berkeley Spice basics... except some may need
a name change to a "B" source... I think LTspice handles both
syntaxes.)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-07-20 15:56:31 UTC
Permalink
Post by Jim Thompson
(These should work just fine in LTspice, as well as in any other Spice
variant which adheres to Berkeley Spice basics... except some may need
a name change to a "B" source... I think LTspice handles both
syntaxes.)
LTspice handles quite a few syntaxes (syntaces?) that aren't in the manual.

The nice thing about standards is that there are so many to choose from...
--
"For a successful technology, reality must take precedence
over public relations, for nature cannot be fooled."
(Richard Feynman)
Jim Thompson
2013-07-20 16:08:54 UTC
Permalink
On Sat, 20 Jul 2013 08:56:31 -0700, Fred Abse
Post by Fred Abse
Post by Jim Thompson
(These should work just fine in LTspice, as well as in any other Spice
variant which adheres to Berkeley Spice basics... except some may need
a name change to a "B" source... I think LTspice handles both
syntaxes.)
LTspice handles quite a few syntaxes (syntaces?) that aren't in the manual.
http://www.wordhippo.com/what-is/the-plural-of/syntax.html
Post by Fred Abse
The nice thing about standards is that there are so many to choose from...
"B"-style syntax is basic to all Spice variants.

I believe PSpice first introduced the EVALUE form, but LTspice and
several other variants recognize that syntax.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Joerg
2013-07-20 16:17:48 UTC
Permalink
Post by Fred Abse
Post by Jim Thompson
(These should work just fine in LTspice, as well as in any other Spice
variant which adheres to Berkeley Spice basics... except some may need
a name change to a "B" source... I think LTspice handles both
syntaxes.)
LTspice handles quite a few syntaxes (syntaces?) that aren't in the manual.
I think syntaxes is right. But it sound too much like sin taxes.

[...]
--
Regards, Joerg

http://www.analogconsultants.com/
Fred Abse
2013-07-20 17:55:24 UTC
Permalink
Post by Joerg
I think syntaxes is right. But it sound too much like sin taxes.
Only in certain counties in Nevada...
--
"For a successful technology, reality must take precedence
over public relations, for nature cannot be fooled."
(Richard Feynman)
Jim Thompson
2013-07-19 19:13:47 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.

Grounding pins that should be floated is a no-no.

I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
w***@dialup4less.com
2013-07-19 20:08:27 UTC
Permalink
On Fri, 19 Jul 2013 11:15:15 -0700 (PDT)
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.
Grounding pins that should be floated is a no-no.
I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Here is the ascii file.

Version 4
SHEET 1 1220 680
WIRE 272 -48 240 -48
WIRE 288 -48 272 -48
WIRE -96 -16 -192 -16
WIRE 64 -16 -16 -16
WIRE 1072 16 976 16
WIRE 1216 16 1072 16
WIRE 976 112 976 16
WIRE 64 128 64 -16
WIRE 112 128 64 128
WIRE 160 128 112 128
WIRE 240 128 240 -48
WIRE 288 128 288 -48
WIRE -192 144 -192 -16
WIRE 64 160 64 128
WIRE 160 160 160 128
WIRE 192 160 160 160
WIRE 480 192 352 192
WIRE 640 192 480 192
WIRE 192 224 160 224
WIRE 64 256 64 240
WIRE 128 256 64 256
WIRE 160 256 160 224
WIRE 160 256 128 256
WIRE 976 304 976 192
WIRE -192 320 -192 224
WIRE 240 352 240 256
WIRE 352 352 240 352
WIRE 464 352 352 352
WIRE 64 384 64 256
FLAG 288 256 0
FLAG 64 464 0
FLAG 480 192 Vout
FLAG 112 128 Vneg
FLAG 128 256 Vpos
FLAG 976 304 0
FLAG 1072 16 Vref
FLAG 272 -48 Vpos
FLAG 352 352 Vref
FLAG -192 320 0
SYMBOL Opamps\\AD8218 224 192 R0
SYMATTR InstName U1
SYMATTR SpiceModel AD8218
SYMBOL voltage 64 368 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V3
SYMATTR Value 24
SYMBOL res 48 144 R0
SYMATTR InstName R2
SYMATTR Value 0.02
SYMBOL voltage 976 96 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 2.50
SYMBOL current -192 144 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value 1
SYMBOL res 0 -32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 100
TEXT 456 432 Left 2 !.include AD8218.cir
TEXT 448 392 Left 2 !.dc I1 -5 5 0.05
Jim Thompson
2013-07-19 20:17:59 UTC
Permalink
Post by w***@dialup4less.com
On Fri, 19 Jul 2013 11:15:15 -0700 (PDT)
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.
Grounding pins that should be floated is a no-no.
I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I need an AD8218 symbol... AD8218.asy
Post by w***@dialup4less.com
Here is the ascii file.
Version 4
SHEET 1 1220 680
WIRE 272 -48 240 -48
WIRE 288 -48 272 -48
WIRE -96 -16 -192 -16
WIRE 64 -16 -16 -16
WIRE 1072 16 976 16
WIRE 1216 16 1072 16
WIRE 976 112 976 16
WIRE 64 128 64 -16
WIRE 112 128 64 128
WIRE 160 128 112 128
WIRE 240 128 240 -48
WIRE 288 128 288 -48
WIRE -192 144 -192 -16
WIRE 64 160 64 128
WIRE 160 160 160 128
WIRE 192 160 160 160
WIRE 480 192 352 192
WIRE 640 192 480 192
WIRE 192 224 160 224
WIRE 64 256 64 240
WIRE 128 256 64 256
WIRE 160 256 160 224
WIRE 160 256 128 256
WIRE 976 304 976 192
WIRE -192 320 -192 224
WIRE 240 352 240 256
WIRE 352 352 240 352
WIRE 464 352 352 352
WIRE 64 384 64 256
FLAG 288 256 0
FLAG 64 464 0
FLAG 480 192 Vout
FLAG 112 128 Vneg
FLAG 128 256 Vpos
FLAG 976 304 0
FLAG 1072 16 Vref
FLAG 272 -48 Vpos
FLAG 352 352 Vref
FLAG -192 320 0
SYMBOL Opamps\\AD8218 224 192 R0
SYMATTR InstName U1
SYMATTR SpiceModel AD8218
SYMBOL voltage 64 368 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V3
SYMATTR Value 24
SYMBOL res 48 144 R0
SYMATTR InstName R2
SYMATTR Value 0.02
SYMBOL voltage 976 96 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 2.50
SYMBOL current -192 144 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value 1
SYMBOL res 0 -32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 100
TEXT 456 432 Left 2 !.include AD8218.cir
TEXT 448 392 Left 2 !.dc I1 -5 5 0.05
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
w***@dialup4less.com
2013-07-19 20:34:03 UTC
Permalink
On Fri, 19 Jul 2013 13:08:27 -0700 (PDT), wanderer
Post by w***@dialup4less.com
On Fri, 19 Jul 2013 11:15:15 -0700 (PDT)
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.
Grounding pins that should be floated is a no-no.
I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I need an AD8218 symbol... AD8218.asy
Post by w***@dialup4less.com
Here is the ascii file.
Version 4
SHEET 1 1220 680
WIRE 272 -48 240 -48
WIRE 288 -48 272 -48
WIRE -96 -16 -192 -16
WIRE 64 -16 -16 -16
WIRE 1072 16 976 16
WIRE 1216 16 1072 16
WIRE 976 112 976 16
WIRE 64 128 64 -16
WIRE 112 128 64 128
WIRE 160 128 112 128
WIRE 240 128 240 -48
WIRE 288 128 288 -48
WIRE -192 144 -192 -16
WIRE 64 160 64 128
WIRE 160 160 160 128
WIRE 192 160 160 160
WIRE 480 192 352 192
WIRE 640 192 480 192
WIRE 192 224 160 224
WIRE 64 256 64 240
WIRE 128 256 64 256
WIRE 160 256 160 224
WIRE 160 256 128 256
WIRE 976 304 976 192
WIRE -192 320 -192 224
WIRE 240 352 240 256
WIRE 352 352 240 352
WIRE 464 352 352 352
WIRE 64 384 64 256
FLAG 288 256 0
FLAG 64 464 0
FLAG 480 192 Vout
FLAG 112 128 Vneg
FLAG 128 256 Vpos
FLAG 976 304 0
FLAG 1072 16 Vref
FLAG 272 -48 Vpos
FLAG 352 352 Vref
FLAG -192 320 0
SYMBOL Opamps\\AD8218 224 192 R0
SYMATTR InstName U1
SYMATTR SpiceModel AD8218
SYMBOL voltage 64 368 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V3
SYMATTR Value 24
SYMBOL res 48 144 R0
SYMATTR InstName R2
SYMATTR Value 0.02
SYMBOL voltage 976 96 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 2.50
SYMBOL current -192 144 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value 1
SYMBOL res 0 -32 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 100
TEXT 456 432 Left 2 !.include AD8218.cir
TEXT 448 392 Left 2 !.dc I1 -5 5 0.05
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Here is the symbol.

Version 4
SymbolType CELL
LINE Normal -32 72 124 0
LINE Normal -32 -79 -32 72
LINE Normal 124 0 -32 -79
LINE Normal 64 -30 64 -60
LINE Normal 64 27 64 61
LINE Normal 16 50 16 60
LINE Normal 16 -56 16 -60
LINE Normal 16 -55 16 -56
TEXT 71 -46 Left 2 +
TEXT 75 46 Left 2 -
TEXT -26 33 Left 2 +
TEXT -26 -34 Left 2 -
WINDOW 0 16 -80 Left 2
SYMATTR SpiceModel
SYMATTR Prefix X
SYMATTR Description
SYMATTR Value2
SYMATTR SpiceLine
SYMATTR SpiceLine2
SYMATTR ModelFile
PIN -32 32 NONE 0
PINATTR PinName In+
PINATTR SpiceOrder 1
PIN -32 -32 NONE 0
PINATTR PinName In-
PINATTR SpiceOrder 2
PIN 64 -64 NONE 0
PINATTR PinName V+
PINATTR SpiceOrder 3
PIN 16 64 BOTTOM 15
PINATTR PinName ref
PINATTR SpiceOrder 4
PIN 16 -64 TOP 15
PINATTR PinName enb
PINATTR SpiceOrder 5
PIN 64 64 NONE 0
PINATTR PinName V-
PINATTR SpiceOrder 6
PIN 128 0 NONE 0
PINATTR PinName OUT
PINATTR SpiceOrder 7
Jim Thompson
2013-07-19 20:13:43 UTC
Permalink
On Fri, 19 Jul 2013 12:13:47 -0700, Jim Thompson
Post by Jim Thompson
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.
Grounding pins that should be floated is a no-no.
I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.
...Jim Thompson
Looks like your first observation is correct... the model is certainly
messed up... no surprise... Spice modeling at Analog Devices is
managed under marketing :-(

I tried patching the model, but couldn't make it play.

Does the actual part behave like expressed on the data sheet? If so,
maybe I can write a proper model.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
w***@dialup4less.com
2013-07-19 20:31:13 UTC
Permalink
Post by Jim Thompson
On Fri, 19 Jul 2013 12:13:47 -0700, Jim Thompson
On Fri, 19 Jul 2013 11:15:15 -0700 (PDT),
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.
Grounding pins that should be floated is a no-no.
I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.
...Jim Thompson
Looks like your first observation is correct... the model is certainly
messed up... no surprise... Spice modeling at Analog Devices is
managed under marketing :-(
I tried patching the model, but couldn't make it play.
Does the actual part behave like expressed on the data sheet? If so,
maybe I can write a proper model.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I don't have the actual part. I'm giving up on it and switching to the LT6016.

Thanks for the help.
Jim Thompson
2013-07-19 20:35:25 UTC
Permalink
Post by w***@dialup4less.com
Post by Jim Thompson
On Fri, 19 Jul 2013 12:13:47 -0700, Jim Thompson
On Fri, 19 Jul 2013 11:15:15 -0700 (PDT),
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
Post the actual .asc file.
Grounding pins that should be floated is a no-no.
I use a part I made called NoFloat which applies a resistor of value
{1/Gmin} to ground.
...Jim Thompson
Looks like your first observation is correct... the model is certainly
messed up... no surprise... Spice modeling at Analog Devices is
managed under marketing :-(
I tried patching the model, but couldn't make it play.
Does the actual part behave like expressed on the data sheet? If so,
maybe I can write a proper model.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I don't have the actual part. I'm giving up on it and switching to the LT6016.
Thanks for the help.
I don't blame you. AD has been notoriously bad with Spice models...
and soon... they're going to one-up LT and require that you simulate
their parts on their website-based simulator :-(

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Phil Hobbs
2013-07-19 21:04:37 UTC
Permalink
Post by Jim Thompson
Post by w***@dialup4less.com
I don't have the actual part. I'm giving up on it and switching to the LT6016.
Thanks for the help.
I don't blame you. AD has been notoriously bad with Spice models...
and soon... they're going to one-up LT and require that you simulate
their parts on their website-based simulator :-(
Get them while they last!

http://www.analog.com/static/imported-files/spice_models/ADI_All_Spice_Models.zip

Cheers

Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net
Jim Thompson
2013-07-20 00:53:45 UTC
Permalink
On Fri, 19 Jul 2013 17:04:37 -0400, Phil Hobbs
Post by Phil Hobbs
Post by Jim Thompson
Post by w***@dialup4less.com
I don't have the actual part. I'm giving up on it and switching to the LT6016.
Thanks for the help.
I don't blame you. AD has been notoriously bad with Spice models...
and soon... they're going to one-up LT and require that you simulate
their parts on their website-based simulator :-(
Get them while they last!
http://www.analog.com/static/imported-files/spice_models/ADI_All_Spice_Models.zip
Cheers
Phil Hobbs
I presume all of them are of the same quality as that of the AD8218
?:-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-07-29 01:10:11 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
What does the real device do when connected as you simulated?

Also, unspecified on the data sheet, what happens if ENB is tied to
GND, but REF has 2.5V tied to it?

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-07-29 19:48:48 UTC
Permalink
On Sun, 28 Jul 2013 18:10:11 -0700, Jim Thompson
Post by Jim Thompson
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
What does the real device do when connected as you simulated?
Also, unspecified on the data sheet, what happens if ENB is tied to
GND, but REF has 2.5V tied to it?
...Jim Thompson
Another amusement, node ENB only exists in the node list of the
subcircuit declaration, but not within the subcircuit netlist, except
inside an "IF" statement... strange!

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
w***@dialup4less.com
2013-07-29 20:15:45 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received a reply from Analog Devices

"I think we can acknowledge the error in the model. I will have the engineer that created the model fix the error
and have the corrected version up on the web within the week."
Jim Thompson
2013-07-29 20:27:10 UTC
Permalink
Post by w***@dialup4less.com
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received a reply from Analog Devices
"I think we can acknowledge the error in the model. I will have the engineer that created the model fix the error
and have the corrected version up on the web within the week."
Congratulations on your success! I E-mailed the manager of that
department and he ignored me... probably because I harass AD
constantly about the poor quality of their models ;-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Michael A. Terrell
2013-07-31 03:24:32 UTC
Permalink
Post by Jim Thompson
Post by w***@dialup4less.com
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received a reply from Analog Devices
"I think we can acknowledge the error in the model. I will have the engineer that created the model fix the error
and have the corrected version up on the web within the week."
Congratulations on your success! I E-mailed the manager of that
department and he ignored me... probably because I harass AD
constantly about the poor quality of their models ;-)
You'll note they didn't say within which week?
--
Anyone wanting to run for any political office in the US should have to
have a DD214, and a honorable discharge.
Jim Thompson
2013-08-02 18:29:37 UTC
Permalink
On Mon, 29 Jul 2013 13:27:10 -0700, Jim Thompson
Post by Jim Thompson
Post by w***@dialup4less.com
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received a reply from Analog Devices
"I think we can acknowledge the error in the model. I will have the engineer that created the model fix the error
and have the corrected version up on the web within the week."
Congratulations on your success! I E-mailed the manager of that
department and he ignored me... probably because I harass AD
constantly about the poor quality of their models ;-)
...Jim Thompson
Looks like "within the week" really means the same as RSN >:-}

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-08-08 17:53:12 UTC
Permalink
On Fri, 02 Aug 2013 11:29:37 -0700, Jim Thompson
Post by Jim Thompson
On Mon, 29 Jul 2013 13:27:10 -0700, Jim Thompson
[snip]
Post by Jim Thompson
Post by Jim Thompson
Post by w***@dialup4less.com
I received a reply from Analog Devices
"I think we can acknowledge the error in the model. I will have the engineer that created the model fix the error
and have the corrected version up on the web within the week."
Congratulations on your success! I E-mailed the manager of that
department and he ignored me... probably because I harass AD
constantly about the poor quality of their models ;-)
...Jim Thompson
Looks like "within the week" really means the same as RSN >:-}
...Jim Thompson
Or, now, "within the two weeks" ;-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-08-16 17:06:40 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
[snip]

Seems clear that ADI is not going to produce a revised Spice model as
promised.

So... does anyone have an AD8218 device at hand and could make a few
measurements? Not covered or vaguely defined in the data sheet...

(1) What is the potential of Vs (pin 2) when no external supply is
attached? (+IN & -IN both at +5V)

(2) What is the potential on ENB (pin 3) when floating?

(3) What is the potential on REF (pin 7) when ENB is grounded and no
external reference is applied?

(4) What is the potential on REF (pin 7) when ENB is floating and no
external reference is applied?

(5) What potential is on OUT (pin 5) when ENB is grounded _and_ REF
(pin 7) has 2.5V applied? (+IN & -IN both at +5V)

If I can get the above information I'll write my own model... many
fewer lines than the 157 lines of the ADI-provided model >:-}

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
RobertMacy
2013-08-16 17:20:31 UTC
Permalink
On Fri, 16 Aug 2013 10:06:40 -0700, Jim Thompson
Post by Jim Thompson
[snip]
Seems clear that ADI is not going to produce a revised Spice model as
promised.
So... does anyone have an AD8218 device at hand and could make a few
measurements? Not covered or vaguely defined in the data sheet...
(1) What is the potential of Vs (pin 2) when no external supply is
attached? (+IN & -IN both at +5V)
(2) What is the potential on ENB (pin 3) when floating?
(3) What is the potential on REF (pin 7) when ENB is grounded and no
external reference is applied?
(4) What is the potential on REF (pin 7) when ENB is floating and no
external reference is applied?
(5) What potential is on OUT (pin 5) when ENB is grounded _and_ REF
(pin 7) has 2.5V applied? (+IN & -IN both at +5V)
If I can get the above information I'll write my own model... many
fewer lines than the 157 lines of the ADI-provided model >:-}
...Jim Thompson
Did you send an email to Alex Bordodynov?
Jim Thompson
2013-08-19 17:49:50 UTC
Permalink
On Fri, 16 Aug 2013 10:06:40 -0700, Jim Thompson
Post by Jim Thompson
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
[snip]
Seems clear that ADI is not going to produce a revised Spice model as
promised.
So... does anyone have an AD8218 device at hand and could make a few
measurements? Not covered or vaguely defined in the data sheet...
(1) What is the potential of Vs (pin 2) when no external supply is
attached? (+IN & -IN both at +5V)
(2) What is the potential on ENB (pin 3) when floating?
(3) What is the potential on REF (pin 7) when ENB is grounded and no
external reference is applied?
(4) What is the potential on REF (pin 7) when ENB is floating and no
external reference is applied?
(5) What potential is on OUT (pin 5) when ENB is grounded _and_ REF
(pin 7) has 2.5V applied? (+IN & -IN both at +5V)
If I can get the above information I'll write my own model... many
fewer lines than the 157 lines of the ADI-provided model >:-}
...Jim Thompson
My first cut at it... with no part in hand, and one of the most
useless data sheets I've seen in years...

From: Jim Thompson <To-Email-Use-The-Envelope-***@On-My-Web-Site.com>
Newsgroups: alt.binaries.schematics.electronic
Subject: AD8218 Subcircuit - AD8218_JT.lib
Date: Sun, 18 Aug 2013 14:30:26 -0700
Message-ID: <***@4ax.com>

If there's further interest I'll get a part, take some measurements
myself and refine all the details.

(My lab is currently boxed up while the new house is being built. When
it's finished I'll have a complete shop ;-)

This is just a self-amusement to demonstrate that I can write better
models than those... >:-}

Please report any bugs or incongruities with your brand of Spice
simulator.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-08-19 20:48:48 UTC
Permalink
On Fri, 16 Aug 2013 10:06:40 -0700, Jim Thompson
Post by Jim Thompson
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
[snip]
Seems clear that ADI is not going to produce a revised Spice model as
promised.
So... does anyone have an AD8218 device at hand and could make a few
measurements? Not covered or vaguely defined in the data sheet...
(1) What is the potential of Vs (pin 2) when no external supply is
attached? (+IN & -IN both at +5V)
(2) What is the potential on ENB (pin 3) when floating?
(3) What is the potential on REF (pin 7) when ENB is grounded and no
external reference is applied?
(4) What is the potential on REF (pin 7) when ENB is floating and no
external reference is applied?
(5) What potential is on OUT (pin 5) when ENB is grounded _and_ REF
(pin 7) has 2.5V applied? (+IN & -IN both at +5V)
If I can get the above information I'll write my own model... many
fewer lines than the 157 lines of the ADI-provided model >:-}
...Jim Thompson
My first cut at it... with no part in hand, and one of the most
useless data sheets I've seen in years...

From: Jim Thompson <To-Email-Use-The-Envelope-***@On-My-Web-Site.com>
Newsgroups: alt.binaries.schematics.electronic
Subject: AD8218 Subcircuit - AD8218_JT.lib
Date: Sun, 18 Aug 2013 14:30:26 -0700
Message-ID: <***@4ax.com>

If there's further interest I'll get a part, take some measurements
myself and refine all the details.

(My lab is currently boxed up while the new house is being built. When
it's finished I'll have a complete shop ;-)

This is just a self-amusement to demonstrate that I can write better
models than those... >:-}

Please report any bugs or incongruities with your brand of Spice
simulator.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-08-20 21:05:45 UTC
Permalink
My first cut at it... with no part in hand, and one of the most useless
data sheets I've seen in years...
Newsgroups: alt.binaries.schematics.electronic Subject: AD8218 Subcircuit
If there's further interest I'll get a part, take some measurements myself
and refine all the details.
(My lab is currently boxed up while the new house is being built. When
it's finished I'll have a complete shop ;-)
This is just a self-amusement to demonstrate that I can write better
models than those... >:-}
Please report any bugs or incongruities with your brand of Spice
simulator.
A quick play with LTspice shows it works. I've not dug deep, yet, but, at
least the offset pin works like it should (and didn't with AD's model).

More later, when I've had a proper look.
--
"Design is the reverse of analysis"
(R.D. Middlebrook)
Jim Thompson
2013-08-20 22:03:44 UTC
Permalink
On Tue, 20 Aug 2013 14:05:45 -0700, Fred Abse
Post by Fred Abse
My first cut at it... with no part in hand, and one of the most useless
data sheets I've seen in years...
Newsgroups: alt.binaries.schematics.electronic Subject: AD8218 Subcircuit
If there's further interest I'll get a part, take some measurements myself
and refine all the details.
(My lab is currently boxed up while the new house is being built. When
it's finished I'll have a complete shop ;-)
This is just a self-amusement to demonstrate that I can write better
models than those... >:-}
Please report any bugs or incongruities with your brand of Spice
simulator.
A quick play with LTspice shows it works. I've not dug deep, yet, but, at
least the offset pin works like it should (and didn't with AD's model).
More later, when I've had a proper look.
Great! My plan, at retirement, has been to do both, write a book and
make a business out of developing Spice models.

Now that ADI has provided a correction I'll A-B test mine against
theirs. My main guessing points were input bias current and what
floated nodes looked like. (I suspect they didn't address that
properly ;-)

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-08-23 19:44:21 UTC
Permalink
Post by Jim Thompson
On Tue, 20 Aug 2013 14:05:45 -0700, Fred Abse
Post by Fred Abse
More later, when I've had a proper look.
Great! My plan, at retirement, has been to do both, write a book and
make a business out of developing Spice models.
Now that ADI has provided a correction I'll A-B test mine against
theirs. My main guessing points were input bias current and what
floated nodes looked like. (I suspect they didn't address that
properly ;-)
No, they didn't. I had to add a couple of 1T resistors to their subckt, to
allow floating VS and ENB, to clear Spice warnings..

Your model shows more overshoot, and ringing, on 10mV pulse input, than
the ADI model.

I don't think much of the pulse generator it seems they used to measure
rise time (datasheet fig.11, green trace). >100ns rise? Yecch!
--
"Design is the reverse of analysis"
(R.D. Middlebrook)
Jim Thompson
2013-08-23 20:25:39 UTC
Permalink
On Fri, 23 Aug 2013 12:44:21 -0700, Fred Abse
Post by Fred Abse
Post by Jim Thompson
On Tue, 20 Aug 2013 14:05:45 -0700, Fred Abse
Post by Fred Abse
More later, when I've had a proper look.
Great! My plan, at retirement, has been to do both, write a book and
make a business out of developing Spice models.
Now that ADI has provided a correction I'll A-B test mine against
theirs. My main guessing points were input bias current and what
floated nodes looked like. (I suspect they didn't address that
properly ;-)
No, they didn't. I had to add a couple of 1T resistors to their subckt, to
allow floating VS and ENB, to clear Spice warnings..
I used my "NoFloat" and "NoFloat2Connections" parts in my subcircuit
development ;-)
Post by Fred Abse
Your model shows more overshoot, and ringing, on 10mV pulse input, than
the ADI model.
Yep, I just winged the AC response from the data sheet. I haven't
gotten around to A-B testing yet.
Post by Fred Abse
I don't think much of the pulse generator it seems they used to measure
rise time (datasheet fig.11, green trace). >100ns rise? Yecch!
I don't know. In a buck switcher, for example, the current isn't
going to change rapidly.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-08-23 20:48:14 UTC
Permalink
Post by Jim Thompson
On Fri, 23 Aug 2013 12:44:21 -0700, Fred Abse
Post by Fred Abse
I don't think much of the pulse generator it seems they used to measure
rise time (datasheet fig.11, green trace). >100ns rise? Yecch!
I don't know. In a buck switcher, for example, the current isn't going to
change rapidly.
Yeah true, but for laboratory characterization?

I don't think I I've ever had a pulse generator that bad ;-)
--
"Design is the reverse of analysis"
(R.D. Middlebrook)
Jim Thompson
2013-08-25 21:21:17 UTC
Permalink
On Fri, 23 Aug 2013 12:44:21 -0700, Fred Abse
Post by Fred Abse
Post by Jim Thompson
On Tue, 20 Aug 2013 14:05:45 -0700, Fred Abse
Post by Fred Abse
More later, when I've had a proper look.
Great! My plan, at retirement, has been to do both, write a book and
make a business out of developing Spice models.
Now that ADI has provided a correction I'll A-B test mine against
theirs. My main guessing points were input bias current and what
floated nodes looked like. (I suspect they didn't address that
properly ;-)
No, they didn't. I had to add a couple of 1T resistors to their subckt, to
allow floating VS and ENB, to clear Spice warnings..
Your model shows more overshoot, and ringing, on 10mV pulse input, than
the ADI model.
Another inconsistency. The data sheet shows some peaking in the AC
curves, but the model doesn't ;-)

The ADI model, in spite of all the sections, looks like an ideal
OpAmp.
Post by Fred Abse
I don't think much of the pulse generator it seems they used to measure
rise time (datasheet fig.11, green trace). >100ns rise? Yecch!
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-08-25 21:39:21 UTC
Permalink
On Fri, 23 Aug 2013 12:44:21 -0700, Fred Abse
Post by Fred Abse
Post by Jim Thompson
On Tue, 20 Aug 2013 14:05:45 -0700, Fred Abse
Post by Fred Abse
More later, when I've had a proper look.
Great! My plan, at retirement, has been to do both, write a book and
make a business out of developing Spice models.
Now that ADI has provided a correction I'll A-B test mine against
theirs. My main guessing points were input bias current and what
floated nodes looked like. (I suspect they didn't address that
properly ;-)
No, they didn't. I had to add a couple of 1T resistors to their subckt, to
allow floating VS and ENB, to clear Spice warnings..
Your model shows more overshoot, and ringing, on 10mV pulse input, than
the ADI model.
Change my OpAmp subcircuit params call to...

PARAMS: GBW=0.2 PM=60

Then it'll match the ADI model, but not the ADI data sheet >:-}
Post by Fred Abse
I don't think much of the pulse generator it seems they used to measure
rise time (datasheet fig.11, green trace). >100ns rise? Yecch!
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-08-26 16:55:54 UTC
Permalink
Post by Jim Thompson
Change my OpAmp subcircuit params call to...
PARAMS: GBW=0.2 PM=60
Then it'll match the ADI model, but not the ADI data sheet >:-}
Doesn't change much, AFAICS.

Comparison posted to a.b.s.e.
--
"Design is the reverse of analysis"
(R.D. Middlebrook)
Jim Thompson
2013-08-26 17:04:50 UTC
Permalink
On Mon, 26 Aug 2013 09:55:54 -0700, Fred Abse
Post by Fred Abse
Post by Jim Thompson
Change my OpAmp subcircuit params call to...
PARAMS: GBW=0.2 PM=60
Then it'll match the ADI model, but not the ADI data sheet >:-}
Doesn't change much, AFAICS.
Comparison posted to a.b.s.e.
You changed it in the wrong place, see..

From: Jim Thompson <To-Email-Use-The-Envelope-***@On-My-Web-Site.com>
Newsgroups: alt.binaries.schematics.electronic
Subject: Re: AD8218 model from SED, comparison of transient response,
ADI and two JT versions.
Date: Mon, 26 Aug 2013 09:57:20 -0700
Message-ID: <***@4ax.com>

Study up on "params" in subcircuits >:-}

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-08-26 17:23:16 UTC
Permalink
Post by Jim Thompson
You changed it in the wrong place, see..
Yes, I did.
Post by Jim Thompson
Newsgroups: alt.binaries.schematics.electronic Subject: Re: AD8218 model
from SED, comparison of transient response, ADI and two JT versions.
Study up on "params" in subcircuits >:-}
That's my Berkeley 3f habits. no params in Berkeley 3.

Mea culpa.


Same as the ADI model, now.--

Yes,


"Design is the reverse of analysis"
(R.D. Middlebrook)
Jim Thompson
2013-08-26 23:09:38 UTC
Permalink
On Mon, 26 Aug 2013 10:23:16 -0700, Fred Abse
Post by Fred Abse
Post by Jim Thompson
You changed it in the wrong place, see..
Yes, I did.
Post by Jim Thompson
Newsgroups: alt.binaries.schematics.electronic Subject: Re: AD8218 model
from SED, comparison of transient response, ADI and two JT versions.
Study up on "params" in subcircuits >:-}
That's my Berkeley 3f habits. no params in Berkeley 3.
Mea culpa.
Same as the ADI model, now.--
Yes,
"Design is the reverse of analysis"
(R.D. Middlebrook)
Good! However, neither now match the data sheet regarding GBW.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-08-18 21:37:13 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
My first cut at it... with no part in hand, and one of the most
useless data sheets I've seen in years...

From: Jim Thompson <To-Email-Use-The-Envelope-***@On-My-Web-Site.com>
Newsgroups: alt.binaries.schematics.electronic
Subject: AD8218 Subcircuit - AD8218_JT.lib
Date: Sun, 18 Aug 2013 14:30:26 -0700
Message-ID: <***@4ax.com>

If there's further interest I'll get a part, take some measurements
myself and refine all the details.

(My lab is currently boxed up while the new house is being built. When
it's finished I'll have a complete shop ;-)

This is just a self-amusement to demonstrate that I can write better
models than those... >:-}

Please report any bugs or incongruities with your brand of Spice
simulator.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
wanderer
2013-08-20 19:32:38 UTC
Permalink
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received the new AD8218.cir file. I haven't tried it yet. It should be on the ADI website within the next week or so.

* AD8218 SPICE Macro-model
* Description: Current Shunt Monitor, high side current sensing
* Generic Desc: 4.0V to 80V operation, 8S6DPTMRNJIX
* Developed by: DK
* Revision History:
* 1.0 (9/2012) - DK - initial release
* 2.0 (8/2013) - PB - modified gain of voltages on VREF to output from 2x to 1x

* Copyright 2012 by Analog Devices, Inc.
*
* Refer to http://www.analog.com/Analog_Root/static/techSupport/designTools/spiceModels/license/spice_general.html
* for License Statement. Use of this model indicates your acceptance
* of the terms and provisions in the License Statement.
*
*
* Not Modeled:
* Temperature effects
* PSRR vs Frequency
*
* Parameters modeled include:
* CMRR vs Frequency
* VOS (RTI)
* Bandwidth
* Gain Error
* Voltage Spectral Noise: 110nV/rt hz at 1kHz
* Output Impedance: 2 ohms
* Slew Rate
* Common Mode Range: 4.0V to 80V
*
* END Notes
* Maximum output voltage limited to 5.2V
*
* Node Assignments
* noninverting input
* | inverting input
* | | Vs
* | | | ref
* | | | | enable
* | | | | | ground
* | | | | | | output
.SUBCKT AD8218 +IN -IN VS REF ENB GND OUT

*** Input Stage ***
EV 99 0 Value={ IF( V(VS) <4, V(+IN) , IF( V(VS) > 5.5, V(+IN), V(VS) )) }
Q1 3 1 7. 0 NPN
Q2 4 2 8 0 NPN
R1 99 3 1129
R2 99 4 1129
R3 7. 9 1e3
R4 8 9 1e3
I1 9 GND 400E-6
Ibp +IN GND 124E-6
Ibn -IN GND 124E-6

*** Input and Feedback Resistors ***
EOS 5 1 poly(1) (201,GND) 0 -1
R9 5 +IN 75e3
R10 REF 5 1.5e6
R11 -IN 2 75.045e3
R12 20 2 1.5e6

*** 1st Stage ***
D1 100 6 DZENER2
G1 100 10 1 2 .001
D2 10 6 DZENER1
R8 10 100 200e3

*** 2nd Stage ***
G2 100 20 10 100 .005
R7 20 100 1E6
C1 20 100 11.68E-9

*** Internal Reference ***
E1 100 0 7 0 1
R5 99 7 100e3
R6 7 GND 100e3

**** zero-pole stage
*G4 100 30 20 100 .59e-6
G4 100 30 20 100 .588e-6
R14 30 35 1e6
R16 35 100 1.7e6
L1 30 35 .65

**** 1st pole stage
G3 100 40 30 100 1e-6
R13 40 100 1E6
C2 40 100 186e-15

**** 2nd pole stage
G5 100 45 40 100 1e-6
R15 45 100 1E6
C3 45 100 186e-15
*C3 45 100 1e-15

*** Spectral Noise ***
VN GND 190 .65
DN 190 200 DNOISE
RN 200 GND 1
VM GND 200 0
FN GND 201 VM 1
RZ 201 GND 1

*** CMRR ***
*GCMR 500 0 505 0 .3e-9
*RCMR 500 501 1e6
*LCMR 501 0 80

GCMR 500 0 505 0 .3e-9
RCM1 500 501 549e6
LCMR 500 501 80
RCM2 501 0 1e6

GCM2 600 0 500 0 .85e-6
RCM3 600 0 1e6
CCM2 600 0 655e-15

RCMR1 +IN 505 10e6
RCMR2 505 -IN 10e6

*** Clamp
*D3 11 20 Dlow
D3 11 20 D
V7 11 0 0
D4 20 12 D
V8 +IN 12 .722

*** Output Stage ***
EAVG AVG GND Value={ ((V(+IN) + V(-IN))*0.5 )}
E02 65 0 Value={ IF( V(AVG) > 80, 5.2 , IF( V(AVG) < 4.0, 0, V(45))) }
E03 70 0 Value={ IF( V(ENB) == 0, V(65) + V(600) + .08, IF( V(ENB) != 0, V(65) + V(600), V(65) + V(600) )) }
E04 75 0 Value={ IF( V(70) > 5.2, 5.2 , IF( V(70) < 5.2, V(70)-.00491, V(70) )) }


*** Output Resistance
*Rout 70 OUT 2
Rout 75 OUT 2
*** Output Current limiting
Et 71 0 70 OUT 20
Qc 45 71 72 0 NPN
Re 72 0 10

.model D D
*.model Dlow D(Rdon=0 Rdoff=1e6 Vfwd=0.7)
*.model Dlow D(Ron=0 Roff=1e6 Vf=0.7)
.MODEL DZENER1 D(BV=2V, IS=1E-14, IBV=1E-3)
.MODEL DZENER2 D(BV=2V, IS=1E-14, IBV=1E-3)
.MODEL DNOISE D(AF=0, KF=0.0195e-10.5)
.model DILIM D(IS=1E-15)
.model NPN NPN

.end
Jim Thompson
2013-08-20 22:00:14 UTC
Permalink
On Tue, 20 Aug 2013 12:32:38 -0700 (PDT), wanderer
Post by wanderer
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received the new AD8218.cir file. I haven't tried it yet. It should be on the ADI website within the next week or so.
* AD8218 SPICE Macro-model
* Description: Current Shunt Monitor, high side current sensing
* Generic Desc: 4.0V to 80V operation, 8S6DPTMRNJIX
* Developed by: DK
* 1.0 (9/2012) - DK - initial release
* 2.0 (8/2013) - PB - modified gain of voltages on VREF to output from 2x to 1x
* Copyright 2012 by Analog Devices, Inc.
*
* Refer to http://www.analog.com/Analog_Root/static/techSupport/designTools/spiceModels/license/spice_general.html
* for License Statement. Use of this model indicates your acceptance
* of the terms and provisions in the License Statement.
*
*
* Temperature effects
* PSRR vs Frequency
*
* CMRR vs Frequency
* VOS (RTI)
* Bandwidth
* Gain Error
* Voltage Spectral Noise: 110nV/rt hz at 1kHz
* Output Impedance: 2 ohms
* Slew Rate
* Common Mode Range: 4.0V to 80V
*
* END Notes
* Maximum output voltage limited to 5.2V
*
* Node Assignments
* noninverting input
* | inverting input
* | | Vs
* | | | ref
* | | | | enable
* | | | | | ground
* | | | | | | output
.SUBCKT AD8218 +IN -IN VS REF ENB GND OUT
*** Input Stage ***
EV 99 0 Value={ IF( V(VS) <4, V(+IN) , IF( V(VS) > 5.5, V(+IN), V(VS) )) }
Q1 3 1 7. 0 NPN
Q2 4 2 8 0 NPN
R1 99 3 1129
R2 99 4 1129
R3 7. 9 1e3
R4 8 9 1e3
I1 9 GND 400E-6
Ibp +IN GND 124E-6
Ibn -IN GND 124E-6
*** Input and Feedback Resistors ***
EOS 5 1 poly(1) (201,GND) 0 -1
R9 5 +IN 75e3
R10 REF 5 1.5e6
R11 -IN 2 75.045e3
R12 20 2 1.5e6
*** 1st Stage ***
D1 100 6 DZENER2
G1 100 10 1 2 .001
D2 10 6 DZENER1
R8 10 100 200e3
*** 2nd Stage ***
G2 100 20 10 100 .005
R7 20 100 1E6
C1 20 100 11.68E-9
*** Internal Reference ***
E1 100 0 7 0 1
R5 99 7 100e3
R6 7 GND 100e3
**** zero-pole stage
*G4 100 30 20 100 .59e-6
G4 100 30 20 100 .588e-6
R14 30 35 1e6
R16 35 100 1.7e6
L1 30 35 .65
**** 1st pole stage
G3 100 40 30 100 1e-6
R13 40 100 1E6
C2 40 100 186e-15
**** 2nd pole stage
G5 100 45 40 100 1e-6
R15 45 100 1E6
C3 45 100 186e-15
*C3 45 100 1e-15
*** Spectral Noise ***
VN GND 190 .65
DN 190 200 DNOISE
RN 200 GND 1
VM GND 200 0
FN GND 201 VM 1
RZ 201 GND 1
*** CMRR ***
*GCMR 500 0 505 0 .3e-9
*RCMR 500 501 1e6
*LCMR 501 0 80
GCMR 500 0 505 0 .3e-9
RCM1 500 501 549e6
LCMR 500 501 80
RCM2 501 0 1e6
GCM2 600 0 500 0 .85e-6
RCM3 600 0 1e6
CCM2 600 0 655e-15
RCMR1 +IN 505 10e6
RCMR2 505 -IN 10e6
*** Clamp
*D3 11 20 Dlow
D3 11 20 D
V7 11 0 0
D4 20 12 D
V8 +IN 12 .722
*** Output Stage ***
EAVG AVG GND Value={ ((V(+IN) + V(-IN))*0.5 )}
E02 65 0 Value={ IF( V(AVG) > 80, 5.2 , IF( V(AVG) < 4.0, 0, V(45))) }
E03 70 0 Value={ IF( V(ENB) == 0, V(65) + V(600) + .08, IF( V(ENB) != 0, V(65) + V(600), V(65) + V(600) )) }
E04 75 0 Value={ IF( V(70) > 5.2, 5.2 , IF( V(70) < 5.2, V(70)-.00491, V(70) )) }
*** Output Resistance
*Rout 70 OUT 2
Rout 75 OUT 2
*** Output Current limiting
Et 71 0 70 OUT 20
Qc 45 71 72 0 NPN
Re 72 0 10
.model D D
*.model Dlow D(Rdon=0 Rdoff=1e6 Vfwd=0.7)
*.model Dlow D(Ron=0 Roff=1e6 Vf=0.7)
.MODEL DZENER1 D(BV=2V, IS=1E-14, IBV=1E-3)
.MODEL DZENER2 D(BV=2V, IS=1E-14, IBV=1E-3)
.MODEL DNOISE D(AF=0, KF=0.0195e-10.5)
.model DILIM D(IS=1E-15)
.model NPN NPN
.end
I'll compare it to mine, and refine mine as necessary... assuming that
the ADI version matches reality >:-}

Mine has dramatically fewer lines.

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Jim Thompson
2013-08-20 23:44:36 UTC
Permalink
On Tue, 20 Aug 2013 12:32:38 -0700 (PDT), wanderer
Post by wanderer
Post by w***@dialup4less.com
Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here
http://www.analog.com/en/specialty-amplifiers/current-sense-amplifiers/ad8218/products/product.html
I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like those pins floating. I set the shunt resistor to 0.02 ohms, the battery voltage to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the graph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.
* C:\Projects\LIT\N48_TEC_Driver\simulation\AD8218Test.asc
XU1 Vpos Vneg Vpos Vref Vpos 0 Vout AD8218
V3 Vpos 0 24
R2 Vneg Vpos 0.02
V1 Vref 0 1.25
I1 N001 0 1
R1 Vneg N001 100
.include AD8218.cir
.dc I1 -5 5 0.05
.backanno
.end
Thanks
I received the new AD8218.cir file. I haven't tried it yet. It should be on the ADI website within the next week or so.
* AD8218 SPICE Macro-model
* Description: Current Shunt Monitor, high side current sensing
* Generic Desc: 4.0V to 80V operation, 8S6DPTMRNJIX
* Developed by: DK
* 1.0 (9/2012) - DK - initial release
* 2.0 (8/2013) - PB - modified gain of voltages on VREF to output from 2x to 1x
* Copyright 2012 by Analog Devices, Inc.
*
* Refer to http://www.analog.com/Analog_Root/static/techSupport/designTools/spiceModels/license/spice_general.html
* for License Statement. Use of this model indicates your acceptance
* of the terms and provisions in the License Statement.
*
*
* Temperature effects
* PSRR vs Frequency
*
* CMRR vs Frequency
* VOS (RTI)
* Bandwidth
* Gain Error
* Voltage Spectral Noise: 110nV/rt hz at 1kHz
* Output Impedance: 2 ohms
* Slew Rate
* Common Mode Range: 4.0V to 80V
*
* END Notes
* Maximum output voltage limited to 5.2V
*
* Node Assignments
* noninverting input
* | inverting input
* | | Vs
* | | | ref
* | | | | enable
* | | | | | ground
* | | | | | | output
.SUBCKT AD8218 +IN -IN VS REF ENB GND OUT
*** Input Stage ***
EV 99 0 Value={ IF( V(VS) <4, V(+IN) , IF( V(VS) > 5.5, V(+IN), V(VS) )) }
Q1 3 1 7. 0 NPN
Q2 4 2 8 0 NPN
R1 99 3 1129
R2 99 4 1129
R3 7. 9 1e3
R4 8 9 1e3
I1 9 GND 400E-6
Ibp +IN GND 124E-6
Ibn -IN GND 124E-6
*** Input and Feedback Resistors ***
EOS 5 1 poly(1) (201,GND) 0 -1
R9 5 +IN 75e3
R10 REF 5 1.5e6
R11 -IN 2 75.045e3
R12 20 2 1.5e6
*** 1st Stage ***
D1 100 6 DZENER2
G1 100 10 1 2 .001
D2 10 6 DZENER1
R8 10 100 200e3
*** 2nd Stage ***
G2 100 20 10 100 .005
R7 20 100 1E6
C1 20 100 11.68E-9
*** Internal Reference ***
E1 100 0 7 0 1
R5 99 7 100e3
R6 7 GND 100e3
**** zero-pole stage
*G4 100 30 20 100 .59e-6
G4 100 30 20 100 .588e-6
R14 30 35 1e6
R16 35 100 1.7e6
L1 30 35 .65
**** 1st pole stage
G3 100 40 30 100 1e-6
R13 40 100 1E6
C2 40 100 186e-15
**** 2nd pole stage
G5 100 45 40 100 1e-6
R15 45 100 1E6
C3 45 100 186e-15
*C3 45 100 1e-15
*** Spectral Noise ***
VN GND 190 .65
DN 190 200 DNOISE
RN 200 GND 1
VM GND 200 0
FN GND 201 VM 1
RZ 201 GND 1
*** CMRR ***
*GCMR 500 0 505 0 .3e-9
*RCMR 500 501 1e6
*LCMR 501 0 80
GCMR 500 0 505 0 .3e-9
RCM1 500 501 549e6
LCMR 500 501 80
RCM2 501 0 1e6
GCM2 600 0 500 0 .85e-6
RCM3 600 0 1e6
CCM2 600 0 655e-15
RCMR1 +IN 505 10e6
RCMR2 505 -IN 10e6
*** Clamp
*D3 11 20 Dlow
D3 11 20 D
V7 11 0 0
D4 20 12 D
V8 +IN 12 .722
*** Output Stage ***
EAVG AVG GND Value={ ((V(+IN) + V(-IN))*0.5 )}
E02 65 0 Value={ IF( V(AVG) > 80, 5.2 , IF( V(AVG) < 4.0, 0, V(45))) }
E03 70 0 Value={ IF( V(ENB) == 0, V(65) + V(600) + .08, IF( V(ENB) != 0, V(65) + V(600), V(65) + V(600) )) }
E04 75 0 Value={ IF( V(70) > 5.2, 5.2 , IF( V(70) < 5.2, V(70)-.00491, V(70) )) }
*** Output Resistance
*Rout 70 OUT 2
Rout 75 OUT 2
*** Output Current limiting
Et 71 0 70 OUT 20
Qc 45 71 72 0 NPN
Re 72 0 10
.model D D
*.model Dlow D(Rdon=0 Rdoff=1e6 Vfwd=0.7)
*.model Dlow D(Ron=0 Roff=1e6 Vf=0.7)
.MODEL DZENER1 D(BV=2V, IS=1E-14, IBV=1E-3)
.MODEL DZENER2 D(BV=2V, IS=1E-14, IBV=1E-3)
.MODEL DNOISE D(AF=0, KF=0.0195e-10.5)
.model DILIM D(IS=1E-15)
.model NPN NPN
.end
Bwahahahahahaha!

ADI Model Produces Output Above Rail and Below
Ground and the Wrong Value at I=0. See....

Newsgroups: alt.binaries.schematics.electronic
Subject: AD8218_HighSideSense: ADI Model Produces Output Above Rail
and Below Ground -
AD8218_HighSideSense-ADI_Model_Produces_Output_Above_Rail_and_Below_Ground.pdf
Date: Tue, 20 Aug 2013 16:40:51 -0700
Message-ID: <***@4ax.com>

Makes you wonder if ADI model makers check their work :-(

...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
Fred Abse
2013-08-23 19:44:23 UTC
Permalink
Post by wanderer
I received the new AD8218.cir file. I haven't tried it yet. It should be
on the ADI website within the next week or so.
Better than the previous one.


Needs ".ends", not ".end"

Add to input stage:

*Allow VS and ENB to be floated
Rvsfloat VS GND 1T
Renbfloat ENB GND 1T

Gain error versus tempearture is stairstepped.
--
"Design is the reverse of analysis"
(R.D. Middlebrook)
Loading...