Need help to figure out how to power 230 V to 5 V Arduino with relay



  • I am trying to build a relay actuator similar to this, however I have some trouble with figuring how to connect the 230 V power correctly.

    My project is run on a 5 V Arduino, with a 230 V to 5 V step down regulator. Everything is soldered on a prototype board. I have also solderen on a 3.3 V step down regulator and a NRF24L01 radio. The thought behind this project is to remote control ceiling lighting.

    This is how it looks like now:

    0_1490775586599_17521751_10158487676810381_1240987342_o.jpg

    0_1490775593937_17500367_10158487676960381_1619738280_o.jpg

    What I need help to figure out, is how to connect the 230 V to both the 5 V step down regulator AND the relay without breaking the power circuit to the Arduino when the relay turns off. I've seen projects like this before, but it seems like most of the projects only are USB powered.

    All comments are welcome!


  • Mod

    Connect the phase wire to the middle connector in the relay and one of the power supply pins; connect all neutrals together (power supply and lighting); then connect the lighting phase wire to the Normally Open contact of the relay.
    Or you spend 5$ for a sonoff that is all nicely packaged :D



  • @gohan Thanks for your help, it sure would have been easier to just buy a Sonoff, but I wouldn't learn as much :smile:

    Were you thinking of something like this? (Don't mind me using a LED in replacement of a lamp).

    0_1490784339455_Untitled Sketch 2_bb.png


  • Mod

    No, remove the black wire from supply to relay and put a red wire from the top AC to the middle contact of relay



  • @gohan Ah, yes of course. I feel stupid... :smirk:

    Thank you so much for your help. I will definitely look into Sonoff as well..... ;)


  • Mod

    @ronnyandre good, I always suggest to go with commercial product when people are not familiar when working with 220v: safety first!


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.