Post Go back to editing

# AD8538 in high-side current measurement and temperature simulation in LTSpice

Hi!

I try to simulate a high-side current measurement circuit. But when i simulate with different temperatures the current output curve moves (due to offset) much more than I expect.

For the AD8538 the offset voltage drift is about 0.03uV/C. So when I go from 25C to 75C I expect the input offset on the OP to change with about 0.03*50 = 1.5uV. And this offset should correspond to a current of about 1.5uV / 0.05 = 30uA (R1=0.05 is the current sense resistor).

Running the simulation however results in about 300mA of current change (blue curves for 25 and 75C, green for the reference current).

So my question is what is wrong with my setup or understanding of the circuit? It seems not right the current offset should be so large?

I attach the LTSpice simulation setup below. Just remove the .txt extension in the filename (I was not able to upload the circuit directly).

Best regards

Joakim

```Version 4
SHEET 1 1348 856
WIRE -272 -208 -880 -208
WIRE 208 -208 -192 -208
WIRE -880 -160 -880 -208
WIRE -880 -160 -1088 -160
WIRE -752 -160 -880 -160
WIRE -656 -160 -752 -160
WIRE -128 -160 -576 -160
WIRE 688 -160 -128 -160
WIRE 816 -160 688 -160
WIRE 688 -144 688 -160
WIRE 816 -128 816 -160
WIRE 960 -128 816 -128
WIRE -128 -112 -128 -160
WIRE -752 -80 -752 -160
WIRE 816 -64 816 -128
WIRE 832 -64 816 -64
WIRE -1088 -48 -1088 -160
WIRE 784 -48 752 -48
WIRE 960 -48 960 -128
WIRE 208 -32 208 -208
WIRE 688 -32 688 -64
WIRE 752 -32 752 -48
WIRE 752 -32 688 -32
WIRE -128 -16 -128 -32
WIRE -16 -16 -128 -16
WIRE 176 -16 64 -16
WIRE 336 0 240 0
WIRE 752 0 752 -32
WIRE 752 0 416 0
WIRE 176 16 -112 16
WIRE 832 48 832 32
WIRE 832 48 816 48
WIRE -752 80 -752 0
WIRE -656 80 -752 80
WIRE -240 80 -576 80
WIRE -112 80 -112 16
WIRE -112 80 -160 80
WIRE 816 96 816 48
WIRE 960 96 960 32
WIRE 960 96 816 96
WIRE 208 128 208 32
WIRE -752 144 -752 80
WIRE -752 144 -832 144
WIRE -832 176 -832 144
WIRE -752 176 -752 144
WIRE 816 176 816 96
WIRE 816 208 816 176
WIRE -832 288 -832 256
WIRE -752 288 -752 256
WIRE -752 288 -832 288
WIRE 480 288 480 256
WIRE 480 304 480 288
WIRE 816 304 816 288
WIRE -1088 320 -1088 32
WIRE -752 320 -752 288
WIRE -752 320 -1088 320
WIRE -752 352 -752 320
FLAG -752 352 0
FLAG 816 304 0
FLAG 816 176 Vsens
FLAG 480 384 0
FLAG 480 176 0
FLAG 480 288 Imeas
FLAG 208 128 0
SYMBOL res -768 -96 R0
SYMATTR InstName R1
SYMATTR Value 0.05
SYMBOL res -144 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R2
SYMATTR Value 5k
SYMBOL res -560 -176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 200
SYMBOL res -112 -16 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R4
SYMATTR Value 5k
SYMBOL current -752 176 R0
WINDOW 123 24 28 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName I1
SYMATTR Value PULSE(10m 2 0 10m 10m 100m 200m 1)
SYMBOL voltage -1088 -64 R0
WINDOW 123 24 72 Left 2
WINDOW 39 24 138 Left 2
SYMATTR SpiceLine Rser=0.01
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL res 800 192 R0
SYMATTR InstName R5
SYMATTR Value 1k
SYMBOL pmos 784 32 M180
SYMATTR InstName M1
SYMATTR Value BSS84
SYMBOL res 432 -16 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 1k
SYMBOL res 672 -160 R0
SYMATTR InstName R8
SYMATTR Value 1Meg
SYMATTR InstName U1
SYMBOL res 944 -64 R0
SYMATTR InstName R9
SYMATTR Value 1Meg
SYMBOL res -816 272 R180
WINDOW 0 36 76 Left 2
WINDOW 3 36 40 Left 2
SYMATTR InstName R10
SYMATTR Value 1Meg
SYMBOL res -560 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value 200
SYMBOL bi 480 176 R0
SYMATTR InstName B1
SYMATTR Value I={V(Vsens)*4}
SYMBOL res 464 288 R0
SYMATTR InstName R12
SYMATTR Value 1
SYMBOL res -176 -224 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R13
SYMATTR Value 0.01
SYMBOL voltage 80 -16 R90
WINDOW 123 24 72 Left 2
WINDOW 39 24 138 Left 2
SYMATTR SpiceLine Rser=0.01
SYMATTR InstName V3
SYMATTR Value {Vos}
TEXT -936 528 Left 2 !.tran 10m
TEXT -944 608 Left 2 !.param Vos 0
TEXT -944 568 Left 2 !.temp 25 75
TEXT -704 296 Left 2 ;Linear sweep current from 10mA to 2A in 10ms
TEXT 328 416 Left 2 ;Convert voltage Vsens to current
```

Parents
• After making some measurement over temperature I conclude the datasheet values seems to match the results quite well but the simulation is very off. So don't assume temperature is modelled (correctly) in the circuit models.