A Homemade Fence Charger, Energizer

The electric fence charger circuit presented here is basically a high voltage pulse generator. The super high voltage is derived from a commonly used automobile ignition coil.

An astable multivibrator is used to generate the required frequency to drive the ignition coil. Another astable is used to control the pulses supplied to the fence.

Protecting Crops with Fence Charger

If you have large agricultural fields and desperately need to protect the crops from uninvited guests like animals and possibly humans, then this electric fence charger device is just what you are looking for. Build and install it yourself.

An electric fence is an electrified high voltage barrier which produces painful shocks if physically touched or manipulated. Thus such fencing basically function as deterrents for animals as well as human intruders and stop them from crossing the restricted boundary.

The present circuit of an electric fence charger is designed and tested by me and has proved sufficiently powerful for the application.

20kV from the Sparks

The fence charger circuit is able to produce voltage pulses up to 20,000 volts, needless to say about the fatality rate involved with it. However the pulses being intermittent, provides the subject with enough time to realize, recover and eject.

The generated pulse is so powerful that it can easily arc and fly-off between short distances of around a cm. so the fencing conductor needs to be separated adequately to avoid leakages through arcing and sparking. If not tackled, may drastically reduce the effectiveness of the unit.

Here the generation of high voltage is primarily carried out by an automobile ignition coil.

The winding ratios of an ignition coil are specifically designed and intended for creating high voltage arc between a two closely spaced conductors inside the ignition chamber to initiate the ignition process in vehicles.

Basically it’s just a step-up transformer, which is able to step-up an input applied voltage at its primary winding to monstrous levels at its output or the secondary winding.


CDI based fence charger circuit

IC 555 enhanced fence charger circuit

Let’s diagnose the proposed electric fence charger circuit more deeply.

 Simulation and Working

In the CIRCUIT DIAGRAM we see that the entire circuit is basically comprised of four stages.

A DC oscillator stage,

An intermediate 12 to 230 volts step-up stage,

The voltage collector and firing stage and the super high voltage-booster stage.

TR1 and TR2 are two normal step-down transformers whose secondary windings are connected through SCR2. TR1 input primary winding may be selected as per the country specification.

However, TR2 primary should be rated at 230 volts.

IC 555 along with the associated components forms a normal astable multivibrator stage. The supply voltage to the circuit is derived from the secondary of TR1 itself.

The output from the astable is used to trigger the triac BT136 and the whole system, at a particular fixed intermittent rate as per the settings of P1.

During the ON periods, the triac connects the 12 volt AC from TR1 to the secondary of TR2 so that a 230 volt potential instantly becomes available at the other end of TR2.

This voltage is fed to the voltage-firing stage consisting of the SCR1 as the main active component along with a few diodes, resistor and the capacitor C4.

The fired voltage from SCR1 is dumped into the primary winding of the ignition coil, where it is instantly pulled to a massive 20,000 volts at its secondary winding. This voltage may be suitably terminated into the fencing.

The high voltage generated by this electric fence charger will need to be carefully applied across the whole length of the fence.

The two poles from the ignition coil connected to the fence wiring should be kept at least 2 inches apart.

The pillars of the fence should be ideally made of plastic or similar non conducting material, never use metal and not even wood (wood tend to absorb moisture and may give path to leakages).

Parts List for the explained electric fence charger circuit using SCR

R4 = 1K, 1WATT,

R5 = 100 OHMS, 1WATT,


C4 = 105/400V PPC,


IC = 555

TR1 = 0-12V/3Amp (120 or 230V)

TR2 = 0-12V/1Amp (120 or 230V)




The above concept can be also implemented using a BJT for the generating the triggering pulses for the transformer, as shown below

fence charger circuit using switched IC 555 ignition

Please increase the TIP122 base resistor value to 10K for reducing increased dissipation from the transistor.

Adjust the 1M pot such the ON time of the IC 555 is much shorter than the OFF time, for reducing current consumption.

Video showing the 20kv generation from a basic fence charger circuit set up on work bench.

Mini Fence Charger Circuit

The discussed fence charge above is relatively lager and stronger with its specifications, if you need something smaller, then the following mini fence charger circuit can be quite handy, an may be used for driving away pests like cockroaches, slugs, worms, snails from any desired small premise such a terrace garden, balcony pot plants or simply for guarding food stuffs etc.

Simulation and Working

