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?