Do you mean by the fence to keep people away. Charge a capacitor to A.C mains voltage through a very high resistance connected at the phase side so that the person is not electrocuted. The capacitance of the capacitor determines the length of the shock. The fence will get the wire from the other end of the resistor.
Wkipedia briefly tells about typical electrical fence parameters:
A fence charger places an electrical pulse from ground to the wire about once per second. The pulse is narrow and usually around 5-20 kV. Animals receive an uncomfortable but harmless shock when contacting the wire, and learn to stay away from it.
A few years ago I made an electric fence which worked quite well out of a motor car spark plug coil. I used a 555 timer to energize the coil every few seconds. I connected the gnd to a metal spike hit into the soil and the output of the coil went to the fence. I uses a 7ah 12v battery to power the system. It worked well on people (i tested it on myself) and horses. The horses very quickly learned not to attempt to break the paddock fence
A few years ago I made an electric fence which worked quite well out of a motor car spark plug coil. I used a 555 timer to energize the coil every few seconds. I connected the gnd to a metal spike hit into the soil and the output of the coil went to the fence. I uses a 7ah 12v battery to power the system. It worked well on people (i tested it on myself) and horses. The horses very quickly learned not to attempt to break the paddock fence
I was also used that method(motor car spark plug coil) . I used it for dogs and goats. A solar panel and a 12V motorcycle battery are enough for this.
---------- Post added at 11:40 ---------- Previous post was at 11:03 ----------
you can make a energizer circuit by this steps, (1) make a circuit with digital IC and a powerful transistor for get out 10V-25V (40Hz-70Hz). (2) join that out put pulse cable to secondary coil of a transformer(6V-12V) and other secondary cable to GND of your circuit. (3) Now primary coils of the transformer should be connect to fence (make sure that both cables should be touch by animals)
---------- Post added at 11:55 ---------- Previous post was at 11:40 ----------
you can make a energizer circuit by this steps, (1) make a circuit with digital IC and a powerful transistor for get out 10V-25V (40Hz-70Hz). (2) join that out put pulse cable to secondary coil of a transformer(6V-12V) and other secondary cable to GND of your circuit. (3) Now primary coils of the transformer should be connect to fence (make sure that both cables should be touch by animals)
---------- Post added at 12:00 ---------- Previous post was at 11:55 ----------
you can make a energizer circuit by this steps, (1) make a circuit with digital IC and a powerful transistor for get out 10V-25V (40Hz-70Hz). (2) join that out put pulse cable to secondary coil of a transformer(6V-12V) and other secondary cable to GND of your circuit. (3) Now primary coils of the transformer should be connect to fence (make sure that both cables should be touch by animals)
---------- Post added at 12:01 ---------- Previous post was at 12:00 ----------
you can make a energizer circuit by this steps, (1) make a circuit with digital IC and a powerful transistor for get out 10V-25V (40Hz-70Hz). (2) join that out put pulse cable to secondary coil of a transformer(6V-12V) and other secondary cable to GND of your circuit. (3) Now primary coils of the transformer should be connect to fence (make sure that both cables should be touch by animals)