Strange Circuit?

I thought this was a simple circuit to measure a current on the high side w ith a lower voltage op amp. Input resistors couple with the feedback resis tor to keep the op amp inputs at safe levels. No big deal, seems to work o k. I used a second amp to dig the signal out of the dirt.

Then it appeared I would need some filtering so the current measured would be an average of the PWM signal used to control the device. The caps I add ed didn't seem to do exactly what I was looking for and when I removed them I realized there was something going on that was limiting the band width. Seems it is the basic circuit without filter caps.

With no caps the roll off was around -20dB at 42 kHz. I thought I might ge t better response using lower value resistors if the parasitic capacitance was causing this (620k is a bit high). Using lower resistor values makes i t worse! With 46k4 and 20k resistors the first stage is -110 dB down!

I am missing something very fundamental here. The original resistors are 6

20k and 215k. I think this zip file contains all the files needed.

formatting link

--

  Rick C. 

  - Get 1,000 miles of free Supercharging 
  - Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C
Loading thread data ...

I'm not sure what you are looking at - but you have to place supply voltages and signal sources into your simulation, before they will run. Just labeling a net won't do that.

RL

Reply to
legg

e with a lower voltage op amp. Input resistors couple with the feedback re sistor to keep the op amp inputs at safe levels. No big deal, seems to wor k ok. I used a second amp to dig the signal out of the dirt.

ld be an average of the PWM signal used to control the device. The caps I added didn't seem to do exactly what I was looking for and when I removed t hem I realized there was something going on that was limiting the band widt h. Seems it is the basic circuit without filter caps.

get better response using lower value resistors if the parasitic capacitan ce was causing this (620k is a bit high). Using lower resistor values make s it worse! With 46k4 and 20k resistors the first stage is -110 dB down!

e 620k and 215k. I think this zip file contains all the files needed.

I am testing a design by using it as a component in the test simulation. M aybe you didn't see the main schematic? I guess I should have said the top level schematic is MotorCurrent_highside_test.asc

Opps, I added the end use circuit to the zip file rather than the test circ uit. I've uploaded a new zip file. Thanks for pointing out the mistake.

--

  Rick C. 

  + Get 1,000 miles of free Supercharging 
  + Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

ide with a lower voltage op amp. Input resistors couple with the feedback resistor to keep the op amp inputs at safe levels. No big deal, seems to w ork ok. I used a second amp to dig the signal out of the dirt.

ould be an average of the PWM signal used to control the device. The caps I added didn't seem to do exactly what I was looking for and when I removed them I realized there was something going on that was limiting the band wi dth. Seems it is the basic circuit without filter caps.

ht get better response using lower value resistors if the parasitic capacit ance was causing this (620k is a bit high). Using lower resistor values ma kes it worse! With 46k4 and 20k resistors the first stage is -110 dB down!

are 620k and 215k. I think this zip file contains all the files needed.

Maybe you didn't see the main schematic? I guess I should have said the t op level schematic is MotorCurrent_highside_test.asc

rcuit. I've uploaded a new zip file. Thanks for pointing out the mistake.

I see I also did not explain the problem well. The signal source is SIG wh ich controls the current drawn through the circuit. The circuit turns this into a small voltage across the 0.01 ohm resistor, but at a high common mo de voltage level. The first amp runs on 5 volts so the divider resistors b ring the input voltage to within that range.

The signal level is very low, so a second amp is used to boost the level. T he current measurement is the voltage output on COUT.

Without the filter caps the first amp is -3dB at 300 kHz and the overall ci rcuit is -3dB at 3.2 kHz with a low frequency gain of -10dB. With the caps the -3dB points are 1.7 kHz first stage and 850 Hz overall which is probab ly fine.

I had forgotten that the amp is only 350kHz GBW and was trying to open up t he response without the caps, so used lower value resistors for R2, R3, R4 and R5 with similar ratios. It was rather late and I probably should have put it off until later. However, when I use 46k4 and 20k resistors in the first stage the low frequency response drops to -70 dB overall instead of -

10 dB! With these resistors the DC operating point of the first stage amp is 4.82V vs 4.12V with the original resistors. I tried 10k and 3.6k resist ors and that is even worse with the DC balance out of whack.

