Digital Input protection

Discussion in 'General Electronics Chat' started by mlkcampion, Aug 17, 2007.

  1. mlkcampion

    Thread Starter Active Member

    Nov 16, 2006
    My question regards how to protect a PICs inputs, the inputs are external
    to the unit and accessable to the user. On the same cable as these inputs
    is a 24v supply for sensors. I want to protect the inputs from the user accidentally connecting the 24v to the inputs OR connecting 2 inputs together. The inputs are on port b of a PIC16F876 with pull-ups enabled.

    I know there are alot of ways of protecting such inputs against transients,
    using opto-couplers etc. However space and cost i need a simple plan.

    One idea was to put a diode on each input with a reverse breakdown of greater then 24v?

    Is this enough, will it work or what other one component ideas has anyone else?

  2. lightingman

    Senior Member

    Apr 19, 2007
    The easiest method is to use a zener to ground, after a resistor....The zener may not prevent very fast transients, but will protect against over voltage....Another method, is to use 2 diodes, one from the input to ground (cathode to ground), and one from the input to the supply rail (anode to supply rail) once again after a resistor....If you use the second method, it is a good idea to use a transient suppressor on your supply rail....failing that, if you realy wish to protect your inputs, then an interface consisting of a transistor in the emiter follower configuration, you can then make your inputs any impedance that you require....Daniel.
  3. John Luciani

    AAC Fanatic!

    Apr 3, 2007
    Protecting against 24V over a long period of time would require a series current limiting circuit that can go to high impedance on an overvoltage. For transient voltage suppressor the circuit is designed to shunt energy.

    Each solution is going to require series resistance. You need to verify that your
    circuit will tolerate the impedance.

    For transient suppression I use the Littelfuse SP724AHT which is an active transient voltage suppressor (TVS). It clamps transients to apx 0.6V above Vcc and 0.6V below ground. You need to use a series resistor between the TVS and your circuit to limit current.

    In a SOT23-6 package you can protect four lines. They also have SOIC packages.
    Littelfuse is excellent at providing application information and samples.

    You may be able to use the TVS in combination with a resetable SMD fuse.
    Littelfuse has a variety of fuses as well.

    If possible I would try to protect against the 24V overvoltage with a polarized connector.

    (* jcl *)
  4. mrmeval

    AAC Fanatic!

    Jun 30, 2006
    I agree with jcl
    The easiest in your case is to add a 24V connector that is unlike any other connector on the board. Then label it clearly. Clearly marking the IO can help as can using a user friendly connector such as the screw type terminals you see on industrial equipment. Then you have a manual that tells them how to do it right.