Shop OBEX P1 Docs P2 Docs Learn Events
Electric fence HV Pulse generations circuit using a spin program as the timing — Parallax Forums

Electric fence HV Pulse generations circuit using a spin program as the timing

sparkssparks Posts: 11
edited 2008-02-27 14:28 in Propeller 1
I am seeking to use a propeller chip or basic stamp 1/2 as the active timing and control element for an electric fence for wildlife and domestic animal / security control purposes.

I have been looking at a 2n2222a/2n3055 driver circuit that was featured as a project called "the time machine" that was used to drive a standard 12v ignition coil(I am told GM coils are the best for HV experimentation) to make a low lost very reliable electric fence for stock animal control purposes on a ranch.

the schematic for same can be found here http://www.homepower.com/files/electricfence.pdf

I am using the 2n2222a/2n3055 / the HV generation circuit(driver transistors and the coil) plus an optoisolator to the i/o pins of a propeller chip protoboard.

I will use a program written in spin or forth or basic to give the necessary short pulses and duty cycle for same to power the HV section of the circuit.

I would like to sample the resistance between ground and the hot wire inbetween HV pulses to see if the animal has moved away from the wire yet.(without frying my input pins) (dropping resistor coupled to an optoisolator?)


Any ideas and thoughts very welcome


gwen