I'd like to understand what is going on when the values of these resistors change with similar ratios. The common mode range of the inputs is Vcc+0.1 V (not the absolute max of Vcc+0.3V). Still, I would expect any of these o perating voltages to be ok. Is that the problem, the DC operating point is too close to 5 volts in spite of what the data sheet says?

--

  Rick C. 

  -- Get 1,000 miles of free Supercharging 
  -- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

The sim below will run in your unzipped directory and give a frequency plot. If you remove the 5V supply, it won't.

RL

Version 4 SHEET 1 1752 708 WIRE -48 -192 -64 -192 WIRE 112 -192 32 -192 WIRE 240 -192 192 -192 WIRE -64 -112 -64 -192 WIRE -64 -112 -272 -112 WIRE -32 -112 -64 -112 WIRE 80 -112 48 -112 WIRE 240 -112 240 -192 WIRE 240 -112 80 -112 WIRE 288 -112 240 -112 WIRE -64 0 -64 -112 WIRE 80 0 80 -112 WIRE 624 32 560 32 WIRE 752 32 688 32 WIRE -224 64 -224 32 WIRE 80 128 80 80 WIRE 128 128 80 128 WIRE 176 128 128 128 WIRE 320 128 256 128 WIRE 432 128 400 128 WIRE 544 128 512 128 WIRE 592 128 544 128 WIRE 624 128 592 128 WIRE 752 128 752 32 WIRE 752 128 704 128 WIRE 400 160 400 128 WIRE -240 192 -272 192 WIRE -240 224 -240 192 WIRE 656 256 640 256 WIRE 224 272 208 272 WIRE 656 272 656 256 WIRE 224 288 224 272 WIRE 544 288 544 128 WIRE 624 288 544 288 WIRE 80 304 80 128 WIRE 192 304 80 304 WIRE 752 304 752 128 WIRE 752 304 688 304 WIRE 976 304 752 304 WIRE 320 320 320 128 WIRE 320 320 256 320 WIRE 368 320 320 320 WIRE 480 320 448 320 WIRE 544 320 480 320 WIRE 624 320 544 320 WIRE -240 336 -240 304 WIRE -64 336 -64 80 WIRE -16 336 -64 336 WIRE 192 336 -16 336 WIRE 480 352 480 320 WIRE 656 352 656 336 WIRE -64 368 -64 336 WIRE 224 368 224 352 WIRE 576 432 576 416 WIRE 480 448 480 432 WIRE -64 464 -64 448 FLAG 224 368 0 FLAG -64 464 0 FLAG -16 336 U1+ FLAG 224 272 5V FLAG 288 -112 MOT IOPIN 288 -112 BiDir FLAG 656 352 0 FLAG 656 256 5V FLAG 400 160 0 FLAG 128 128 U1- FLAG 592 128 U2- FLAG 544 320 U2+ FLAG 320 128 Current FLAG 480 448 0 FLAG -272 -112 PSU IOPIN -272 -112 BiDir FLAG 976 304 COUT IOPIN 976 304 Out FLAG -272 192 5V IOPIN -272 192 BiDir FLAG 576 432 0 FLAG -240 336 0 FLAG -224 64 0 SYMBOL res -80 352 R0 SYMATTR InstName R3 SYMATTR Value 215k SYMBOL res 64 -16 R0 SYMATTR InstName R4 SYMATTR Value 620k SYMBOL res 160 144 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 32 86 VTop 2 SYMATTR InstName R5 SYMATTR Value 215k SYMBOL res 64 -128 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R1 SYMATTR Value 0R010 SYMBOL TLV2333 224 256 R0 SYMATTR InstName U1 SYMBOL res -80 -16 R0 SYMATTR InstName R2 SYMATTR Value 620k SYMBOL res 608 144 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 32 86 VTop 2 SYMATTR InstName R9 SYMATTR Value 1Meg SYMBOL TLV2333 656 240 R0 SYMATTR InstName U2 SYMBOL res 352 336 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 32 86 VTop 2 SYMATTR InstName R6 SYMATTR Value 10k SYMBOL res 416 144 R270 WINDOW 0 32 32 VTop 2 WINDOW 3 32 86 VTop 2 SYMATTR InstName R8 SYMATTR Value 10k SYMBOL res 464 336 R0 SYMATTR InstName R7 SYMATTR Value 100k SYMBOL cap 560 352 R0 SYMATTR InstName C1 SYMATTR Value 10nF SYMBOL cap 688 16 R90 WINDOW 0 0 61 VBottom 2 WINDOW 3 0 -4 VBottom 2 SYMATTR InstName C2 SYMATTR Value 100pF SYMBOL voltage -240 208 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value 5 SYMBOL voltage 48 -192 R90 WINDOW 0 -32 56 VBottom 2 WINDOW 3 32 56 VTop 2 WINDOW 123 -4 56 VBottom 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V2 SYMATTR Value "" SYMATTR Value2 AC 0.05 SYMBOL voltage -224 -64 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value 10 SYMBOL voltage 96 -192 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 -32 56 VBottom 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V4 SYMATTR Value .05 TEXT 504 -256 Right 4 ;Motor Current Measurement TEXT 152 -56 Left 3 ;10A = 0.1V TEXT 792 344 Left 3 ;10A = 3.18V\n4.5A = 1.43V\n3.5A = 1.11V TEXT 240 424 Left 3 ;10A = 0.035V TEXT -8 352 Left 2 ;@16Vin U1+ = \n16*215/835 = 4.12V TEXT -384 488 Left 2 !.ac dec 10 1 1E5 LINE Normal 336 400 368 336

