12v for logic input

Discussion in 'The Projects Forum' started by Twisted_Transistor, Sep 12, 2013.

  1. Twisted_Transistor

    Thread Starter New Member

    Sep 10, 2013
    Title: What is the best way to reduce the 12V voltage for logic input


    I have a simple project that I currently working on which include a fiber optic sensor and logic gates.

    My circuit is simple, sensor output is 12V when high and zero (theoretically) when low. 1 sensor output will be feed to HEX inverter and the 2nd sensor will be feed to OR gate. Before it reach the input pin of my gates I passed it through resistor voltage divider to reduce the voltage to approximately 5V.
    My question is,
    1) What is the best way to reduce the voltage to input on my gates?
    2) Is the voltage divider stable/reliable providing 5V input logic? (I tried on breadboard and its working fine, but I don't know on the long run)
    3) Is it OK if I will feed the logic high 12V directly on my logic gates? ( I tried on breadboard and its working also, but I don't know on the long run)
    4) From datasheets of logic gates it specify IiH and IiL and I don't really understand well about this, is it necessary to limit the current input. Can someone shed some light on this?

    My project will run 24/7/365 days what are the consequences and probable fault on the long run if i stick to voltage divider

    It is my first post here, I hope I'm in right section to post this.

    thanks in advance
  2. WBahn


    Mar 31, 2012
    The voltage divider approach should work fine as long as the resistors are sized to be big enough so as to not load the sensor output too much and low enough not to be too slow when interacting with the capacitance.

    Unless the logic is running at 12V, you shouldn't apply the signal to the gates directly. In general, applying a signal that is outside the supply rails will turn on protection diodes which could damage the chip either quickly or reduce the life expectancy.

    Another way to do it is to use a zener diode that is high enough to ensure a logic HI, but not more than the supply voltage. You again have to use a current limiting resistor, but you don't need the lower resistor so the time constant is improved. I've even seen stacked zeners intended to get reasonably close to the applied voltage coupled with small resistors. I've never looked into this myself, but unless you are dealing with very fast signals I think this would be overkill for you.
    absf likes this.
  3. MaxHeadRoom


    Jul 18, 2013
    Try looking at CMOS if you want to work with 12v for logic.
    If you want a higher drive capability for any outputs, you can attach a 2n7000.
  4. #12


    Nov 30, 2010
    A resistor in series with the 12V signal and a small signal diode to the +5 rail will keep the input signal not more than a few tenths above the +5 supply. Another way might be a resistor in series and a 4v7 zener to ground.

    IinHI and IinLow are what the chip needs, and it's pretty small. You aren't trying to limit to that current, you are trying to provide at least that much current. The series resistor might be anywhere from below 1k to 100k, depending on how much current is available from the +12v driver and the speed you need. I tend to stay in the 1ma range because it is a low enough impedance to refuse to pick up random noise and I don't do dozens of gates at a time, so I can waste that much power. If you are working with gates that only have a fanout of 5 digital loads, even 1ma might be too much current to waste in a voltage limiter. I just don't have enough information to "name that resistor", but maybe you can get some guidance out of this.
    absf likes this.
  5. Sensacell


    Jun 19, 2012
    I like to use the voltage divider AND the clamp diode to Vcc.

    The voltage divider reduces the whole signal input, giving you better noise margin when Vin = LOW.
    The diode clamps any over voltage to protect the input.

    The magic is in the resistor values.
    absf and #12 like this.
  6. Twisted_Transistor

    Thread Starter New Member

    Sep 10, 2013
    thanks for all of your inputs guys...i think i need to go back to my drawing board although resistor is divider is fine maybe i need to work it with 4.7 zener diode which i feel appropriate.
  7. sheldons

    Well-Known Member

    Oct 26, 2011
    post your schematic.........
  8. Twisted_Transistor

    Thread Starter New Member

    Sep 10, 2013
    this is my original schematic using resistor divider. i have not yet modified.
    • sch.png
      File size:
      19 KB
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    Knowing just what part IC1 happens to be would be a help.
  10. Twisted_Transistor

    Thread Starter New Member

    Sep 10, 2013
    IC1 sould be 74LS04