Connect with us

designing a if then circuit with exception

Discussion in 'Electronic Basics' started by Clive, Apr 5, 2004.

Scroll to continue with content
  1. Clive

    Clive Guest

    I have come across a problem in my circuit design.

    I need to acheive the following

    If Fvoltage-Rvoltage=<100mv then output=low UNLESS Fvoltage<300mv

    Are the voltages too small to use directly? or would they need

    How can design to circuit and keep it simple?
  2. Those voltages are fine when using comparators that have millivolt DC

    Are you saying that you want the output to be low for inputs below 100
    mV and also low for inputs > 300 mV, but high for voltages between

    If so, a window comparator composed to the two sections of an LM393
    connected in parallel to the same pull up resistor might be accurate

    There is a circuit that performs this function shown on page 10 of
    this data sheet, labeled as 'Limit Comparator'.

    If, instead, you are saying that inputs below 100 mV cause an output
    low, but inputs above 300 mV cause an output high, and inputs between
    these limits produce outputs that have not yet been defined, then you
    may be able to make that with just one comparator.
  3. John Fields

    John Fields Guest

  4. Rewriting in a pseudo language:

    IF F-R<=100 THEN Q=0 UNLESS F<300

    UNLESS does not compute that easy so I rewrite again:

    IF (F-R<=100) AND (F>=300) THEN Q=0 ELSE Q=1

    In this line I see an opamp calculating F-R and amplify it let's say ten
    times. The opamp is followed by a comparator that compares the opamps output
    signal to 1V. F can be amplified ten times and compared to 3V the same way.
    A two inputs NAND makes Q from the outputs of the comparators.

    An important point is the hysteresis of the comparators. They need some
    hysteresis to prevent oscillations. The amount of hysteresis depends on the
    required accuracy of the whole circuit.

  5. John Fields

    John Fields Guest

    Not bad!

    I don't see the need for the extra opamp for F, and I decoded the
    all-zeroes state, but other than that, great minds think alike...

    Check alt.binaries.schematics.electronic for my take on it.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day