Electronic – Cheap way to get 5V DC from 12V AC

power supply

I'm currently doing a home automation project which involves my intercom system being controlled by a NodeMCU. The intercom system runs off 12V AC. As for the actual automation/wiring itself, I think I have that fairly well covered. However, I would love to be able to power the NodeMCU directly from the 12V AC rather than having to bring in an extremely long extension cord just to supply 5V DC.

Whilst I am aware that there are plenty of options available for getting 5V DC from 12V DC, I have been almost completely unsuccessful in finding a simple convertor to do exactly what I intend at a low price.

I would really appreciate it if someone could give me some guidance as to how they may think to overcome this problem.

Thank you in advance for any help.

Best Answer

Generating 5V @500mA is easy, all you need is a bridge rectifier, largish capacitor and a 5V switching regulator.
The switching regulator is a replacement for the older linear regulators, you can use something like the R-78E-0.5 from Digikey or there are dozens of cheaper units on Ebay.

Since you are only adding about 2.5-3.5W maximum to your 12V AC input supply, I'd imagine you would have no problems.

schematic

simulate this circuit – Schematic created using CircuitLab

BUT THERE IS A PROBLEM ...in all probability the 12V AC is converted into at least one supply within your intercom. This means you CANNOT connect DIO pins or ground on the ESP8266 to points within the intercom as it may damage one or both.

You can overcome this problem in several ways:

  1. Opto isolate all signals going to/fron the ESP8266 and the intercom
  2. Find a DC supply voltage inside the intercom that can be used to power your ESP8266, then you can have a common ground. (You might even be able to find a 5VDC supply)
  3. Use an isolated switching regulator such as the TEL 3-2011 from Digikey, and then connect the grounds together.

Update:

Since #3 seems to be a better fit from the comments, this would be the schematic:

schematic

simulate this circuit