# op amp rails and it's inputs

I am trying to feed this voltage measured by the oscilloscope to a voltage comparator. by design the voltage should swing between +0.7 and -0.7 . BUT since the voltage is not referenced to ground i am really having a hard time wrapping my head around what should be connected the comparator , and HOW should i connect them .

since the voltage am trying to feed to the comparator is not referenced to ground i can't just get away with connecting the op-amp negative rail to ground right ?

just bear with me one more moment , what am trying to say is if for instance i feed a signal that has a magnitude of 0.7 does that mean it's 0.7 higher in voltage than the op amp ground , or is it independent of the op-amp ground ? i mean if for instance i connected the comparator negative rail to 0.7V and then feed a 0.7 to any of the inputs would i be effectively feeding the op-amp 0 volts since they are both at the same level. so i guess what am trying to ask is , what are the relation between the + and - rails of the op-amp to it's inputs. what should i connect the - and + rails of the comparator. i am really confused about what a ground represent in this case

• The question talks about op amps, but there isn't a single op amp in the schematic. Show us the full circuit. – Matt Young Jul 1 '15 at 17:12
• The inputs must be < than the V+ and > than the V-. For rail to rail amps the rail voltages are included in the acceptable range. There are some op amps that go slightly beyond rails for inputs, but most don't. – avl_sweden Jul 1 '15 at 17:35
• i am trying to build this circuit i want to feed the voltage measured by the oscilloscope to an op amp working as a comparator, but i haven't yet figured out how it should be connected and that's why it's not in the schematic – User.t Jul 1 '15 at 17:36

The voltages will likely go beyond +/-0.7v in practice. The 1N4007G datasheet specifies Vf or the maximum forward diode voltage at about 1.0v when 1A is passing through it. It can take more current than this, up to 30A, for a very brief period of time however. If L1 is a high-power device, more than 1A could flow through either diode briefly, pushing the measured voltage higher than 1V, likely up to +/-3v. Test it and record the output using an oscilloscope for real-world values in your circuit.

Note that the 1N400x series are relatively slow and are optimized for rectification purposes. The collapsing magnetic field in L1 when the key is released, will ramp up voltage very quickly. A faster diode may be needed to prevent large voltage spikes from forming. Again, test it and see.

Anyways, a comparator outputs it's positive rail voltage when it's positive input is greater than it's negative input. It outputs its negative rail voltage when the positive input is less than it's negative input.

In general, you can't drive an op-amp's inputs beyond it's supply rails. So it is not possible to power the comparator from 5v and 0v, then apply -3v to an input. How this is mitigated is by the use of resistor dividers to "scale" and align input signals to values falling within the acceptable range of the comparator. Same with it's output.