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.

LM358: Any alternative Op Amp for a comparator to work with MSP430

Part Number: LM358
Other Parts Discussed in Thread: LMC6772, TLV3702, TLV6703, MSP-EXP430FR2355, LM2903, TPS3700-Q1, TLV6700, TPS3700, TLV6710

Hi guys. I'm using the MSP-EXP430G2.

I'm looking for an Op Amp that can act as a switch for my MSP430. I have connected a potentiometer to V+. As you see this comparator circuit, I want to make Vout to 3.3V when I change V+.

Vout is connected to the MSP430 and I want to trigger an interrupt.

Most Op Amps from TI I found supported high voltage supplies. Are there recommendations for a low power Op Amp that can act as a comparator which can become a digital switch for my MSP430 launchpad? I prefer to use PDIP-8 packages so that I can plug them right away to the breadboard.

  • Hi David,

    search for a RRIO OPAmp. RRIO means swinging from rail to rail at input and output.

    Kai
  • Hi David,

    Here is the list of PDIP general purpose amplifiers that support low voltage:
    www.ti.com/.../products.html

    Can I ask why you're not looking for a dedicated comparator? TI makes comparators that would be good and we generally don't recommend using an op-amp as a comparator for a variety of reasons.
    www.ti.com/.../overview.html

    Hope that helps,
    Paul
  • Hello David,

    Some suggestions:

    LMC6772 (needs pull-up resistor on output)
    TLV3702 (does not need pull-up)

    I would also recommend placing a 10k resistor in series with the V+ input to limit the current into the pin should there be a fault.

    What you really want is something like the TLV6703, but it is in a SOT-23-6 package. SOT-23 to SIP or DIP adapters are widely available.
  • Paul Goedeke said:
    Can I ask why you're not looking for a dedicated comparator?

    Oh, I apologize for this Paul; actually, I thought I always have to create a comparator using an Op Amp. I didn't know TI sold comparators. Thanks for telling me!

    I think the LM2903P will do the job for my scenario.

    Can I ask these before closing this thread, plase?

    Although I'm using the MSP-EXP430G2 launchpad, I might be switching to a MSP-EXP430FR2355 LaunchPad because this is four configurable smart analog combo modules (12-bit DACs and PGAs). I had a idea that I want to control the Vref with the DAC.

    Q0: Is it okay if I connect a DAC output to the Vref?

    Q1: Will the above circuit work for the MSP430 MCUs?

  • Paul Grohe said:
    What you really want is something like the TLV6703, but it is in a SOT-23-6 package. SOT-23 to SIP or DIP adapters are widely available.

    Oops, I missed this reply. Thanks for telling me.

    However, I didn't understand how to use this properly; how can I the set the reference voltage?

    For example, I wish the output to be 3.3V when the sensing input exceeds 1.2V.

  • Hi David,

    You cannot change the voltage reference, but you can change the input voltage by using a resistor divider, as shown in Fig 17 above.

    You would select the divider ratio so that your desired trip threshold creates 400mV at the divider tap.

    This tool will allow you to select the resistors:

    www.ti.com/.../volt_div3.htm

    You would enter your desired threshold voltage (1.2V *) in the "Input Voltage" field, and 0.4V in the "Desired Output" field.

    The "resistor Sequence" setting refers to the resistor tolerances, "E96" is "1% values" and "E24" is "5%" values.

    The "Resistor Scale" sets the multiplier for the base resistance value. Since you are monitoring a supply, and you do nto want to create too large of a load, you should select resistors in the 100's of kOhm to low Megohms range. So select "10000" (third from bottom).

    The result is R1 = 240k and R2 = 120k. *

    You cannot use the LM2903 in your original circuit because it is not "rail-to-rail" input (as Kai said) and has in input voltage limitation. It can only accept inputs up to 1.5V below V+ at room temp, or 1.8V max on a 3.3V supply. The devices I suggested are rail to rail inputs.

    You could power the LM2903 off the 5V rail, which would give you a 3.5V input range, which is acceptable - but it will have problems at low temperatures. You can also add a divider to the V+ and change the Vref voltage - which is essentially what the TLV6703 is doing.

    What you are trying to do is referred to a "Power Supervisor". TI has many devices for just this application. Unfortunately, they will all be in really tiny packages:

    www.ti.com/.../overview.html

    * Corrected from original post

  • Hi, Paul. I deeply appreciate your help!

    Paul Grohe said:
    What you are trying to do is referred to a "Power Supervisor". TI has many devices for just this application.

    Thanks for noticing this to me.

    Paul Grohe said:
    You cannot change the voltage reference, but you can change the input voltage by using a resistor divider, as shown in Fig 17 above.

    Q0: Hmm, I kinda noticed that there are no Power Supervisor products that give an option to change the internal voltage reference?

    For instance, TPS3700-Q1 looked great to me but it has a fixed 400-mV internal reference.

    Q1: Then how about this? Since TI has a digital potentiometer, can I connect the digital potentiometer to the Power Supervisor's input to control the threshold?

  • A0: You change the three resistors to set the thresholds. The TLV6700 is the tighter-spec version of the TPS3700.

    This cookbook circuit will show you how to calculate the resistor values for a window comparator:

    www.ti.com/.../snva832

    (The TLV6710 shown in the appnote is the 36V version of the 18V TLV6700 - functionally the same)

    A1: Maybe. It's possible, but there are a few things to be aware of. Keep in mind that the accuracy of the reference will depend on the source (supply). The "ends" of the pot may not be able to go higher than it's supply voltage, so be sure to check the input limits. It would be safer to have the pot replace "R2" in a divider as an adjustable resistor. Also, you will have to re-program the "pot" at power-up if it does not have EEPROM memory and if the "pot" may need some time start-up time after power-up. There is also a minimum supply voltage that the "pot" supply needs to pass for it to start functioning. The all-in-one supervisors are meant to be independent from the processor. If you are going through all that trouble to adjust with a programmable pot - then just use either an external or internal DAC.