PDA

View Full Version : Safety resistor



Michael Wakileh
- 4th October 2009, 21:35
Hi,
In one test circuit I have a voltage (0 -1.6volts) going into the PIC ADC directly.. Although this works well, I suppose its safe practice to put a resistor (under 10K) in between as a precautionary measure... just incase that pin turns to being an output. I'm guessing any value that restricts current to under 20 mA is ok...as long as the sample times are adjusted...In this case the PIC is running at 3.3 Volts so the worst case is probably 3.3volts shorting to ground... anything over 165Ohms should be ok, right? I appreciate any insights/confirmation...
greets,
Mike

Archangel
- 18th October 2009, 04:10
Hi,
In one test circuit I have a voltage (0 -1.6volts) going into the PIC ADC directly.. Although this works well, I suppose its safe practice to put a resistor (under 10K) in between as a precautionary measure... just incase that pin turns to being an output. I'm guessing any value that restricts current to under 20 mA is ok...as long as the sample times are adjusted...In this case the PIC is running at 3.3 Volts so the worst case is probably 3.3volts shorting to ground... anything over 165Ohms should be ok, right? I appreciate any insights/confirmation...
greets,
Mike
Looks right to me Mike.

Melanie
- 18th October 2009, 08:38
Actually, the consideration is the other way around...

Are you likely to have a voltage, spikes or other undesirables on your incomming line likely to damage your PIC? The PIC is unlikely to be set to OUTPUT (unless you explicitly do it) since Microchip put some effort into ensuring the PIC initialises at Power-ON into Input (High-Impedence) mode. Because if it DOES initialise as OUTPUT, will it be HIGH or LOW? Then that negates the common practice of tying unused pins to VDD or GROUND.

You are now intoducing a new problem - Since the INPUT ADC Impedance is around 10K, putting such a high (10K) Resistor in series as per your suggestion is going to seriously affect your ADC readings and deviate them from what is true and expected.

I wouldn't worry about the PICs inputs becoming outputs (unless you are deliberately including a self-destruct routine into your PIC) as much as potentially what you are likely to be feeding the PIC.

Michael Wakileh
- 19th October 2009, 11:22
I ended up using the 250 Ohms... (I'm working on some open source hardware (sparkfun widgets) which can be reprogrammed by anyone.) I really like the idea of the Pic self destruct routines. That should really become a thread of its own! :)