zero level detector

Thread Starter

kahafeez

Joined Dec 2, 2008
150
hi people, i was trying to apply this zero level detector on a breadboard. the circuit is simple. has no comlications bt it didnt work. can some one point out the mistake??? the output was sort of same as the input.... i didnt use any resistors....
 

Attachments

leftyretro

Joined Nov 25, 2008
395
How were you measuring the output voltage? If you were using a scope be sure it's set for DC coupling or you will lose the ground reference.

Lefty
 

SgtWookie

Joined Jul 17, 2007
22,230
You indicate that your input is +1v to 1v. That would be a straight DC level.

Did you mean that your input is a +1v/-1v square wave?

You have the inverting input grounded, and you also have the -V supply grounded. If you're actually trying to determine the zero crossing, you should have a -v supply.

If your +V supply is 5v, the most you'll see out of the LM358 is +3.5v.

You're running the opamp in open-loop mode. This is hard on the output, because it's operating in constant saturation, which creates heat and wastes power. You should consider using a comparator instead. Comparators are designed to be operated in open-loop mode.
 

leftyretro

Joined Nov 25, 2008
395
well i was using as a scope...... what is DC coupling..... i've no idea.... plz explain...
Many scopes have a switch that selects DC or AC coupling of the signal from the scope probe. If in the AC coupling mode then the input signal is passed through a capacitor inside the scope, and that lose the common reference voltage used by the circuit being measured. You need to use DC coupling to measure the output of that op amp.

Lefty
 

mik3

Joined Feb 4, 2008
4,843
You are using a single supply and the input signal goes below 0V. This may destroy the op amp or cause latch up problems. You need to use a dual supply (positive-ground-negative) to make a zero crossing detector. Also, the LM358 is not designed to work as a comparator. It will work but with not very high frequencies due to low slew rate. You can use an op amp designed as a comparator, which is not internally compensated, for better results.
 

Thread Starter

kahafeez

Joined Dec 2, 2008
150
yes its a square wave....

i wanted a 0V lo and 5V hi square wave output of my input.... thats y the supply is 3.5V and gnd.....

so what do i do to make it a close loop. i think i'll introduce a gain in the ouput. can u plz suggest me a schematic that gives 5V if input is above 0V and 0V when signal is below 0V
 

mik3

Joined Feb 4, 2008
4,843
yes its a square wave....

i wanted a 0V lo and 5V hi square wave output of my input.... thats y the supply is 3.5V and gnd.....

so what do i do to make it a close loop. i think i'll introduce a gain in the ouput. can u plz suggest me a schematic that gives 5V if input is above 0V and 0V when signal is below 0V
You said your input signal is between 0V and 5V, why you want 0V on the output when the input is less than 0V? Can you be more clear on what will you like to do?
 

SgtWookie

Joined Jul 17, 2007
22,230
See the attached.
[eta]
I used a sinewave input to more clearly show when the output of the comparator toggled.

The inverting input is held at ground reference. The noninverting input gets the sinewave input.

R1 serves as a pull-up resistor for when the LM339's output is not conducting; as it is an open-collector circuit.

R2 limits the current from the Zener through the comparator's output when it's conducting. Without the 5.1v Zener and R2, the output would fall to the negative rail. You could also use a 4.7v Zener.
 

Attachments

Last edited:

Audioguru

Joined Dec 20, 2007
11,248
Look at the datasheet for the LM358. Its max allowed negative input voltage is only 0.3V. If you didn't destroy it with -1V or -5V then it will be destroyed soon.

The supply is 5V so the max output voltage of the LM358 without a load is +3.8V.
It doesn't have any negative feedback so its gain is about 100,000.
 

Thread Starter

kahafeez

Joined Dec 2, 2008
150
actually my requirement was shaping a wave.....

see the attached image for explanation.....


i used PLL for FSK demodulation.... now i need to give this wave to the 89c51.... so i wanted to shape it according to the input the 89c51 needed.... thats a 0V lo and 5V hi square wave.... the datarate is set equal for both the transmitter and receiver 89c51
 

Attachments

eblc1388

Joined Nov 28, 2008
1,542
actually my requirement was shaping a wave.....
thats a 0V lo and 5V hi square wave.... the datarate is set equal for both the transmitter and receiver 89c51
You can use the following circuit for your signal conditioning purposes.



You can save a hell lot of posts if you have said what you wanted in the first post.
 

Attachments

Thread Starter

kahafeez

Joined Dec 2, 2008
150
thanks eblc and evryone....

lolz abt the comment..... here the Vcc is +5V right ????


listen i also want to invert(180 degree phase shift) a square wave coming from an 89c51.... i can do this using a bjt bt my design requires split supply of +5 and -5V .... can u plz suggest me how to do this using a single supply opamp .... preferably with a 5V supply .... the datarate is 4.8kbps.... thanks people...
 

eblc1388

Joined Nov 28, 2008
1,542
thanks eblc and evryone....

lolz abt the comment..... here the Vcc is +5V right ????
Yes. The "5" next to the voltage source means 5V.

listen i also want to invert(180 degree phase shift) a square wave coming from an 89c51.... i can do this using a bjt bt my design requires split supply of +5 and -5V .... can u plz suggest me how to do this using a single supply opamp .... preferably with a 5V supply .... the datarate is 4.8kbps.... thanks people...
If by this time in your study you cannot invert a 0~5V square wave using just +5V and a NPN bjt, then I think you will be in serious trouble because this is one of the most basic skill in electronic.:eek:

You don't even need to use an opamp. It can be built with just a single NPN and a few resistors.
 

Thread Starter

kahafeez

Joined Dec 2, 2008
150
dude i'm nt that good at it .... though i've finished my degree n m doin my project .... bt i know i suck at electronics.... anyways m trying to learn after finishing my degree ....

n i told u i made a bjt amp which automatically inverts the wave.... bt the bjt needs a +5 and a -5V supply n i need to cut it down to just one supply(preferably 5V) and ground....
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
The circuit does not have a negative supply. It has a single +5V supply that has its 0V terminal connected to the circuit's ground.
 
Top