WARNING
This build requires the fondling of components charged to HAZARDOUS VOLTAGES.
You need only get close to, and not phsyically touch these components to get a jolt, which may lead to Ventricular Fibrillation.
You can die (or shit your pants, sometimes both) while building this device. We are not liable for any losses or injuries, and cannot answer any support queries regarding this build.
Edit: Yes, you can still die, even if you know how to program an Arduino.
Legality of this build
While hand-held stun-guns are illegal in Australia, cattle-prods and stun batons appear to be available online legally from several suppliers, including at least one Australian camping/survival store. In fact, they'd probably be considered a tool here. How else are we supposed to keep the 'roos off the streets?
As this is a difficult build and you can't exactly conceal such a device in your pants without seeming at least a little suspicious, I figure it should be okay'ish to post about.
That said, getting caught with one in public may still be analagous to carrying an unregistered firearm!
You have been warned.
I've devoted quite a lot of time to R&D'ing Pulsed-Arc (Micro-TIG) welder this past year.
Due to the extended hours spent researching and prototyping in my workshop, people have accused me of 'not having a life' and 'always working'.
I disagree, so I took some time off to create a people deterrent.
It's worth noting that these devices are probably very illegal (if you're caught with them) in Australia (like everything else)
So, don't get caught with one. And definitely don't keep one in your car.
I guess taking one camping might be fine though.
Hah! Surprise block diagram. Next Question.
We're stepping up the four or so volts available from a standard'ish 18650 Lithium Ion cell, to just about ten Kilovolts at the output spark gap through several stages.
First, two boost converter circuits are wired in parallel to double the output current (Diode-ORed). This bumps the four'ish volts at several amps available from the Lithium cell, to just over 13 volts at 700 milliAmps required by the Royer Oscillator.
The converters used are based on Linear Technology's LT1308 single-cell chips, junkbox parts I had on-hand from a previous project.
Next, the 13'ish volts is fed into a relatively unmodified off-the-shelf cheap-as-shit CCFL inverter, designed for 300mm CCFL tubes. These are commonly used in cars, PC cases, and other places where people feel the need to compensate for their small cocks.
Most (if not all), cheap fixed-brightness inverters are designed around a Royer Oscillator (resonance witchcraft), this drives the transformer at it's natural resonant frequency while utilising a relatively small component count.
The Royer Oscillator magically turns the ~13 volts at 700mA applied to its input, into just under 900 Volts AC at a couple of milliamps at its output - They're usually made for 12volts, but we're being naughty here.
Finally, we feed the ~900 Volts AC into a twelve stage Villard Cascade (a type of Voltage Multiplier). The gives us ~10 kilovolts across our output sparkgap, with a fire rate of 5 ~ 10Hz.
A One kiloVolt commercial spark gap has been added in series with the output sparkgap. This helps protect against direct short circuits, and also ensures that at least 1kV will be discharged into our victim research subject, in the event of direct skin contact.
This design was thrown together very roughly in one full day using existing and/or recycled parts; I really didn't expect to write about it, but figured it might make an interesting read for some.
In order to complete this write-up, I'm building and documenting a second unit from scratch - Apologies for the poor'ish quality photos, I'm a little short on time.
Yes, the startup "whizzz" is just for show! (intimidation plays a big part with these things)
Blue LED means the Boost Converter is active, and the push button is unlocked for use.
Red LED means the Boost Converter and FET Drivers are switched off (Standby mode, saves ~220mA). Pressing the push-button once will wake up the device once in standby.
Alternating Red/Blue means a discharge is in progress
All designs are provided as freeware for non-commercial use
Boost Converter circuit
[Download] Schematic - PNG Image
[Download] PCB Artwork - Zip archive of Gerber files
[Download] Bill of Materials - XLS Spreadsheet
Lithium Ion Charger
[Download] Schematic - PNG Image
[Download] PCB Artwork - Zip archive of Gerber files
[Download] Bill of Materials - XLS Spreadsheet
Microcontroller Card (without gate driver)
[Download] Schematic - PNG Image
[Download] PCB Artwork - Zip archive of Gerber files
[Download] Bill of Materials - XLS Spreadsheet
Microcontroller Card (with Gate driver)
[Download] Schematic - PNG Image
[Download] PCB Artwork - Zip archive of Gerber files
[Download] Bill of Materials - XLS Spreadsheet
Firmware
[Download] Firmware Binary - Microchip HEX format
Villard Cascade, remaining parts, diagrams
[Download] Schematic - PNG Image
[Download] Bill of Materials - XLS Spreadsheet
[Download] Complete Wiring Diagram - PNG Graphic illustration
Component Datasheets
[Download] 2SK4033 N-Channel MOSFET (boosted uC card)
[Download] MCP1252 Inductorless 5V Buck/Boost Reg (boosted uC card)
[Download] PIC12F1840 8Bit Microcontroller (both uC cards)
[Download] MCP73833 Single-Chip Charge Controller (charger card)
[Download] LT1308A Single-Cell Boost Converter (Boost converter cards)
[Download] MUR1100E High Voltage Power Rectifier (Villard Cascade)
[Download] A71H10xx3820 1KV Surge Arrester (Villard Cascade)
Hardware:
01 - On the microcontroller card, I'd advise adding an external 47K pull-up resistor between the switch (before R7) and VDD, as the PICs internal weak pull-ups are more than weak
02 - The huge currents pulled from the Lithium Ion cell may cause some protected cells to enter shutdown mode after a few seconds of usage (the cell output is switched off until the load is removed). Increase R2 on the Boost Converter cards to 12K, and decrease the lead spacing of the output sparkgap (or just limit in-air discharges to no more than a couple of seconds!)
03: The "DandeLiIon" charger card has two embedded PCB fuses; if the polarity of the battery or charge inputs are reversed, a protection Diode will conduct, blowing the fuse. Get the polarity right!
04: Once the unit is powered down, a hazardous (painful) voltage may still exist across the output spark gap. The is due to residual charge in the Villard Cascade capacitors; you can discharge the caps by shorting the output onto something metallic
Firmware:
No known issues (yay!)
The artwork, printed onto a sheet of Toner Transfer Paper

