# How to understand rail to rail input circuit?

I watched an input circuit for ground rail as follows,

Why do I have to place a current source here? If I place a resistor instead, there will still be current flowing in emitter-base direction for ground input at IN+.

Similar rail-rail input circuit bothers me as follows,

What signal will port 1-4 have when IN+ changes from 0 to Vcc? And why?

• You can use a resistor but s current source is better as it will deliver the same current as the common mode input voltage changes. The second circuit is just two circuits similar to circuit 1. When the common mode voltage is too high for the p channel devices, the n channel ones will work, and vice versa. – user1582568 Jan 21 '16 at 0:02

1. Using a current source helps to deliver a specific gm as well as ensure that the transistors stay biased in the correct region throughout the wave form. A resister placed there would allow that node to "wobble" which isn't good because you solve this circuit by assuming it's symmetric and that node is an AC ground.
2. You solve differential circuits like this by only looking at half, and then understanding that the other half will be inverted for an inverted signal being delivered to IN-. So looking only at IN+, at 0.5Vcc, nodes 1 and 4 would be around 0.5Vcc as well (not exactly but that's okay or even good in most cases). If you pull IN+ to ground, that nmos will turn off. The resistor then pulls node 1 to Vcc. The Pmos will be hard on and the current source will push the most current it can through that Resistor, which brings the node 4 voltage to almost Vcc. If you pull IN+ to Vcc, that nmos will be hard on. The current source will pull as much current as it can through the resistor and the voltage at node 1 will be almost ground. The PMOS will be turned off and that resistor will pull the voltage at node 4 to ground. As you can see, by using the proper output for the correct half of the wave cycle, we can reach rail to rail on the output waveform. (solving for nodes 2 and 3 is just the inverse of nodes 1 and 4, assuming that the input of IN- is the inverse of IN+)
• How can it be an AC ground? current sources have high impedance. – Jasen Jan 21 '16 at 8:47
• Hey, dave, what do you mean by AC ground? – oilpig Jan 21 '16 at 12:50
• @Jasen, Current sources are fun, and by fun I mean confusing. So that circuit can't be split up unless the node voltage where to differential pair is considered "Locked in place." To an extent this is true with a current source there. And you're right that a current source has high output impedance (it should be infinite, almost like an open circuit). SO, taking all that into account, a simple DC analysis says that the current source - input fets node is open from the rails and it's at a fixed voltage. THAT'S what makes it an AC ground. – Dave Jan 21 '16 at 13:58
• @oilpig, AC ground is a term used to name any point in an amplifier that has a "fixed DC voltage." It's called this because even if an AC wave tries to move that node voltage, it won't move (being fixed in place and all that jazz). That means that the node acts like a ground node, BUT ONLY FOR AC. So, it's an AC ground. (In reality there's no such thing as an AC ground; it's just a useful tool to help understand circuits and calculate impedances without over-complicating things) – Dave Jan 21 '16 at 14:13