AnswerBun.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!

Related Questions

Preventing long-press button function on DFPlayer board

1  Asked on December 19, 2020 by michael-reilly

   

Half-wave rectifier with resistor and inductor load

2  Asked on December 18, 2020 by edwin-vargas

   

Sprintf() function bricked Arduino Nano?

2  Asked on December 18, 2020 by dragos-spiridon

     

Regarding plugging operations

1  Asked on December 18, 2020 by kamola

 

Debugging Signal Distortion/Oscillation

1  Asked on December 18, 2020 by cdevelop

       

Can a MOSFET work upside-down?

2  Asked on December 16, 2020 by user253751

   

Am I using this LM393A comparator incorrectly?

2  Asked on December 15, 2020 by ttbulaski

     

Bonding yourself via oscilloscope GND?

1  Asked on December 14, 2020 by manuel

   

Would a ground plane/traces impact NFC antenna performance?

1  Asked on December 14, 2020 by yonatan-avhar

   

Thermal compound for Alumina Ceramic Insulator

2  Asked on December 14, 2020 by uk25

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir