Author Topic: Needs some pieces of advice on how to diagnose an electric fence  (Read 2878 times)

0 Members and 1 Guest are viewing this topic.

gg64

• Contributor
• Posts: 43
• Country:
Needs some pieces of advice on how to diagnose an electric fence
« on: January 19, 2019, 07:53:12 pm »

Hey,

So I am trying to figure out the problem onto an electric fence (for cattle, advertised 3J 10kV).

(The main power here is 230v, 50Hz)

Peoples already hepled me figuring what a component was.

So here is a schematic:

(schematics on QUCS: regular_sch.PNG)

So my understanding is:

the left side is supposed to provide the power to the circuit (left of the transistor here, which actually a TRIAC).

So the C3 capacitor (25µF) get charges and could reach up to 650v~(230*sqrt(2)*2)

I know it used to reach about 420v before triggering though.

Here is a simplified version of the triggiring side:

(schematics w/ grouped resistors: simplified_sch.PNG)

So the pulse tranformer and the C3 capicitor (25µF) would provide the voltage divider (1.48M/(1.48M+2.21M)).

(I know right, the voltage divider formula works if the output current is zero but there, I think the final voltage is relevant)

Therefore multiplying the voltage by 0.401 to gives charges to the C2 capacitor (4.7µF).

That would yield a maximum voltage of 260.82v (=650.44v*0.401)

So I replaced the original DIAC by a DB3 which should be about 30v-32v (threshold).

Let's take 30v for the maximum best case.

So the charging ratio would be of 11.5%~(30v/260.82v)

