Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Electric fence with modern devices

SG61-addict

Junior Member level 1
Junior Member level 1
Joined
Mar 8, 2008
Messages
19
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,283
Activity points
1,503
Hello,

I'm trying to install an electric fence in my garden to protect my vegetables and trees against boars, deer and other wild game. To be effective I have to put 5 wires from 20cm to 1.5m from the soil and be quite generous with the energy discharge. I will probably build a separate circuit to drive the lower wire, I don't want to kill or over stress the neighbor's cat :)

Basically, a lot of peoples do it with a 12V battery, a car ignition coil and a power transistor driven by a 555 or any pulse generator. The circuits I've found on the web are really old and often use ugly NPN darlington...

basic hv gen.png


In theses designs, there is a big spike at the MOS drain caused by the coil at the opening at the MOS. They try to dump it:
- Adding D2 => works fine but also dump the hv pulse so the whole design is useless
- Adding D3 and/or D4 => in simulation, this have absolutely no effect
- Doing nothing and changing the switching device when dead

When simulating this design with no diodes but a real NMOS model, the Vdrain peak voltage is approximately 10-50V higher than the max Vds voltage specified in the datasheet.

What will be the good protection device if I want to use a NMOS device ?


Some rare designs are using a capacitor in series with the primary coil. The capacitor is initially charged to a medium voltage (100-300V) and then it is shorted across the coil. This more complex design looks to be less RF-noisy and less aggressive for the switching device. The medium-level voltage can be easily generated with a little coilcraft transformer (e.g. DA2032, ...).

capacitive mode.png


In simulation, this works fine with some particularities :
- Compared to the basic schematic, the output energy is much lower when output load decrease
- The primary coil of a car ignition coil is intended to be driven by a 12V signal, not 100V. The output voltage with no load is enormous. The coil insulation may be insufficient.
- Since the energy came from a LC resonant tank, the output waveform is a sine. But ok, a deer will probably not see the difference.

I really would like to build something strong and robust. Not afraid by complex electronics and modern packages.

Professional generators are really expensive. Affordable ones are either not powerful, not robust or I can probably build them for 1/10th of the price.

Any advice will be strongly appreciated :)
Many thanks
 
a normal car coil has a link from LV to HV
If you read my post you will see that I specifically specified a dual-output coil, which is isolated, not a single-output coil, which is not.
if the ckt is left to charge longer it can reach 200V
True, but that doesn't happen when the circuit is operating.
If you think that's a real concern, you can add a power Zener to limit the voltage.
 
Hi,

in my eyes the isolation between primary and secondary has no safety effect on an electric fence, since the HV side is connected to GND and the fence. So it´s the job to give an electric shock.

And for the driving circuit it makes no difference at all. It does never see the HV side.

Klaus
 
Just to be clear, a dual output lost spark type coil - has no mains isolation rating what-so-ever.
And just to further clarify, the dual-output coil has to have at least 20kV isolation between the primary and secondary, which, I think, should be sufficient for mains' isolation.
And for the driving circuit it makes no difference at all. It does never see the HV side.
And if the hot side of the mains are accidentally connected to the ground of the circuit, which is connected to the HV ground for a standard coil, you will certainly blow a fuse or open a breaker.
Is that not a difference?

Standard practice is to always isolate mains' voltage from any output.
Do you not think that's necessary?
 
Hi, I think what you need is a flyback converter, 12v to 300v.
With a proper primary clamp, RCD, or RCDZ.

Ensure the fet can withstand vin + vsec(reflected) + leakage spike.
If you use a TVS in the pri clamp, then ensure it doesnt get broken over by the
normal reflected voltage.

Both pri and sec are grounded to earth.

Make the primary current limit high enough so it cant deliever much energy.

Make sure you use ultra fast diodes throughout.
Do you want me to do a sim in LTspice and send.?

Just do resistive divider feedback.

Plain old enamelled copper wire will be good enough...but the regs wont back that...but then again, this is a one off for your own back garden?

