Author Topic: Window Comparator Has Strange Outputs  (Read 806 times)

0 Members and 1 Guest are viewing this topic.

Offline Scr1bbl3Topic starter

  • Contributor
  • Posts: 13
  • Country: us
Window Comparator Has Strange Outputs
« on: April 28, 2023, 10:30:19 pm »
Hi all,
Found this windows comparator on the interweb and decided to implement it for giggles. Simple premise but it has some odd outputs. The voltage divider resistors are all 10K and the pullup is 5.1K so the trip points should be 1.66V and 3.33 volts with 5Vcc. I am using a BA4560P comparator (dual comparators)
When I am below and above the trip points of 1.66 and 3.33, I get 3V at the output.
Between 1.66 and 3.33, I get 5.
Can anyone explain this?
Thanks, Scrib
 

Offline John B

  • Frequent Contributor
  • **
  • Posts: 909
  • Country: au
Re: Window Comparator Has Strange Outputs
« Reply #1 on: April 28, 2023, 10:37:15 pm »
BA4560P is a an opamp, not a comparator. It will not be able to swing completely to the supply rails and a pullup resistor isn't doing anything useful in this situation.

Try using a basic comparator like the LM393.
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1730
  • Country: gb
Re: Window Comparator Has Strange Outputs
« Reply #2 on: April 28, 2023, 10:42:33 pm »
Your comparators are not "open collector".  The 3 Volt output is when you have one pulling high and the other pulling low. A quick fix is to insert a diode on each comparator output before the pull up resistor.  Cathode to comparator output.  Anodes commoned and connected to pullup resistor. Or use open collector types such as suggested LM393.
« Last Edit: April 28, 2023, 10:50:50 pm by wasedadoc »
 

Offline Scr1bbl3Topic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: Window Comparator Has Strange Outputs
« Reply #3 on: April 28, 2023, 10:44:05 pm »
Thanks John,
I can't believe I did that. I just pulled the bag out of the drawer labeled comparator and just popped it in. Don't trust the labels and double check the part number.
 

Offline Scr1bbl3Topic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: Window Comparator Has Strange Outputs
« Reply #4 on: April 28, 2023, 10:45:38 pm »
That'll do it - read the damn data sheet, right! Thanks for the feedback.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20836
  • Country: gb
  • 0999
Re: Window Comparator Has Strange Outputs
« Reply #5 on: April 29, 2023, 01:29:05 pm »
Add a small diode, say 1N4148, in series with each output, with the anodes connected to RL.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1754
Re: Window Comparator Has Strange Outputs
« Reply #6 on: April 29, 2023, 01:43:05 pm »
Hi,

Adding a diode may not get the output close enough to 0v.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20836
  • Country: gb
  • 0999
Re: Window Comparator Has Strange Outputs
« Reply #7 on: April 29, 2023, 02:46:09 pm »
Hi,

Adding a diode may not get the output close enough to 0v.
Define close enough?

The BA4560 is a bad choice. Its output will only be just under a volt or so of the negative rail to start with, so the low output will be around 1.5V with the diode and 10k pull-up.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf