View Full Version : Long Distance Input's to Pic

- 20th April 2005, 01:23

What's considered good design practice when you have 4 mechanical input switches that are located 8 ft away from the pic? The application is a kit car. I was going to run a shielded cable, or shielded cable with optical isolation. Any suggestions?



- 20th April 2005, 03:41
If you realy want to play safe choose opto coupler.. that's it.

But a good resistor match and sufficient current on the line + simple noise filter do also a good job with or without any shielded cable.

- 20th April 2005, 23:37
Hi Steve

Thanks for your reply. Could you explain what you mean by "good resistor match and sufficient current on the line + simple noise filter".
I thought you would always use the internal pullup resistors if available, otherwise, a 10K pullup resistor.


- 21st April 2005, 09:37

as Steve has already mentioned: Opto-Isolators are perfect.

the internal PullUp is too weak for this.
You should definitely use ane external one and this should be less than 10k, say 4k7 or 2k2 or even lower..
You could use one resistor at ech end of the line.

bear in mind that with resistors at both ends of the line
you would have 8 resistors in parrallel between VSS and VDD, when all 4 switches are closed.
For 2k2 Resistors this would mean 18mA. This could be an issue for a battery powered application.

For a simple filter a 100nF Cap and a 10k Resistor (close to the PIC) would do.