Artwork transferred to a sheet of 0.8MM blank circuit board

The bottom layer (ground plane) masked with Kapton tape in preparation for etching

Etched, coarsely trimmed and silver-plated

Drilled and seperated into individual boards

Fully assembled
Most cheapshit 100mm ~ 300mm CCFL inverters look (almost) exactly like this

We'll need direct access to the transformer's secondary output...

... So go ahead and cut away everything else

We've saved about 20mm, and made it easier to attach the Villard Cascade
IMPORTANT: If your CCFL inverter has an Electrolytic bypass capacitor across it's input, ensure it's rated for at least 25 volts!
Exceptionally shitty units, such as this one, don't have any bypass capacitors installed. Adding one won't hurt in this case and may actually improve performance
Prepare your anus components (ignore the quantities shown above)

Bend the Diodes and Align them as shown, tinning the bends will simplify the next step

Solder the diodes together as shown, no-clean flux cored solder works wonders here

All twenty four Diodes soldered in series

Trim the leads in the staggered pattern as shown

Trim and Solder the capacitor leads to the staggered points, twelve caps per side

All twenty-four caps soldered, and the cascade now completed
Place the modified CCFL inverter upside-down on your bench

Solder the Villard Cascade inputs to the transformer secondary

READ ME!
First, place the inverter + cascade on your work surface, upside-down, and elevated in the air (important) as shown. I used two spools of tape to do this, anything non-conductive and preferrably plastic will do.
Next, place a high-voltage clip-lead (or solder a heavily isulated wire) onto the DIODE ANODE LEAD of the cascade input. This is your EHT Ground point.
Place a pin (or something sharp) into the other end of the clip lead or wire, and space it 10mm or less from the cascade output pin, just like the photo above
Failure to follow the above instructions carefully could lead to a dead cascade!

Now, shove ~13 volts into the inverter to generate some Ozone!
Turn off the unit and short the output to drain the caps before proceeding

Start insulating the array with Kapton Tape (or the 'Crapton' chinese knockoff)

