MCU 5v Input Protection

Discussion in 'Embedded Systems and Microcontrollers' started by jblackston78, Nov 26, 2011.

  1. jblackston78

    jblackston78 Thread Starter New Member

    Joined:
    Nov 26, 2011
    Messages:
    3
    I have a single wire based communication bus which handle both rx/tx communication at 5v. I've tied this directly to the MCU input and placed TVS diodes to help under and over voltage protection. This is a bus that gets exposed to the outside world and while being used in the field it has come into contact to 12v on the bus and a high current run, which intern blows my TVS diodes and then pops my MCU.

    Does anybody know a circuit to handle over voltage protection on this type of circuit which can with stand 12v. I've tried to find some kind of transceivers which mimic my bus network, but have not found any.

    I imagine this is probably a common circuit and hope someone can point me in the right direction.

    Thanks in advance,
    Jason
  2. Yako

    Yako New Member

    Joined:
    Nov 24, 2011
    Messages:
    246
    Most MCUs already have protection built in.
  3. jblackston78

    jblackston78 Thread Starter New Member

    Joined:
    Nov 26, 2011
    Messages:
    3
    I'm using a MicroChip part and the input on that is not rated to go too high over 5v. The high voltage placed on the bus has the ability for a large current drain so when the TVS heats up and pops the entire 12v is pushed to the MCU which only can protect to 5v. To protect it self the MCU just blows that pin. Depending upon what happens the rest of the chip is fine except for that pin. So how do I protect that pin from over voltage? The TVS diode protection isn't enough.
  4. MrChips

    MrChips Moderator Staff Member

    Joined:
    Oct 2, 2009
    Messages:
    9,469
    No MCU pin should be used directly on a communication bus. Use an RS-232, RS-422 or RS-485 device instead.
  5. Yako

    Yako New Member

    Joined:
    Nov 24, 2011
    Messages:
    246
    Isn't it?

    Can you show us what you've done?
  6. MrChips

    MrChips Moderator Staff Member

    Joined:
    Oct 2, 2009
    Messages:
    9,469
    Last edited: Nov 27, 2011
  7. THE_RB

    THE_RB AAC Fanatic!

    Joined:
    Feb 11, 2008
    Messages:
    5,435
    Why not just use a resistor? A resistor on the data line will limit the max current according to the fault voltage, so a 1k resistor and 12v fault voltage (7v over 5v) will limit fault current to about 7v / 1000 ohms = 7mA.
  8. jblackston78

    jblackston78 Thread Starter New Member

    Joined:
    Nov 26, 2011
    Messages:
    3
    I had thought about placing a resistor on the data line, but wasn't sure if that could completely protect it. My real goal if possible is to not only prevent over voltage, but also include other protection like short-to-ground, ect...

    If you had to connect to a 5v bus bidirectional line what would you use to protect this data line? Is there a transceiver available to handle this? The RS-422 is a differential signal line which doesn't work. Is it possible to modify an existing transceiver to get the bus connection I need?
  9. MrChips

    MrChips Moderator Staff Member

    Joined:
    Oct 2, 2009
    Messages:
    9,469
    Putting a 33 to 49-ohm resistor in series with the bus line may save burning your diodes and MCU.

    Is the MCU part something of your design? The I/O pin is being switched from input to output if it is a bidirectional data bus. Do you have a spare output pin that you can use as a transmit/receive control signal. If that is the case you may be able to use a RS-485 transceiver such as 75LBC179.
  10. thatoneguy

    thatoneguy AAC Fanatic!

    Joined:
    Feb 19, 2009
    Messages:
    6,356
    Location:
    Midwest USA
    I'm assuming the PIC and bus wire are sharing the ground with the 12V system?

    You could be out of luck unless you switch to an HV PIC and simply run it at 12V with good power conditioning for both PIC and signals.
  11. ErnieM

    ErnieM AAC Fanatic!

    Joined:
    Apr 24, 2011
    Messages:
    5,389
    Location:
    Lon Guyland, Noo Yawk
    HV PICs still run at 5V. The "HV" refers to a built-in current shunt to regulate a higher voltage down to 5V at the PIC's power pin.

    jblackston78: It's a tricky problem as you have a fairly unique serial interface here with a single line being bi-directional. However, if it doesn't affect your data rate then a simple resistor may be all the extra protection you need. It protects both the input and driving output from shorts or large voltages.

    I would be inclined to replace the TVS diode with a pair of schottky diodes, one to Vss, one to Vdd. Together with the resistor they give a controlled path for over voltages.
  12. MrChips

    MrChips Moderator Staff Member

    Joined:
    Oct 2, 2009
    Messages:
    9,469
    I agree. I didn't have the time to draw a schematic to demonstrate.
  13. Yako

    Yako New Member

    Joined:
    Nov 24, 2011
    Messages:
    246
    I must be going insane.

    I could have sworn that I saw a block diagram of a 16F series PIC depicting internal clamping diodes for the IOs.

    These IO ports are very robust. Sink and source 20mA of current.

    You could probably even short them all out and at worst your program would crash.
  14. THE_RB

    THE_RB AAC Fanatic!

    Joined:
    Feb 11, 2008
    Messages:
    5,435
    You have to be careful doing that!

    Many of the new PICs use very little supply current (especially if they also use sleep modes). The diode to Vdd will conduct fault current to Vdd causing Vdd to rise anytime the fault current is greater than the current the PIC consumes. When Vdd rises that can damage the PIC and possibly the voltage regulator too depending on type.
  15. ErnieM

    ErnieM AAC Fanatic!

    Joined:
    Apr 24, 2011
    Messages:
    5,389
    Location:
    Lon Guyland, Noo Yawk
    Quite possibly, but consult a Doctor for a professional opinion.

    Most do, some don't. Check the data sheet for the exact device and the exact pin you are concerned with.

    Quite true.

    Not a chance. It's a race between wire bonds fusing and silicon melting.
Similar Threads
Forum Title Date
Embedded Systems and Microcontrollers Analog input spike protection from 120VDC Jul 25, 2011
Embedded Systems and Microcontrollers Input protection with Schottky - what to do about this problem Sep 16, 2010
Embedded Systems and Microcontrollers MAX232 input protection? Sep 15, 2010
Embedded Systems and Microcontrollers Make binary output from one input Aug 2, 2014
Embedded Systems and Microcontrollers Analog input voltage Jul 30, 2014

Related Site Pages

Share This Page