I have a project where I need to read 0-18 Volts AC in Arduino's input (0-5V DC).
So I did a circuit with a diode (half wave bridge), voltage divider, and a RC circuit where I tested some values for the RC part where the speed of the AC to DC converted voltage were enough for me.
Three levels of AC voltage are sent in these terminals depending on button presses (18, 17 and 16V).
I wired my circuit directly over the AC terminals and got readings that varied from 1 to 3V DC, which are enough for me to read in Arduino
When I connected the circuit to Arduino, I grounded one of the AC terminals (the one where the diode blocked current flow) to Arduino's ground.
When I turned on the circuit, connected to Arduino, a fuse on the AC line blew, like there was some short circuit.
So, my question is: How to ground this separate AC circuit to my Arduino, in order to be able to read this converted/lowered voltage? Did I wire it wrong, according to the schematics? How should I correct it?
Edit1: This AC line is a secondary in a big transformer that outputs different voltages. Is there a possibility of any of these two wires not be grounded?