Voltage regulator connected between positive and negative voltages

groundnegativevoltage-regulator

I'm kind of new to the world of electronics, so bear with me.
I need to regulate +24 volts down to about +21 volts (for supplying a really pretentious heating resistor). I already have the circuit for the v-reg using +24v. The problem I'm having is that I don't have +24 volts, but I do have +12 and -12 volts. Could I connect the input of the v-reg to +12v and use the -12v as the circuit's GND?
The voltages come from a PC PSU.

This is basically what I need:

This is basically what I need

EDIT: I calculated the output as +9V. Combined with -12V the load should get 21V, right?
But now I'm not sure about what I use for the ULN2003's ground? Should I use the actual GND or should I leave it to -12V.
Thanks.
Could this work?

Best Answer

You can think of a ±12 V supply as a 24 V supply, because it is. Taken in isolation that is fine.

You can run into trouble when you connect your circuit to something else that uses a different ground, and those grounds are not floating with respect to each other. Your circuit views the -12 V supply as ground, which is fine for it. However, if you try to connect signals to it that use the same power supply 0 V line as their reference, your circuit will view all those signals as being 12 V higher than the driving circuit. That probably isn't good.

If, in contrast, you connect your circuit to another one that is powered from a separate wall wart, then you can choose whatever point on each circuit you consider the 0 V reference and connect them together. This works because the power supplies for the two circuits are isolated from each other. That means the voltages of each can float arbitrarily relative to the other. By connecting the two grounds, you define a common reference between the two otherwise floating circuits, and then after that they are not floating with respect to each other anymore.