Introduction: PetSafe Pet Barrier Transmitter

About: I am a musician and electrical/computer engineer. I also make new media art when I can create that opportunity. I currently serve as Concertmaster of the Wichita Symphony Orchestra (WSO) and Chicago Chamber Or…

Most pet owners are familiar with the concept of a wireless pet containment system: the animal wears a "shock" collar; when the animal is too near an antenna of a transmitter, the animal gets warned with a vibration or beep, then shocked. Typically, the antenna to the transmitter outlines the perimeter of a yard --- an underground fence. If a pet owner also wants to keep an animal out of a certain area in the house, perhaps off a piece of furniture, they can buy an indoor transmitter as well. However, most pet owners do not do this:
1. The transmitter is expensive
2. The circular pattern of transmission for the indoor transmitter is often not appropriate for the area of containment. How would you use one transmitter to keep an animal off a couch while allowing them around the couch, for example?
3. The thing is big, ugly, and in the way. Where can you put it that will be convenient for you and still will outline the area of containment?

Ready for some good news? We can make our own transmitter, completely compatible with PetSafe collars but smaller than PetSafe's, with an antenna that can be any shape or size, for under $5! Our transmitter can serve as a replacement for an outdoor or an indoor system. And if you are ready for a break from the Arduino and friends I have more good news: we don't need a microcontroller. This can all be done with a couple of 555 timer ICs (available literally everywhere, including Radio Shack, Jameco, and All Electronics) and some supporting passive components. There's no code to write. You can build this thing without ever going near your computer (assuming you have a way to read this and surf the web without a computer.) And you can have the satisfaction of knowing you built the magical transmitter yourself.

Step 1: Background

Before we get too deep into making this thing, how about a high-level overview of how the thing works and why I created the transmitter the way I did? If you just want to just get to building, skip this step. My feelings won't be hurt.

This project was born out of Instructables/Jameco August Build Night. As you can see from the link, Makerspaces such as our Wichita-based MakeICT were challenged to host a Build Night focusing on using materials Jameco sent. After the Build Night we were encouraged to post instructables sharing what we built with these materials. The only IC we were given was the 555. Surprisingly, Jameco didn't provide any Cray Computers. They didn't provide microcontrollers either. There weren't even any 556s in the bag (2 555s in the same package). Besides the 555s, Jameco gave us a decent supply of resistors and a whole bunch of random passive components.

Just a week or two before our Build Night, a friend and I were lamenting that there still wasn't a good solution for keeping her dogs off the furniture. Sure there are products like The SofaScram Mat, but they are less than ideal. If you use this mat, for example, you either deal with the hassle of taking the mat off and on the sofa or, more likely, you leave the mat on the sofa for eternity so the sofa doesn't get used ever by anybody, animal or human. What a waste. Might as well let the dog use it then. And what about when guests just show up? Are you seriously supposed to instantly remember that the mat is there? Or do you just let your guests sit on the sofa, mat and all, and let the resulting loud beep freak them out? I'll bet your dog would think that was funny.

So that got me wondering about my wireless fence transmitter. "How do you work?" I asked it. When it didn't answer I used an oscilloscope to take a look at its output. I saw that it transmitted a pulsing a sinusoidal wave at about 10.5K Hz. The wave pulsed every 36mS.

This pulsed wave seemed like a simple thing to emulate using a sound card, so I took my favorite programming weapon of choice and wrote a patch (see couchAway.pd below) to confirm that a simple pulsed wave could trigger a dog collar. Yep, it did. Experimenting with the patch, I found any frequency between 9K and 12K worked, but the pulsing needed to be almost exactly 36mS. Much variance from that, and the collar would not consistently work.

We could call this project "done" at this point: if you have an old computer with a sound card around, you can turn it into a transmitter now with my patch, wire for an antenna, a resistor and an 1/8" plug (see pic below). It works well and consistently. You could also give a Raspberry Pi the job and still end up saving serious dough over PetSafe's transmitter. But seriously, are you going to waste a computer like that? It's like using a Ferrari to go to the grocery store. Not cool. Let's move on, shall we?

A pulsed wave can be thought of as 2 waves: one wave is used to turn another one on and off. Electrical Engineers call circuits that make waves astable multivibrators and a quick Google search verifies that the 555 is at home as diva for the design of an astable multivibrator. So when I saw the Instructables/Jameco challenge to build something cool given 555s and some passive components, the collar transmitter seemed like a good fit.

