# Different grounds for sensor power and reading

First of all, I'm pretty new in this area of electronic circuit design so I might end up saying something pretty dumb in the course of my question. Also, English is not my native language, so sorry for any mistakes. This is my very first question here too.

My problem is the following. I have a pressure sensor that is powered with 24V and spits out a signal from 0V to 10V proportional do the pressure reading. The sensor has three wires: +24V, GND and SIGNAL. The microcontroller I use to read this signal is a 3.3V based one, so I needed some voltage divider to do this conversion.

For some reasons this voltage divider circuit needs to be buffered, so I used an OpAmp. Since there are other circuits in this same board that uses OpAmp's that need symmetrical power and I need the OpAmp for the voltage divider to be able to reach 0V, I used a TLE2426 rail splitter to generate a +12V/-12V for the board (I must use a 24V power supply to power this board).

I need to connect the GND of the microcontroller to the virtual GND of the TLE2426. The problem is that the reference from wich I'll be measuring the output of the voltage divider circuit is the virtual GND generated by the TLE2426, and the reference from wich the sensor will output its signal is the GND from the 24V power supply. I know I can't connect this two GND's together.

The circuit I have is as follows:

simulate this circuit – Schematic created using CircuitLab

Things i thought might solve the problem:

1 - Using the PS GND as the GDN for the voltage divider only. Will the OpAmp output the correct voltage to the virtual GND in this case?

simulate this circuit

2 - Using a boost converter in the +12V and virtual GND lines to generate +24V again but with a common ground this time and then powering the sensors with this circuit. I don't know if I can use this type of circuit with a virtual GND or if this will generate some sort of noise in the circuit.

EDIT:

So, I continued searching about this subject and, changing some of my keywords, I found this other post here:

Inverting Buck-Boost -12V converter Schematics

Maybe this works out for me. I can use a LM7812 to generate a +12V and a LM2576 in the configuration shown in the post to generate the -12V and the GND of both input and output is the same which will solve my problem with the pressure sensors. What do you think?

EDIT 2:

Just to clarify: I need a negative suply voltage because in this same board I have a circuit that takes the 0V-3.3V from de MCU and converts it to -10V-+10V for the drive of an actuator I have. Since both circuits (the one that reads the pressure sensors data and the one that generate the signal for the actuator) are connected to the MCU I need to have the same GND for both.

• Do you really want to connect the weak virtual GND to MCU GND? This will probably introduce many problems.
– Jens
Commented Jun 13, 2023 at 13:50
• I need this reference to measure the output of the voltage divider circuit, don't I? I have other circuits in this same board that need this symmetrical power. For example, I have a circuit that receives the 3,3V from the MCU and output a -10/+10 signal for an actuator. Commented Jun 13, 2023 at 19:01
• There is a way to generate this symmetrical power maintaining the same GND with a 24V input? Commented Jun 13, 2023 at 19:12
• The LM358 seems to be rail to rail. You should make an adder circuit from it that adds virtual ground with the output of your sensor. You need a resistor between -12V and the -input and a feedback resistor from the -input to the output of the opamp so that your output equals (12V+Vsensor), relative to -12V, so Vsensor relative to virtual ground. Add a voltage divider on the opamp output to use as the input to your uC. You probably should also add a fixed offset into the adder to avoid negative voltage on your uC along with a clamping diode. Commented Jun 13, 2023 at 21:33
• I would like to know your reasons for the statement "I know I can't connect this two GNDs together". A lot hinges on why you can't do that. Commented Jun 14, 2023 at 2:44

If your concern is that you need to have the op-amp output go right down to 0V, then I suggest you reconsider. If you are willing to lose a few ADC counts at the low end of the conversion range, then you could aim to obtain an output from 50mV...3.3V, for instance, corresponding to the 0V...+10V input range. That's still 98% of the full range, and the lower output boundary of +50mV is a perfectly feasible by an LM358 using 0V as its negative supply.

This subtle alteration of ADC conversion values is easily compensated for in software. For example, with your expected input range of 0V...+10V, corresponding to an output +50mV...+3.3V, the required relationship will be:

$$V_{OUT} = V_{IN}\frac{3.3V-50mV}{10V-0V} + 50mV = 0.325V_{IN} + 50mV$$

Simply rearrange that to make $$\V_{IN}\$$ the subject, and implement this expression for $$\V_{IN}\$$ in your microcontroller software:

$$V_{IN} = \frac{V_{OUT} - 50mV}{0.325}$$

The above relationship between $$\V_{OUT}\$$ and $$\V_{IN}\$$ can be achieved with as little as three resistors, and a low impedance, clean positive voltage source:

simulate this circuit – Schematic created using CircuitLab

These three circuits use different methods to derive some fixed reference potential $$\V_{REF}\$$. On the left I just use the +12V supply, in the middle I use a zener diode, and on the right (for best precision) I use a TL431 voltage reference.

All three circuits have the same input-to-output relationship:

