loading

How do I measure a short, high-voltage pulse, as in an electric fence?

I want to monitor an electric fence for signs of grounding or a break. I think the best way to do this would be to measure the current at the end of the fence, but I don't know how to convert a 6kV+ pulse into something a microcontroller can read.

The pulse:
6kV+
about 100mA
1/300th of a second pulse
1 pulse per second

Any suggestions would be greatly appreciated. I have some familiarity with hardware and I'm good with Google, but the more detailed the better. Thank you for your time.

Edit: I would like to continuously monitor the electric fence. The microcontoller would be left out in the shed and sound an alarm when the fence was grounded/broken for too long.

sort by: active | newest | oldest
Vyger6 years ago
Although it might give you some peace of mind you really don't need to constantly monitor the fence. Animals (and people) go through a training period during which they learn that touching the fence is bad. Even the most stupid animals learn after a few good shocks that touching the fence is bad. From that point on they usually will leave it alone and not even come close to it. Your fence could be down for days and would still be effective. its the threat of the shock that they learn to respect. A tune up in training might be necessary once in a while, but only the more stubborn animals will continue to challenge the fence. Whenever I moved the wire, such as to change to fresher grass, I used to walk the horses to the new fence placement and short it out while they were watching. That is all it took to set the new boundaries. I did have a goat that was a problem but even he learned eventually. I tied him to a post and set up fence wire on each side of him with a few feet of wiggle room. He bounced back and forth quite a few times between the wires before he finally figured out that it wasn't going to quit until he did.
Vyger6 years ago
When I had my electric fence running all I used to do is put a blade of grass on the grounded post and drop it onto the wire. The sizzle let you know it was working. Also how high the horses jumped when they heard the zap told how strong it was.

An alternate method is to get a neighbors dog to run under it with his tail sticking up. This however usually only works once.
rickharris6 years ago
Spark gap? I am fairly sure my electric fence doesn't produce 100 Ma - I have touched it - unpleasant but not over painful.
seandogue6 years ago
the safest way to do the voltage measurement is using a high-voltage probe. Having said that, it can be done with a properly insulated voltage divider (using a ~10M and 10K, for instance), output through a highspeed buffer opamp. Be very careful whatever you do. that's enough current to kill, so please don't become the connection to ground!!! oh...An Oscilloscope is the measurement device that will catch the event.
tehDorf (author)  seandogue6 years ago
Thank you for your suggestion, but I want to be able to continuously monitor the electric fence, so I don't think an oscilloscope would be appropriate. The microcontroller will monitor the line and when the fence is not working properly (i.e. no current detected for 20 seconds) it will raise an alarm.
I also wanted to note that it sounds as if you're doing a current loop detection to ensure the circuit is delivering current (rather than a static high-V test which does not preclude a break in the loop), which implies that you may want to consider a low value, (~1ohm or less) inline resistor in the feed line for the fence, and a sense circuit to boost the signal coming from the current sense resistor. Again, a high speed diff-in amp to apply gain to the current sense resistor would be advisable, followed by a schmitt trigger digital buffer to feed the micro.

Fwiw, you can also use a toroidal current sense element, that goes around the feed line, to generate your sense signal. This has the benefit of being isolated from the High-V line, increasing the safety factor for both you and your microcontroller
Ah...you're looking for a pulse detector. I see. google it.
Simplest way: Get a high voltage rated resistor, or several, such that you can get a current of a few mA out of the bottom to ground.

Theoretically R=6000/0.01 = 600K say BUT THE RESISTOR MUST BE RATED TO AT LEAST 10kV.

There ARE high voltage optocouplers, but if you can't get one DEFINITELY hotter than 10kV, make one: Take a PLASTIC tube, stuff one end with an LED, preferably IR, and stuff the other with a photo transistor - make SURE there is at least 20mm of separation from the "hot side" to the cold. The phototransistor can be wired directly into the micro. It would still be prudent to put a zener barrier on the micro.

Steve
Tube should be opaque....
Try a resistor, which goes into a digital galvanometer, as im sure a 6kv galvanometer would cost quite a bit.
this would mean that your voltage is cut proportionally, so if a resistor is used that cuts it down to say 60v, and you are looking for voltage drops, im sure that there is some way of outputting data into a micro controller to indicate when voltage drops below 60v, (as 4kv will proportionally make 40v , though i may be wrong) , otherwise, you could have that pulse of power trigger a relay which trips a timmer circuit that turns on and powers another relay , for a bit longer than the intervals of the fences pulses that powers a relay which is normally open ,so when no power goes into the relay it moves to normally closed, which will trip an alarm.
by timmer circuit i mean a circuit which turns on when it receives some kind of input, such as the contacts of the relay closing for a moment, and remains on for a certain amount of time.
for this to work, the timers countdown must be reset each time it receives input, e.g if the intervals of each pulse is 30 seconds, the timer must power the relay for 40 seconds or more, and its countdown must go back to 40 each time it receives input, so that it doesnt go
pulse, 40 seconds on, next pulse in 30 seconds
30 seconds later; second pulse , 10 more seconds on, next pulse in 30 seconds
10 seconds after, alarm trips, there is no power,
alarm stays on until next pulse.

all of this could easily be powerd by a rechargeable 9v being charged by solar panel and mini bost converter (3v form solar cell to 9v), or a small dc power pack.

all of this wouldnt cost much, and can all be bought form most electrical hobby shops. i am 100% certain though that all the componenets can be bought form jaycar.com.au