The referred circuit for the mini fence charger is shown below, it may be understood with the help of the following points:

The top part of the transformer winding basically delivers a reinforcement to the base of the transistor by means of C2 the T1 keeps being confined on to the conduction status until C2 charges completely, ending the latch and compelling the transistor to commence the conduction sequence afresh.

R1 that may be a 1K resistor is installed to restrict the base gain for T1 to secure inhibits whereas VR1 that could be a 22k preset could very well be tweaked for acquiring an effectively pulsating T1 rate.

C2 could be additionally fine tuned by attempting supplementary values until the maximum output is accomplished at the trafo output

Transformer Specs

The transformer could possibly be any iron-cored step down transformer (500mA) commonly employed in transformer version AC/DC power supply devices.

The output immediately across the transformer output may be at the evaluated secondary level, for instance whether it is a 220V secondary, in that case the output could possibly be anticipated to be with this levels.

The above degree could possibly be even more heightened or stepped up by means of the connected diode, capacitor charge pump set-up corresponding to cockroft-walton power generator system.

The set-up boosts the 220V level to scores of volts that could be compelled to spark across an accordingly deployed finish terminals of the charge pump circuit.

The above end high tension end terminals could be appropriately wired up across the whole length of the area which needs to be guarded from the bugs and for implementing the intended fencing charging operations.

The fence charger wires must be separated by some minimum distance so that the sparks do no keep flying of even in the absence of any external intrusion from the insects.

The explained mini fence charger circuit concept could be furthermore utilized in mosquito swatter bat purpose by swapping the iron cored transformer with a ferrite core counterpart.

Circuit Diagram

small ferrite transformer based fence charger circuit

Need Help? Please send your queries through Comments for quick replies! And please Bookmark my site :)


Swagatam said…
the negative terminal is the ground point.

the positive terminal goes to C4.

the central top cap is the high tension terminal.

you may refer to this diagram

Swagatam said…
The capacitor accepts and stores the 220V input, and in the process when the firing limit of the SCr is crossed, the SCR fires and shorts the capacitor leads across the connected winding of the coil discharging the cap voltage into the coil. This discharge is stepped-up by the coil to the specified levels at the high tension output....so this is how it works.
Rakshak said…
dear sir sir how measure 20,000 v
Swagatam said…
it's current that may be lethal, not voltage, it will depend on the transformer current rating.
hai......this circuit is very use full to my home...for wild elephants...please correct diagram send to me..my email address is - madushankagamage445@gmail.com -
Swagatam said…
a simpler solution is to pulse TR2 directly with the IC555 via a transistor or a mosfet and eliminate TR1 entirely from the CDI circuit.
surya smart said…
how can i measure the ampere from tranformer?
Swagatam said…
connect meter prods directly across the secondary output wires, in the AC Amp range
Abu-Hafss said…
Hi Swagatam

1) According to the circuit description, the right transfo should be labelled TR2 and the the left one as TR1.

2) What is the purpose of the diode in the lower right corner, next to the capacitor?

3) Is it important to connect one lead of the primary to one lead of the secondary, of the 2nd transformer?
Swagatam said…
Hi Abu-Hafs,
2)the diode is for grounding the negative spikes.
3) yes it's very important for providing the ground to the scr with reference to its gate voltage.
Abu-Hafss said…
Hi Swagatam

For my CDI bench test, I want to switch off the traic whenever there is trigger pulse. Please check if following configuration is OK:


I haven't used traic before so please suggest me suitable values for the resistors and how much collector current would be enough to operate BT136?
Swagatam said…
Hi Abu-Hafss,

It's correct, the resistor can be any value between 2k and 10k as the triac would require just 15mA or even less to trigger fully.
Ramesh Valaki said…
dear sir
i want to make solar fence enegiser. i m from chemical field so don't have technical info.so plz guide me for the same. can we have ready made circuit for energiser?
Swagatam said…
Dear Ramesh,
I think the following circuit will be perfect for your applications:

samaj said…
Hy Swagatam

i like your ckt but have some questions

there is some difference in the part list and fig -2 also some parts from fig 1 also differ from fig-2
so which is completely write part list or fig-1 or fig2

Swagatam said…
Hi Samaj,