Reply to
legg

h side with a lower voltage op amp. Input resistors couple with the feedba ck resistor to keep the op amp inputs at safe levels. No big deal, seems t o work ok. I used a second amp to dig the signal out of the dirt.

d would be an average of the PWM signal used to control the device. The ca ps I added didn't seem to do exactly what I was looking for and when I remo ved them I realized there was something going on that was limiting the band width. Seems it is the basic circuit without filter caps.

might get better response using lower value resistors if the parasitic capa citance was causing this (620k is a bit high). Using lower resistor values makes it worse! With 46k4 and 20k resistors the first stage is -110 dB do wn!

rs are 620k and 215k. I think this zip file contains all the files needed.

n. Maybe you didn't see the main schematic? I guess I should have said th e top level schematic is MotorCurrent_highside_test.asc

circuit. I've uploaded a new zip file. Thanks for pointing out the mista ke.

which controls the current drawn through the circuit. The circuit turns t his into a small voltage across the 0.01 ohm resistor, but at a high common mode voltage level. The first amp runs on 5 volts so the divider resistor s bring the input voltage to within that range.

. The current measurement is the voltage output on COUT.

circuit is -3dB at 3.2 kHz with a low frequency gain of -10dB. With the c aps the -3dB points are 1.7 kHz first stage and 850 Hz overall which is pro bably fine.

p the response without the caps, so used lower value resistors for R2, R3, R4 and R5 with similar ratios. It was rather late and I probably should ha ve put it off until later. However, when I use 46k4 and 20k resistors in t he first stage the low frequency response drops to -70 dB overall instead o f -10 dB! With these resistors the DC operating point of the first stage a mp is 4.82V vs 4.12V with the original resistors. I tried 10k and 3.6k res istors and that is even worse with the DC balance out of whack.

rs change with similar ratios. The common mode range of the inputs is Vcc+

0.1V (not the absolute max of Vcc+0.3V). Still, I would expect any of thes e operating voltages to be ok. Is that the problem, the DC operating point is too close to 5 volts in spite of what the data sheet says?

Thanks for taking a look.

Did you download the new .zip file? Open MotorCurrent_highside_test.asc an d you will see all the power supplies and signal generators. I also includ ed a .plt file so all the relevant signals will automatically be opened in the plot window.

--

  Rick C. 

  -+ Get 1,000 miles of free Supercharging 
  -+ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

That circuit won't work. Resistor tolerances will wreck the CMRR.

There are ways to do high-side current sensing.

Reply to
John Larkin

missing AOD4185.

If you're only interested in the current monitor, you might just limit to those parts.

Is the problem with the breadboard not acting like the model, or vice versa?

Hard to argue with a model, if you don't have the hardware.

RL

Reply to
legg

gh side with a lower voltage op amp. Input resistors couple with the feedb ack resistor to keep the op amp inputs at safe levels. No big deal, seems to work ok. I used a second amp to dig the signal out of the dirt.

