Ben Wheare wrote: > BRILLIANT reply! Thanks! :) > So, plan: > > One pair connected with a relay and wallwart. One end of the pair (at my > end) is connected to 5V. If the PIC input is high, its powered, if not, the > relay is de-energized and powers off, hence the PIC input is floating. > Thats the 'fail-safe' approach. > Actually, couldn't I take 5V from the above pair, and use it to power the > PIC. What about the differences in ground? Any way to get around that? > If I understand it, you'll use the relay closure at the remote end on one pair, to a local pic input, and possibly tap the line for PIC power which will signal some data on another pair, right? Think of the line as a smallish value resistor when closed, and infinite when open. If going right to a pic, I wouldn't float it, but perhaps if the line was 50 ohms, put a 1-2k resistor to 5v, then the other side of the resistor to pair1 line 1, pair1 line 2 then goes to local gnd. Pic input is off the pair1 line 1 local connection. Closed, it's pulled down to <.5v and open it goes high through the 1-2k. Measure the cable and do the calcs. You could also just drive an opto. I would also probably use 12v or so if also powering remote electronics, but remember the relay will be shorting the lines, so you don't get much V that way... ;) I'd use a local 5v reg on the remote side, and send comm back to an opto. The best way would be separate lines for power, and by using a local reg, you circumvent any changes in copper resistance over temperature changes, unless you're flexible in when you need power. IF you only needed the pic to operate when remote power was on, or only when it was off, you could use 12v, change the local series resistor, and put a 5v reg input across the relay contacts. Depending on if you use a NC or NO relay, you get to power the pic if power is on or if off. In the opposite state, there's no input to the remote reg. because it's shorted. So, a NC relay would allow the pic to be powered remotely if the remote site was up AND you get basic signaling to the local pic input on the same line. It may or may not work depending on power draw remotely and line resistance, et al. I suspect that if you can't find values that will source enough power to your load AND give you nice levels locally, you could use an A-D input instead of a digital one and look for whatever closed and open values turn out to be. There should be a wide enough difference unless you end up drawing mega-power remotely, which you shouldn't do anyway. A heavy load remotely will look more like a closed relay locally... It's easy enough to just run the calculations for your particular values. Another idea: save one pair, or be able to switch it from some other use, for use as an intercom or remote audio pickup. Then you can have people do your bidding at the remote site as well as listen for whatever is worth listening for out there... ;) -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist