Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is an opamp better next to the current sense resistor or closer to a microcontroller?

Status
Not open for further replies.

maker8122

Junior Member level 1
Joined
Apr 3, 2018
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
207
opamp better next to current sense resistor or near to microcontroller?

Am measuring currents in a 24v line using a CS30 highside opamp and a PIC18F microcontroller running at 5v:

https://www.st.com/content/ccc/reso...df/jcr:content/translations/en.DM00109905.pdf

There's quite a lot of other stuff going on on the board and the sense resistor is not close to the uC.

1) Is it better to place the CS30 directly next to the resistor, the routen a 5v power trace and a SENSE trace (0-5v output of the CS30 to the ADC) over from the uC?

2) Or is it better to locate the CS30 next to the uC and route two (approximately) 24v lines over from the sense resistor to the CS30?

At first it seemed like it was obviously option 1, but the more I think about it, the more the doubts...
 

Re: opamp better next to current sense resistor or near to microcontroller?

Hi,

the sense resistor is not close to the uC
Please understand that we can´t see your circuit. So, are you talking about kilometers or some millimeters?

* The input is differential, so if you wire the sense inputs very parallel, then all introduced noise is (ideally) cancelled out.
* Additionally the output of the CS30 is referenced to GND. Every GND_bounce between CS30_GND and microcontroller_GND will cause measurement errors.
Therefore I recommend to put the CS30 close to the microcontroller.

But in detail it depends on a lot of other parameters.
Noise sources, expected precision, GND_currents, common mode noise and it´s frequency...

Klaus
 

Re: opamp better next to current sense resistor or near to microcontroller?

;) about 100mm

but there are potential noise sources on the board - like a 24v boost convertor and a 12v battery charger.

The precision doesn't have to be amazing in this application, but wanted to understand "best practice". You've given me a pretty good idea. Thanks!
 

Re: opamp better next to current sense resistor or near to microcontroller?

Hi,

The precision doesn't have to be amazing in this application
...we have no clue what this means
similar to "the sense resistor is not close to the uC " ;-)

****
anyway...
* use ceramic decoupling capacitor close to the VCC pin of the CS30. Urgent.
additionally
* use a 100R, 1nF LPF close to the ADC input (to avoid ringing caused by S/H of the ADC)
* use 100R, 1nF LPF close to each high side current sense opamp input (to suppress HF at the amplifier input and to avoid dV/dt overdrive of the input stage)
...At least as placeholders on your PCB.

Klaus
 

Re: opamp better next to current sense resistor or near to microcontroller?

Noted.

(On precision: ultimately the role of this measurement is to provide a programmable fuse, but first will it to monitor circuit performance in real time and learn how to get good performance out of the parts.)

On the LPFs for the input to the CS30, 1nF & 100R gives 1.6MHz cutoff ( f = 1/ (2*pi*R*C) )

For current readings, wouldn't it be appropriate to make the cutoff frequency much lower? Some multiple of the number of readings taken per second?

For the Sample and Hold ringing at the ADC pin, should I be able to measure this with a scope?
 

Re: opamp better next to current sense resistor or near to microcontroller?

The smallest signal, highest impedance traces should be
the shortest.

Filtering of current sense, or blanking, needs to be done
in a way that doesn't compromise desired performance
(for example, pulse-by-pulse current limiting doesn't
work well when BW < 1/fSW - needs to pass the waveshape
without too much smearing or delay).
 

Re: opamp better next to current sense resistor or near to microcontroller?

opamp better next to current sense resistor or near to microcontroller?

Regardless of the signal integrity aspect, bringing a power track towards the inner side of the board puts at risk other components in the case of handling the board with the equipment energized, ie. probing with a scope. It is in general a good practice to keep power and sensing signals/devices in peripheral regions of the board as much as possible.
 

Re: opamp better next to current sense resistor or near to microcontroller?

Hi,

On the LPFs for the input to the CS30, 1nF & 100R gives 1.6MHz cutoff ( f = 1/ (2*pi*R*C) )
True.
I don't know what signal bandwidth you want. I've chose very high frequency. As said it is not used as anti aliasing filter nor to suppress unwanted frequencies, it is just to limit dV/dt.
You are free to choose values as you like.

For current readings, wouldn't it be appropriate to make the cutoff frequency much lower? Some multiple of the number of readings taken per second?
We simply can not know this. I designed applications where I put a second order LPF to get clean DC, in inother application I've chosen very high cutoff to see the shape of the pulses.

For the Sample and Hold ringing at the ADC pin, should I be able to measure this with a scope?
Yes, I assume you will see it. It depends how the amplifier reacts on step currents at the output.

Klaus

Added:
I don't see it critical to feed the shunt signals close the microcontroller.
The current along the sense wires is low, and the AC voltage will be low, too.

In opposite ... if you want to measure the current pulses of a BLDC motor coil.
It has high dV/dt and relatively high dI/dt.

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top