Author Topic: Single Supply Comparator  (Read 3377 times)

0 Members and 1 Guest are viewing this topic.

Offline dfox416Topic starter

  • Contributor
  • Posts: 18
Single Supply Comparator
« on: May 28, 2014, 02:31:14 am »
I am trying to use an LM311 comparator with a single supply but I cannot get it to work and can't find any examples online. I want it to take a sine wave as input and output a square wave. Any help is greatly appreciated. Thanks!
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Single Supply Comparator
« Reply #1 on: May 28, 2014, 02:51:27 am »
Can you post a schematic of your circuit and explain why it's not doing what you expect it to do?
 

Offline dfox416Topic starter

  • Contributor
  • Posts: 18
Re: Single Supply Comparator
« Reply #2 on: May 28, 2014, 02:59:25 am »
i attached a schematic. i know it is not right because i need to apply a DC offset to the input since i want it to detect the zero crossing but i am not sure how to do that. if i use the same voltage divider for both inputs, it effectively shorts them together. should i use separate voltage dividers for each input?
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Single Supply Comparator
« Reply #3 on: May 28, 2014, 03:03:28 am »
Are you simulating it, or building it on a breadboard?

If you are only simulating it you can bias the sine wave at half the supply voltage in the source block.

If you are building it for real you need to use separate bias resistors for the sine wave input and couple the input signal through a capacitor.
 

Offline Fank1

  • Regular Contributor
  • *
  • Posts: 159
Re: Single Supply Comparator
« Reply #4 on: May 28, 2014, 10:49:27 am »
Your reference, ie the - input, is at 4.5 V the input must exceed this for the output to go positive.
Duplicate the voltage divider ( R2 - R3 ) on the + input and couple the signal from V1 with a capacitor.
 

Offline MrsR

  • Regular Contributor
  • *
  • Posts: 118
  • Country: au
Re: Single Supply Comparator
« Reply #5 on: May 29, 2014, 09:55:26 pm »
Can you post a schematic of your circuit and explain why it's not doing what you expect it to do?
If you want to simulate first Try LTspice IV a Comp. like a LT1018 should do it and in real life a LM393 worked OK! (it was a lot cheaper) on a Breadboard and now the PCB is next
I just finished designing a Brushed motor controller and in some ways the output is similar I used Triangle waveform  but the input was a square wave that I made a Integrator for A input and B input is the Triangular wave form.

HAVE FUN
Rachael :-+ 
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Single Supply Comparator
« Reply #6 on: May 29, 2014, 11:48:28 pm »
Check out the schematic in this post.  It is pretty much exactly what you are looking for.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf