0
\$\begingroup\$

enter image description here

I want to sense a near-ground voltage in this circuit which is Vsense, but its maximum voltage would be 0.5 V so I designed an op amp amplifier with a gain of 10.

I used another op amp to split the 12 V supply into +6 V and -6 V to power the amplifying op amp.

enter image description here

The problem is: the amplified output of UB is measured referenced to the virtual ground (GNDREF in the circuit) and I want to send this voltage to a microcontroller to sense it. But since the MCU uses a different ground, I'm afraid there will be a problem.

I thought about simply connecting both grounds and everyone will be happy but it came to my mind that MCU's ground is the same of battery's 12v ground which is the same negative rail of the op amp so I want to know if that would be a problem.

\$\endgroup\$
5
  • \$\begingroup\$ What micro are you using, and does its ADC have a fixed reference or can you supply your own. Adding amplification adds errors. If you can change the scale of the ADC it is preferable. \$\endgroup\$
    – Trevor_G
    Commented Apr 10, 2017 at 16:42
  • \$\begingroup\$ @Trevor I'm using atmega328p, it has internal reference of 1.1 v \$\endgroup\$
    – iMohaned
    Commented Apr 10, 2017 at 16:44
  • \$\begingroup\$ The ATmega family allows you to use an external reference through the AREF pin. \$\endgroup\$
    – Trevor_G
    Commented Apr 10, 2017 at 16:50
  • \$\begingroup\$ @Trevor But.. Doesn't it has a maximum input voltage of 5 V? \$\endgroup\$
    – iMohaned
    Commented Apr 10, 2017 at 17:03
  • 1
    \$\begingroup\$ Yes it does, but you are trying to measure a max of 0.5V. If you set up AREF with a reference voltage of 0.5V you will get full scale on the ADC = 0.5V, which, if I am reading your question right, is what you are after. \$\endgroup\$
    – Trevor_G
    Commented Apr 10, 2017 at 17:07

2 Answers 2

1
\$\begingroup\$

The LM358 you've shown in your schematic is a single-supply op amp capable of an input common mode range down to 0 V (i.e. ground) and an output swing down to 20 mV maximum. Therefore you don't need to produce a 6 V GNDREF: just reference everything to GND.

\$\endgroup\$
2
  • \$\begingroup\$ What if I want to do it this way? (just for curiosity) \$\endgroup\$
    – iMohaned
    Commented Apr 10, 2017 at 16:04
  • \$\begingroup\$ @iMohaned Ultimately your problem is that Vsense is referenced to ground so you need to amplify Vsense referenced to ground. If you amplify referenced to GNDREF you'll run into the problem the other answer mentioned. A single supply op amp is the simplest and cheapest solution. \$\endgroup\$
    – Null
    Commented Apr 10, 2017 at 16:10
2
\$\begingroup\$

Having the gnd of the MCU at the same potential as the -ve rail of the op-amp is not a problem in principle. However, with respect to gnd Vsense(max) is at +0.5V. GNDREF is at +6V, so the effective +input of U?B is -5.5V. Therefore the op-amp output will saturate negatively and output 0V over your full sense range.

You could just use a single supply op-amp circuit to drive the MCU (ADC?) input.

\$\endgroup\$
1
  • \$\begingroup\$ That changed everything :( when i made a breadboard test circuit i referenced the input voltage sensing voltage to ground (just for testing) and i forgot about all that referencing stuff. \$\endgroup\$
    – iMohaned
    Commented Apr 10, 2017 at 16:07

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.