|
Electric Fence – 20KV pulses for perimeter defenseBy Radu Motisan Posted on September 8th, 2011 , 8760 Views (Rate 14.06) |
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.

The high voltage generated is not dangerous because of the low current (and power), but it will produce intense pain.
The circuit:
![]() |
![]() |
![]() |
![]() |
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).
Circuit diagram:

The PCB layout can be downloaded here: ElectricFenceVer1.0
Note: The circuit 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!
Test video:
The PCB Layout in PDF: ElectricFenceV1
|
|


























October 9th, 2011 at 2:49 pm
[...] and amplitude all configurable using three potentiometers. The pulse generator is based on my 20KV pulse generator. In this case, the induction coil is replaced with an inverter, that generates a configurable [...]
December 12th, 2011 at 10:13 am
I wish you could listed down all the parts used so I could build myself one.
thanks
December 12th, 2011 at 1:40 pm
@victor, please see Circuit diagram . All the components are listed there.
December 13th, 2011 at 2:00 am
Thanks Radu. I overlooked that.
December 17th, 2011 at 12:24 pm
Hi Tks for This, How many Kilometers can fence this one?
December 19th, 2011 at 4:54 am
how do YOU open the file for the PC layout? Its in Zip file. I cant open up the file. HELP!!!
THANKS
December 19th, 2011 at 10:58 am
You will need Eagle software to open it
December 21st, 2011 at 4:27 am
Radu,
isn’t there any other way? could you make the file into Abobe PDF? So it would still be alot easier?
thank you
December 21st, 2011 at 4:28 am
Radu,
Please transfer the file into Adobe PDF? thanks
December 21st, 2011 at 10:01 am
Victor, see it here: http://www.pocketmagic.net/wp-content/uploads/2011/09/ElectricFenceV1.pdf
December 22nd, 2011 at 3:19 am
Hi Radu!!!
thank you very much for the link!!! Fantastic!!! I was able to get the PCB diagram. One question though, this PCB diagram as you face it is the under part of the (copper side) of the board?? Right? Also would you have any suggestion as how I could efficiently print or transfer this diagram to the copper side of the PCB without losing detail? Im just a beginner in electronics this would be my second major project. I was able to build me a variable voltage regulator (dc) in the past. Now Im excited in creating your idea. Again thank you very much.
December 22nd, 2011 at 10:43 am
Hi Victor,
Yes, this is the mirrored version, showing exactly what you need to print on the copper side.
Easiest way is to print it on paper, put it over your copper board and drill the holes.
Then remove the paper and while keeping an eye on it, draw the connections between holes, using some resistant paint or lacquer and a sharp brush or any other tool you’re comfortable with.
Use FeCl3 to corrode the rest of the copper, and you’re done.
January 5th, 2012 at 9:45 am
Radu,
what is the exact size (in inches) of the pcb? thanks
January 20th, 2012 at 7:14 pm
can I get the electric fencer v1 in pdf layout with
only conneting lines for laser printing on photo paper
and then iron on to copper board.
February 26th, 2012 at 11:34 am
Ai incercat pe gardul propriuzis?
February 26th, 2012 at 11:43 am
L-am dus cu mine la munte dar nu l-am instalat. Cand l-am realizat, din greseala am atins iesirea, dar era pe setare minima, si a fost dureros.
Setare minima inseamna undeva pe la 1KV. Setarea maxima permite 20KV. Durata pulsului nu mai stiu cum era setata, dar “all-in-one” produce destul de multa durere.
Vara trecuta am fost in elvetia si am atins din greseala un gard de vite, am sarit ca ars. Culmea, pulsul a venit numai la vreo 3 secunde dupa ce am atins firul, are deci o frecventa foarte mica ce foloseau ei acolo. Ca durere produsa a fost cu putin mai mult decat ce am simtit la al meu pe setare minima.
February 26th, 2012 at 10:01 pm
Daca impedanta nu e corespunzatoare ,tensiunea e prea mica in gard .
Sant verificatoare pt gard – un voltmertu in trepte.
https://picasaweb.google.com/112827018205146693954/ElectricFenceVer10?authkey=Gv1sRgCM_TqMLHq8TF9AE#5713536625245616866
February 26th, 2012 at 11:52 pm
mi-am confectionat si eu o “sonda” de inalta tensiune, dar la ce gard mi-a trebuit mie, cat sa inconjur un cort, nu imi fac probleme pentru modificari prea mari in tensiune.
February 27th, 2012 at 7:37 pm
La noi sant probleme legale privind utilizarea ef.
March 6th, 2012 at 7:23 pm
i will also would like to know How many Kilometers can fence this one do
March 16th, 2012 at 3:18 pm
Hello i have the same question with scott how many meters can fence?Also is the maximum diameter of the wire that can take?thanks a lot
March 16th, 2012 at 5:08 pm
You’ll need to take into account wire resistance for distance voltage attenuation, and pillar insulators. At 20KV I expect these to be negligible, so you can use it for a few km easily.
April 9th, 2012 at 9:08 am
can`t find 1N222A Transistor please tell other equalent transistor.
April 9th, 2012 at 1:34 pm
any generic npn transistor will do.
April 12th, 2012 at 9:04 am
Dear Radu, can you tell me the specific type of the induction coil?, please. If not, can you write all the specs about that you used.
Thank you!
April 12th, 2012 at 1:20 pm
It’s a normal auto induction coil, mine was a bosch, taken out from a VW car.
June 2nd, 2012 at 8:24 am
Don’t you mean 1N2222A not 1N222A
June 2nd, 2012 at 8:26 am
2N sorry
June 2nd, 2012 at 9:55 am
Thanks Jak, yes it is a 2n2222, you can use any other generic NPN trnasistor.
June 6th, 2012 at 5:30 pm
Hi, Nice Circuit, What happens when the HV Output is shortcircuit, like grass or weeds or direct short.
June 8th, 2012 at 3:35 pm
Not good … the voltage decreases to a value that is not usable .
June 8th, 2012 at 3:45 pm
-In cazul unui scurtcircuit cind rezistenta tinde spre 0 ohmi (sarma,direct short),daca e mentinut se termina bateriile ;
-In cazul ierbii/alte plante (like grass or weeds )efectele gardului se manifesta asupra acestora ,nu asupra animalelor.
June 22nd, 2012 at 2:57 am
Hi Radu
I built this circuit, to use to energise a fence to protect some beehives. Unfortunately it is not functioning properly. There appears to be no pulse action at all, no matter what the position of the pots. When switching the board off, I get a spark, approx 5-7 mm. The main power transistor gets very hot if the power is left on. So I am not sure if there is an obvious explanation. I was very careful in wiring it up, but perhaps something is wrong. I tested all resistors with a meter as I installed them, so I know they are all correct. There is no specification given for some of the components, even in Perez’s original article in Home Power.(I got mine from Digi-Key). So this is a bit of an unknown, although I believe what I have should be fine. I guess I have to start over. It took me quite a while to assemble.
Rob
June 22nd, 2012 at 7:46 am
Hi Rob, there must be some errors in your circuit. You can also post a few pictures so I can have a look:
The transistor should stay cool, unless you’re using some very high frequency (this is just a guess). Can you measure the oscillator frequency? Do you have a frequency meter, or a scope to show the signal on transistor’s base?
What components have no specs? I built two such boards without any issues, one is here, the other one can be see at: http://www.pocketmagic.net/?p=2343
so let’s see how to fix this.
September 13th, 2012 at 4:11 pm
what is the specification of the battery is it 1.5V/8AA. plz reply me as early as possible. I am working on this project.
September 14th, 2012 at 4:18 am
I am working on this project and I am not getting the sparks. Do I need VW Bosch coil only? 8AA 1.5V does this type of batteries are available in the market? Please give me the details about the batteries as early as possible.
September 14th, 2012 at 4:36 am
Is ignition coil and induction coil one and the same thing. Please reply me ad early as possible. I will be very thank full of you
September 14th, 2012 at 8:23 am
@Sneha: normal alkaline AA 1.5V battery.
Check the oscillator and see if it is working.
The ignition coil used in auto is an induction coil.
September 17th, 2012 at 6:43 pm
I have bought a two wheeler ignition coil, but its not working, oscillator is working only problem is the sparks. If i get the same induction coil as you have used then it will work? And you have used box type capacitor, but i have used ceramic ones will they effect the circuit?
September 17th, 2012 at 6:45 pm
Can you suggest me a mini digital project with all the details?
October 6th, 2012 at 8:37 am
I am working on this project and I am not getting the sparks. Can you suggest me more details of your project
October 6th, 2012 at 10:31 am
you’ll need to check your circuit again, but also the ignition coil. feel free to post pics with what you did so far.
October 19th, 2012 at 9:11 am
hi friend, great job!
can you please tell me how many volts is C1 cap 1000 uF/??? volts?
I am making this great project
October 19th, 2012 at 11:08 am
25V or more
October 27th, 2012 at 7:15 pm
What application(s) are required to open your files on a Mac?
November 8th, 2012 at 5:36 am
Hi, i’ve done this circuit and i got the pulse. but the output voltage does not reach up to kV. it only can go up to 300V. i’ve used hitachi ignition coil to step up the voltage. does ignition coil’s brand influence the value of output voltage? i need to achieve kV voltage for output in order to get a good result for my final year project. Please reply as soon as possible. thank you.
November 8th, 2012 at 10:41 am
Hello Ain, you might want to try a different coil as well. This is a very simple circuit, and little can go wrong about it.
December 1st, 2012 at 3:03 pm
I wish you could listed down all the parts used so I could build myself one.
thanks
December 1st, 2012 at 4:35 pm
all the parts are listed in the circuit diagram. easy to build, nothing fancy.
December 26th, 2012 at 9:04 am
Hello, is this circuit power input can connect to the 12V car battery?
Can i use the flyback transformer for the TV instead of the induction cail?
December 28th, 2012 at 11:47 am
@ngks: yes you can use a 12V car battery
the flyback transformer produces high voltage but low current, you would need to rectify it and place a capacitor in parallel on the output, to get a shock . something similar can be seen here: http://www.pocketmagic.net/2011/09/battery-powered-high-voltage-multiplier-for-gas-igniter-or-stun-gun/
January 25th, 2013 at 5:05 pm
Hi Radu,
I built your 20kv electric fence circuit which works very well except – - every two or three minutes, the 2nd 555 (U2) goes u/s. Now I did use a Mosfet in place of the 2N3056, driven directly from the 555 via a 330 OHM resistor, i.e. did not use a PN2222 in between the 555 and Mosfet. Would this be the most likely cause of the constant failure of the 2nd 555 I.C. ?
January 25th, 2013 at 6:16 pm
@gary, You might be getting some high voltage spikes back to your driver circuit. This can happen with some types of induction coils . Try putting a small snubber, across the coil’s primary : a small neon bulb and see if that helps.
You need to use the PN2222 as well, for better results: it is used to properly amplify the trigger signal for the high power transistor (or mosfet in your case).
January 26th, 2013 at 5:25 pm
Many thanks Radu, will incorporate both of your suggestions.
February 27th, 2013 at 1:26 pm
sir can you tell ignition coil of generator or motorbike can also be used in place of ignition coil of car.is voltages effected?
February 27th, 2013 at 3:13 pm
@umair: yes you can use other ignition coils
March 2nd, 2013 at 9:29 am
greetings radu’
i plan to build the circuit soonest.how can i incorporate a relay circuit for alarm or sounder if someone touch the high voltage side.
March 2nd, 2013 at 10:48 am
@jhunflex you should be able to detect a voltage drop in the high voltage line
March 2nd, 2013 at 12:03 pm
Thank’s radu..I’ll go to your suggestion very helpful to me.
March 14th, 2013 at 4:05 am
Hi, Please do not be tempted to convert this circuit to run from mains, from a DC adapter or battery charger. There was a fatal accident recently here when someone did this. The issue is that fences attract lightning, this breaks down the insulation in the adapter and 230Vac can then make its way back onto the fence. This is why fence safety standards like IEC60335.2.76 require 25kV isolation on the output transformer.
Regards
Paul
March 15th, 2013 at 11:27 pm
Hi Radu,
I have urgent need of your device as there is a threat from bears!
Ιt’s possible to buy this device?
(please for you email and don’t show this message if not must)
Regards
Nikos
April 3rd, 2013 at 4:10 pm
pls, kindly mail a list of the component needed because i’m lost here the circuit diagram and image diagram and video have me confused
April 12th, 2013 at 9:33 am
[...] and amplitude all configurable using three potentiometers. The pulse generator is based on my 20KV pulse generator. In this case, the induction coil is replaced with an inverter, that generates a configurable [...]
April 12th, 2013 at 3:01 pm
Hi Radu, good day can you give me the voltage of all capacitors in the circuit? then the wattage of all risistors, then the rectangular white one.. thanks… hoping for your reply.
April 12th, 2013 at 5:47 pm
For caps use 25V or more. The resistors are 0.5W, unless otherwise specified.
April 13th, 2013 at 8:48 am
Thanks Radu, i’l do the cuircuit asap..
April 13th, 2013 at 9:04 am
Ok Ronnie, drop me a few pics when done, I’d like to see it.
April 15th, 2013 at 7:14 am
Is there anything I can do to stop transistors from heating up
April 15th, 2013 at 4:38 pm
@Jack: I didn’t experience any extreme heating