ed would be an average of the PWM signal used to control the device. The c aps I added didn't seem to do exactly what I was looking for and when I rem oved them I realized there was something going on that was limiting the ban d width. Seems it is the basic circuit without filter caps.

might get better response using lower value resistors if the parasitic cap acitance was causing this (620k is a bit high). Using lower resistor value s makes it worse! With 46k4 and 20k resistors the first stage is -110 dB d own!

ors are 620k and 215k. I think this zip file contains all the files needed .

on. Maybe you didn't see the main schematic? I guess I should have said t he top level schematic is MotorCurrent_highside_test.asc

t circuit. I've uploaded a new zip file. Thanks for pointing out the mist ake.

G which controls the current drawn through the circuit. The circuit turns this into a small voltage across the 0.01 ohm resistor, but at a high commo n mode voltage level. The first amp runs on 5 volts so the divider resisto rs bring the input voltage to within that range.

l. The current measurement is the voltage output on COUT.

l circuit is -3dB at 3.2 kHz with a low frequency gain of -10dB. With the caps the -3dB points are 1.7 kHz first stage and 850 Hz overall which is pr obably fine.

up the response without the caps, so used lower value resistors for R2, R3, R4 and R5 with similar ratios. It was rather late and I probably should h ave put it off until later. However, when I use 46k4 and 20k resistors in the first stage the low frequency response drops to -70 dB overall instead of -10 dB! With these resistors the DC operating point of the first stage amp is 4.82V vs 4.12V with the original resistors. I tried 10k and 3.6k re sistors and that is even worse with the DC balance out of whack.

ors change with similar ratios. The common mode range of the inputs is Vcc

+0.1V (not the absolute max of Vcc+0.3V). Still, I would expect any of the se operating voltages to be ok. Is that the problem, the DC operating poin t is too close to 5 volts in spite of what the data sheet says?

like an INAxxx or similar. sot23 and a sense resistor

Reply to
Lasse Langwadt Christensen

and you will see all the power supplies and signal generators. I also inc luded a .plt file so all the relevant signals will automatically be opened in the plot window.

Sorry, you don't need that device because it is left over from another sche matic this was copied from, rip both of those transistors out. All those s ignal sources can go other than 5V and SIG.

Not trying to argue with anything, trying to understand.

Please refer to the third post I made in this thread. That describes what I think it should do and what I am not understanding about how it mucks up. In a nutshell it seems to work ok with the 620k and 215k resistors, but w ith smaller values in similar ratios it seems to go wonky dropping the base gain of the first amp at low frequencies. There is something fundamental about this arrangement I'm not getting.

Larkin might be right that this is a crap design to attempt, because of res istor mismatching. But the motor voltage won't vary a lot and I can use 0.

1% tolerance resistors. We need them for some other parts of the circuit a nyway. Mostly this is to set a current limit to the motor. Seems the moto rs are strong enough to damage themselves if run to the stops.
--

  Rick C. 

  +- Get 1,000 miles of free Supercharging 
  +- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

There are lots of cheap specific high-side current sense chips. And tricky ways to do it yourself.

One can also float the opamp on the high rail and build up a lot of gain before dealing with the common-mode. I've done that in NMR gradient amp shunts, where I needed PPM accuracy at pretty high bandwidths.

Get gain first, deal with common-mode second. The circuit above does the exact opposite... worse, actually.

Reply to
John Larkin

high side with a lower voltage op amp. Input resistors couple with the fe edback resistor to keep the op amp inputs at safe levels. No big deal, see ms to work ok. I used a second amp to dig the signal out of the dirt.

sured would be an average of the PWM signal used to control the device. Th e caps I added didn't seem to do exactly what I was looking for and when I removed them I realized there was something going on that was limiting the band width. Seems it is the basic circuit without filter caps.

t I might get better response using lower value resistors if the parasitic capacitance was causing this (620k is a bit high). Using lower resistor va lues makes it worse! With 46k4 and 20k resistors the first stage is -110 d B down!

istors are 620k and 215k. I think this zip file contains all the files nee ded.

ation. Maybe you didn't see the main schematic? I guess I should have sai d the top level schematic is MotorCurrent_highside_test.asc

test circuit. I've uploaded a new zip file. Thanks for pointing out the m istake.

