Introduction: Arduino PetSafe Cat Barrier

Hey, all! I finally decided to write this as an instructable of my own - my first. To give proper credit, this project originated with user whyameye's original post on Sept. 2, 2013 - Original PetSafe Barrier Project. I built on his success, and used data he gathered on how the PetSafe "shock collar" system worked, and used an arduino to build my circuit to emulate his results with his 555-chip circuit.

I wired up an Arduino Duemilenove with the output NPN power transistor via a 1k resistor on pin 9, just as if I were wiring up a basic LED blinking circuit, then wired a 1k potentiometer in series with the output load wire loop to adjust field strength. All was powered with a 9V battery. (Note: if you need more field strength, simply wire the power supply for the TIP29 power transistor to a separate, higher DC voltage supply - maybe try 9V or 12V first. Remember to tie the DC- to the common ground)

I used the arduino timer1.pwm routine to generate the 10.5KHz during the on pulse, and a loop with 18ms on / 18ms off for the 36 ms pulse carrier wave. This emulates the astable multivibrator circuit whyameye created with his 555 circuit. Here is a the arduino sketch code:

/*
* Astable multivibrator signal emulator

* for PetSafe fence

*/

#include "TimerOne.h"

void setup()

{

pinMode(9, OUTPUT);

Timer1.initialize(95.2); // initialize timer1, and set a 95.2us second period (10.5KHz)

}

// the loop routine runs over and over again forever:

void loop()

{

Timer1.pwm(9, 512); // setup pwm on pin 9, 50% duty cycle

delay(18); // wait for 18ms

digitalWrite(9, LOW); // turn the LED off by making the voltage LOW

delay(18); // wait for 18ms

}

Step 1: Wiring the Breadboard Circuit

Step 2: Results