Olin Lathrop, Embed Inc, 978-772-3129 wrote: > > > Theoretically the clamp diode is forward biased, so the > > voltage on its anode won't get more than 0.7v over the > > PIC 5v rail. But I cannot believe this part is a diode > > rated for 170v, and as a designer I don't use a low > > voltage diode for 170v, forward biased or not. > > You keep talking about the 170V as being at the PIC. It's at the other end > of a resistor whos job is to handle the high voltage. What the PIC sees is > essentially a current source at a few tens of microamps. It is at the PIC. One resistor does not provide voltage isolation. By the letter of the SPEC you are attaching 170vdc to the PIC pin. (Two resistors in a voltage divider is a different matter) Let me explain.. You keep talking like this is a steady state 170vdc with the clamp diode nicely biased on. The real world doesn't work like that. What if the 170v comes from a mechanical switch (very fast turn on times)?? Are you saying the little clamp diode is infinitely fast turning on?? I work with TVs and i'm constantly ordering special diodes, fast switching, higher voltages. Getting a diode that is both fast AND suitable for higher voltages means a specialty diode, usually expensive and generally large physically. There is no way the tiny ESD diodes etched onto the PIC wafer are suitable for this. If the voltage increases at a rate faster than the turn-on time of the clamp diode, and it exceeds the miserable 20v or whatever the diodes and wafer start to break down at, you have failure of the PIC. And mains AC has the worst spikes and transients you could imagine, both negative and positive spikes up to kv's with vertical slew rates, ringing and the works. So when you get high voltage transients the PIC wafer and diodes are exposed to some real nasty stuff, and that includes high voltages. If you had a decent capacitor from the PIC input to gnd and one series resistor this would be safer, but it is still a bad design compared to R:RC or R:ZC. Those little wires inside the PIC going to the wafer and the wafer itself are rated for a set isolation voltage. That voltage is 5v. Connecting a high voltage directly to a PIC pin (series resistor or not) is very out of spec. :o) -Roman PS. Even the very nastiest Asian switchmode suuplies have inductive mains filter, a number of large filter caps, and always a cap and resistive divider or zener before the high voltage enters the first semi. The product would not be reliable enough to sell otherwise. I'm sure if Microchip had to manufacture their circuit it would look VERY different. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads