2
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ @ThePhoton I believe only around 500mA (the standard USB supply) as it is just powering the NodeMCU. \$\endgroup\$ – Rocco Aug 28 '18 at 23:14
  • \$\begingroup\$ Rocco, on StackExchange, it's best to put your updates into the question to make it stand-alone. Can you do that with your current update, please? \$\endgroup\$ – Brian Carlton Aug 29 '18 at 0:10
  • \$\begingroup\$ @BrianCarlton Thank you for your comment. I apologise in advance; but which updates are you referring to for me to include? \$\endgroup\$ – Rocco Aug 29 '18 at 0:14
2
\$\begingroup\$

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

\$\endgroup\$
  • \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$ – Dave Tweed Aug 29 '18 at 11:08
1
\$\begingroup\$

Add a bridge and cap to your 12v ac for your dc out to a cheep buck converter.

\$\endgroup\$
-2
\$\begingroup\$

So long as you're certain your 12vAC source and wiring can support the load, I'd look for bargain basement deals on automotive car chargers. They're pre-made 5V switching supplies, old 500mA and 1A ones are often at clearance prices or free, and they are tolerant of variable voltage input because of the need to accommodate varying voltage from a battery as well as spikes from the alternator. Depending how many you need, you can source these from garage sales, pawn shops, the garbage. Can order them new for about $1.28 each. You'll need to put a rectifier and input cap on it, but that's about the cheapest and easiest thing to build.

If you don't mind wasting a crapton of power, you can use 7805s or the like, but at 500mA you'll need a heat sink and fan probably, so this could be more expensive despite the low cost of a 7805. It may be worth actually measuring your worst case power consumption though, because if the actual current is substantially below 500mA, a 7805 may be acceptable. Really depends what you're doing. Without modification, power consumption in sleep mode is ~20mA, this can be brought down to ~20uA, so if your device was sleeping almost all the time you may only need a 7805.

You can also get a 5v regulator for a few bucks, but I think because of manufacturing volume, taking apart fully built automotive chargers will actually be a buck cheaper per unit.

\$\endgroup\$
  • 1
    \$\begingroup\$ Thank you for your answer! Using an automotive car charger had initially crossed my mind but I disregarded it, fearing that they are only meant to be used for DC rather than AC. However, I see that you have mentioned the use of a rectifier to solve this problem. Would a rectifier like this be sufficient? I ask because I have never heard of them before. Thanks once again! \$\endgroup\$ – Rocco Aug 28 '18 at 23:54
  • \$\begingroup\$ A single phase full wave rectifier is what you'd want, and they are made simply from four diodes that can be readily scavenged if you want or bought very cheaply. To be clear, there are better solutions, but how much better will vary with the regulator being compared, which will vary price. You should definitely look up on @JackCreasey's concerns as I'm not familiar with the intercom units you're using, this is just a a recommendation to get the cheapest possible buck converter, and nothing is cheaper than free. \$\endgroup\$ – K H Aug 29 '18 at 0:04
  • \$\begingroup\$ I'd look for a rectifier with 2-5A rating and much closer to double the voltage I actually needed, so I'd probably go for ~40V, and check datasheets until I was pretty sure I had the lowest Vf at that current rating that I could get. That said, that rectifier is probably OK. For testing I'd just use whatever diodes were on hand. \$\endgroup\$ – K H Aug 29 '18 at 0:09
  • \$\begingroup\$ To confirm, would something like this be better suited for my use case? Also, if it came to it, could the first rectifiers I linked work, or would it be dodgy? \$\endgroup\$ – Rocco Aug 29 '18 at 0:22
  • \$\begingroup\$ I don't know the exact reasons for this case, but at my skill level, I find every semiconductor seems to be a 4 or 5 or 10 way tradeoff, so having an unnecessarily high rating in one place typically means a sacrifice is made elsewhere for the same package size. Just a guess, but to block 800V instead of 40, probably something in there has to be 20 times thicker, meaning that it will have 20 times the resistance unless it is also 20x as large in area. \$\endgroup\$ – K H Aug 29 '18 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.