• AVR Freaks

Hot!Pin input current from external source.

Author
Murton Pike Systems
Senior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2020/09/10 02:13:01
  • Location: 0
  • Status: online
2020/09/26 03:58:38 (permalink)
0

Pin input current from external source.

I am using a pic32mx274 for reading analogue signals on a transistor curve tracer.
I made a mistake with a resistor on a pcb and this meant the op amp driving the analogue signal was putting out 7 volts.
This went through a 1k resistor into the analogue input.
For some reason this crashed the PIC.
If I disconnect the 1k resistor the PIC runs fine.
I can only guess the PIC is intolerant of what I did.
In the good old days of 8 bit PIC's we used to shove mains via a high value resistor into PIC pins with no problems.
Any idea why what I did upset the PIC ?
Surely there are internal diodes to VDD and VSS ?
#1

4 Replies Related Threads

    Ian.M
    Super Member
    • Total Posts : 13272
    • Reward points : 0
    • Joined: 2009/07/23 07:02:40
    • Location: UK
    • Status: offline
    Re: Pin input current from external source. 2020/09/26 07:20:09 (permalink)
    5 (3)
    7V-3.3V-0.7V=3V, so you dumped 3mA through the protection diodes of an analog pin.  
    TB3013 http://ww1.microchip.com/downloads/en/AppNotes/93013a.pdf tells you why that's poblematic.

    --
    NEW USERS: Posting images, links and code - workaround for restrictions.
    I also support http://picforum.ric323.com because this forum is sometimes too broken to use!
    #2
    Murton Pike Systems
    Senior Member
    • Total Posts : 48
    • Reward points : 0
    • Joined: 2020/09/10 02:13:01
    • Location: 0
    • Status: online
    Re: Pin input current from external source. 2020/09/26 07:33:30 (permalink)
    0
    Many thanks for that valuable information.
    I also have designed a USB scope using the same PIC.
    Its input a2d only goes to 3.3v but can go negative again through a resistor.
    The PIC seems less sensitive to that although it can go to -5V.
    On future designs I will ensure I use Schottky diodes on A2D inputs.
     
     
    #3
    boatbodger
    Super Member
    • Total Posts : 132
    • Reward points : 0
    • Joined: 2011/03/27 15:39:07
    • Location: 0
    • Status: offline
    Re: Pin input current from external source. 2020/09/26 15:06:25 (permalink)
    4 (1)
    A tip:  Be aware of the high levels of reverse leakage that Schottky diodes can have when used in an analogue circuit - you may be surprised!  It is always tempting to select one with the lowest Vf you can find, but you will also find they tend to have the highest Ir.
     
    #4
    Murton Pike Systems
    Senior Member
    • Total Posts : 48
    • Reward points : 0
    • Joined: 2020/09/10 02:13:01
    • Location: 0
    • Status: online
    Re: Pin input current from external source. 2020/09/26 17:07:23 (permalink)
    0
    The circuit is quite low impedance < 1k so a little reverse current isnt too big a problem.
    The circuit had a wrong resistor hence such a big voltage on the input and that has been fixed now.
     
    I have also designed a USB scope which again uses PIC32mx A2D's.
    I havent had a problem with that but the input can only go -5v negative and not over +3.3v positive.
    There is a 1k series resistor which limits the current into the A2D.
     
    However I will add Shottky's in the future just to be safe.
     
     
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5