negative rail for low side current sense?...

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
 
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...
 
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).
 
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
 
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...
 
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
 
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!
 
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.
 
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
 
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
 
\"... 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/
 
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/
 
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
 
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.
 
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.
 
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
 
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.
 
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
 
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
 
DJ Delorie <dj@delorie.com> writes:

Mikko OH2HVJ <mikko.syrjalahti@nospam.fi> writes:
- 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.

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.

--
mikko
 

Welcome to EDABoard.com

Sponsor

Back
Top