Please note that I do not advocate this solution as the best or most efficient way to build a wireless collar transmitter. For example, it's silly to use 2 555s when you can use a 556. (The Jameco kit didn't have 556s.) Also, the RC circuits that govern the frequency of the waves in this 555 circuit do drift a bit, and this could be a problem, especially if the transmitter is kept outside where temperature fluctuates. A more robust solution might be to use a microcontroller. Also, in the circuit I sometimes put 2 resistors in series or parallel instead of using only 1 resistor. This was so I could use only resistor values and ratings given in Jameco's assorted resistor kit. So feel free to build as is, tweak, improve...or just resurrect that old 386 in your garage and use its sound card. If you do build this as is though, you can feel good about having built something that PetSafe sells for over $60. And you did it using only a couple of 25-cent ICs. Cool, eh?

If you think this project is too difficult for you, also know that this makes you bested by a 12-year-old; I had a kid build this transmitter successfully using these directions. Now that I have shamed you...are you ready to get started?

Step 2: Getting Started

Skill Set needed:
To build this, you should have a basic idea of how resistors and capacitors work. You should be comfortable using a multimeter to measure voltage and continuity, and have some experience soldering through-hole components on perf board. (This circuit really needs to be soldered to be reliable. A solderless breadboard isn't going to cut it.)

Theory of Operation:
We are, in essence, building two of this circuit. Our only significant change is that one of our circuits will feed its output to the reset pin (pin 4) of the other. This turns the other circuit on and off. By turning the circuit on and off we can pulse the frequency.

Materials (all available from Jameco's materials provided for Build Night unless otherwise noted):
 - 2 555 ICs
- 1 perf board with .1" grid cut to 1.5" x 1.1" (That's 15 holes on one side, 11 on the other. I cut up this stuff)
- 3 1K resistors
- 1 5.6K resistor
- 2 100 Ohm resistors
- 1 10uF capacitor (anything bigger than 1uF should be fine)
- 1 .1uF capacitor
- 1 .01uF capacitor
- 500K trim pot (I used this)
- 9V power source (Jameco provided 9V batteries and battery snaps, but since I want to leave this on continually I used an AC adapter from a discarded set of computer speakers instead.)
- wire

If you want a box and some nice plugs/jacks to give your project a finished look, here's some more materials you might also consider:
- DC Jack
- RCA plug
- RCA jack
- project box

Tools:
- soldering iron and solder
- multimeter
- drill (if you want to use a project box)
- some decent music (not that stuff you usually listen to)

Step 3: Schematic

Technically you don't need to look at this schematic to build the board. However, if you want to understand what is going on, improve the design, or you need to troubleshoot, it's pretty handy.

A few notes:
 - As mentioned before parts decisions were based on what was available from the Jameco kit for August Instructables Build night.
 - The schematic and board layout were done in Eagle (free version).
 - R2 and R7 are in parallel to dissipate heat. A 47 Ohm resistor could replace these if it were 1/2 watt. Or use a 47 Ohm 1/4 watt and take your chances. :-)
 - R3 and R4 could be replaced with one 6.8K resistor

Step 4: PCB Perf Board Layout

A few notes about the board:
 - Besides providing a screenshot of the board, I provide one with inverted colors (easier on ink if you print it) and one that is flipped (easier to trace stuff when looking at the back side of the board).
 - The grid shown is set to .1", exactly the distance of the holes on the perf board
 - Blue traces need insulated wire because they cross other wire.
 - R2 and R7 get a bit warm, so they are spaced a bit away from the other components to help reduce frequency drift.

Nervous to build this? Read on...

Step 5: Perf Board Construction

If you are comfortable populating boards,skip this step and get to soldering! If you want more instruction though, here are the directions I used with my 12-year-old friend so he could put his together:

Soldering tips: 

- Keep your tip clean. Make sure your sponge is wet and you continually clean the solder tip with the sponge.
- Tin the soldering tip before applying solder
- Get the iron hot enough to melt the solder but no hotter. If the tip is turning blue, it's too hot.
- Tape the board and components with masking tape as needed to hold the board and parts in place as you solder. Taping legs as you solder them can help a lot too.
- Work on top of a scrap piece of wood.

Populating the board:

("right" and "left" in the directions below assume that you are looking at the front of the board where the components go)

1. tack the 555s on the board. Put just enough solder on the pins to hold the 555s in place. Make sure you get the orientation of the 555s right (match the orientation of the crescent between the PCB printout and the physical chip.)

2. Tack the 500k potentiometer on the board.

3. Insert C3 and solder right  leg to pin 1 of U$2. Cut the excess leg length.

4. Solder the other leg of C3 to pins 2 and 6 of U$1. Then bend the leg to reach the middle pin of the potentiometer and solder. Cut the excess length.

5. Insert C1 (make sure you get the orientation right) and solder lower leg to pin 1 of U$1 and the outer leg of C2. Cut excess.

6. Bend other leg of C1 to edge of board just to get it out of the way. We'll save that for later.

7. Insert C2 and solder upper leg to pins 2 and 6 of U$2. Cut excess.

8. Insert R2 and R7. Use the legs of R7 to connect to R2. Cut excess length.

9. Connect the other leg of C2 to the right leg of R2. You can use the leg of either R2 or C2 to connect the two. Cut excess lengths of both legs.

10. Insert R3 and connect the upper leg of R3 to the upper leg of C2. Cut excess.

11. Insert R4 and solder the lower leg of R3 to R4. Cut excess of both legs.

12. Insert R6 and solder it's outer leg to the upper leg of R4 and pin 7 of U$2. Cut excess.

13. Solder the inner leg of R6 to pin 8 of U$2.

14. Insert R1 and connect the left leg to pin 8 of U$1 and the upper leg of C1. Cut excess.

15. Connect the right leg of R1 to the upper leg of the potentiometer. Cut excess

16. Using a leftover piece of leg from some component, solder the right leg of R1 to pin 7 of U$1.

17. Strip 1/4" off both ends of an insulated piece of wire. Using the wire, connect the right leg of R2 to pin 1 of U$2

18. Strip 1/2" off one end and 1/4" off the other. Use the 1/2" side to connect the left leg of R6 to pin 4 of U$1. Then connect the 1/4" side to pin 8 of U$2.

Step 6: Finishing Up

If you want, you can connect a 9V power source to Vcc and ground, connect a wire as your antenna to Sig+ and Sig- and call construction "done." However, with this much effort already put into it, wouldn't it be nice to put the whole thing in a project box and use civilized items like plugs and jacks for your antenna and power connections?

Yes it would be nice wouldn't it? Here's how my friend the 12-year-old did it in 3 steps:

1. Cut 3 insulated pieces of wire 3" each. Strip each end 1/4". Solder a wire to each of the 4 solder pads shown on the PCB diagram.

2. Drill holes in the box for the jacks. Screw the jacks in the holes.

3. Solder the 4 wires to the appropriate connections on the jacks.

We also soldered up a loop of wire as a test antenna onto an RCA plug.

Step 7: Testing/Tweaking

For the less experienced, here are some suggestions before plugging the transmitter in:
 - Triple check all your connections with a continuity tester. Make sure neighboring pins that aren't supposed to be connected don't have solder bridges connecting them.
 - Triple check your polarity. The 555s will die if hooked up backwards. Don't ask me how I know this. :-)
 - If possible, use a current-limited power source until you are sure the circuit works correctly.

After you are sure everything is as it should be, power up the circuit with a 9V adapter and plug your test wire in. Place a shock collar near the test wire and slowly turn the potentiometer back and forth until you hear the collar clicking. From there you can fiddle with the potentiometer until you have the maximum range for all of your collars, and that they give warnings and shocks.

Note that the frequency of the circuit tends to drift, especially when first turned on. After verifying that the circuit works, leave it on for 5-10 minutes before finally tweaking the potentiometer to its permanent position.

Step 8: Making the Antenna

The antenna can be any size or shape you wish and mounted to anything you wish, provided it is a closed-loop wire. Here's an example of the antenna we made to slip behind the seat of our couch. You can check out how it works in the video at the beginning of this Instructable.

Step 9: Troubleshooting

Troubleshooting is tough without an oscilloscope. If you don't have one, I strongly recommend the Syscomp CGR-101. For $200 you can't beat it. You can also build an oscilloscope adequate for testing this circuit using your sound and a couple of resistors. Free software for this, such as xoscope, is available online.

When testing, test each 555 circuit independently. First confirm that the 555s are getting power. Then check if U$1 is outputting a pulse: if you don't have an oscilloscope you might check this by putting an LED in series with a resistor between pin 3 of U$1 and GND. If you do have an oscilloscope, put your probe on pin 3 and adjust the potentiometer so that the period is 36 mS. Then check U$2 similarly.

If either 555 is outputting the wrong frequencies, look for open connections. Some better multimeters can tell you frequencies. Otherwise, without an oscilloscope or substitute, you can't check this. Sorry, bud. :-(

Good luck and let us know if you have questions, clever additions, or other good problem-solving techniques.

I Could Make That Contest

Participated in the
I Could Make That Contest