Need help with electric fence charger

Thread Starter

lukimaister

Joined Sep 18, 2020
25
Hi,

I'm a beginner in electronics and I'm trying to make an electrical fence charger for a school project, but I found a problem that I cannot solve, so I'm asking for help here.
I've got an IC555 timer that would make 1 second DC pulses on secondary transformer. I need 230v AC to power up the transformer.
My question is, how can I send those pulses, so that it activates the transformer, that is powered from 230v AC, or is that even possible?
I've attached an image that shows what I want to achieve. There is a transistor, but it doesn't work because of AC, so what can I put there instead? InkedScreenshot 2020-09-27 12.00.15_LI.jpg
 

ericgibbs

Joined Jan 29, 2010
18,766
hi luki.
Welcome to AAC.
Fence chargers usually work on the back emf principle of switching a large inductive load, not mains.

E

This example uses an old vehicle ignition coil.
 

Attachments

crutschow

Joined Mar 14, 2008
34,282
It is unnecessary, as well as dangerous, to use 230Vac for your circuit.
Use a flyback circuit such as eric proposed.
Look up "electric fence circuit diagram" for many more examples.
 

Thread Starter

lukimaister

Joined Sep 18, 2020
25
Hey. I've managed to complete my circuit, this time using an ignition coil. The output of ignition coil is too high so I had to reduce it with resistor, but as I do that the current also reduces, and it becomes too harmful for an electric fence. Is there any possiblity to fix that?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi luki,
Please post your circuit so that we can check it.
E

Update:
From your description it is very important you do NOT power the project until we have checked your circuit
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,766
hi,
Use the timing components I have shown of my circuit.
In that way you can adjust the Dwell time [ determines the size of the spark voltage] and the Rate [ the interval between sparks]

Add the components and repost your circuit.

BTW: Use an old vehicle spark plug with the gap set to 25 to 30 Thou, in order to check the spark

Body of the plug to 0V and the top terminal of the plug to the High Voltage output of the circuit
EAAA 559 18.49.gif
 

Thread Starter

lukimaister

Joined Sep 18, 2020
25
Is this alright? The dwell did work, the rate didn't, but I could just change it to 100k to make it 1 second pulse. I did get a lot higher voltage on the coil output, but I still don't understand how, would you care to explain?
Circuit- ver3.PNG
 

ericgibbs

Joined Jan 29, 2010
18,766
hi luki,
The Dwell controls how long the current flows into the inductor primary winding, the shorter the conduction time, the lower the back EMF when the primary is switched Off.

You do not show the Ballast resistor in series with the Primary winding, use a 3R [ from a car scrap yard]

Also you have shown a 1:1 transformer, an Ignition coil has a much higher step ratio than that!

The Rate control should work.

Three of these fence chargers have been working on our South African farm since 2008.

I will run a simulation on your circuit tomorrow and post the result.

E

BTW: The 1k load is not required.
 

Thread Starter

lukimaister

Joined Sep 18, 2020
25
So I was looking more about ignition coils and I found out that the ratio is normally 1:100. Before I thought that the ratio would need to be something like 1:1000, because the source is only 12v. As it turns out there is like 250 volt spike, before the primary is induced, so that explains why it could be 1:100. Am I wrong about that?
Anyway, if that statement is true then that figures why I was getting such a low output current.
 

ericgibbs

Joined Jan 29, 2010
18,766
hi luki,
This is the original circuit running in LTSpice.
It works as expected.
Note : the Dwell and Rate settings interact, so both may need a trim when setting up.
For the Sim they are set at approx 50%
Increase the R7,, 1R to say 2R or 3R if you want to reduce the HV

Your circuit has components missing!
E
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
34,282
As an alternate to an ignition coil, which can generate more voltage than desired, a 6V or 12V filament type transformer could likely be used, with the secondary used as the primary for the transistor connection.
Those should give an output in the neighborhood of a couple thousand volts, which is more typical of a commercial fence controller.

Note that whatever transformer you use, it is recommended you use a high voltage zener or transient voltage suppressor between the transistor collector and emitter to protect if from any excess flyback voltage.
 

Thread Starter

lukimaister

Joined Sep 18, 2020
25
How is that "harmful"?
Sorry for that, I meant "harmless".
I think I'm just gonna use an ignition coil as its cheap and easy to get.

Also I have really long pulses (around 200ms) on my simulation, even if I lower the dwell resistor. Maybe it's the programs bad. I'm using EveryCircuit.
It could be that I'm missing some components.
Circuit - ver6.PNG
 

Thread Starter

lukimaister

Joined Sep 18, 2020
25
I made a better simulation in LTspice using Ericgibbs's schematic, which I modified so that it gives me 5k output and 1J. Now the only problem is that one little spike before the pulse. I' also curious if those inductors parameters are valid for any ignition coil?
If not then I'l have to find them from the one that I'l buy, right?
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi,
Ref the small spike...
You should consider Lenz's Law which I noted earlier.

When the square wave voltage is applied to the coil, the magnetising current builds up to a maximum value, the current rate of rise is limited by the inductance of the coil, so the rate of change of current is over a longer period..... E = -L . di/dt
So you get a low energy spark.

When the inductor driving voltage is removed quickly, the same Law applies , but this time the dt time much shorter, so the energy is higher.

E

BTW: an Ignition coil is essentially an Auto transformer, the primary and secondary have a fixed internal path connection at their ends
 

ericgibbs

Joined Jan 29, 2010
18,766
hi liki,
Please correct the ignition coil drawing and connections on your LTS sim, they are wrong.
E

Post your LTS asc file.

AAA 573 14.52.gif
 

Thread Starter

lukimaister

Joined Sep 18, 2020
25
Well I did correct the ignition coil, but then the current output was really low. I did not include the realy part, because I don't have it and thats problably why I can't get good results. My previous schematic was ok, I only needed to get rid of that voltage spike, but I really don't know how.

I'm starting to think that this project is too hard for me, as I don't have the requered knowledge. Maybe I'l try to find easier circuit or switch project. And if I'm wasting your time just say so.
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,766
hi
You should add a MOV across the transistor, to protect it from HV spikes.
Also select a transistor for a 5Amp current, the problem will be there will not be a high enough Base drive current!!!

Look at N MOSFETs to replace the transistor.
E

Update:
Rough example..
 

Attachments

Last edited:
Top