AD8218 spice model is messed up.

Could someone verify for me that the AD8218 spice model is screwed up? The model and data sheet are here

formatting link

18/products/product.html

I'm just trying to reproduce Figure 35 in the datasheet. I'm using the circ uit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like tho se pins floating. I set the shunt resistor to 0.02 ohms, the battery voltag e 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 refere nce voltage instead of the reference voltage. I can reproduce the graph wit h 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

Reply to
wanderer
Loading thread data ...

e model and data sheet are here

rcuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't like t hose pins floating. I set the shunt resistor to 0.02 ohms, the battery volt age to 24V, the reference to 1.25v and vary the Load from -5Amps to 5Amps i n 0.05amp increments. My results show the part offsetting by twice the refe rence voltage instead of the reference voltage. I can reproduce the graph w ith the 1.25V reference but the datasheet shows a 2.5v reference. Here is t he spice netlist.

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 ad ding the V(ref) is redundant. Changing this line gives me the results I exp ect. But maybe I'm expecting the wrong results:)

Reply to
wanderer

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.
Reply to
Jim Thompson

he model and data sheet are here

ircuit 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 vol tage 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 ref erence 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.

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

Reply to
wanderer

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.
Reply to
Jim Thompson

I need an AD8218 symbol... AD8218.asy

...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.
Reply to
Jim Thompson

The model and data sheet are here

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 vo ltage 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 re ference 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.

I don't have the actual part. I'm giving up on it and switching to the LT60

  1. Thanks for the help.

Reply to
wanderer

? The model and data sheet are here

e circuit in Figure 34. I tied Vs and ENB to +IN because Ltspice doesn't li ke 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 5Am ps in 0.05amp increments. My results show the part offsetting by twice the reference voltage instead of the reference voltage. I can reproduce the gra ph with the 1.25V reference but the datasheet shows a 2.5v reference. Here is the spice netlist.

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

Reply to
wanderer

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.
Reply to
Jim Thompson

Get them while they last!

formatting link

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
Reply to
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.
Reply to
Jim Thompson

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)
Reply to
Fred Abse

WHAT? Seriously? When did that happen?

[...]
--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

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)
Reply to
Fred Abse

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/
Reply to
Joerg

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.
Reply to
Jim Thompson

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)
Reply to
Fred Abse

formatting link

"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.
Reply to
Jim Thompson

I think syntaxes is right. But it sound too much like sin taxes.

[...]
--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

Only in certain counties in Nevada...

-- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)

Reply to
Fred Abse

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.