Which according to this website (rc circuit basically charges up to 11.5%) (:http://sim.okawa-denshi.jp/en/CRlowkeisan.htm)

Which would be about 2.1sec to reach the 30v (2.21M+1.48M 4.7µF) (R4+R8 w/ C2)

Then the discharge circuit would be triggered (allowing a current pulse through the pulse tranformer).

Another R-C would be formed when the DB3 diac would conduct (221ohm w/ 4.7µF) (R8 w/ C2)

The datasheet of the triac says (nxp bt139-600e) 1.6v to trigger it.

The discharge ratio would be 96.6%~95%~(=(30-1.6)/30).

The discharge time would be 3.1msec.

Making a cycle 2103msec.

Question:

Did I made an error ? (I think I got a PEKBAC problem, aka I am probably making a very obvious mistake)

Because I measered a 901ms cycle so I suppose I am wrong somehow, and I can't figure why my TRIACs and DIAC keep being fried for some reason...

If you guys want to know what I already did:

https://www.eevblog.com/forum/repair/electric-fence-with-an-unknnown-component/

I did some more testing but I am pretty much out of ideas (maybe I need to suppose it is a faulty diode)

Basicaly, I can diagnose the symptom but not the cause, therefore I keep frying components.

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #1 on: January 20, 2019, 03:08:08 am »
I think there are 2 obvious errors.

1st error is obvious, 2nd error is dangerous and may trip the earth leakage breaker.

The frequency is 50 hertz which is 0.02 seconds and your cycle time is nearly ~ 1 sec.... do you think anyone will design such circuit?

Maybe you  should retrace the circuit or post front and back of the pcb clearly, so that helpful members can participate to point you in the right direction despite your 2 postings already on this site.

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #2 on: January 21, 2019, 09:32:27 am »

The ground on the left would not be here, it is just for QUCS simulation (basicaly sometimes nothing beats paper and a brain).

The ground on the transformer exist IRL, you can't escape it.

In practice it would sometimes trigger the differential breaking. I don't want to fix it, because it allows a feature: know when a steady defect on the fence line-> it does not trigger it most of the time though since the differential is a 500mA. But when it does the user would go search for a fence defect. Which would occur every ~two weeks or so.

Here are some photos from the modified original board (on imgur: https://imgur.com/a/a1lfhSK ).

FYI: I already did a copy of this board (components wise and PCB wise (w/ jlcpcb and KiCad), at least I thought so ?!?), and I managed to reproduce exactly the same symptom.
And yes this circuit ran for years (this thing was made in the 80/90s I think, last service was in 2004)
Name of the original product:
PICFOR RB80

Here is a typical look of it (in French):
http://www.clotures-electriques.pyrat.net/Cloture-secteur-PICFOR-RB-80-1-247.html
http://www.clotures-electriques.pyrat.net/Picfor-RB-80-Secteur-230-Volts-184.html

So basicaly I think I measured and reproduce the problem somehow.

To answer your point about the 1st problem: the resistor are 5watts on the main side, I used 7Watts resistor on my copy.

Should I provided a Bill Of Material ? (I'll try to provide something)

Dacke

• Regular Contributor
• Posts: 62
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #3 on: January 21, 2019, 03:25:05 pm »
I'm just curious but, you said you ordered these triacs from Ebay,  which is notorious for selling counterfeit components.  I see a multiple 5 packs of BT139's there for $1.79 with free shipping and the genuine component is around 90 cents each from Digikey, which would be around$5 plus shipping.  I only say this as I've had many issues with Ebay parts,  my last experience being with counterfeit IRF510s which destroyed themselves as soon as power was applied.  I no longer order components from Ebay unless I have no other choice.  I'm just pointing this out,  you could be chasing your tail here.

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #4 on: January 21, 2019, 08:17:54 pm »
Well, I think the problem is in front of the computer (me):

I did change the pulse transformer but my own and the coil winding are a bigger section. Therefore allowing a bigger Ampere at once.

That being said, that would not explain why it did not burn right away (after I fixed the tranformer issue on it) before I fried the board (when I did not plug the tranformer correctly....).

Question: Could a non-lamented tranformer core impact a lot the capacity of transmission to the secondary that badly ? (a signal generator would help me, and even then, I don't that is the main problem)

Speaking of the TRIACs, the very first ones I fried (from Ebay) were (it seemed legit, I got 5 for 7.2eur):
https://www.ebay.fr/itm/322308031962?ViewItem=&item=322308031962&var=511208998756&ppid=PPX000608&cnac=FR&rsta=fr_FR(fr_FR)&cust=2KK89337BG366891X&unptid=a17d3d96-b79d-11e8-86af-441ea1472d58&t=&cal=63a2a5576fd82&calc=63a2a5576fd82&calf=63a2a5576fd82&unp_tpcid=email-receipt-auction-payment&page=main:email&pgrp=main:email&e=op&mchn=em&s=ci&mail=sys

So since the coil winding was bigger than before, could it just be a pulse way to high ? Because when I think about it:
(see simplified_sch_25u_short.PNG)

Those triac are rated 16A, I am thinking I am way over that (I don't have an oscilloscope :/)

For Your Information, there was enough energy to either blow up the triac or the track (probably bad soldering after several attempt).

During my last attempt (for science): I also managed to blew up a part of the track by shorting the 1 and 2 on the triac. I am not really astonished by the energy (0.5*420*420*25*10^-6=2.2 Joules) but mostly bother by the fact that did not got transfered to the secondary somehow.

Do I need thin wire to help getting voltage at the tranformer primary ?

Reason: Limiting the current-> by resisting, because the orignal tranformer got a an isolating tape that look like it is heat resistant.
I know that is also because of likelyhood of arcing at 10kV

I might tried with a 1000 resistor in serie, to see if the triac survive.

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #5 on: January 22, 2019, 06:42:30 am »
OK, I got a bit of time to study this circuit.

C1, C3 and associated Diodes act as a Voltage Multiplier.
The device on the Sim is not a triac but a mosfet. I don't know why you select that, but my comment is;
Since the actual firing [when c2 charges up on alternate half of the power, is enough to fire the Diac], current is only 1 direction only, never both ways,
hence a SCR thyristor can be used instead.

The device used must be able to withstand at least Vdrm of 650V and with the current limit resistor as you have used, I recommend BT258-800R SCR, for example. Your selection of a mosfet is incorrect in your sim.

The output transformer in your sim, I suppose is preliminary with a ratio of only 0.03 step down.... but incase of actual step up, its going to be very dangerous without proper limit HV resistors in circuit. Just a word of caution there.

Cheers;

[EDIT: C3 must be able to withstand at least 600V similarly, assuming very long firing time. Hence this is a lethal circuit to be handled with care. The mosfet in your sim is only rated at 100V. Of course all this depend on the firing time or time for charging in the trigger circuit selection].

« Last Edit: January 22, 2019, 06:58:00 am by Armadillo »

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #6 on: January 22, 2019, 09:16:36 am »
Hey,

I tried to use a TRIAC inside QUCS but I got poor (the 25µ was charging, the triac was not triggerred, the diac was nice IIRC)/no results.

By the way the transformer is actually define (in QUCS) by the inverse of the factor for some reason, hence the 0.03 instead of 30. Unless I switched primary and secondary.

I find out about the voltage multiplier circuit recently actually.

The 25µ is rated at 450v maximum voltage, before frying the board I remember it used to charge up around 420v and trigger.

For the caution part, yes, after my first try, I am using an extenion cord with a switch, since the main is really too easy to reach.

I might give the BT258-800R SCR a try but the previous (and factory) component was a NXP BT139-600E or NXP BT139-600, (I am not sure about the E part but I am sure about the voltage).

In some technical data onto the French website (http://www.clotures-electriques.pyrat.net/), the pulse time was 120µs (it is a PICFOR RB80):

http://www.clotures-electriques.pyrat.net/Picfor-RB-80-Secteur-230-Volts-184.html

And the Itsm is 155A on the bt139-600e (but I am not sure If I am reading this right) (I think I am way above that).

http://biakom.com/pdf/BT139-600E_NXP.pdf

On fig.4: this is full sin wave cycle, I have no idea how it will behave for my case.

On fig.5: there is a dIt/dt limit, since the the pulse is supposed to be in the µs kind of order, and it is out the graph.

This confirm the current limiting resistor I was willing to give a try. Because I am not sure if it is a maximum derivative which would destroy it if I exceed it.

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #7 on: January 22, 2019, 09:28:56 am »
The limit is set by R8 and I don't know the value of 221 ohms is how you get it, but that's limit the current to less than 3A. So that R8 also plays a vital role in Components destruction if not size correctly.

The QUCS, I pronounce it as Quack Quack..... if you know what I mean.

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #8 on: January 22, 2019, 10:32:50 am »
Thanks for the reply, no the capacitor (25µF) is shorted by the triac.

You can look at the schematic, R8 is on the command part, not for the power side.

« Last Edit: January 25, 2019, 07:05:03 pm by gg64 »

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #9 on: January 22, 2019, 11:05:39 am »
Oh yes I can see it now.

Then the triac is going to blow because no current limit, you need to put something there to limit the current, though the transformer reactance does limit the current, so you better calculate it. what did you simulator says the peak current without the resistor?

Also where did you find a 25uF capacitor that is rated at >600 V Interesting Value but practically I have not seen one so big in electronic. In electrical yes, they call it capacitor bank house in big cabinet.

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #10 on: January 22, 2019, 11:34:04 am »
Yeah it is a big capacitor but on regular operation it would not go above ~450v.

I blew up one triac with a 221ohm (1/4watt one).

I tried again but with a 1000ohm 7watt, nothing (I need to replace the diac, it should be dead, it is not the first I blew one up).

I will keep you updated.

Hopefully the voltage don't go too high during the pulse (due to the discharge time which might overlap with the main power).

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #11 on: January 22, 2019, 12:05:26 pm »
Ok so I tried with a triac and new diac. I could measure 618v to 612v in dc mode (at 25µF) with a 1k 7watt resistor onto the 1 pin of the triac.

It seems to oscillate with about a 1Hz frequency, I measure at the diac as well, I get 26-31v oscillation. (I suspect that the diac is polarized ?!?, I Will check this eventually)

So it is not blewing up but not working either. The command seem to trigger but the current is probably not enough. No spark on the secondary...

For measuring the inductance, I only have multimeter and capacitor, and I am not really hype on having to mess to much with the main...

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #12 on: January 22, 2019, 12:14:27 pm »
My Sim Model attached;

It shows the problem;

The Peak voltage can hit as high as 763V due to some back emf by just a 1uh primary side transformer. Either you design a snubber or select a SCR high enough for it. and be weary of the transformer inductance.
The Peak current with a limit of 100 ohm Resistor and the 1uH transformer is 3.26A
The Peak Spike Current with ZERO OHM limit is 1830A !!!
The trigger happen at 0.53 seconds with the value as shown.

The following users thanked this post: gg64

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #13 on: January 22, 2019, 01:03:36 pm »
Thanks for the working simulation . I might give another try after work, I need to go to work.

What did you use for simulation ? I tried several software but this one looks familiar but I can't remember the name, LTSpice ? (I already got familiar with several, orcad, qucs, altium, and so on).

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #14 on: January 22, 2019, 01:47:06 pm »
Yes;

There is a mistake in previous model. The circuit fires One Shot and didn't recharge because the triac remains On, I noticed.

Attached, revised with the missing resistor at the gate and the revised waves. The resistor is necessary.

Regards;

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #15 on: January 22, 2019, 09:07:30 pm »
Hi;

If you are still having problems, probably its time to check your HV transformer for open or shorts from last known unlimited pulse, for example.
If you have a DSO, you can ring test it or if you have a ring tester better still.

fzabkar

• Frequent Contributor
• Posts: 436
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #16 on: January 22, 2019, 09:53:39 pm »
ISTM that the value of L1 can be chosen by assuming that all of the energy of the capacitor is dumped into the inductor/transformer.

So 0.5 x C x V squared = 0.5 x L x I squared

L = C x V^2 / I^2 = C x (V/I) squared

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #17 on: January 22, 2019, 10:01:19 pm »
You are right, actually.

But that will mean that the transformer has got to be changed to suit the cal.

It would be easier to measure the self inductance of the coil to adjust the circuit to suit it since physical transformer is unknown.

Also how much juice will not kill the cattle.....  no ideal.

ISTM that the value of L1 can be chosen by assuming that all of the energy of the capacitor is dumped into the inductor/transformer.

So 0.5 x C x V squared = 0.5 x L x I squared

L = C x V^2 / I^2 = C x (V/I) squared

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #18 on: January 22, 2019, 10:06:48 pm »
Oops ! in the first post;

LOL.....

[Edit; the time constant 0.53 sec is still not long enough. The charge must be at least minimum >500V]

« Last Edit: January 22, 2019, 10:11:29 pm by Armadillo »

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #19 on: January 22, 2019, 10:38:35 pm »
I wish I had one Digital storage oscilloscope as well.

A 2Msamples/sec dual channels would be enough for most of what I need to do.

(Maybe checking fuel injection as well with it ? )

Anyway I got a schematic working in LTspice XVII.

I did a copy of yours to check if I can get it working.

Did you used stock components or some found on the internet for the diac and triac in LTspice ?

Could the 100ohm resistor need to be bigger than a 1/4watt ?

I already tried with a 220ohm 1/4Watt it blew up the triac. I think it made an arc therefore shorting the resistor, and thus shorting the capacitor completly again (I saw a big flash.... )

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #20 on: January 22, 2019, 10:44:03 pm »
Just so you know, I got video footage with me playing with the new tranformer before I fried the board.

I used to do spark about 8mm long (about a third of inch). And no it won't kill you because the pulse is too short to be an issue (like the french website would say, about 120µs).

http://www.clotures-electriques.pyrat.net/Picfor-RB-80-Secteur-230-Volts-184.html

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #21 on: January 22, 2019, 10:50:08 pm »

Better be sure than be sorry;

Its how much in how short the time.

[Edit: Oops yah the time is really short. Always have been trained to be coward when it comes to high voltage...... hahahhaha the french is right.]

« Last Edit: January 22, 2019, 10:53:12 pm by Armadillo »

gg64

• Contributor
• Posts: 43
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #22 on: January 22, 2019, 11:00:18 pm »
Well I do agree that you should use the moto: better safe than sorry. But I actually like the modification you did. I have ideas how to modify it so it fits my 'requirement'.

At least thank to you guys I am moving foward. Not doing this anymore.

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #23 on: January 22, 2019, 11:04:29 pm »

Could the 100ohm resistor need to be bigger than a 1/4watt ?

I already tried with a 220ohm 1/4Watt it blew up the triac. I think it made an arc therefore shorting the resistor, and thus shorting the capacitor completly again (I saw a big flash.... )

Yoo, you need to be WARY of your existing transformer inductance. It is the inductive reactance + the limit resistor that limits the current and affect the back emf.
I suspect the transformer is shorted some turns in the primary. The inductive reactance is way too low already. It would be better to eliminate the limit resistor come to think of it, otherwise it would be really nonsense too big in size. I think, the primary inductance should be much much more than 1uH.

Why don't you try take away the limit resistor and insert increase the size of the primary transformer inductance to from 10uH ~ 1mH in the primary thus eliminate the limit resistor and also find out what is reasonable inductance to be used to check the HV transformer whether it is defective. I hope you know what I am saying. I am not at my station now, so can't SIM it.
« Last Edit: January 22, 2019, 11:07:29 pm by Armadillo »

• Super Contributor
• Posts: 1725
• Country:
Re: Needs some pieces of advice on how to diagnose an electric fence
« Reply #24 on: January 23, 2019, 02:34:16 am »
With the above learnt knowledge, I am confident to say;

Your HV transformer primary is shorted resulting in a lack of inductive reactance causing the current to overshoot the limit of the triac.

Test Method: LCR measure the primary self inductance of the Primary coil of the transformer, it should NOT be less than 200uH.
Preferred Method: Compare a know good transformer with the DUT.

Attached the components value selection that will produce the 10KV pulse and close to 3 joules of energy without the limiting resistor.
With this selection the original BT139-600E "must" be used.

Smf