SIG which controls the current drawn through the circuit. The circuit tur ns this into a small voltage across the 0.01 ohm resistor, but at a high co mmon mode voltage level. The first amp runs on 5 volts so the divider resi stors bring the input voltage to within that range.

evel. The current measurement is the voltage output on COUT.

rall circuit is -3dB at 3.2 kHz with a low frequency gain of -10dB. With t he caps the -3dB points are 1.7 kHz first stage and 850 Hz overall which is probably fine.

en up the response without the caps, so used lower value resistors for R2, R3, R4 and R5 with similar ratios. It was rather late and I probably shoul d have put it off until later. However, when I use 46k4 and 20k resistors in the first stage the low frequency response drops to -70 dB overall inste ad of -10 dB! With these resistors the DC operating point of the first sta ge amp is 4.82V vs 4.12V with the original resistors. I tried 10k and 3.6k resistors and that is even worse with the DC balance out of whack.

istors change with similar ratios. The common mode range of the inputs is Vcc+0.1V (not the absolute max of Vcc+0.3V). Still, I would expect any of these operating voltages to be ok. Is that the problem, the DC operating p oint is too close to 5 volts in spite of what the data sheet says?

Yeah, I've never designed a high side current sense before and I realized r ight away the gain of the first stage has to be below 1, below the ratio of the power supplies in fact. Trying to generate gain while referenced to t he higher voltage rail with parts I'm already using is problematic. That w ould require a rail around 10 volts that is referenced to the higher voltag e. Too many parts.

I may try using one of the available chips for this. I was trying to avoid adding a new item to the BoM.

--

  Rick C. 

  ++ Get 1,000 miles of free Supercharging 
  ++ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

e:

:

he high side with a lower voltage op amp. Input resistors couple with the feedback resistor to keep the op amp inputs at safe levels. No big deal, s eems to work ok. I used a second amp to dig the signal out of the dirt.

easured would be an average of the PWM signal used to control the device. The caps I added didn't seem to do exactly what I was looking for and when I removed them I realized there was something going on that was limiting th e band width. Seems it is the basic circuit without filter caps.

ght I might get better response using lower value resistors if the parasiti c capacitance was causing this (620k is a bit high). Using lower resistor values makes it worse! With 46k4 and 20k resistors the first stage is -110 dB down!

esistors are 620k and 215k. I think this zip file contains all the files n eeded.

ulation. Maybe you didn't see the main schematic? I guess I should have s aid the top level schematic is MotorCurrent_highside_test.asc

e test circuit. I've uploaded a new zip file. Thanks for pointing out the mistake.

is SIG which controls the current drawn through the circuit. The circuit t urns this into a small voltage across the 0.01 ohm resistor, but at a high common mode voltage level. The first amp runs on 5 volts so the divider re sistors bring the input voltage to within that range.

level. The current measurement is the voltage output on COUT.

verall circuit is -3dB at 3.2 kHz with a low frequency gain of -10dB. With the caps the -3dB points are 1.7 kHz first stage and 850 Hz overall which is probably fine.

open up the response without the caps, so used lower value resistors for R2 , R3, R4 and R5 with similar ratios. It was rather late and I probably sho uld have put it off until later. However, when I use 46k4 and 20k resistor s in the first stage the low frequency response drops to -70 dB overall ins tead of -10 dB! With these resistors the DC operating point of the first s tage amp is 4.82V vs 4.12V with the original resistors. I tried 10k and 3.

6k resistors and that is even worse with the DC balance out of whack.

esistors change with similar ratios. The common mode range of the inputs i s Vcc+0.1V (not the absolute max of Vcc+0.3V). Still, I would expect any o f these operating voltages to be ok. Is that the problem, the DC operating point is too close to 5 volts in spite of what the data sheet says?

right away the gain of the first stage has to be below 1, below the ratio of the power supplies in fact. Trying to generate gain while referenced to the higher voltage rail with parts I'm already using is problematic. That would require a rail around 10 volts that is referenced to the higher volt age. Too many parts.

id adding a new item to the BoM.

why high side sensing?

Reply to
Lasse Langwadt Christensen

ote:

te:

