2
\$\begingroup\$

enter image description here

I want to measure the current at point A. This is a constant current circuit driving a laser. But to connect it with INA219, how can I connect it to my circuit?

Option 1: Do I need a shunt resistor in series and Vin+ and Vin- are connected between resistor?

Option2: Vin+ is connected to supply (12V) and Vin- is at point A.

Option3: Vin+ and Vin- are connected along the path of the current without resistor, just like the connection of multimeter.

Also mine is a constant current circuit of 21mA, so the variations will be less. Is there any way to calibrate the sensor to measure the small variations?

Please spare me if my doubt is very basic. I dont have much experience with analog electronics. I watched many youtube videos, but in each one its is telling differently. Thanks in advance

\$\endgroup\$
3
  • \$\begingroup\$ Teena, if we are done here, please take note of this: What should I do when someone answers my question. If you are still confused about something then leave a comment to request further clarification. Play the game and everyone is happy. \$\endgroup\$
    – Andy aka
    Commented Aug 3, 2023 at 13:46
  • \$\begingroup\$ The sensor is having an internal shunt of 0.1ohm. So i can connect it directly to circuit, in the path of the current flow. here V+ to output of opamp and V- to laser. Thank you \$\endgroup\$
    – Teena
    Commented Aug 3, 2023 at 14:06
  • \$\begingroup\$ Teena you are not understanding what I am saying. \$\endgroup\$
    – Andy aka
    Commented Aug 3, 2023 at 17:58

3 Answers 3

2
\$\begingroup\$

You are making things over-complicated. All you actually need to do is look at the voltage across the 280 Ω resistor with respect to ground. I've called it Vsense in an extract of your picture below: -

enter image description here

You don't need an INA219; just an ADC input channel.

\$\endgroup\$
1
\$\begingroup\$

The short answer is yes. You need a shunt resistor with the correct resistor to be able to measure the current.

The INA219 and similar chips are designed to convert a very low voltage over the shunt resistor to a more readable value. The idea is to use a very small shunt resistor to reduce the amount of power dissipation.

In the circuit you have here, as you mentioned, the opamp is to limit the current. No current goes to Opamp inputs. This means all the current goes through the 280R resistor and it is doing the current measurement!

For your circuit, you have two options to measure the current:

Option 1: You are using a UNO board. It has a built-in ADC. You can measure the voltage over the 280R resistor to find out the current. Simply divide the voltage by the resistor to convert it to current (mV/R=mA).

Simple current measurement

Option 2: If, for any reason, you want to use the INA219, you can divide the 280R into two resistors. For example, let's use a 270R and a 10R in series. Then, by 21mA going through it, the voltage over the 10R would be 210mV. You can connect the Vin+ and Vin- to measure the voltage over this resistor. If you set the INA219 gain to "/8", then it can measure up to 320mV.

Suggested circuit

The INA219 indicates that the inputs can connect to GND (even less than zero). This means this circuit should work. However, if there was a bias in the measurement, you can swap the place of the 10R with 270R to make sure the input voltages of the INA219 are well far from the GND. But the principal is the same, and you need to measure the voltage of the 10R resistor.

\$\endgroup\$
4
  • \$\begingroup\$ The shunt should be in between Opamp output and laser. Correct me if I am wrong? The constant current is the output of the opamp and I want to measure that current for some to analyse noise. \$\endgroup\$
    – Teena
    Commented Jul 31, 2023 at 9:25
  • \$\begingroup\$ I am adding the breakout board information: adafruit.com/product/904 It does have an internal resistor of 0.1 ohm. So in that how can I connect the sensor to circuit? connect my power supply(12V) to VIN+ and output of opamp(that is the constant current) to VIN-. Is it how I need to do? \$\endgroup\$
    – Teena
    Commented Jul 31, 2023 at 10:54
  • \$\begingroup\$ About your first question, what you need to consider is that the input of the opamp does not sink or source any current. This means all the current that goes through the laser, also goes through the 280R resistor. You can use this to measure that very same current. \$\endgroup\$
    – Saadat
    Commented Jul 31, 2023 at 12:42
  • 1
    \$\begingroup\$ @Teena -- the current through the 280 ohm resistor will always be the same as the current coming out of the op amp, assuming the op amp is ideal, and within a hair of that for a "real" op amp. \$\endgroup\$ Commented Aug 3, 2023 at 14:21
0
\$\begingroup\$
  1. Yes you need a shunt.
  2. Vin+ and - should be connected to either side of the shunt.

The INA219 accept up to 26V on its input so that is fine.

However, this circuit is unlikely to operate as intended, since the op-amp is shorted to ground.

If you try to have a current source through the diode, this isn't going to work, you need some feedback on the op-amp.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you Damien. I have updated the circuit. Thanks again for your answer \$\endgroup\$
    – Teena
    Commented Jul 31, 2023 at 5:51
  • \$\begingroup\$ Add the shunt and it should work @Teena \$\endgroup\$
    – Damien
    Commented Jul 31, 2023 at 6:20
  • \$\begingroup\$ I am adding the breakout board information: adafruit.com/product/904 It does have an internal resistor of 0.1 ohm. So in that how can I connect the sensor to circuit? connect my power supply(12V) to VIN+ and output of opamp(that is the constant current) to VIN-. Is it how I need to do? \$\endgroup\$
    – Teena
    Commented Jul 31, 2023 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.