You coudl always do two fences...a 100v fence on the outside....to shoo the cats away without hurting them...then the 300v one inside that.
I mean, you could possibly take off the two voltages from two coils on the same former

Might as well use a chip like a ucc28c43 or similar
 
Regular electric fences are nohow that complex.

I know for a fact that a car coil, a resistor, a relay and 4 NiCd
AA cells will knock you out. Unexpectedly. With no ground loop
to blame.
 
Regular electric fences are nohow that complex.

I know for a fact that a car coil, a resistor, a relay and 4 NiCd
AA cells will knock you out. Unexpectedly. With no ground loop
to blame.
Certainly it's not difficult to simply generate a strong shock at the coil output with no load.
The problem is, that output voltage can drop rapidly with the capacitive load of a long fence wire.
That's why 1 joule of spark energy is suggested for each mile of fence wire.
A standard Kettering configuration ignition coil only outputs about 0.1 joule, so would work for a fence no longer than about 500 feet.
A capacitive discharge circuit can generate much more.
 
The CD ignition uses the auto-transformer for energy transfer rather than energy storage. It may have a certain efficiency and inductance with a 1:100 turns ratio to transfer a pulse at the charging rep. rate. The primary cap @ 100V is about 200uF per Joule. Using smaller caps allows one to scale the energy spike by adding as many as you need for the impedance of the fence hopefully insulated enough to be low capacitance to ground with good insulators. Inductance will be approx 0.5 mH / km / N for the number of wires in parallel.

Capacitor costs for large e-caps can be rather nonlinear, so I would recommend comparing a variety of smaller sizes for economy of scale due to stock volumes.

For example this quality KYOCERA AVX e-cap, 100 uF+1.5 ohm 120V cap is $0.824us (10pcs) = 1mF total
Whereas a 1mF 120V 70 mohm e-cap Chinsen cap is $4.50 (1)
and a bipolar Motor start cap might be $40.

So it depends how you want to measure fence losses for the pulse transfer . Cats with long hair might detect the E-field before the barb reaches their skin. Boars will have a lower impedance. The 1:100 ratio transforms the primary cap to the secondary as 100^2=1e4 lower C and higher ESR. So 560uF becomes 56 nF out the secondary.

Modelling with various load C tells me one can see several kV or reactive resonating voltage at low frequency and then discharge of several kW into an external dielectric with maybe a hundred watts into the series resistance for 200 us. This pulse is well within the BW of ~ 20kHz of old coils.

The 40W charging resistor can be replaced with a 100W light bulb which will get hot but not glow.

1705777808208.png
 
Standard practice is to always isolate mains' voltage from any output.
Do you not think that's necessary?
I agree on this statement.
But the OP never talked about "mains powered". Never talked about AC at all. He talked about battery.
So why bringing "mains" into the discussion?

All electric fences I´ve seen are battery/solar powered.

There may be mains powered, but then I think they are using a properly isolating AC/DC supply.

Klaus
 
And just to further clarify, the dual-output coil has to have at least 20kV isolation between the primary and secondary, which, I think, should be sufficient for mains' isolation.
The problem is, in the manufacturing, the required isolation is not guaranteed as it would be for a mains rated part

you could end up with the LV coil, 0.1mm, or less, away from the HV coil inside the " potted " part and no one would ever know

the quality of the potting is not something they overly bother about - as long as the outside looks right - cost is the driver for the most part

This is why, for UL, or any 1st world country with applicable standards ( NZ, Oz, Canada, UK, the EU ), an automotive coil is not safety rated, - it is just too unknown.
--- Updated ---

in my eyes the isolation between primary and secondary has no safety effect on an electric fence, since the HV side is connected to GND and the fence. So it´s the job to give an electric shock.
Really ? if the live mains ( say 230Vac ) is connected to the output wire via a fault, or faults, you would be happy to touch it ?

p.s. there are many, many mains powered electric fences sold around the world - and applicable UL and other standards for them
 