the high side with a lower voltage op amp. Input resistors couple with th e feedback resistor to keep the op amp inputs at safe levels. No big deal, seems to work ok. I used a second amp to dig the signal out of the dirt.

measured would be an average of the PWM signal used to control the device. The caps I added didn't seem to do exactly what I was looking for and whe n I removed them I realized there was something going on that was limiting the band width. Seems it is the basic circuit without filter caps.

ought I might get better response using lower value resistors if the parasi tic capacitance was causing this (620k is a bit high). Using lower resisto r values makes it worse! With 46k4 and 20k resistors the first stage is -1

10 dB down!

resistors are 620k and 215k. I think this zip file contains all the files needed.

imulation. Maybe you didn't see the main schematic? I guess I should have said the top level schematic is MotorCurrent_highside_test.asc

the test circuit. I've uploaded a new zip file. Thanks for pointing out t he mistake.

e is SIG which controls the current drawn through the circuit. The circuit turns this into a small voltage across the 0.01 ohm resistor, but at a hig h common mode voltage level. The first amp runs on 5 volts so the divider resistors bring the input voltage to within that range.

he level. The current measurement is the voltage output on COUT.

overall circuit is -3dB at 3.2 kHz with a low frequency gain of -10dB. Wi th the caps the -3dB points are 1.7 kHz first stage and 850 Hz overall whic h is probably fine.

o open up the response without the caps, so used lower value resistors for R2, R3, R4 and R5 with similar ratios. It was rather late and I probably s hould have put it off until later. However, when I use 46k4 and 20k resist ors in the first stage the low frequency response drops to -70 dB overall i nstead of -10 dB! With these resistors the DC operating point of the first stage amp is 4.82V vs 4.12V with the original resistors. I tried 10k and

3.6k resistors and that is even worse with the DC balance out of whack.

resistors change with similar ratios. The common mode range of the inputs is Vcc+0.1V (not the absolute max of Vcc+0.3V). Still, I would expect any of these operating voltages to be ok. Is that the problem, the DC operati ng point is too close to 5 volts in spite of what the data sheet says?

V

ed right away the gain of the first stage has to be below 1, below the rati o of the power supplies in fact. Trying to generate gain while referenced to the higher voltage rail with parts I'm already using is problematic. Th at would require a rail around 10 volts that is referenced to the higher vo ltage. Too many parts.

void adding a new item to the BoM.

The motor is controlled through a H-bridge and I prefer not to muck with th e logic levels with low side sensing (the ground for the motor is common wi th the logic ground). I guess a 10 mohm resistance won't actually muck wit h the logic levels much. I suppose I could be talked into that.

What I'd really like at the moment is to know what happens in this circuit when the first stage resistors are lowered in value without changing the ra tio appreciably. The gain goes from about 1/3 ~ -10dB to -70 dB or worse a s the values are made smaller.

I'm looking at using a current sense chip, but I'd like to understand what is going on with the simulation of this circuit which is the same as the sp ecial chips. Heck, the INA199 even shows it working from a 5 volt supply w ith up to a 26 volt sense resistor common mode voltage.

--

  Rick C. 

  --- Get 1,000 miles of free Supercharging 
  --- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

When all 4 resistors in the diff amp are reduced by a factor of ten, I see no difference in the gain plots. You will see the same if you make those changes in the texted sim that was posted.

If you will copy the exact sims that you are comparing, that apparently show otherwise, I'll look at them.

So far, none run, out of the box.

RL

Reply to
legg

. . . and remember there are limits on the output current of this low power amp, particularly when pulling towards ground.

RL

Reply to
legg

asc and you will see all the power supplies and signal generators. I also included a .plt file so all the relevant signals will automatically be open ed in the plot window.

chematic this was copied from, rip both of those transistors out. All thos e signal sources can go other than 5V and SIG.

at I think it should do and what I am not understanding about how it mucks up. In a nutshell it seems to work ok with the 620k and 215k resistors, bu t with smaller values in similar ratios it seems to go wonky dropping the b ase gain of the first amp at low frequencies. There is something fundament al about this arrangement I'm not getting.

resistor mismatching. But the motor voltage won't vary a lot and I can use 0.1% tolerance resistors. We need them for some other parts of the circui t anyway. Mostly this is to set a current limit to the motor. Seems the m otors are strong enough to damage themselves if run to the stops.

