# Problem With Op-Amp Comparator

Discussion in 'Homework Help' started by HeWasOnly3, Dec 6, 2010.

1. ### HeWasOnly3 Thread Starter New Member

Sep 2, 2010
12
0
Hi gurus, currently I'm trying to do a simulation on a question regarding comparator. First of all the question requires me to use an input of 200mVpp, 500 Hz(Which can be achieved by using a Function Generator) and output it to a square wave 0 to 5V. So for my attempt to do this question, I have used a non- inverting amplifier and a comparator to solve this question. Okay, the thing that I don't understand is that why my output is 743mV to 4.27V instead of 0V to 5V? Here is my circuit constructed using Multisim. Many thanks

File size:
89.2 KB
Views:
38
2. ### bertus Administrator

Apr 5, 2008
19,584
3,996
Hello,

There are two main problems with the circuit.

1) the input signal give both + and - signals, but the opamp is single powered.

2) the second opamp compares to ground, but the signal probably wont go negative.

Take a look at the attached PDF for single supply opamp circuits.

Bertus

File size:
163.1 KB
Views:
59
3. ### HeWasOnly3 Thread Starter New Member

Sep 2, 2010
12
0
Okay I have corrected the first mistake but it looks weird. You see if I connect both + and - of the input, I will have to set the Amplitude to 50mVp in order to achieve 200mVpp. In contrast to my previous circuit in which I use only + and ground input, I need to set Amplitude to 100mVp in order to achieve 200mVpp. I have read the pdf file that you have uploaded however I still cant get 0 to 5V square wave result. Here is my modified circuit.

File size:
91.4 KB
Views:
22
4. ### thatoneguy AAC Fanatic!

Feb 19, 2009
6,349
731
What you are trying to build is a zero crossing detector with dual polarity output.

Google should give you good ideas. sound.westhost.com has a few schematics for this.

5. ### HeWasOnly3 Thread Starter New Member

Sep 2, 2010
12
0
I have read that and tried the circuit, however it still wont produce 0 to 5V output hmmm....

6. ### StayatHomeElectronics AAC Fanatic!

Sep 25, 2008
1,020
71
The output limitations are a function of the opamp. Their output does not typically reach the supply rails that power it. To get closer, there are "rail-to-rail" output opamps that achieve voltage outputs that are much closer to the supply rails. However, they also do not typically achieve the exact 0V and 5V that you are looking for.

Here is an example data sheet for a "rail-to-rail" opamp. Page 5 has output characteristics. It shows that with low currents the high and low output, V(oh) and V(ol) get within millivolts of the supply rails, V(cc) and V(ee). However, with larger output currents the output voltages get further and further away from the rails.

Opamps without the "rail-to-rail" capabilities start with their output further away even at low output currents...