p.s. there are many, many mains powered electric fences sold around the world - and applicable UL and other standards for them
OK. you are free to do so. You may discuss many many applications. And you may talk about selling and the whole world.
And you may discuss UL and you may discuss this and that.

But my aim is to keep on the OP´s topics.

Klaus
 
But the OP never talked about "mains powered". Never talked about AC at all. He talked about battery.
So why bringing "mains" into the discussion?
Because in post #11 the OP asked me to post my line-powered design, that's why..
Please read all the posts before dinging me.
 
Last edited:
Hi,

Because in post #11 the OP asked me to post my line-powered design, that's why..
Please read all the posts before dinging me.

No, it´s not a personal issue. It´s a technical issue.

Before posting I searched for "mains" and for "AC" ... could not be found.

So it was you who brought "line powered" into play. And I agree that the OP asked for your circuit. But I doubt he asked because it is mains powered.
****
Also I worte "In my eyes" ... to clearly state "it is my personal opinion" .. but at the same time other opinions are allowed.
I did never wrote "There is a MUST", or that all application need to follow my opinions.
I even admitted that there may be mains powered circuits - but I´ve never seen one.
What else do you want me to do to express that I´m not the "Know it all" guy?

But I also stated that "if mains powered" then you need proper isolation between mains and output.
I focussed the isolation to the power supply.

Now you use a non isolating power supply. I already agreed that this causes a safety problem.
But then I see that your SCRR is connected to EARTH_GND and your transformer_output is connected to the same EART_GND.
This would never pass a safety regulations.

Safety isolation tests for devices often tell to:
* short both mains inputs (L, N. Obviously not powered)
* short all outputs
* apply a test voltage (let´s say 1500V AC) using an insulation resistance tester between input and output.
--> your circuit will fail this test.

See Figure4: https://www.xppower.com/resources/b...lation-ratings-in-high-voltage-power-supplies

Klaus
 
But then I see that your SCRR is connected to EARTH_GND and your transformer_output is connected to the same EART_GND.
This would never pass a safety regulations.
No, the lines powered part of my circuit is not connected to earth ground.
Only the output of the dual-output, isolated coil is.
your circuit will fail this test
No it won't.
--- Updated ---

Before posting I searched for "mains" and for "AC" ... could not be found.
Then I suggest you read the whole thread before posting criticisms.
 
Last edited:
It certainly is - and they often do fail - ask any motorcyclist, - more pertinent is: would you trust a coil that is subject to no regulation whatsoever. and is made to a low price, to keep you apart from the mains ? A UL rated part will always do this - even under very adverse conditions.
--- Updated ---

remember - if one side of the HV is earthed - there is a steady 230Vac ( max case ) across the insulation all the time, 24/365 . . .

and then there are mains transients, and possible lightning strikes on the " live " wire - the motorcycle coil will not fare too well then ....
 
and they often do fail - ask any motorcyclist
Okay, I'll ask myself, since I qualify as "any motorcyclist".
I've had five motorcycles that I've driven well over 150,000 miles total (one for over 100k miles), and never had a coil failure.

And why pick on motorcycles?
There are are about 300 million vehicles in the USA, and coil failures seem rather rare here.
Do you know of someone who has had one?
I don't know of any in my 80 plus years of existence. .
if one side of the HV is earthed - there is a steady 230Vac ( max case ) across the insulation all the time, 24/365 .
Only if the neutral and hot are wired incorrectly.
And 240Vac is small compared to the 20kV spark voltage.
and then there are mains transients, and possible lightning strikes on the " live " wire - the motorcycle coil will not fare too well then
And you think an "approved" transformer will not fail from a lightening strike?
 
"
Only if the neutral and hot are wired incorrectly.
And 240Vac is small compared to the 20kV spark voltage. "

Sigh, no, the top end of C2 is effectively at mains potential relative to Earth, so if one side of the HV earth is earthed there is a constant voltage applied.

Again - it is the ( unknown ) variability of manufacture that is the biggest threat to safety.
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top