rstofer "AC of variable frequency and very low voltage (<=5V) can be had by using the tone() function on an Arduino uC."
My thoughts would be one would be better building an analogue sine wave generating oscillator, use a digital potentiometer as a way of varying the frequency perhaps, the amplify the current, if necessary, with a voltage follower transistor. An arduino, or 555, would give a digital square wave, unless put through a series of low pass filters, in which case it would approximate a sine pretty well.
Doctorandus_P "4. Add an extra layer of insulation, so it is double isolated. This can be as simple as a cardbord box around the transformer, but I recommend something more elegant."
My guess for anything self-built and mains AC powered would be to encase it in two concentric shells, in either order I'd think could be ok(?), one to provide insulation made of plastic, a plastic project box or perhaps a 3d printed form, and one to provide some level of fire resistance made of metal. Cardboard could burn all too easily, and infact could conduct and crumble if it got wet. I'm thinking that would be the wisest way for anyone wanting toconstruct something mains powered to set it up, so long as it wasn't something which generates enough heat during operation that such layering ofprotection would be problematic, then safe design would get rather trickier in terms of having to have vents. To the original poster Dan123456, I'm making some speculations about mains powered devices here, none of this paragraph's compexities apply to your needs at low voltages and low currents, you don't need to worry about shocks at all from low voltage AC, and it would be very difficult for anything at low voltage AC to catch fire unless large currents were involved, which they can't be unless your initial supply (the DC wall wartpowering your AC inverter or the AC wall wart) has a high current limit, or unless you dumped appreciable currents in to a tiny resistance (whole 12V across a 50 ohm resistor or something, Power=V^2/R).