• negative rail for low side current sense?

    From DJ Delorie@21:1/5 to All on Fri Mar 18 00:08:23 2022
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to DJ Delorie on Thu Mar 17 21:23:09 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to jlarkin@highlandsniptechnology.com on Fri Mar 18 02:34:19 2022
    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...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whit3rd@21:1/5 to DJ Delorie on Thu Mar 17 23:50:30 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to DJ Delorie on Fri Mar 18 08:27:42 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Klaus Kragelund@21:1/5 to DJ Delorie on Fri Mar 18 18:16:14 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to whit3rd@gmail.com on Fri Mar 18 13:58:39 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to jlarkin@highlandsniptechnology.com on Fri Mar 18 13:56:23 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to klauskvik@hotmail.com on Fri Mar 18 14:02:47 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Panteltje@21:1/5 to dj@delorie.com on Fri Mar 18 18:35:46 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Clive Arthur@21:1/5 to DJ Delorie on Fri Mar 18 18:45:39 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Larkin@21:1/5 to DJ Delorie on Fri Mar 18 12:30:14 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to Jan Panteltje on Fri Mar 18 16:20:28 2022
    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!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whit3rd@21:1/5 to DJ Delorie on Fri Mar 18 13:21:25 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to John Larkin on Fri Mar 18 16:19:07 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to whit3rd@gmail.com on Fri Mar 18 16:47:02 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whit3rd@21:1/5 to DJ Delorie on Fri Mar 18 14:17:27 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to whit3rd@gmail.com on Fri Mar 18 17:39:59 2022
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sylvia Else@21:1/5 to DJ Delorie on Sat Mar 19 09:09:30 2022
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Klaus Vestergaard Kragelund@21:1/5 to DJ Delorie on Sat Mar 19 00:18:16 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Fri Mar 18 16:33:23 2022
    fredag den 18. marts 2022 kl. 05.08.35 UTC+1 skrev DJ Delorie:
    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/

    if you skip the short circuit sense resistor, does it have to be differential?

    three opamps with ~60x gain and a pull up to center the output at 2.5V with zero current
    diode or the output and use an opamp as comperator for the short circuit detect

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to Klaus Vestergaard Kragelund on Fri Mar 18 21:03:52 2022
    Klaus Vestergaard Kragelund <klauskvik@hotmail.com> writes:
    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

    That sounds like multiple op amps per leg... either both signals need an
    opamp to offset them, plus a third to difference them, or if you try to
    reduce the opamps, you can't offset them enough *and* amplify them at
    the same time (which is what I'm seeing now).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Fri Mar 18 18:06:35 2022
    lørdag den 19. marts 2022 kl. 02.02.07 UTC+1 skrev DJ Delorie:
    Sylvia Else <syl...@email.invalid> writes:
    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.
    I thought of just outputting a square wave from the MCU into a charge
    pump inverter, but 4.6v minus two diode drops is only a few volts, and
    not a lot of milliamps (you're limited by the pin's max output). It
    might be enough, but if a solid 1A buck/boost negative rail is cheap and easy enough...

    https://www.maximintegrated.com/en/design/technical-documents/tutorials/3/3740.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to Sylvia Else on Fri Mar 18 21:01:55 2022
    Sylvia Else <sylvia@email.invalid> writes:
    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.

    I thought of just outputting a square wave from the MCU into a charge
    pump inverter, but 4.6v minus two diode drops is only a few volts, and
    not a lot of milliamps (you're limited by the pin's max output). It
    might be enough, but if a solid 1A buck/boost negative rail is cheap and
    easy enough...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to Lasse Langwadt Christensen on Fri Mar 18 21:13:03 2022
    Lasse Langwadt Christensen <langwadt@fonz.dk> writes:
    [1] http://www.delorie.com/electronics/bldc/

    if you skip the short circuit sense resistor, does it have to be differential?

    The IKCM15L60GAXKMA1 power module has a design without the separate
    short sense (just three resistors) but it uses diodes to "or" the
    signals into the sense pin. The side effect of that is you need larger
    sense resistors (36mR instead of 5mR, and 3W instead of 0.5W) which
    creates a larger voltage swing, which means the negative swings are much larger. This kind of design assumes the motor will always be "running"
    which is not true in my case (a hard stop caused the fault in the last
    design)

    You kinda want differential anyway to avoid ground drops, with that much current.

    three opamps with ~60x gain and a pull up to center the output at 2.5V
    with zero current diode or the output and use an opamp as comperator
    for the short circuit detect

    Yup, but that doesn't stop the sensed value from going negative...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to Lasse Langwadt Christensen on Fri Mar 18 21:49:25 2022
    Lasse Langwadt Christensen <langwadt@fonz.dk> writes:
    https://www.maximintegrated.com/en/design/technical-documents/tutorials/3/3740.html

    Interesting! Hadn't thought of that... Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Fri Mar 18 18:43:51 2022
    lørdag den 19. marts 2022 kl. 02.13.16 UTC+1 skrev DJ Delorie:
    Lasse Langwadt Christensen <lang...@fonz.dk> writes:
    [1] http://www.delorie.com/electronics/bldc/

    if you skip the short circuit sense resistor, does it have to be differential?
    The IKCM15L60GAXKMA1 power module has a design without the separate
    short sense (just three resistors) but it uses diodes to "or" the
    signals into the sense pin. The side effect of that is you need larger
    sense resistors (36mR instead of 5mR, and 3W instead of 0.5W) which
    creates a larger voltage swing, which means the negative swings are much larger. This kind of design assumes the motor will always be "running"
    which is not true in my case (a hard stop caused the fault in the last design)

    You kinda want differential anyway to avoid ground drops, with that much current.
    three opamps with ~60x gain and a pull up to center the output at 2.5V with zero current diode or the output and use an opamp as comperator
    for the short circuit detect
    Yup, but that doesn't stop the sensed value from going negative...

    Version 4
    SHEET 1 1500 1028
    WIRE -208 -48 -320 -48
    WIRE 16 -48 -16 -48
    WIRE 208 -48 16 -48
    WIRE 304 -48 208 -48
    WIRE 1088 -48 304 -48
    WIRE 1312 -48 1088 -48
    WIRE -320 -16 -320 -48
    WIRE -208 32 -208 -48
    WIRE -16 32 -16 -48
    WIRE 160 96 128 96
    WIRE 224 96 160 96
    WIRE 528 96 304 96
    WIRE 768 96 528 96
    WIRE 208 144 208 -48
    WIRE 160 160 160 96
    WIRE 176 160 160 160
    WIRE 304 176 304 96
    WIRE 304 176 240 176
    WIRE -208 192 -208 112
    WIRE -112 192 -208 192
    WIRE -16 192 -16 112
    WIRE -16 192 -32 192
    WIRE 176 192 -16 192
    WIRE 208 240 208 208
    WIRE 1088 240 1088 -48
    WIRE -208 320 -320 320
    WIRE 16 320 16 -48
    WIRE 16 320 -16 320
    WIRE 208 320 16 320
    WIRE -320 352 -320 320
    WIRE 1088 352 1088 320
    WIRE 1232 352 1088 352
    WIRE -208 400 -208 320
    WIRE -16 400 -16 320
    WIRE 160 464 128 464
    WIRE 224 464 160 464
    WIRE 208 512 208 320
    WIRE 160 528 160 464
    WIRE 176 528 160 528
    WIRE 304 544 304 464
    WIRE 304 544 240 544
    WIRE 512 544 304 544
    WIRE 768 544 512 544
    WIRE 832 544 832 96
    WIRE 1088 544 832 544
    WIRE -208 560 -208 480
    WIRE -112 560 -208 560
    WIRE -16 560 -16 480
    WIRE -16 560 -32 560
    WIRE 176 560 -16 560
    WIRE 1312 592 1312 -48
    WIRE 208 608 208 576
    WIRE 1232 608 1232 352
    WIRE 1280 608 1232 608
    WIRE 1424 624 1344 624
    WIRE 1088 640 1088 624
    WIRE 1280 640 1088 640
    WIRE -208 688 -320 688
    WIRE 16 688 16 320
    WIRE 16 688 -16 688
    WIRE 208 688 16 688
    WIRE -320 720 -320 688
    WIRE -208 768 -208 688
    WIRE -16 768 -16 688
    WIRE 160 832 128 832
    WIRE 224 832 160 832
    WIRE 208 880 208 688
    WIRE 160 896 160 832
    WIRE 176 896 160 896
    WIRE 304 912 304 832
    WIRE 304 912 240 912
    WIRE 512 912 304 912
    WIRE 768 912 512 912
    WIRE 832 912 832 544
    WIRE -208 928 -208 848
    WIRE -112 928 -208 928
    WIRE -16 928 -16 848
    WIRE -16 928 -32 928
    WIRE 176 928 -16 928
    WIRE 208 976 208 944
    FLAG 304 32 0
    FLAG 208 240 0
    FLAG -320 64 0
    FLAG 48 96 0
    FLAG -208 272 0
    FLAG 208 608 0
    FLAG -320 432 0
    FLAG 48 464 0
    FLAG -208 640 0
    FLAG 208 976 0
    FLAG -320 800 0
    FLAG 48 832 0
    FLAG -208 1008 0
    FLAG 1088 432 0
    FLAG 1312 656 0
    FLAG 1088 720 0
    FLAG 528 96 I_U
    FLAG 512 544 I_V
    FLAG 512 912 I_W
    FLAG 1424 624 I_SC
    SYMBOL OpAmps\\AD824 208 112 R0
    SYMATTR InstName U1
    SYMBOL voltage 304 -64 R0
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR InstName V1
    SYMATTR Value 5
    SYMBOL voltage -320 -32 R0
    WINDOW 3 -334 50 Left 2
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR Value SINE(0 {Ipeak} 100 10m)
    SYMATTR InstName V2
    SYMBOL res 320 80 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R1
    SYMATTR Value 45k
    SYMBOL res 144 80 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R2
    SYMATTR Value 1k
    SYMBOL res -16 176 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R3
    SYMATTR Value 1k
    SYMBOL res 0 128 R180
    WINDOW 0 36 76 Left 2
    WINDOW 3 36 40 Left 2
    SYMATTR InstName R4
    SYMATTR Value 91k
    SYMBOL res -224 176 R0
    SYMATTR InstName R5
    SYMATTR Value 0.005
    SYMBOL res -224 16 R0
    SYMATTR InstName R6
    SYMATTR Value 1
    SYMBOL OpAmps\\AD824 208 480 R0
    SYMATTR InstName U2
    SYMBOL voltage -320 336 R0
    WINDOW 3 -334 50 Left 2
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR Value SINE(0 {Ipeak} 100 10m 0 120)
    SYMATTR InstName V4
    SYMBOL res 320 448 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R7
    SYMATTR Value 45k
    SYMBOL res 144 448 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R8
    SYMATTR Value 1k
    SYMBOL res -16 544 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R9
    SYMATTR Value 1k
    SYMBOL res 0 496 R180
    WINDOW 0 36 76 Left 2
    WINDOW 3 36 40 Left 2
    SYMATTR InstName R10
    SYMATTR Value 91k
    SYMBOL res -224 544 R0
    SYMATTR InstName R11
    SYMATTR Value 0.005
    SYMBOL res -224 384 R0
    SYMATTR InstName R12
    SYMATTR Value 1
    SYMBOL OpAmps\\AD824 208 848 R0
    SYMATTR InstName U3
    SYMBOL voltage -320 704 R0
    WINDOW 3 -334 50 Left 2
    WINDOW 123 0 0 Left 0
    WINDOW 39 0 0 Left 0
    SYMATTR Value SINE(0 {Ipeak} 100 10m 0 240)
    SYMATTR InstName V6
    SYMBOL res 320 816 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R13
    SYMATTR Value 45k
    SYMBOL res 144 816 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R14
    SYMATTR Value 1k
    SYMBOL res -16 912 R90
    WINDOW 0 0 56 VBottom 2
    WINDOW 3 32 56 VTop 2
    SYMATTR InstName R15
    SYMATTR Value 1k
    SYMBOL res 0 864 R180
    WINDOW 0 36 76 Left 2
    WINDOW 3 36 40 Left 2
    SYMATTR InstName R16
    SYMATTR Value 91k
    SYMBOL res -224 912 R0
    SYMATTR InstName R17
    SYMATTR Value 0.005
    SYMBOL res -224 752 R0
    SYMATTR InstName R18
    SYMATTR Value 1
    SYMBOL schottky 768 112 R270
    WINDOW 0 32 32 VTop 2
    WINDOW 3 0 32 VBottom 2
    SYMATTR InstName D1
    SYMATTR Value BAT54
    SYMATTR Description Diode
    SYMATTR Type diode
    SYMBOL schottky 768 560 R270
    WINDOW 0 32 32 VTop 2
    WINDOW 3 0 32 VBottom 2
    SYMATTR InstName D2
    SYMATTR Value BAT54
    SYMATTR Description Diode
    SYMATTR Type diode
    SYMBOL schottky 768 928 R270
    WINDOW 0 32 32 VTop 2
    WINDOW 3 0 32 VBottom 2
    SYMATTR InstName D3
    SYMATTR Value BAT54
    SYMATTR Description Diode
    SYMATTR Type diode
    SYMBOL res 1072 528 R0
    SYMATTR InstName R20
    SYMATTR Value 1k
    SYMBOL OpAmps\\AD824 1312 560 R0
    SYMATTR InstName U4
    SYMBOL res 1072 336 R0
    SYMATTR InstName R21
    SYMATTR Value 2.4k
    SYMBOL res 1072 224 R0
    SYMATTR InstName R22
    SYMATTR Value 3k
    SYMBOL res 1072 624 R0
    SYMATTR InstName R19
    SYMATTR Value 1k
    TEXT -552 -200 Left 2 !.tran .1
    TEXT -672 224 Left 2 !.param Ipeak=10

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whit3rd@21:1/5 to DJ Delorie on Fri Mar 18 18:58:43 2022
    On Friday, March 18, 2022 at 2:40:10 PM UTC-7, DJ Delorie wrote:
    whit3rd <whi...@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.

    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...

    Yeah, the choice of a gain-of-one current sense amp isn't great. There's gain-of-20 and gain-of-60
    available, ST.com shows TSC2010, TSC2011, and for gain-of-100 TSC2012. They don't claim accuracy
    for big sense voltages, though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mikko OH2HVJ@21:1/5 to DJ Delorie on Sat Mar 19 09:35:01 2022
    DJ Delorie <dj@delorie.com> writes:

    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.

    Things I've used for similar setup depending on accuracy need. BLDC
    driver does not sound like metrology application ;-)

    - Large negative rail
    - LM7705 to generate -0.23V rail
    - Resistor divider (one or two sided) from sense resistor to 3.3V (say,
    40 ohms and 3.3V cause the -40mV to show up at 0mV, increase 40ohms to
    'lift' the signal).
    - Instrumentation amplifier
    - Hall current sensor
    - Opamp with negative input CM (TL27L4 and successors, TS921...)

    -- mikko

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to DJ Delorie on Sat Mar 19 06:47:31 2022
    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/

    Something like this should work.

    https://www.dropbox.com/s/kcvi27lqv60nhdi/BLDC_lowside_shunt.jpg?raw=1

    The opamp inputs run above ground.

    The caps are optional. Some tricks can be played to make this 4-wire differential, or 3-wire sorta diff which preserves the shared divider.

    Autozeroing is still a good idea.





    --

    I yam what I yam - Popeye

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hul Tytus@21:1/5 to DJ Delorie on Sat Mar 19 15:46:13 2022
    "... went below 0v at the input pins". adc input or lm324 input?
    And while we're here: what gain have you set the lm324 to?

    Hul

    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hul Tytus@21:1/5 to DJ Delorie on Sat Mar 19 15:55:30 2022
    One other thought: set the processor adc input to have a slightly
    positive offset and then counter that offset in the "ad conversion
    complete" interupt handler.

    Hul

    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From legg@21:1/5 to DJ Delorie on Sat Mar 19 12:02:29 2022
    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 ;-)

    -2V5 seems like a rather large source signal.

    Is the sensed current that produces the 'below ground' situation
    normal or overload?

    Is a linear response required under those conditions?

    If not, why not just ad sensor protection/conditioning?

    RL

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to Hul Tytus on Sat Mar 19 13:33:50 2022
    Hul Tytus <ht@panix.com> writes:
    "... went below 0v at the input pins". adc input or lm324 input?

    The lm324's inputs

    And while we're here: what gain have you set the lm324 to?

    34x (2k input, 68k feedback)

    One other thought: set the processor adc input to have a slightly
    positive offset and then counter that offset in the "ad conversion
    complete" interupt handler.

    Interesting idea, but I'd lose some precision in the adc. I saw some
    solutions that biased the sense the *other* way too - more adc range on
    the useful side.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to legg on Sat Mar 19 13:38:27 2022
    legg <legg@nospam.magma.ca> writes:
    -2V5 seems like a rather large source signal.

    The source signal is around 40mV in the old design, closer to 0.5v in
    the new design (which I'm not happy about)

    The opamp changes that to a 0-5V swing centered around 2.5v

    Is the sensed current that produces the 'below ground' situation
    normal or overload?

    It's a servo. When it's speeding up, it's a motor, and everything's
    positive. When it's slowing down, it's a generator, and the currents
    are negative.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to mikko.syrjalahti@nospam.fi on Sat Mar 19 13:47:03 2022
    Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> writes:
    Things I've used for similar setup depending on accuracy need. BLDC
    driver does not sound like metrology application ;-)

    When you're trying to hold a 0.09 degree step, it might as well be.

    - Large negative rail

    One poster had a clever idea for generating this with a charge pump off
    the main switcher.

    - LM7705 to generate -0.23V rail

    That's a new one on me!

    - Resistor divider (one or two sided) from sense resistor to 3.3V (say,
    40 ohms and 3.3V cause the -40mV to show up at 0mV, increase 40ohms to
    'lift' the signal).

    I'm not sure I want all the motor power potentially travelling through
    the MCU's vcc bus.

    - Hall current sensor

    One poster hinted at these, and I've been looking at the TMCS1101 which
    would let me move the current sense to the three BLDC wires instead of
    the negative rail, so I could sense the positively-driven phases as
    well. It causes some layout issues, but I think it will be the most
    useful.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Larkin@21:1/5 to DJ Delorie on Sat Mar 19 10:46:58 2022
    On Sat, 19 Mar 2022 13:33:50 -0400, DJ Delorie <dj@delorie.com> wrote:

    Hul Tytus <ht@panix.com> writes:
    "... went below 0v at the input pins". adc input or lm324 input?

    The lm324's inputs

    Classic LM324s can go insane on all four amps if one input pin is
    pulled a bit below ground.

    --

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Sat Mar 19 11:12:23 2022
    lørdag den 19. marts 2022 kl. 18.47.15 UTC+1 skrev DJ Delorie:
    Mikko OH2HVJ <mikko.sy...@nospam.fi> writes:
    Things I've used for similar setup depending on accuracy need. BLDC
    driver does not sound like metrology application ;-)
    When you're trying to hold a 0.09 degree step, it might as well be.

    - Large negative rail

    One poster had a clever idea for generating this with a charge pump off
    the main switcher.
    - LM7705 to generate -0.23V rail
    That's a new one on me!
    - Resistor divider (one or two sided) from sense resistor to 3.3V (say,
    40 ohms and 3.3V cause the -40mV to show up at 0mV, increase 40ohms to 'lift' the signal).
    I'm not sure I want all the motor power potentially travelling through
    the MCU's vcc bus.

    - Hall current sensor

    One poster hinted at these, and I've been looking at the TMCS1101 which would let me move the current sense to the three BLDC wires instead of
    the negative rail, so I could sense the positively-driven phases as
    well. It causes some layout issues, but I think it will be the most
    useful.

    easy to try, https://www.ebay.com/itm/173284477757

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From legg@21:1/5 to DJ Delorie on Sat Mar 19 15:02:16 2022
    On Sat, 19 Mar 2022 13:38:27 -0400, DJ Delorie <dj@delorie.com> wrote:

    legg <legg@nospam.magma.ca> writes:
    -2V5 seems like a rather large source signal.

    The source signal is around 40mV in the old design, closer to 0.5v in
    the new design (which I'm not happy about)

    The opamp changes that to a 0-5V swing centered around 2.5v

    I couldn't find any offsets in your schematic and didn't see the gain.

    There are a number of op amps that don't have issues with inputs
    going tens of millivolts below ground. Are you sure its an issue?

    Is the sensed current that produces the 'below ground' situation
    normal or overload?

    It's a servo. When it's speeding up, it's a motor, and everything's >positive. When it's slowing down, it's a generator, and the currents
    are negative.

    Same question - are you actually trying to control the current during
    the overload, or is it simply an overloaded monitor?

    RL

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to mikko.syrjalahti@nospam.fi on Sun Mar 20 19:19:22 2022
    Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> writes:
    A typo from me - I meant 40 (or 400) ohms to shunt non-GND-end and 3k3
    (or 33k) to 3.3V so you're running roughly constant 1mA through. This
    causes a small gain/offset error, but that's easy to compensate.

    I understood. I don't want the high voltage side connected to the 5v
    (not 3v3) bus at all, even through a 33k resistor, for both safety and
    noise reasons.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From DJ Delorie@21:1/5 to mikko.syrjalahti@nospam.fi on Sun Mar 20 19:21:06 2022
    Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> writes:
    A typo from me - I meant 40 (or 400) ohms to shunt non-GND-end and 3k3
    (or 33k) to 3.3V so you're running roughly constant 1mA through. This
    causes a small gain/offset error, but that's easy to compensate.

    And yes, I know the opamp's circuitry effectively connects that to 5v.
    I also know that board no longer works due to a spike on the high
    voltage side.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lasse Langwadt Christensen@21:1/5 to All on Sun Mar 20 16:24:07 2022
    mandag den 21. marts 2022 kl. 00.21.17 UTC+1 skrev DJ Delorie:
    Mikko OH2HVJ <mikko.sy...@nospam.fi> writes:
    A typo from me - I meant 40 (or 400) ohms to shunt non-GND-end and 3k3
    (or 33k) to 3.3V so you're running roughly constant 1mA through. This causes a small gain/offset error, but that's easy to compensate.
    And yes, I know the opamp's circuitry effectively connects that to 5v.
    I also know that board no longer works due to a spike on the high
    voltage side.

    stick a diode clamp on the sense resistor

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From whit3rd@21:1/5 to All on Sun Mar 20 22:54:03 2022
    If you know the +15 supply comes up before motor current, and the sense resistor (s)
    are near ground, you can power a few current sources (PNP transistor, emitters thru matched
    current-program resistors to +15, bases tied together and driven by an op amp for half milliamp each).
    Those, will pull up end B of a few level-translation resistors with their ends A connected
    to a current-sense resistor terminal.

    At half a milliamp, a + 2.5V offset (into a high impedance) happens when the resistors
    are 5000 ohms. It's accurate enough if the sense resistors are much under 5000 ohms, of course.
    1% resistors means that's 2.5 +/- .07V or so, it'll have to be calibrated for 'zero'.
    15V gives you enough leeway that the PNPs can just get their bases connected to (filtered) +5
    if you don't need to regulate better than the +15/+5 rail difference voltage.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Klaus Vestergaard Kragelund@21:1/5 to DJ Delorie on Tue Mar 22 16:35:01 2022
    On 19/03/2022 02.03, DJ Delorie wrote:
    Klaus Vestergaard Kragelund <klauskvik@hotmail.com> writes:
    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

    That sounds like multiple op amps per leg... either both signals need an opamp to offset them, plus a third to difference them, or if you try to reduce the opamps, you can't offset them enough *and* amplify them at
    the same time (which is what I'm seeing now).
    You add small offset to the non inverting input (VCC/(gain*2)

    Like seen in page 6 here:

    https://www.st.com/en/evaluation-tools/steval-ihm028v1.html

    Cheers

    Klaus

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Piotr Wyderski@21:1/5 to Lasse Langwadt Christensen on Thu Mar 24 17:50:00 2022
    Lasse Langwadt Christensen wrote:

    https://www.maximintegrated.com/en/design/technical-documents/tutorials/3/3740.html

    Flybuck requires additional windings and this alone might suffice to
    cause panic. ;)

    Best regards, Piotr

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jlarkin@highlandsniptechnology.com@21:1/5 to bombald@protonmail.com on Thu Mar 24 10:14:25 2022
    On Thu, 24 Mar 2022 17:50:00 +0100, Piotr Wyderski
    <bombald@protonmail.com> wrote:

    Lasse Langwadt Christensen wrote:

    https://www.maximintegrated.com/en/design/technical-documents/tutorials/3/3740.html

    Flybuck requires additional windings and this alone might suffice to
    cause panic. ;)

    Best regards, Piotr

    The DRQ74 family of dual-winding inductors are great, and cheap.

    An autotransformer flyback makes twice the voltage as a single
    inductor version. Add in the input voltage too!



    --

    I yam what I yam - Popeye

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Piotr Wyderski@21:1/5 to jlarkin@highlandsniptechnology.com on Thu Mar 24 22:44:45 2022
    jlarkin@highlandsniptechnology.com wrote:

    The DRQ74 family of dual-winding inductors are great, and cheap.

    Yes, I am using these for 20W SEPICs. Another benefit is that you can
    one more diode footprint and one capacitor to the PCB and populate it
    for SEPIC mode or a plain boost mode at the P&P stage. But when you need
    more insulation strength or just more windings, you quickly run out of
    options and a custom design is needed.

    Best regards, Piotr

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)