comparator LM393

Status
Not open for further replies.

michal_w

New Member
Hello,
I'm doing a comparator using LM393.

Input/output parameters:
inverting input: 20VAC (effective value)
non-inverting input: 0V (GND)
supply voltage: 3.3VDC

Expected behaviour:
0V - when Vin <0
3.3V - when Vin>0

My circuit looks like this:


In PSpice everything looks fine:


But real circuit doesn't work properly. It looks similar to this:


I don't know in which exact moment of time there is high voltage (3.3 V), cause I have only one-channel oscilloscope.
I suppose this problem can be related with GND.

I will be grateful for any help.

Greetings,
Michal
 
Last edited:
hi mical,
Are you trying to get an equal on/off time of the pulse at the output.?

If Yes, you will have to add a small offset voltage that sets the non inverting to 0v.

Another problem with LM393 is that if an input voltage goes higher than the Vsupply -1.5V, the outputs can invert.

EDIT:
Add this divider resistor
Reduce the AC input at the LM393 pin to less than 2Vac
 

Attachments

  • Clipboard01.jpg
    26.2 KB · Views: 371
Last edited:
Hello all,
sorry for refreshing this old topic, but I haven't solved this issue yet (I had a little break).
I've modified my circuit, but it still doesn't work properly.

To display signals I use digital scope (sound card + visual analyser).

My circuit (A, B, C are measuring points):


Transformer output voltage (point A):


Negative input voltage (point B):


Transformer output voltage (point A) and output voltage (point B):


Negative input voltage (point B) and output voltage (point B):


My question:
1. Why negative input voltage (point B) is not a sine wave? It looks like voltage measured on diode.
2. Could be this voltage a reason of inappropriate output voltage (intentionally it should be square wave - described in my previous post) ?
3. If not - what should I modify?

Thanks in advance for your reply,
regards
Michal
 
They also don't like much current below ground. Try making the input resistor larger and add a diode to prevent the voltage from going much below ground.
 

Attachments

  • comp.PNG
    57.8 KB · Views: 340
Hello,
I have to connect output of the comparator with microcontrollers input.
What would be the best way to reduce output voltege:
- use a voltage regulator eg. LF33
- use a voltage divider
- use something else
?

Thanks in advance for your reply,
regards
Michal
 

hi,
A voltage divider is the simplest option.
 
If the pull up resistor on the output of the 393 is tied to 3.3 volts, why do you need a lower voltage?
 
If the pull up resistor on the output of the 393 is tied to 3.3 volts, why do you need a lower voltage?

hi Ron,
Your diagram in post #4, shows it connected to +9V, perhaps the OP doesn't realise that the resistor to +3.3V is an option.?

E
 
If the pull up resistor on the output of the 393 is tied to 3.3 volts, why do you need a lower voltage?

Right, I will try to reduce supply voltage to 3.3 V.

PS. Sometimes it's very hard to find the easiest way
 
Last edited:
Right, I will try to reduce supply voltage to 3.3 V.

PS. Sometimes it's very hard to find the easiest way

hi,
Keep the 9V supply to the LM393 IC if you prefer, but connect the top of the resistor to 3.3V. In that way the output will switch between 0v and 3.3v
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…