Thanks everyone for the quick input. First, i have to say that when the main source is not connected, there is no voltage. So i don't think the 5 volt when the switch is at off comes from capacitance (i may be wrong). So far, i did not put any capacitor in the circuit to filter de dc variations . I will later on.
I'm just trying to understand the basics before i continue my circuit.
right now, when the switch is on, i get 13,7 DCV RMS, 20 volts max peak at 120hz (58% duty cycle)
When the switch is at off, i get 5.6 volts RMS DC at 60 HZ (23% duty cycle)
And when i unplug the main, i get no voltage!.
The circuit is simple for now, but i really don't get why i have 5 volts when the switch is at off.
thanks