Wednesday, July 10, 2013

My Raspberry Pi — Extending Sensor Circuits

I've been wondering what the best way to do this is — and how far you could go. Here's my inelegant solution:

- I bought a 3' 3-wire extension cord
- I cut the cord part in half
- I also cut 3 M/F breadboard patch wires in half (a black, a red and a yellow)
- I stripped all cut ends (12, in all)
- I soldered the female patch wires to the female half of the of the 3-wire cord
- Ditto, the male with the male
- I chose to color code as follows: red=current, black=ground and yellow=GPIO control
- Heat-shrink tubes and electrical tape finished the job.

Above: female end connected to a PIR motion detector.

After I made sure that the short cord worked I added a 50' 3-wire extension between the 2 plugs shown above.  Guess what? That worked too.

So much for good news — what are the down sides?

1. These cords and plug are heavy and stiff. I have to be careful not to bend patch wire pins.
2. 14-gauge wire is over-kill.

But, so what.

1 comment:

  1. I generally recommend staying away from that type of cabling to prevent some bone-head plugging it into a wall outlet. However, I have had need to resort to this myself. I have an IR beam sensor at the end of my driveway, 350 feet away from the house. I need to send 12V to it and read a contact closure back. And the cable has to be able to survive outdoors. Extension cords were the only cost effective solution I could find. I did cut off the ends of the first and last cable and used duct tape around where the intermediate cables connect together.

    ReplyDelete