I don't actually know how to do this safely... And it doesn't seem like an easy project...
Anything less than 50V is generally considered safe and you can't normally feel it. Anything over 50V is considered dangerous and in most countries you can't sell a product where the high voltage can be touched (it has to be insulated/isolated inside the product).
A transformer can boost AC but it doesn't work that well with PWM (not at all with DC) and you would need to boost the current from the Arduino.
An inductor "tries to maintain current". The instant you (DC) apply voltage, little current flows and then over the next few milliseconds/microseconds current increases as the magnetic field builds-up.
If you suddenly disconnect the power suddenly the current "tries" to keep flowing as the magnetic field collapses. Normally, we add a flyback diode which allows a current path at a low voltage so the transistor/MOSFET isprotected fronm.o Without a diode, and open circuit has infinite resistance and as the inductor tries to push current through an infinite resistance it produces a high voltage. (If you know Ohm's Law, you know it takes high voltage to push current through a high resistance.) This is how the ignition coil in your car works to make a high-voltage sp;ark from a 12V battery
I don't actually know how to do this safely... And it doesn't seem like an easy project...
Anything less than 50V is generally considered safe and you can't normally feel it. Anything over 50V is considered dangerous and in most countries you can't sell a product where the high voltage can be touched (it has to be insulated/isolated inside the product).
A transformer can boost AC but it doesn't work that well with PWM (not at all with DC) and you would need to boost the current from the Arduino.
An inductor "tries to maintain current". Or you can say it "resists changes in current". The instant you apply (DC) apply voltage, little current flows and then over the next few milliseconds/microseconds current increases as the magnetic field builds-up.
If you suddenly disconnect the power the current "tries" to keep flowing as the magnetic field collapses. Normally, we add a flyback diode which allows a current path at a low voltage so the transistor/MOSFET is protected from the high-voltage kickback. Without a diode and open circuit has infinite resistance and as the inductor tries to push current through an infinite resistance it produces a very high voltage. (If you know Ohm's Law, you know it takes high voltage to push current through a high resistance.)
This is how the ignition coil in your car works to make a high-voltage sp;ark from a 12V battery. Those shock-prank "toys" usually have a relay switching on & off rapidly through a coil to generate the shock-voltage. A relay is more-likely to survive the high-voltage than a transistor, but the relay may not last long either.