The circuit presented here works good, and I have used it successfully in my mountain trips to protect my tent and good from wild animals while on trails. I have developed a newer one, so choose whichever suits you best.
The Electric fence
Here is an electric fence perimeter protection circuit designed to run on batteries and provide configurable pulses of up to 20KV, to protect a tent perimeter against bears or other animals, out in the wild. It doesn’t kill as the output current is limited, but it is definitely not for those with medical (heart) problems. So be advised to use extra care and awareness when constructing or deploying such a device.
As said, the high voltage generated is not dangerous because of the low current (and power), but it will produce intense pain. Similar circuits are being employed for pastures, and I’ve seen many in the mountains, in several countries I traveled to.
The device uses two 555 timer circuits to generated a variable frequency, variable width pulses, that are used to drive an auto induction coil. For my design I’ve used a VW Bosch induction coil with excellent results. The power is provided by 8 AA 1.5V batteries, connected in series for 12V. The frequency and the pulse width can be adjusted using two potentiometers. The frequency specifies how often will the high voltage pulses be generated and so fed into the perimeter wire, while the pulse width influences the amount of energy fed into the coil, and so how much high voltage energy will be sent into the wire (more energy, more painful the discharge will be).
The circuit , the batteries and the induction coil are enclosed in a waterproof plastic recipient. The high voltage output should be connected to a loop of metallic wire placed around the protected perimeter. This high voltage line should be insulated from ground (use some plastic for that). The cold output should be connected to a good ground: insert a 50cm steel pipe or wire into the ground. Rocky soils or dry soils need a better ground (use a longer wire and bury it as deep as possible).
The PCB layout can be downloaded here: ElectricFenceVer1.0
Note: This will not work well with a flyback transformer used instead of the induction coil. A good quality induction coil is a must for this device to work as expected. If testing the output, make sure you set the device to minimum power, by adjusting the pulse width. The shocks at higher power are painful!
The PCB Layout in PDF: ElectricFenceV1
Variants built by my readers:
Nice work Nezocas!
Update Feb 10, 2019: A few years later and this circuit is still very popular! Kalpesh Desai built professional PCBs for it. Nice work Kalpesh!
Salih, from Turkey, pushed things even further, with the addition of a solar panel to allow this electric fence energiser to operate autonomously in remote locations. This is the best build so far, congrats Salih!
Update April 11, 2019: here’s another high quality build by Kalpesh Desai from India:
This is yet another example of high skill resulting in a beautiful construction. Congrats Kalpesh!
Update May 11, 2019: Tharindu De Silva built the circuit on a breadboard, and enclosed it in a rugged plastic box to use it against rats. It looks great, nice work Tharindu!
For those interested in building an Electric Fence, please note that there is an update version of this circuit, presented here.