TransWikia.com

Am I using this LM393A comparator incorrectly?

Electrical Engineering Asked by TTbulaski on December 15, 2020

I’ve read about comparators and from my understanding, you’ve got 2 voltage inputs: reference voltage usually connected at the inverting input and Vin i.e. voltage you want measured usually connected at the non-inverting input. The output voltage will depend on your V+ and V- values and whether it’s Vin>Vref (V+ is the output) or Vin<Vref (V- is the output).

My goal was to use a comparator (LM393A) that will output either a HIGH (5V) or LOW (0V) signal depending on the value of the Vin I’ve used as the input for the non-inverting input, but here is what happened instead:

enter image description here

I was expecting the output to be at 5v once V7 has surpassed V6 (V7 > 3.7V) but instead, Vout looks like this (graph fitted for your convenience):

enter image description here

Is there something I did wrong?

2 Answers

The LM393A, like most comparators, has an open collector output - that is, the output transistor can pull the output to Ground, but the comparator needs some external device to pull the output high.

You require a pull-up resistor of 10K or so connected from the output pin to your positive supply, instead of your resistor to ground, in order to see the output switch.

Correct answer by Peter Bennett on December 15, 2020

It's worth adding to Peter's answer about what is happening, why comparators like this have an open collector output.

An open collector output makes it easy to AND or OR (depending on your logic convention) the outputs without any further logic.

One application of this is to make a window comparator. The output will be high (positive logic, true, 1) only if the input is between two reference voltages.

schematic

simulate this circuit – Schematic created using CircuitLab

Answered by Neil_UK on December 15, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP