So we have this pet containment system by PetSafe. It's the buried wire type that transmits around the 10.66 kHz range. Our buried wire perimeter encircles around 2 acres of yard, so it's a decently large loop.
We've now had our 2nd transmitter fail (over about 11 years), which isn't THAT bad on average. At about $100 a pop, they're not super expensive, but I figured I'd see if I could cobble together one on my own with spare parts laying around on the cheap (and maybe amp up the power a bit for areas where the line is buried deeper and doesn't trigger the collar all that well)
One barrier of entry on this project is that it requires an MCU, in my case a dsPIC30F2012. This particular chip is WAY overkill for such a purpose, but I had it around, and it's a $4-5 part or so. Most any 5v MCU will do the trick.
I did a little web search for the patents on the transmitter and actually found FCC tests that laid out the wave patterns needed (and a schematic of the unit I had actually).
After some messing around and fiddling with the oscilloscope, I got the thing to work. The power levels are adjustable to FAR more than I'd need. The only part that gets warm to the touch is the voltage regulator, but I can always throw a heat sink on that.
The schematic:
The dsPIC30F2012 does 2 important things: it supplies the signal and timing, and it detects oscillation fault.
The waveform for the PetSafe system uses a signal at about 10.66 kHz. The signal is amplitude modulated between zero signal, low signal and high signal. RB2 provides a 10.66 kHz square wave during the low and high phases, and RB3 biases the signal depending on the high or low phase. The two are mixed into the base of Q1.
Q1 feeds a high power switching transistor (Q2), which I had harvested out of an old power supply. I tested other power supply NPN transistors which also worked: C2810, C5027, E13009, E13007F2, and STD13007.
LED2 is a simple continuity checker. D1 is there to prevent inductive kick-back (not sure if even needed).
T1 is some spare wire wrapped around a ferrite core (from an old PSU). C1 values might be different for different size loops. T1, C1 and the loop act as a tuned circuit, so fiddling might yield good results depending on your setup.
The other side of T1 generates about 2.5v when the circuit is oscillating. The LM311 is used to detect this signal and discharge C5. When the oscillation stops, C5 will charge up, the output being fed to the dsPIC's RB4 lead. When the program sees this happen, it lights up the fault LED.
LS1-LS4 are for diagnostics, and currently just light up back and forth for amusement.
C2, C4, C3 and C2 are just there to provide clean stable power to the board.
I'm no brain surgeon, so I am sure there are MANY ways to improve this circuit, not the least of which would be to add some sort of fuse to the output stage in case of short circuit.
If anyone's interested in the code for the dsPIC, or for the general waveforms that should be outputted in case you're using a different MCU, just let me know.
At any rate, thought I would share the schematic. It's been up and running for a couple of days now, and seems to work fine!
p.s. I plan on building a couple of these, one for the car, which is the main reason I used a regulator to handle 12v instead of just using a 5v supply. (our Jack Russel likes to charge after cars, we'd like to train that behavior out!).
We've now had our 2nd transmitter fail (over about 11 years), which isn't THAT bad on average. At about $100 a pop, they're not super expensive, but I figured I'd see if I could cobble together one on my own with spare parts laying around on the cheap (and maybe amp up the power a bit for areas where the line is buried deeper and doesn't trigger the collar all that well)
One barrier of entry on this project is that it requires an MCU, in my case a dsPIC30F2012. This particular chip is WAY overkill for such a purpose, but I had it around, and it's a $4-5 part or so. Most any 5v MCU will do the trick.
I did a little web search for the patents on the transmitter and actually found FCC tests that laid out the wave patterns needed (and a schematic of the unit I had actually).
After some messing around and fiddling with the oscilloscope, I got the thing to work. The power levels are adjustable to FAR more than I'd need. The only part that gets warm to the touch is the voltage regulator, but I can always throw a heat sink on that.
The schematic:
The dsPIC30F2012 does 2 important things: it supplies the signal and timing, and it detects oscillation fault.
The waveform for the PetSafe system uses a signal at about 10.66 kHz. The signal is amplitude modulated between zero signal, low signal and high signal. RB2 provides a 10.66 kHz square wave during the low and high phases, and RB3 biases the signal depending on the high or low phase. The two are mixed into the base of Q1.
Q1 feeds a high power switching transistor (Q2), which I had harvested out of an old power supply. I tested other power supply NPN transistors which also worked: C2810, C5027, E13009, E13007F2, and STD13007.
LED2 is a simple continuity checker. D1 is there to prevent inductive kick-back (not sure if even needed).
T1 is some spare wire wrapped around a ferrite core (from an old PSU). C1 values might be different for different size loops. T1, C1 and the loop act as a tuned circuit, so fiddling might yield good results depending on your setup.
The other side of T1 generates about 2.5v when the circuit is oscillating. The LM311 is used to detect this signal and discharge C5. When the oscillation stops, C5 will charge up, the output being fed to the dsPIC's RB4 lead. When the program sees this happen, it lights up the fault LED.
LS1-LS4 are for diagnostics, and currently just light up back and forth for amusement.
C2, C4, C3 and C2 are just there to provide clean stable power to the board.
I'm no brain surgeon, so I am sure there are MANY ways to improve this circuit, not the least of which would be to add some sort of fuse to the output stage in case of short circuit.
If anyone's interested in the code for the dsPIC, or for the general waveforms that should be outputted in case you're using a different MCU, just let me know.
At any rate, thought I would share the schematic. It's been up and running for a couple of days now, and seems to work fine!
p.s. I plan on building a couple of these, one for the car, which is the main reason I used a regulator to handle 12v instead of just using a 5v supply. (our Jack Russel likes to charge after cars, we'd like to train that behavior out!).
Last edited by a moderator: