My question really wasn't about overloading a PIC input (I even specified i= t won't happen, at least from the shunt normal operation) but if there could = be some "parasitic" or anyhow difficult to understand phenomena that will make the shunt go negative. I'm thinking about overshoot, etc.. although theoret= ically this should not happen. Anybody that can elaborate on it please? >Hello, >I'm playing with my SMPS step up (boost) design, where the controller is a= PIC. > >I thus have +12V power input, an inductor, a MOSFET, and a diode that char= ges a >high voltage capacitor, and a voltage divider before the diode, to=20 >monitor voltage >(via a first PIC ADC input) of the cap without actually discharging it=20 >continuously. > >The gate of the MOSFET is connected to a +5V rail through a 1k=20 >resistor and I use >a PIC output in open drain configuration to ~quickly stop the MOSFET=20 >from conducting >(the opposite doesn't need to be ultrafast, as the SMPS will be always use= d in >discontinuos mode, thus current is zero whenever the MOSFET starts to cond= uct). >Switching frequency is pretty low. > >While it's certainly not the most performant boost circuit, I like its=20 >simplicity >and low components count. > >Now, I also need to monitor current (for which I have devoted a second=20 >ADC input), >and thus I have placed a shunt resistor between the source of the=20 >MOSFET and the >0V rail. I can be 100% sure that the voltage out of it will never=20 >exceed the PIC >ADC max input voltage, also due to insufficient input current from the=20 >power supply. >The shunt has also pretty low resistance so the voltage never reachs=20 >0.5V (not much >resolution from the ADC, but enough to not want to add an OpAmp, as=20 >space on board >is very very limited). > >Question is: should I put a series resistor between the PIC ADC input and = the >shunt? Theoretically the voltage will never go below 0V and will never go = above >0.5V (as explained above), but I fear some insidious aspects that=20 >maybe I haven't >been able to consider, maybe for some hard to grasp parasitic=20 >capacitance, etc.. >could the shunt voltage go below 0V and thus fry my PIC ADC input pin=20 >unless I put >a series resistor? Is this series resistor necessary? > >If it's totally useless, I don't want to put it, it's a matter of principl= e. :D > >Thank you very much for augmenting my design knowledge and experience. > >Kind regards, >Mario --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .