This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM2901AV: Comparator circuit not working.

Part Number:  LM2901AV
Other Parts Discussed in Thread: LM2901

Dear TI forum family,

I've designed a comparator circuit using LM2901. But I'm not getting the desired output.

Please verify my schematic and let me know your suggestions.

The default voltage at MTH is 3.01V and it goes down. 

On reaching the respective voltages, I'm getting only 0.9V as the output of the comparator. 

Thanks in Advance.

Adarsh Raju

  • Hi Adarsh,

    your relay needs a current of 80mA to turn-on. This current is way too high for the LM2901. You need to add a transistor buffer.

    Also note that the common mode input voltage range of LM2901 must stay below 3V with a supply voltage of 5V.

    Kai

  • Do you have any alternative parts for the circuit since the PCB is already designed?

  • Hi Adarsh,

    there are some more mistakes in the circuit. The free-wheeling diodes are missing at the buzzer and at the relay. And hysteresis is missing to prevent relay and buzzer chattering.

    I would do a revision of the circuit. We would help you in this.

    Kai

  • Adarsh

    thanks for reaching out on the forum. Please see Figure 3 on page 10 for output response for varying sink current. I believe that’s what Kai is eluding too. 
    Kai has made several other suggestions that should also be considered. 

    Kai

    thanks again as usual for your excellent support 

    Chuck

  • Thank you Kai for your help. Please help me to work on this. I can change the relay according to LM2901.

  • Hello Adarsh,

    As Kai and Chuck point out, there are several errors in the circuit.

    One assumption you seem to have made is that the LM2901 outputs can source (output) voltage (5V). They can only sink current, and require a load to the pull-up voltage. So the relay coil connected to ground will never turn on.

    1. Relay coils need to be between the output and the supply voltage, not ground. Note this will change the logic.

    2. The relay does not seem to have built-in diode clamps, so will require a diode across the coil to clamp the coil back-EMF when it turns off. Without the diode, the back EMF (usually -70V to -150V!) will quickly damage the LM2901 within a few cycles.

    3. The relays part number seems to be for 24V coils, and you are using 5V. Even when wired correctly, a 24V relay may not reliably pull-in on only 5V.

    4. The buzzer and LED also need to be placed between the output and the supply voltage, like the relay coil. Your schematic should also show the buzzer and LED (other end grounded? V+?). My guess is the buzzer and LED will draw more than 10mA each.

    5. The input voltages to the comparator should be 3V or less. You may run into incorrect outputs at cold temperatures.

    6. 80mA for the relay is above the current limit of the LM2901 (16mA). See figure 6.3. The relay load is too great and would just pull the output up to near 5V, which may cause the LM2901 overheat. An external transistor or MOSFET is needed to drive a large relay.

    Unfortunately, I do not see a quick-fix by just replacing the LM2901 - even if we could shoehorn in a R-R output device, you still have the issue with the package, pinout and output current.

  • Hi Paul,

    Thank you for your valuable feedback.

    Since we were looking for the cheapest circuit, I thought this will work just like a comparator. 

    This was just the comparator that was available to me during the PCB design. 

    Please let me know if there is any possible way I can get a simple comparator circuit with this schematic?

    Thank you

    Adarsh Raju

  • Hello Adarsh,

    There will have to be some re-layout done, or some serious hacking to the board. The basic circuit is okay, but the outputs are not correct.

    Where do the LED and buzzer return to? Can you provide a more detailed schematic?

    What are the part number of the LED and buzzer? More importantly what is their current? The buzzer may need a transistor or MOSFET, too. And if the LED is run at over 10mA, then it may need a transistor, too.

    You specified a Q1 device, do the components need be Q1?

  • Hi Paul,

    LED and buzzer are connected to the ground. ( Actually, they are associated with an external board.) I need to get an output at the terminal of LM2901 when the conditions are satisfied. 

    So changes in the led and buzzer can be made easily.

    I have only problem with the LM2901. So it will be better if we can do something on this board itself. 

    I didn't get about the Q1 device. Can you tell me what you want on that?

    Thanks 

    Adarsh

  • Hi Adarsh,

    a good method to drive a heavier load is to use a PNP transistor at the output of comparator, as discussed here:

    https://e2e.ti.com/support/amplifiers-group/amplifiers/f/amplifiers-forum/1069469/lm124aqml-sp-lm124a-sp-voh-vol-at-low-supply-voltage

    Kai

  • Hi Kai,

    Thank you for your great support here as usual.

    Adarsh,

    Please take a look at the other thread that Kai linked and please respond with further questions or let us know if this type of load will work for you.

    Best Regards,

    Joe

    Applications Engineer

    Linear Amplifiers Business Unit | Comparators Product Line (CMPS)

    All information in this correspondence and in any related correspondence is provided “as is” and “with all faults”, and is subject to TI’s Important Notice (http://www.ti.com/corp/docs/legal/important-notice.shtml)

  • Hello Adarsh,

    I'm a bit confused... Are you able to modify the board, or the external LED/Buzzer board?

    The board as you have it WILL NOT WORK without modification for the relay. Period.

    In short, as Kai showed, to drive the loads high-side (or grounded loads), and maintain the same logic (activates on over-temp), a PNP transistor and two resistors will need to be added to the output of the comparators to provide the needed high-side drive.

    Similar for the buzzer and LED. If these were driven directly from the comparator outputs and tied to V+, then the logic would be opposite and the LED would be lit and the buzzer would be on during "normal" times. So the PNP transistor adds the needed inversion to be able to drive the them correctly. So perhaps the PNP circuit can be added to the second board with the LED and buzzer.

    Here is the modified relay circuit:

    See the "PNP Collector Relay Switch Circuit" in the following article:

    https://www.electronics-tutorials.ws/blog/relay-switch-circuit.html

    This circuit would need to be duplicated for the LED and Buzzer circuit.

    If you can cut the output trace to the relay, the circuit could be hacked-in.

    I have attached the TINA simulation if you wish to play with it. Run a Transient simulation as the voltage source sweeps 3V to 0V.

    Adarsh.TSC

  • Hi Adarsh,

    To make things easy, there are "Pre Bias" transistors available that have these resistors built-in. So you would just have to solder in a single SOT-23 device. An example is this device:

     https://www.diodes.com/part/view/DDTB113ZC?BackID=8432

    Look for "PNP" and R1 ≠ R2. R1 (base) should be lower than R2 by at least 10x.

    And, also, the diode directly across the relay coil terminals (never share traces with a fly-back diode!).

  • Dear all,

    Thank you for the support. I'll work on this and let you know the feedback. 

  • Adarsh

    thanks for your response.  We will hold this open for a while and await your response.

    Chuck

  • Adarsh

    Hopefully you will resolved since we have not seen any additional input on this post; so I will be closing it.  If you ever need further support, you can re-open or re-post.  Thanks for your support of the forum.

    Chuck