negative rail for low side current sense?...

D

DJ Delorie

Guest
If we could take a moment to talk about something ON topic for a change ;-)

I\'m updating an old design that uses low-side current sensing for BLDC
drive[1]. I\'m sensing both forward and reverse current. So the signal
is about +- 40 mV but could be more. I had been using an LM324 in
differential mode with a 2.5V \"ground\" to offset the sense voltages, but
the signal still went below 0V at the input pins. I\'m trying to do
better this time ;-)

My first thought is, add a negative power rail. I\'ve got +15v and +5v
so there\'s already one switcher (LM2842 based), so I could add another
one. Suggestions for a simple invert-switcher? How negative do I need
to go? I\'d been running the LM324 on +5 and GND, and need a 0..5 output
signal anyway (+- 2.5v biased to 2.5v), so -5? Then I\'m thinking a 5.1v
zener to protect the ADC input.

Alternately, opinions on an alternate quad low-side sensor that can
handle positive and negative currents...

Also, I\'d been using a resistor divider for each opamp to bias it to
2.5V. Is it worth the effort to put in a 2.5V rail and use that, so
that all the sensors have a common \"zero\" at the ADCs, vs possibly
different ones due to resistor tolerances?

Thanks!

[1] http://www.delorie.com/electronics/bldc/
 
On Fri, 18 Mar 2022 00:08:23 -0400, DJ Delorie <dj@delorie.com> wrote:

If we could take a moment to talk about something ON topic for a change ;-)

I\'m updating an old design that uses low-side current sensing for BLDC
drive[1]. I\'m sensing both forward and reverse current. So the signal
is about +- 40 mV but could be more. I had been using an LM324 in
differential mode with a 2.5V \"ground\" to offset the sense voltages, but
the signal still went below 0V at the input pins. I\'m trying to do
better this time ;-)

My first thought is, add a negative power rail. I\'ve got +15v and +5v
so there\'s already one switcher (LM2842 based), so I could add another
one. Suggestions for a simple invert-switcher? How negative do I need
to go? I\'d been running the LM324 on +5 and GND, and need a 0..5 output
signal anyway (+- 2.5v biased to 2.5v), so -5? Then I\'m thinking a 5.1v
zener to protect the ADC input.

Alternately, opinions on an alternate quad low-side sensor that can
handle positive and negative currents...

Also, I\'d been using a resistor divider for each opamp to bias it to
2.5V. Is it worth the effort to put in a 2.5V rail and use that, so
that all the sensors have a common \"zero\" at the ADCs, vs possibly
different ones due to resistor tolerances?

Thanks!

[1] http://www.delorie.com/electronics/bldc/

Take a look at ADE7912 and 13 maybe.





--

I yam what I yam - Popeye
 
jlarkin@highlandsniptechnology.com writes:
> Take a look at ADE7912 and 13 maybe.

Thanks for reminding me about these; I\'ve used the ADE7753 before.
Tempting, but... I already have the ADC part in the MCU, and the ADE7912
doesn\'t sample fast enough for the software I\'m using. Plus, those are
big chips compared to a single quad op amp. Also, 3.3v, although that\'s
work-around-able.

Yeah, unspoken requirements, but...
 
On Thursday, March 17, 2022 at 9:08:35 PM UTC-7, DJ Delorie wrote:

I\'m updating an old design that uses low-side current sensing for BLDC
drive[1]. I\'m sensing both forward and reverse current. So the signal
is about +- 40 mV but could be more.

Alternately, opinions on an alternate quad low-side sensor that can
handle positive and negative currents...

A pretrimmed instrument amp (INA105 for example) can
do the translation; that one takes inputs 5V outside the rails
so should handle 40 mV easily. You get the accuracy by
paying extra, of course.
 
On Fri, 18 Mar 2022 02:34:19 -0400, DJ Delorie <dj@delorie.com> wrote:

jlarkin@highlandsniptechnology.com writes:
Take a look at ADE7912 and 13 maybe.

Thanks for reminding me about these; I\'ve used the ADE7753 before.
Tempting, but... I already have the ADC part in the MCU, and the ADE7912
doesn\'t sample fast enough for the software I\'m using. Plus, those are
big chips compared to a single quad op amp. Also, 3.3v, although that\'s
work-around-able.

Yeah, unspoken requirements, but...

If you are using one uP ADC, you could make one good amp and mux into
it.



--

I yam what I yam - Popeye
 
18.03.22 05:08, DJ Delorie wrote:
If we could take a moment to talk about something ON topic for a change ;-)

I\'m updating an old design that uses low-side current sensing for BLDC
drive[1]. I\'m sensing both forward and reverse current. So the signal
is about +- 40 mV but could be more. I had been using an LM324 in
differential mode with a 2.5V \"ground\" to offset the sense voltages, but
the signal still went below 0V at the input pins. I\'m trying to do
better this time ;-)

My first thought is, add a negative power rail. I\'ve got +15v and +5v
so there\'s already one switcher (LM2842 based), so I could add another
one. Suggestions for a simple invert-switcher? How negative do I need
to go? I\'d been running the LM324 on +5 and GND, and need a 0..5 output
signal anyway (+- 2.5v biased to 2.5v), so -5? Then I\'m thinking a 5.1v
zener to protect the ADC input.

Alternately, opinions on an alternate quad low-side sensor that can
handle positive and negative currents...

Also, I\'d been using a resistor divider for each opamp to bias it to
2.5V. Is it worth the effort to put in a 2.5V rail and use that, so
that all the sensors have a common \"zero\" at the ADCs, vs possibly
different ones due to resistor tolerances?

Thanks!

[1] http://www.delorie.com/electronics/bldc/
Your offset should place the voltage for the ADC mid range at no current
St full current, the rails should not be exceeded.

Maybe I am missing what you are doing, but you should not see signals below 0V

Cheers

Klaus


--
Klaus
 
jlarkin@highlandsniptechnology.com writes:
If you are using one uP ADC, you could make one good amp and mux into
it.

I have several (the RX66T is designed for this), the problem isn\'t that
side of the circuit - the problem is dealing with the original signals,
which will go outside the rails.
 
whit3rd <whit3rd@gmail.com> writes:
A pretrimmed instrument amp (INA105 for example) can
do the translation; that one takes inputs 5V outside the rails
so should handle 40 mV easily. You get the accuracy by
paying extra, of course.

That one says inputs are limited to +- Vs (+- 15V supply), which leads
back to one of my original questions - if I need a negative rail.
 
Klaus Kragelund <klauskvik@hotmail.com> writes:
[1] http://www.delorie.com/electronics/bldc/
Your offset should place the voltage for the ADC mid range at no
current St full current, the rails should not be exceeded.

Maybe I am missing what you are doing, but you should not see signals below 0V

The sense resistor gets bidirectional current, so the sense voltage can
be negative (not much, maybe 40 mV) and between that, the offsetting
resistors for virtual ground, and the amplification needed, it results
in a signal at the IN- pin that may go below 0V.

The *output* of the opamp is centered around 2.5v, sure.
 
On a sunny day (Fri, 18 Mar 2022 13:58:39 -0400) it happened DJ Delorie
<dj@delorie.com> wrote in <xn4k3vw3ao.fsf@delorie.com>:

whit3rd <whit3rd@gmail.com> writes:
A pretrimmed instrument amp (INA105 for example) can
do the translation; that one takes inputs 5V outside the rails
so should handle 40 mV easily. You get the accuracy by
paying extra, of course.

That one says inputs are limited to +- Vs (+- 15V supply), which leads
back to one of my original questions - if I need a negative rail.

I replaced some LM with the CMOS TLC274CN quad opamp.
Those have a minimum inout voltage range from -.2 to -.3
 
On 18/03/2022 04:08, DJ Delorie wrote:
If we could take a moment to talk about something ON topic for a change ;-)

I\'m updating an old design that uses low-side current sensing for BLDC
drive[1]. I\'m sensing both forward and reverse current. So the signal
is about +- 40 mV but could be more. I had been using an LM324 in
differential mode with a 2.5V \"ground\" to offset the sense voltages, but
the signal still went below 0V at the input pins. I\'m trying to do
better this time ;-)

<snip>

https://www.nve.com/currentSensors

Well, maybe.

--
Cheers
Clive
 
On Fri, 18 Mar 2022 13:56:23 -0400, DJ Delorie <dj@delorie.com> wrote:

jlarkin@highlandsniptechnology.com writes:
If you are using one uP ADC, you could make one good amp and mux into
it.

I have several (the RX66T is designed for this), the problem isn\'t that
side of the circuit - the problem is dealing with the original signals,
which will go outside the rails.

An RRIO opamp will process signals on both sides of ground. If you mux
into one amp that DC offsets up into about the middle of your unipolar
ADC range, one of the mux inputs can be ground. Digitize that once in
a while and subtract it from the others.

You could do an opamp per channel, and tolerate a modest DC offset
error. Depends on the accuracy you want and how much you want to pay
for resistors. You could software autozero if you ever know for sure
that the current is zero.



--

If a man will begin with certainties, he shall end with doubts,
but if he will be content to begin with doubts he shall end in certainties.
Francis Bacon
 
John Larkin <jlarkin@highland_atwork_technology.com> writes:
I have several (the RX66T is designed for this), the problem isn\'t that
side of the circuit - the problem is dealing with the original signals,
which will go outside the rails.

An RRIO opamp will process signals on both sides of ground. If you mux
into one amp that DC offsets up into about the middle of your unipolar
ADC range, one of the mux inputs can be ground. Digitize that once in
a while and subtract it from the others.