Bottom, Top and Underside insulated so far

Bottom, Top, Underside and Upperside insulated (Keep the input/output pins exposed!)

Solder a length of high-voltage wire to the Villard Cascade's Ground (First Diode's Anode)

Pot the connection and surroundings with Silicone sealant (or hot-melt glue if you're impatient)

Install the series-sparkgap (optional) and extend it with HV wire
Assembled boost converters, begging to be installed.

Glue them back to back (or use double-sided adhesive tape)

Install the Diodes, power input wires and link the grounds

Install the ground wires and power output wires

Attach the inverter's positive rail to the boost converter's output
Note: The CCFL inverter will be low-side switched, leave it's negative lead disconnected for now
Important: Apologies for the possible confusion here. The only FETs I had on-hand have an enhancement voltage (VGSth) higher than the nominal supply voltage (3v7)
As I'm short on time and suppliers are closed for the long weekend, it was far quicker to re-engineer the board to include a small MCP1252 boost converter for the FET's gate drive (only good for slow'ish switching, which is what we're doing).
I have included PCB artwork with and without the converter circuit for your convenience.
TL;DR: I messed up. The board shown in the images below may look a little different, but the wiring is effectively the same.
Don't forget to flash the PIC before installing it! You can buy a Pomona 5250 SOIC clip for about $20 from Mouser. It can also be done in-circuit with the same clip.
Prepare the processor card (note the new MSOP-8 boost converter)

Processor card Wired. Note: The boost converter 'negative' input is attached to the FET's Drain

Attach the Boost Anode, Charger Anode, and Switched Anode to B+

Attach Main Ground, Charger Ground and Switched Ground to B-

Insulate the terminals with a few layers of Kapton, and neaten up the wires
Important: I ran out of thermal adhesive. In it's place I used good quality thermal grease (CW7270) in the centre of the board for heat transfer, and Araldite around the edges to hold the board down.
Also, ensure you file the ground feed-throughs as flush as possible with the board (without compromising the ground connection); the more heat we can suck out of the PCB and dump into the heatsink, the higher our charge current will be.
Don't bust your balls on the above though, we'll never be able to obtain the MCP73833's 1-amp charge current with a simple homebrew PCB. The charge current is currently set to 450mA.
Prepare the charger card, ensure the feed-through vias are filed as flush as possble with the PCB

Charge output, Power input and Status LED wires soldered

Heatsink prepared with thermal grease and araldite (these will flatten out due to pressure)

Charger card held down with a Zip-Tie while waiting for the Araldite adhesive to cure (2+ Hours)
There are many different ways of skinning this cat. For example, the pins from a fluorescent starter would make for an excellent pair of contact probes - I'm keeping it simple here with some solderable galvanized fencing wire.
It's held up to daily discharges for the past few months without issues, aint broke, not fixing
Prepare the end-cap for modification

Drill two holes, and thread a piece of 'Gal' fencing wire through them

Apply 'Araldite' (or a similar adhesive) to each side

Do the same for the lower side, be fairly generous here

Fuck it. Just pot the whole thing with adhesive.

Mark out a 10mm spark gap towards the center of the wire

Trim that shit.

Solder each lead to the Villard Cascade output

Test the new gap, and get all moist in the crotch
I'm not terribly good at mechanical stuff.
Insulate the shit out of everything, til it's all one solid mass.

Keep insulating.

Cut a 25mm (ID) length of conduit to size, mark out the switch positions

Drill and/or route the Switch and LED holes

(Gently) shove the entire assembly into the conduit

Yank the switch and LED wires out using a hook of some sort

Terminate and install the switches and LED

Terminate and install the DC Jack, buzzer and charge status LEDs

Drill a hole into an end-cap for the DC Jack (note the added slots for the status LEDs)

Everything installed, 5VDC applied to the DC input jack (RED = Charging)

Hooray! The charge completed successfully, and nothing caught fire.

Tada, one Stun Baton.

ZZZzzzt. By far the most satisfying sound I've heard all year.
Don't get into any trouble - and if you must, please keep me out of it.
Stay safe!
-PodeCoet
Click here to get in-touch or check out my other write-ups