This power supply provides 5V with respect to one leg of the 24 VAC input. I'm trying to understand what that means because this provides 1.2 amps and I only need 20 mA for what I'm trying to do. It seems like hot and neutral are going to each end of the regulator. Does this mean a high signal would be in phase and amplitude with 24 VAC and a low signal would be the 24 VAC peak minus 5V? Can I do something similar to this with a LM7805?
I think the rather unconventional SMPS arrangement produces a -5V supply with respect to one side of the (floating) 24VAC input.
In other words, the 'ground' is -5V with respect to J4 pin 2. Presumably this matches up with the inside of the device and allows communication using the 5V logic translator.
It does look kind of dodgy- but the Schottky diode should protect against obvious issues.
An LM7905 would do something similar, but its not rated for enough voltage and would be very inefficient.
First of all, there is no Hot and Neutral. Based on the fact that you are asking that the DC voltage is relative of one of the legs, I assume that pins 1 an 5 of J4 are connected to a transformer's secondary.
To call one node ground, you don't need to connect it to anything special (e.g. earth.) You just call it ground and that's the end of the story. Then if you put a DC regulator, the resulting DC voltage is going to be reffered to that leg of the transformer. In this case the leg that is connected to pin 5.
Your schematic can be simplified this way:
In the schematic, the ground symbol is connected to J4:5. However, if the pin is not connected to earth also, the voltage of J4:5 with respect to earth is unknown. However, J4:2 is 5VDC with respect to J4:5.
As you may see, I omitted the ground symbol because it's only used to name the node connected to J4:5.
Yes, you can use a LM7805, but the setup shown on the diagram is much more efficient.