I've addressed this kind of thing in other answers, such as this one and this one, but in those I derived appropriate resistor values using Thevenin equivalance. Check them out to see that approach. Today I feel adventurous, so I will apply KCL at node OUT, for two distinct cases of known inputs and outputs:

simulate this circuit

$$I_3 = I_1 + I_2$$

I replace currents in that expression using Ohm's law:

$$\frac{V_{OUT}}{R_3} = \frac{V_{IN}-V_{OUT}}{R_1} + \frac{V_{REF}-V_{OUT}}{R_2}$$

Then I plug in known values from each case (I will use the +12V positive supply for $$\V_{REF}\$$ here), to obtain two simultaneous equations:

$$\frac{+50mV}{R_3} = \frac{(0)-(+50mV)}{R_1} + \frac{(+12V)-(+50mV)}{R_2}$$

$$\frac{+3.3V}{R_3} = \frac{(+10V) - (+3.3V)}{R_1} + \frac{(+12V)-(+3.3V)}{R_2}$$

There are three unknowns ($$\R_1\$$, $$\R_2\$$ and $$\R_3\$$), and only two equations, so I choose one of them arbitrarily, then solve for the other two. In my examples, I set $$\R_1=47k\Omega\$$, because it's a readily available E12 value, large enough to present a light load on the source at IN, but not so large that interference is an issue.

The results I got were:

$$R_1 = 47k\Omega$$

$$R_2 = 3.748M\Omega$$

$$R_2 = 22.78k\Omega$$

Those are the values I have shown in the circuit above left. For the other two versions I performed the exact same calculations, but with $$\V_{REF}=+4.7V\$$ and $$\V_{REF}=+2.5V\$$.

### Update

Given your comments below, from the perspective of the MCU, the sensor signal has the potential range -12V...-2V.

With a negative supply, an op-amp input and output range includes 0V, and we can produce an output all the way to ground. The next circuit needs both supply rails, +12V and -12V, and will map an input of -12V...-2V to 0V...+3.3V:

simulate this circuit

Applying KCL, as before, yields a slightly different relationship:

$$\frac{V_{IN}-V_{OUT}}{R_1} + \frac{V_{REFP}-V_{OUT}}{R_3} = \frac{V_{OUT}-V_{REFN}}{R_2}$$

Another option would be to use an inverting, summing amplifier, which is far easier to configure, and is ideal for applying an offset:

simulate this circuit

$$V_{OUT} = -(V_{IN}\frac{R_1}{R_3} + V_{REF}\frac{R_1}{R_2})$$

The inversion is inconvenient, but easy to compensate for software; a small price to pay for simplicity.

Again, to avoid power supply noise getting injected into the signal, it's possible to use any clean positive voltage source to provide $$\V_{REF}\$$, such as the TL431.

• Thank you for taking the time to give me an well explained answer. Commented Jun 14, 2023 at 12:58
• This wold work for me if I didn't need the negative 12V. As I said in one of the comments of the my post, in this same board there is a circuit to convert from 0V-3.3V to -10V-10V for an actuator I have, so I need this negative supply. The problem with that is by using a rail splitter I will have two different grounds. I will add this information in the original post. I did an edit too about the LM2576 in an inverter configuration, do you think this wold work? Commented Jun 14, 2023 at 13:04
• @CíceroZanette I'm not sure why you need the -12V. Just because the circuit you connected to has and uses a -12V supply doesn't mean you have to. Besides, the signal from your sensor is surely 0V...+10V with respect to the sensor ground, which also happens to be the 24V system ground, is that not correct? I am under then impression that the TLE2426 module is proposed as part of your solution, and isn't part of the existing system. Am I wrong there? Commented Jun 14, 2023 at 13:20
• I will try to explain better what's my problem. The circuit on the original post is what I have now. I use a TLE2426 to split a 24V from an external PS in a +12V and -12V with a virtual GND. I need this two supplies because one of the circuits in my board uses an OpAmp to convert 0V/3.3V from my MCU to -10V/+10V for an actuator. This same MCU needs to read a 0V/10V signal of a sensor that's referenced to the external PS GND, so the ground of this two circuits needs to be the same for me to be able to use the same MCU for both circuits. The TLE2426 that I use now don't allow that. Commented Jun 14, 2023 at 14:08
• @CíceroZanette am I right in saying, then, that your MCU's ground is the virtual one, midpoint of the 24V supply, produced by the TLE2426? Am I then correct to say that , from the MCU's perspective, your sensor signal will look like -12V...-2V? Commented Jun 14, 2023 at 14:21

Do yourself a favor and create a proper split supply relative to MCU GND using a buck converter. The 1:1 transformer solution works with most buck converters, that don't have a sync FET to GND.

For proper regulation the load current on the +12 output must be above the -12 current. R1 and R2 can help here.

It is easy to scale down the 0-10 V sensor signal to the 3.3 V ADC range.
I added a simple clamp circuit with 2 diodes, just in case the sensor signal exceeds the expected voltage range.

The DAC output can be scaled up to +/-10 V with another OpAmp as shown.

With this design all components refer to the same GND.

simulate this circuit – Schematic created using CircuitLab