I am working on a project that involves an IoT device, with a 3.3V microcontroller, powered from a doorbell transformer. In an earlier question, I was attempting to solve an issue with a bridge rectifier failing. One of the answers to that question involved a circuit similar to the one below. However, this circuit is not working correctly.
The doorbell transformer provides about 21V AC. My application requires that the doorbell still functions. The switch allows the transformer outputs to be shorted. This triggers a solenoid that rings the audible bell. To prevent the inductive kick from the solenoid from killing any of the other components, a bidirectional TVS (1) is used to suppress the voltage spike.
Because the MCU does not require much current, a half-wave rectifier (3) is used to convert the 21V AC from the doorbell transformer to about 13V DC. A capacitor is used to smooth the rectifier output (4). Finally, a switching voltage regulator (5) converts the rectified DC voltage to 3.3V to power the microcontroller.
In order to prevent a loss of power to the MCU when the doorbell button is pressed, a 6V zener diode (2) is used to allow power to be supplied to the switching regulator (or at least it is supposed to) while the button is pressed.
I've included links to all the datasheets below:
(2) Zener Diode
I would greatly appreciate any insight into why this circuit fails to power the MCU. Thank you in advance for your help.