Comments

  • phil kennyphil kenny Posts: 233
    edited 2008-02-25 20:17
    I don't have any direct experience with driving an ignition coil, but my
    first approach would be to sample the current, preferably on the input
    side of the coil first with nothing touching the fence. Then once more
    with something simulating an animal.

    Measuring the current waveforms with a scope is best.

    You may have to use a peak detector and appropriate filter to find out
    what the highest level the charging current reached in each case. The filter
    would be there to minimize spikes from ringing.

    If looking at the input current didn't give reliable results, then use a
    suitable current sensing resistor on the ground side of the output from
    the coil.

    I'd sure stay away from the HV business end.

    phil

    Post Edited (phil kenny) : 2/25/2008 9:46:03 PM GMT
  • Nick MuellerNick Mueller Posts: 815
    edited 2008-02-25 21:47
    > I would like to sample the resistance between ground and the hot wire inbetween HV pulses to see if the animal has moved
    > away from the wire yet.(without frying my input pins) (dropping resistor coupled to an optoisolator?)

    You can see that on the primary side of the coil. If the peak voltage after switching off is less that with an unloaded secondary side, you do have some load.

    A bit saver, but you still can get several hundred of volts on the primary.


    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • OwenSOwenS Posts: 173
    edited 2008-02-25 22:49
    Ignition coils, flybacks, and other high voltage supplies are not safe for contact with animals or humans, especially without special precautions. TASERs are powered by flybacks, which emmit much lower currents than ignition coils can, and feature saferty precautions, yet people die from them every year

    Should the voltage travel through the heart, which cannot be ruled out, 1ma AC is sufficient to cause ventricular fibrillation. Alternatively, there is a risk of burns caused by the short arcs that such voltages can produce. Finally, HV traveling down nerves damages them, sometimes permanently.

    I know my HV quite well. Keep yourself and animals well away from it.
  • sparkssparks Posts: 11
    edited 2008-02-26 02:05
    Hi Owen,
    I was planning on a very low duty cycle for the HV pulse to lower the total amperage(and am current limiting in the circuit I am developing also)(similar to the taser patents(btw its a custom wound series of coils driven by microprocessors in the taser M18 and M26/X26(I have 2 of the M18 disassembled on the bench) and examining the patents shows the activation signal for same for same , ie the X26 loads its duty cycles/modes of operations from a 128k flashram in the battery part(ie not a naked battery) and uses capacitor(s) to store charge..

    I will not be using same. I too also am somewhat conversant with voltages and shocks and effects and will be avoiding the 2 stage charging of the taser x26 patents as the 2000v shock used after the 50k shock is far more dangerous, and this circuit wont be used to charge taser cartridges just 18-36km of stock control fencing [noparse]:)[/noparse].

    and I am aiming for about 20kv out in very short pulses(and yes I have a 50kv probe and several Oscilloscopes available to me, and I dont wear personal jewelry(earlier mishap never to be repeated 30 years ago)).

    while I appreciate your caution owen, my only concerns at this point (which I will settle tomorrow with a picaxe chip is NOT destroying the processor on the first pulse(which would instantly shut it down also). so need to build a circuit and experiment .

    The reason for the ignition coil and bipolar driver transistors is protection from induced pulses from nearby lightning strokes and longetivity in operation(ie built tougher than a flyback) other than that its just another coil in my spice simulator [noparse]:)[/noparse]

    gwen

    and the driver in the case is a pulsed DC circuit waveform keep min mind this is a circuit under development not a finished product yet..
  • OzStampOzStamp Posts: 377
    edited 2008-02-26 05:54
    Hi Gwen.

    With interest I read your post ..
    Repaired a few of these HV electric fences over the years for mates..( at mates rates..)
    Ranging from simple to most complicated...
    The most complicated fence controller I have seen even does not have a micro controller in it.
    So a Propeller would be overkill to the MAX...and really a waste of hard earned dollars..

    Most commercially avaialable fence controllers use a 4060 Cmos oscilator timer chip
    that couples to firing a TRIAC that drives the coil ( LV TO HV) they have very simple power supplies in them..

    Basically just a CAP + RESISTOR + ZENER to give you a 12VDC (from 240VAC here in OZ)
    circuit or so to power up the CMOS chip

    Even a picaxe would be overkill..

    Cheers Ron Mel OZ..
  • OwenSOwenS Posts: 173
    edited 2008-02-26 11:56
    It does sound like your taking precautions. My wording was perhaps a bit strong, but I guess I'm just too used to people trying to do stupid things with HV transformers, and forgetting to make sure things fail safe, or are indeed safe in the first place.
  • JavalinJavalin Posts: 892
    edited 2008-02-26 16:14
    Perhaps if you're keen on using a micro-controller an Parallax SX would be fine. Running SX/B (basic language) would be easy to write and the chip is very cheap < £5.
    Also - can you post the pdf - the link doesn't work but i'd be interested to see the schematic of an electric fence!

    James
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-02-27 02:38
    This is interesting. My dogs constantly get out and I've tried an electric fence. They're terrified of the fence, but the problem is keeping it UP and NOT shorted. I'm kind of doing the same thing as you, except I'm building a tiny dog collar that has the prop running a small 1" toroid custom wound transformer. I can get about 1KV out of it which is more than enough to shock the Smile out the dog if it gets out(literally....). I'm not suggesting you make collars for cattle and what not, but I use a highspeed opto-isolator to prevent the EM from the coil from effecting the prop. Food for thought.
  • Beanie2kBeanie2k Posts: 83
    edited 2008-02-27 12:19
    @Phildapill

    You might take care to mind any animal cruelty laws in your area. There's an old saying: "The road to hell is paved with good intentions." In this case it may not be hell but prison and we would hate to lose you.
  • bambinobambino Posts: 789
    edited 2008-02-27 14:28
    I don't use an electric fence, but I have used trainer collars. Rufus " the dog in My avaitar picture" wore one as a puppy, while in training. I tried a few different versions. As a rule of thumb, if I was afraid to put it on me and push the button, "I didn't use it".
    I found the devices worked best when the animal recieved a warning thru a piezo speaker first, then a shock if they didn't comply. After about two weeks, the only thing needed to train new behavior was a piezo speaker.

    Once a bad habit has been cultivated in an animal, the correction may or may not work, no matter how high the voltage. My first, Bulldogs 20 years ago, would not stay in the yard. So I opted for a commercial electric fence. It would deter them only if they had nothing better to do. This point was proven when a nieghbor "with whom I had a few unkind words with" thought It would be interesting to lay fried bacon over the wires. Much to his suprise, the dogs where still licking the wires even after the bacon was gone.

    The real solution with untrained animals IMO, is a system such as the piezo speaker. Once the animal learns what that means, the fence can pretty much be turned off........ And if something on the other side is worth more to it than your punishment, then your fence isn't going to stop him any way.

    Chain LINK!!!! is just better! If you can afford it!

    Edit: Just an extra example.· A Farm next to my Grand Fathers Land was separated by a Barbed wire fence. The owner of the farm had to put a Bull of his to sleep because he sired one of my Grand Fathers cows through the fence. The animal had just lost too much blood in the process!


    Post Edited (bambino) : 2/27/2008 2:40:06 PM GMT
Sign In or Register to comment.