0
\$\begingroup\$

I am trying to power an atmega328p, and the esp8266 for one of my projects. I am trying to drive a relay to switch lights on and off. The problem is that the relay runs on 12v, the atmega runs on 5v and the esp8266 runs on 3.3. I was thinking of using a board mount power supply to use 120v ac, to get 12v for the relay, then use a 7805 regulator to get 5v for the atmega, and finally use a LM3940IT to get 3.3v for the esp8266. I do know that the esp8266 can not be run off of the atmega's 3.3v pin :(

What I am wondering is am I totally off on what I am hoping to do. Is there a better way? I have found a couple articles about switch power but, not as much as I would like. I am also concerned about the amount of amperage needed for everything. I will use a Darlington transistor to drive the relay from the atmega, I am not sure how much power that will consume.

Here is the board PSU http://www.mouser.com/ProductDetail/RECOM/RAC04-12DC-230/?qs=F5OEftmZcCAbIVZkvUf1yw%3d%3d I would really appreciate any help. Thank you very much.

\$\endgroup\$
6
  • \$\begingroup\$ 166mA is not exactly a lot... I'd be looking for something slightly larger than that. The ATMega328p typically would take about a quarter of that just to itself. Wireless devices take a lot of current while actively transmitting. And relays are often hungry too. \$\endgroup\$
    – Majenko
    Dec 21, 2014 at 16:37
  • \$\begingroup\$ Your right, and that is what I am worried about. Also is it okay for me to daisy chain power components together like that? psu 12v->5vRegulator->3.3vRegulator? and is there a better way to reduce the power drop? Thanks! \$\endgroup\$
    – user77533
    Dec 21, 2014 at 16:42
  • \$\begingroup\$ Why not run the ATmega at 3.3V and get a 3.3V relay? \$\endgroup\$ Dec 21, 2014 at 16:42
  • \$\begingroup\$ The ATmega I have is a DIP package, the TQFP package is too small for me to work with by hand :( and I think I still would run the relay through a transistor of some type to protect the IC \$\endgroup\$
    – user77533
    Dec 21, 2014 at 16:45
  • \$\begingroup\$ You can simplify your life a little if you get a 5V relay. Then you will only need 5V and 3.3V. Your basic plan sounds like it would work but there are many details involved. You have to consider how much power will be dissipated at each stage. The 5V regulator might get kind of hot, depending on how much current you need. \$\endgroup\$
    – mkeith
    Dec 21, 2014 at 16:52

2 Answers 2

0
\$\begingroup\$

What you're doing is certainly feasible, as long as you're willing to handle the waste power. The one change I'd suggest is replacing the PSU with a RAC04-12SC. You don't need the -12 that your specified PSU provides, and going to a single 12 volt output will giver you 333 mA, which may be enough. Note that, if the PSU is going full out, it will provide 4 watts, and the 7805 will have to dissipate 2.8 watts minus the power in the relay coil. This is certainly possible, but you must use a good heat sink, with proper care for thermal connection.

\$\endgroup\$
0
\$\begingroup\$

There are 5 V and 3.3 V relays too. Using one of those would be much more efficient as you could use just a 5 V PSU and the only conversion needed will be the one to make 3.3 V for the ESP; way better than using a 12 V PSU just for the 12 V relay and wasting more than half the energy everywhere else.

\$\endgroup\$

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.