Hello, I'm trying to build a small power circuit that outputs 5 VDC to power a microcontroller and some relay coils. The power source is 24 VAC rms.
I've designed a basic circuit that I originally thought would work but after building it, I quickly realized my design is off.
This is the schematic:

The concept of this design is the microcontroller would be programmed to toggle the relays on or off which would control 24 VAC signals to a furnace, but the 5 VDC required to power the microcontroller and relay coils would come from the furnace's 24 VAC source. That way I don't need to rely on an external DC power source. It could all be integrated into one PCB.
This is the measured 24 VAC rms power source:

I've put this entire circuit together exactly the way its shown in the schematic and when I measured what was supposed to be 5 VDC, I got this:

I would like to keep the cost and complexity of the components as low as possible. Size is a bit of a constraint, so large capacitors or something like that is a no-go.
Just to clarify, I'm a bit of a beginner when it comes to this stuff so if anyone that knows more could point out and explain the problems with this design I would greatly appreciate it.
I've designed a basic circuit that I originally thought would work but after building it, I quickly realized my design is off.
This is the schematic:

The concept of this design is the microcontroller would be programmed to toggle the relays on or off which would control 24 VAC signals to a furnace, but the 5 VDC required to power the microcontroller and relay coils would come from the furnace's 24 VAC source. That way I don't need to rely on an external DC power source. It could all be integrated into one PCB.
This is the measured 24 VAC rms power source:

I've put this entire circuit together exactly the way its shown in the schematic and when I measured what was supposed to be 5 VDC, I got this:

I would like to keep the cost and complexity of the components as low as possible. Size is a bit of a constraint, so large capacitors or something like that is a no-go.
Just to clarify, I'm a bit of a beginner when it comes to this stuff so if anyone that knows more could point out and explain the problems with this design I would greatly appreciate it.