Shorting capacitors using a transistor?
I composed this answer before you posted your schematic. In what you drew the transistor will remain in the active mode and will not behave as a switch. This is what I thought you were describing:







simulate this circuit &ndash; Schematic created using CircuitLab

Unless the transistor blows up (which is very likely) the Arduino would be safe. On the worst case scenario you would be pumping around 20mA into the protection diodes of the Arduino micro controller, as the current will be limited by your resistor. Not advisable, but not too bad.

But this idea will not work. The reason you get the spark when you short the terminals by hand is because you are placing a very small impedance very quickly on a device that basically has no current limitation. This vaporizes the tiny region of metal that initiates contact which vaporizes and initiates the plasma that you can see as a spark as the rest of charge dissipates through it.

If you manage to get the transistor to switch quickly enough (unlikely, as several parasitics come into play that will reduce the rate of discharge) what you will get is all of this current heating up the transistor, possibly to the point of failure.

With this idea the only way I can see to generate a spark would be with a very thin wire (basically a low-value fuse) in series with your capacitor and transistor. The fuse will blow (if the transistor doesn't), just like the metal does on the point of contact.

To be able to get a spark across a fixed gap, you need to generate high voltages. Not high currents.