I'll do the necessary corrections soon. thanks
vikas loh said…
hello sir
any idea about make alarm circuit when fence wire is short.
please give me circuit.
Swagatam said…
hello vikas, it could be implemented using a current sensor stage.....if possible I'll try to update it in the above article.
Atif Javed said…
sir can y guide me whats the exact purpose of first circuit which make a alternate voltage and how its operate
Atif Javed said…
and what is 1M pot is it a variable resistor which adjust the frequency
Swagatam said…
the first circuit is explained here:

Swagatam said…
yes it's for adjusting the 555 IC frequency
mukptl said…
hi Swagatam
i made this fence circuit but its working fine for 1 minutes
after 1 minutes traic BT136 getting hot and spark stops
whats cause for that ?
Swagatam said…
Hi mukpti, you can connect a heatsink with the triac or use a 10ohm/5 watt resistor in series with its supply leads

mukptl said…
thanks for reply
now am changing from 230 ac to 12 dc power supply options
for that i am going to replace bt136 with tip122 and 1k resistor with 100 Ohms that connects to tip122 Base
but i not sure with 3 legs of tip122
1st leg of tip122 connect with output from timer 555
2nd leg with TR2 and 3rd with ground wire
is that correct ?
Swagatam said…
I can specify the leg orientation here, but it would be better if you check it through an image.

just type and search TIP122 datasheet and you'll be able to get the complete info regarding the device, or you can click the "images" option in Google search for getting an instant view of the same
mukptl said…
Thanks a lot
i made it working but still tip222 getting hot
Swagatam said…
it will get hot, you will need to add a heatsink to it.....also try increasing its base resistance from 1K to may be 22k or even higher.
mukptl said…
can tip122 replace with MOSFET irfz44 in 12v dc model or BT136 replace with MOSFET irfz44 in AC230 model to solve hitting problem ?
Swagatam said…
mosfet cannot be replaced with BT136....it can be replaced with TIP122 in the DC model
Blue boy said…
Hi will this work on a colourbond roof? I'm desperate to stop intruders, thank you
Swagatam said…
the wiring will need to be done as done for fences, if you just connect it to the roof it won't work
mukptl said…
can we remove TR2 and use direct 230 ac ?
if removed tr2 and trigger SCr from 555 will work ?
please see this
Swagatam said…
In your drawing the SCR will instantly burn, since it's directly connected across the mains...and anyway it looks dangerous.

instead, you can try one of the designs shown in the following article:

Gom Dorji said…
Sir, I have read your home made electric fence energizer and found very simple designed and cost effective. So m also planning to design one electric fence energizer with following parameters;
Input 12v DC
Pulse width 100micro secs
Maximum output is 2joules
working length is 200m to 40km.
Therefore can you kindly advice me.
Swagatam said…
Gom, pulse width can be set by adjusting the 22k resistor value appropriately.
however I am not sure about the joule calculation,, you can probably do it by yourself.

for 40km length you may have to install many such circuits at appropriate intervals for enabling an effective outcome from the units.
Gom Dorji said…
Thank you for your reply. Let me try it .
vishwa karanth said…
hi swagatam,
Can we use this circuit to energize 4KM ?
Swagatam said…
Hi Vishwa, yes it looks possible since the voltage is high enough, around 20kV
Gom Dorji said…
Sir, since the output voltage we get is in pulse how can we measure output voltage?
Swagatam said…
Gom, 20kV can be difficult to measure with ordinary DMM....but it's not required...you can judge it visually...if the spark is able to fly across a 1cm gap or more then it's well over 20KV
Unknown said…
sir give ur number pls
bursach said…
Hi Swagatam, is there any PCB for both circuits?
Swagatam said…
Hi Bursach, sorry no ready PCB designs for the circuits
bursach said…
Ok, I will make my own. Can I use for example Myrra transformers to montage to pcb? The second Tr I have is 2x1.25A, is it sufficient or it has to be just 3A?
Swagatam said…
The transformers are ordinary step-down iron core type since these are supposed to be used with the 50/60Hz from the mains, ferrite versions will not work
bursach said…
I think these are ordinary transformers but compact, check this link, what I mean :

