Skip to main content
added 49 characters in body
Source Link
KarlKarlsom
  • 1.9k
  • 2
  • 16
  • 27

I want to trigger an interrupt on an ATMEGA328P, when the current of a magnet fallsload is below a certain value.

Therefore I designed the following differential amp circuit using an LM358

Below picture shows the LTSpice circuit. enter image description here

With the following parameters for the LM358. enter image description here

The LTSpice simulation shows the following voltage at the output voltage vs. load current: enter image description here

After the simulation, I build this circuit. The potentiometer is used to adjust the gain slightly enter image description here

But after building it up, I cannot get it working. From 0 to 100mA Rload the output of the OPAMP remains at 3.8V (5V VCC - VRailOffset). Even with RLoad disconnected the output voltage remains at 3.8V. The voltage measured at the 10Ohm current sense resistor is correct.

The adjustment potentiometer has no effect at all to the output state. I tried different resistor values already (1k/22k and 100k/2Meg).

What am I missing here?

I want to trigger an interrupt on an ATMEGA328P, when the current of a magnet falls below a certain value.

Therefore I designed the following differential amp circuit using an LM358

Below picture shows the LTSpice circuit. enter image description here

With the following parameters for the LM358. enter image description here

The LTSpice simulation shows the following voltage at the output voltage vs. load current: enter image description here

After the simulation, I build this circuit. enter image description here

But after building it up, I cannot get it working. From 0 to 100mA Rload the output of the OPAMP remains at 3.8V (5V VCC - VRailOffset). Even with RLoad disconnected the output voltage remains at 3.8V. The voltage measured at the 10Ohm current sense resistor is correct.

The adjustment potentiometer has no effect at all to the output state. I tried different resistor values already (1k/22k and 100k/2Meg).

What am I missing here?

I want to trigger an interrupt on an ATMEGA328P, when the current of a load is below a certain value.

Therefore I designed the following differential amp circuit using an LM358

Below picture shows the LTSpice circuit. enter image description here

With the following parameters for the LM358. enter image description here

The LTSpice simulation shows the following voltage at the output voltage vs. load current: enter image description here

After the simulation, I build this circuit. The potentiometer is used to adjust the gain slightly enter image description here

But after building it up, I cannot get it working. From 0 to 100mA Rload the output of the OPAMP remains at 3.8V (5V VCC - VRailOffset). Even with RLoad disconnected the output voltage remains at 3.8V. The voltage measured at the 10Ohm current sense resistor is correct.

The adjustment potentiometer has no effect at all to the output state. I tried different resistor values already (1k/22k and 100k/2Meg).

What am I missing here?

Source Link
KarlKarlsom
  • 1.9k
  • 2
  • 16
  • 27

OPAMP - Current sense - unexpected behavior

I want to trigger an interrupt on an ATMEGA328P, when the current of a magnet falls below a certain value.

Therefore I designed the following differential amp circuit using an LM358

Below picture shows the LTSpice circuit. enter image description here

With the following parameters for the LM358. enter image description here

The LTSpice simulation shows the following voltage at the output voltage vs. load current: enter image description here

After the simulation, I build this circuit. enter image description here

But after building it up, I cannot get it working. From 0 to 100mA Rload the output of the OPAMP remains at 3.8V (5V VCC - VRailOffset). Even with RLoad disconnected the output voltage remains at 3.8V. The voltage measured at the 10Ohm current sense resistor is correct.

The adjustment potentiometer has no effect at all to the output state. I tried different resistor values already (1k/22k and 100k/2Meg).

What am I missing here?