I was thinking, if I ended up creating a 2.5v rail, I\'d hook that in to
an ADC channel too. The RX has its own internal mux (three units of
8/8/14 inputs, but the chip I\'m using only has 22 inputs), and can
automatically switch and scan all selected inputs per interrupt, which
is handy.

You could do an opamp per channel, and tolerate a modest DC offset
error. Depends on the accuracy you want and how much you want to pay
for resistors. You could software autozero if you ever know for sure
that the current is zero.

Yeah, the software had an autozero function. I was never really happy
with how well it worked.
 
Jan Panteltje <pNaonStpealmtje@yahoo.com> writes:
That one says inputs are limited to +- Vs (+- 15V supply), which leads
back to one of my original questions - if I need a negative rail.

I replaced some LM with the CMOS TLC274CN quad opamp.
Those have a minimum inout voltage range from -.2 to -.3

Oh, those look promising... thanks!
 
On Friday, March 18, 2022 at 10:58:51 AM UTC-7, DJ Delorie wrote:
whit3rd <whi...@gmail.com> writes:
A pretrimmed instrument amp (INA105 for example) can
do the translation; that one takes inputs 5V outside the rails
so should handle 40 mV easily. You get the accuracy by
paying extra, of course

That one says inputs are limited to +- Vs (+- 15V supply), which leads
back to one of my original questions - if I need a negative rail.

The datasheet I read does NOT say that at all. It says +20 to -20V,
and claims ten volts from the rails is harmless.

Other options are better still: <https://www.ti.com/lit/an/sboa008/sboa008.pdf?ts=1647599978652>
mentions plus/minus 200V range, only limited by resistor power dissipation.
 
whit3rd <whit3rd@gmail.com> writes:
That one says inputs are limited to +- Vs (+- 15V supply), which leads
back to one of my original questions - if I need a negative rail.

The datasheet I read does NOT say that at all. It says +20 to -20V,
and claims ten volts from the rails is harmless.

It also says, under \"Absolute Maximum Ratings\", that the input volage
range is +- Vs. Sigh. \"If you can\'t trust the specs...\"

It also requires a +- 5v supply minimum, and if I need to add a negative
supply, any opamp would do.

Other options are better still: <https://www.ti.com/lit/an/sboa008/sboa008.pdf?ts=1647599978652
mentions plus/minus 200V range, only limited by resistor power dissipation.

The catch there is that it\'s relying on the internal resistor network to
bring the opamp inputs into range. In my case, the signal is small, but
still out of range at the opamp inputs, despite the resistor network.
 
On Friday, March 18, 2022 at 1:47:14 PM UTC-7, DJ Delorie wrote:
whit3rd <whi...@gmail.com> writes:
That one says inputs are limited to +- Vs (+- 15V supply), which leads
back to one of my original questions - if I need a negative rail.

The datasheet I read does NOT say that at all. It says +20 to -20V,
and claims ten volts from the rails is harmless.

It also says, under \"Absolute Maximum Ratings\", that the input volage
range is +- Vs. Sigh. \"If you can\'t trust the specs...\"

Yeah, I\'m reading input/voltage range/common mode (also a footnote that says
it goes to +/- 25 V with +/-15V power and no \'protection\').

It also requires a +- 5v supply minimum, and if I need to add a negative
supply, any opamp would do.

Just use a +12 supply (and a 2.5V source/sink for \"ground\") . The symmetric-dual-supply
language is merely a convention, not a requirement.

Other options are better still: <https://www.ti.com/lit/an/sboa008/sboa008.pdf?ts=1647599978652
mentions plus/minus 200V range, only limited by resistor power dissipation.

The catch there is that it\'s relying on the internal resistor network to
bring the opamp inputs into range. In my case, the signal is small, but
still out of range at the opamp inputs, despite the resistor network.

It needs that \'2.5V\' point to be wired to its \'ground\' pin, is the hard-to-communicate part.

The real catch is, the resistor network is (laser-trimmed?) very accurate,
and that add-on hikes the price up. It\'s difficult to search on common-mode range,
but duals and quads exist in current-sense offerings, that ought to do the job.
 
whit3rd <whit3rd@gmail.com> writes:
Just use a +12 supply (and a 2.5V source/sink for \"ground\") . The symmetric-dual-supply
language is merely a convention, not a requirement.

I have a +15v supply and a +5 supply already. I\'m offsetting to 2.5V
for the ADCs, but the sense resistors are on the power lines for the
BLDC motor - which is a 160V 8A nominal system. I can\'t just offset
that by 2.5V ;-)

(well, effectively I could, but that\'s where the negative rail comes
into play)

Now I wonder if I could offset the +15v supply down 2.5v, but I don\'t
think the power chip supports that (IKCM15L60GAXKMA1) - looks like it
allows up to +- 5v between the low side pins and Vss. Hmm...

> It needs that \'2.5V\' point to be wired to its \'ground\' pin, is the hard-to-communicate part.

For a unity gain amp, yeah, that would bring it up. I need to also
amplify it up to +- 2.5v swing, and doing both in the same stage causes
problems. Doing it in separate stages means twice the chips (and twice
the cost, twice the pcb area), so... tradeoff. I could use that
pcb/cost to add a negative rail instead. Which is better?
 
On 18-Mar-22 3:08 pm, DJ Delorie wrote:
If we could take a moment to talk about something ON topic for a change ;-)

I\'m updating an old design that uses low-side current sensing for BLDC
drive[1]. I\'m sensing both forward and reverse current. So the signal
is about +- 40 mV but could be more. I had been using an LM324 in
differential mode with a 2.5V \"ground\" to offset the sense voltages, but
the signal still went below 0V at the input pins. I\'m trying to do
better this time ;-)

My first thought is, add a negative power rail. I\'ve got +15v and +5v
so there\'s already one switcher (LM2842 based), so I could add another
one. Suggestions for a simple invert-switcher?

Or a negative charge pump.

Sylvia.
 
On 18/03/2022 19.02, DJ Delorie wrote:
Klaus Kragelund <klauskvik@hotmail.com> writes:
[1] http://www.delorie.com/electronics/bldc/
Your offset should place the voltage for the ADC mid range at no
current St full current, the rails should not be exceeded.

Maybe I am missing what you are doing, but you should not see signals below 0V

The sense resistor gets bidirectional current, so the sense voltage can
be negative (not much, maybe 40 mV) and between that, the offsetting
resistors for virtual ground, and the amplification needed, it results
in a signal at the IN- pin that may go below 0V.

The *output* of the opamp is centered around 2.5v, sure.
You offset both the input and the reference, they should both be around
50% VDD, with a little difference due to the gain and the needed 50% VDD
on the ADC
 

Welcome to EDABoard.com

Sponsor

Back
Top