I think these Tr are not ferrite.
Swagatam said…
yes, these can be used!
bursach said…
Thanks Swagatam, I suppose 2x1.25A= 2.5A for Tr1 with 30VA and 2x12V will be enough ?
Swagatam said…
The specs for both the trafos could be approximately 0-12V/1Amp/220V
bursach said…
Thanks Swagatam, one more question, the high voltage bobbin I have has primary with marks 15 and -. The secondary of Tr2 going to one primary of the bobbin I suppose to + (15). From SCR , end going to minus (-) and earth of fence. End of C4 going to bobbin secondary. The other end of secondary bobbin going to fence(high voltage). My bobbin is from a car, and has short with one end of primary and one end of secondary. Will this work in this way?
Swagatam said…
Sorry Bursach, I am not quite able to figure out your trafo specs from those markings.

I think a relatively easier schematic is discussed in the following article which you can try with less difficulty:


you can try the first diagram

yes the SCR left pin will go to the ground

end of C4 is going to the primary pin of the ignition coil

If you are using a car ignition coil, then probably you could take the help of the diagram presented in the following article

bursach said…
Ok, I will give I try. But beside this car bobbin everything seems to be clear to me .
Thank you!
Swagatam said…
sure! wish you all the best
sanjay bharvad said…
Hello Swagatamsir
I want to add siren with this circuit for fencing use to protect my farm .... When wild animal touch wire I want to blow the siren ....plz help me

My mail id Sanjaybharvad138@gmail.com
Swagatam said…
Hello Sanjay, the siren will need to be configured separately by using some other concept such as through an IR based alarm system or a vibration detector etc...It cannot be done within the above explained circuit...
Thushara said…
Hello Swagatam,

The circuit works,But,
1)The output pulse length is short,if adjust the 1M pot.
2)Not work with 12v Dc Battery.
Pls help me.
Swagatam said…
Hello Thushara, the circuit will definitely work with a 12V battery but make sure it's rated at, at least 7 ah

for increasing the pulse length you can try increasing the 1uF capacitor to 10uF and see the difference...and also replace the 22K resistor with a 100K pot so that you get an additional option for optimizing the PWMs
Lalith Bandara said…
Hi, is there any place to buy this as a Electronic Kit? Thanks
~ô¿ô~ said…
The charger design discussed here is not considered low-impedance output is it? If I understand correctly, a low impedance current would have a final transformer with a low ratio winding.
Jan Van Vuuren said…
Hi Swagatam,
In my country we have a huge problem with armed car hijackers. I want to know if I can install your unit in a car so that it can be activated when you are high jacked. I want to connect it to the chassis of the car so that when the hijackers touch the car they will be shocked by the high voltage. Hopefully this will deter them and they will seek easier targets.
Do you think this can work? I am especially concerned that high voltage can cause a spark in the fuel tank of the car.
Kind regards
Swagatam said…
Hi Jan,

I am afraid that may not be possible, because the car body is huge and this might make the impact very weak, and even if it was made strong it can't affect the intruder since the intruder would be wearing shoes, and without an earthing the shock would become ineffective, so the concept won't work as assumed by you.

and yes the fuel tank is another crucial thing which might need to be considered...
Jan Van Vuuren said…
Thank you for your advice.
Bhargav Patel said…
Hello sir,
With the DC Circuit how much area of the farm can be covered? maximum?
Swagatam said…
Hello Bharghav, you will have to test it practically, it will be difficult to assume it..
jody said…
I made a fish shocker using a ign coil which lead do I let grag the lake bottom
Swagatam said…
obviously it's the high tension cable from the ign coil block which you should use for the shock.
nwn said…
if i need to get 8kw from this ciruit, what kind of changes has to be done?

Swag said…
Hi, you will have to build a custom transformer, and use mosfets for triggering the primary of the trafo. It will be like a 8kW high frequency inverter circuit
bhanu ss said…
Hallo sir, i want to make a flying insect killer from your mini fence charger circuit. so please suggest me which type /model/number ferrite core transformer should i use in that circuit ,instead of iron core transformer?? what are the values of c2,c3, c4 and c5 . does the c4 and c5 are ppc one ? thanks in advance
Swag said…
Bhanu, the concept presented in the following link will perhaps fulfil your specific need:

bhanu ss said…
thanks a lot for your quick response!
Sir, in above mentioned mini fence charger circuit, what is the value of the TRANSISTER "T1" ?
Swag said…
You can use 2N2222, 8050 or TIP31, or D1351

Contact me for Customized Circuits


Email *

Message *

 Follow on G+  Follow on Facebook   Follow on Tweeter  Follow on G+  Follow on G+

Follow Homemade Circuits