So how did I blow out my PIC and LCD?

Discussion in 'Embedded Systems and Microcontrollers' started by spinnaker, Jan 15, 2010.

  1. spinnaker

    Thread Starter AAC Fanatic!

    Oct 29, 2009
    4,866
    991
    Well I guess I made a classic newbie mistake and my PIC and LCD are toast.

    I had everything working, PIC and LCD. I started working on my voltage 2 resistor divider for my ADC. I thought I would use a Schottky diode 1n5817 to clamp the voltage to VDD. So I connected the cathode to VDD and the anode to my divider. It was clamping as expected. Without the diode, I was getting +7 VDC from my divider with 33VDC into my divider (I calculated the divider for 30 VDC). With the diode, it clamped to 5.1.

    I don't know what when wrong but I blew out the PIC and the LCD. I had a second PIC on hand so I know the first is bad. The LCD does not work with the new PIC so I think it is bad. Among other things, it holds RS high even though I am taking it low with an output PIN on the pIC.

    Any idea what could have gone wrong? Could I have someone introduced too high of a voltage on VDD through that Schottky?

    Other than first removing my PIC and LCD before hooking things up, anyway to avoid this problem in the future?
     
    Last edited: Jan 15, 2010
  2. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    A circuit diagram would help but it sounds like you lost the divider and connected 33volts into your Vdd via the diode. Why are you trying (unsuccessfully) to clamp to Vdd? The normal way to protect a AtoD input is to connect a 5.1 volt zener from the divider to earth.
    Also do the math and make sure that the divider output cannot exceed Vdd, its better to err on the low side rather than push the output to the limit.
     
  3. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    The diode clamping method only works correctly if the current through the clamping diode is much less than the total current drawn by the PIC and LCD. Otherwise, the VDD voltage will rise because current is fed through the clamping diode and effectively powering the whole circuit.

    Even with a regulated power supply(PS) connected it will not help. The PS's output would simply shutoff because its output is higher than than the voltage dial setting.

    I would say the problem is in your voltage divider resistor values. Please post that part of the schematics and we will give further comments.
     
  4. spinnaker

    Thread Starter AAC Fanatic!

    Oct 29, 2009
    4,866
    991
    Well another classic newbie mistake. Start wiring stuff up before you create a schematic and don't record what you have before tearing it apart.

    I don't think it was exactly like the attached because it would have not blown out the pic but it was close to the attached.
     
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    The resistor values for the voltage divider looks fine to me.

    Since your LCD is also being fried, it suggests the problem is power rail related.

    The moment your PIC went to SLEEP, its supply current reduced drastically and the supply voltage may rise unexpectedly.

    Better add a 5.6V zener across the supply rail and then you are protected from the unexpected VDD voltage rise.
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    This has nothing to do with your original problem. But depending on your sample rate, you may gain some accuracy by inserting an OPAMP after the voltage divider. The AD converter in PIC uC may loose accuracy with high series resistance. It is documented in the PIC data sheet ADC section.
     
  7. spinnaker

    Thread Starter AAC Fanatic!

    Oct 29, 2009
    4,866
    991
    Thanks to the both of you.


    I guess lessons learned. Should I even worry about clamping if my divider is high enough?

    I would protect the VDD with a 5.6 zener. What about the ADC? That is what I was trying to protect in the first place! :)


    Thanks for the tip on the op amp. But not sure if I need to worry about it as my sample rate does not need to be all that fast.
     
Loading...