# inverting a negative voltage with an amplifier

#### jsnx

Joined Mar 17, 2022
21
Hello,

I'm having trouble thinking of a way to convert a negative voltage to a positive one with an inverting OPA. I have an input voltage range of [-5 to -1]V and I need to convert it into a positive voltage to compare it with a reference voltage ( regulation for my charge pump) and I only have a positive supply voltage of 5V.

I studied the one stage OTA shown below and the minimum input voltage is $V_{icmin} = V_{gs1} + \frac{V_{g5}-V_{th5}}{n_{5}}$ So I can't have a negative input in my OTA.

I was wondering if there is a way to be able to use the OTA for a negative input voltage or if there is another way to convert it into a positive voltage where I won't be needing a regulation.

Thank you

#### crutschow

Joined Mar 14, 2008
33,346
A rail-rail type op amp will do that for you.
You just configure it as an inverter with two resistors.
What gain do you want?

#### jsnx

Joined Mar 17, 2022
21
A rail-rail type op amp will do that for you.
You just configure it as an inverter with two resistors.
What gain do you want?
I want a gain of one. But what is the transistor level circuit of a rail-rail op amp? is it different from a classic one stage OTA?

#### crutschow

Joined Mar 14, 2008
33,346
I want a gain of one. But what is the transistor level circuit of a rail-rail op amp? is it different from a classic one stage OTA?
Yes, it's different.
You can look at the schematic in the spec sheet of a rail-rail op amp to see how they do it.

Are you trying to build you own op amp?

#### ronsimpson

Joined Oct 7, 2019
2,795
Input in green goes from -1 to -5 and back. Output in red goes from +1 to +5.
This requires a "R-R" opamp.

#### jsnx

Joined Mar 17, 2022
21
Yes, it's different.
You can look at the schematic in the spec sheet of a rail-rail op amp to see how they do it.

Are you trying to build you own op amp?
I'm doing a design of a circuit where I'll be needing to invert a negative voltage and everything has to be in one chip.

#### crutschow

Joined Mar 14, 2008
33,346
I'm doing a design of a circuit where I'll be needing to invert a negative voltage and everything has to be in one chip.
Here's an article on the design of rail-rail op amps that may help.
It could probably be simplified for your purposes.

#### jsnx

Joined Mar 17, 2022
21
Here's an article on the design of rail-rail op amps that may help.
It could probably be simplified for your purposes.
Thank you

#### ronsimpson

Joined Oct 7, 2019
2,795
and everything has to be in one chip
I am old school enough I did this with transistors but you can do it with MOSFETs.

#### jsnx

Joined Mar 17, 2022
21

#### Papabravo

Joined Feb 24, 2006
20,600

#### ronsimpson

Joined Oct 7, 2019
2,795
Insert an 'old man' joke here.

#### ronsimpson

Joined Oct 7, 2019
2,795