You can't rip out the transistor with no model???

Ok, I modified the files so they will run without the transistor model whic h isn't needed for the sim. However... the changes to the resistors are in the current sense component, not the top level, so it would require changi ng all three files, the two schematics and the symbol file, to create the t wo sets of resistors. I expect a parameter can be passed into a component to set the resistor values... but too much work.

So if you have a model working with the 620k and 215k values, the zip file now contains files which will simulate with component values of 1/10th the the values you have. The gain at low frequency is -117.5 dB while the corr ectly working circuit is -50 dB as expected.

I had to work to figure out what your circuit was showing in the frequency plot. Your AC input value is -26 dB, but all the rest are the right value relative to that (-50 dB at U2+ relative to the input signal). I see one h uge difference. Your test circuit doesn't bias the inputs to the proper vo ltage. You need to take the current sense resistor to 16V which should put U1+ at 4.12V.

This must have something to do with it. But I get the same DC level with b oth sets of resistors while the AC levels are hugely different.

--

  Rick C. 

  --+ Get 1,000 miles of free Supercharging 
  --+ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

.asc and you will see all the power supplies and signal generators. I also included a .plt file so all the relevant signals will automatically be ope ned in the plot window.

schematic this was copied from, rip both of those transistors out. All tho se signal sources can go other than 5V and SIG.

hat I think it should do and what I am not understanding about how it mucks up. In a nutshell it seems to work ok with the 620k and 215k resistors, b ut with smaller values in similar ratios it seems to go wonky dropping the base gain of the first amp at low frequencies. There is something fundamen tal about this arrangement I'm not getting.

resistor mismatching. But the motor voltage won't vary a lot and I can us e 0.1% tolerance resistors. We need them for some other parts of the circu it anyway. Mostly this is to set a current limit to the motor. Seems the motors are strong enough to damage themselves if run to the stops.

Yeah, I see the ground issue. That's not so important since none of the si gnals we are working with need to have accurate data near ground... except for calibration. Some of the sensors require a DC offset measurement to be taken and subtracted from each reading for optimum accuracy. I believe th ey already have a bias built in so the zero value is not at ground though. Otherwise I guess the offset error could put some measurements below groun d which would be hard to correct for.

I'll need to verify these offsets are high enough or add more to it. Nope, some are only 14 mV. So I'll need to add an offset to the zero level.

The O2 sensor is an oddly specified part. Seems that even though they don' t explicitly indicated it, the gain factor is pretty consistent, but the of fset varies a LOT. The pressure sensors seem to be similar, but perhaps no t to the same extent. The pressure sensor error can be cut in half by cali brating the zero offset. The O2 sensor at normal conditions (20.9% O2 and STP 1 atm) varies between 9 and 13 mV. They talk about being very "linear" with a 4 point calibration matching a straight line with an r^2 of several 9s. But it is hard to do that calibration on every unit.

Otherwise they just don't tell you how accurate the O2 sensor is out of the box.

--

  Rick C. 

  -+- Get 1,000 miles of free Supercharging 
  -+- Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

.asc and you will see all the power supplies and signal generators. I also included a .plt file so all the relevant signals will automatically be ope ned in the plot window.

schematic this was copied from, rip both of those transistors out. All tho se signal sources can go other than 5V and SIG.

hat I think it should do and what I am not understanding about how it mucks up. In a nutshell it seems to work ok with the 620k and 215k resistors, b ut with smaller values in similar ratios it seems to go wonky dropping the base gain of the first amp at low frequencies. There is something fundamen tal about this arrangement I'm not getting.

resistor mismatching. But the motor voltage won't vary a lot and I can us e 0.1% tolerance resistors. We need them for some other parts of the circu it anyway. Mostly this is to set a current limit to the motor. Seems the motors are strong enough to damage themselves if run to the stops.

Ok, that was it. Even though the current drawn was only 200 uA, that seems to mess up the frequency response. I biased up the output to 0.25V and it works the champ. The sim seems to run much faster too. I guess there is something about that low an output that mucks with finding the DC operating point.

Thanks for the help.

--

  Rick C. 

  -++ Get 1,000 miles of free Supercharging 
  -++ Tesla referral code - https://ts.la/richard11209
Reply to
Ricketty C

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.