Electronic – Combine two circuits

basic

I want to apologize in advance for any ignorance throughout this post, I'm not anywhere near an electrical engineer.

Basically I have a consumer which requires 220v and is not operating all the time. Whenever not in operation I would like to cut the current from the outlet automatically. For the purpose I figured I'd use a relay, so I got a 5VDC/220VAC relay which is going to be powered by 5V going out of the consumer which is basically going to keep itself alive and once it stops operating the relay will also switch off since no current will be going to its 5V end.

The problem is, how do I power it on initially, since the relay is turned on by the consumer to which it is supposed to allow current to flow to. So I figured I'd use a small battery + button circuit to manually switch the relay on and from then on the consumer will continue to supply power to keep it on.

Warning: very amateur schematic incoming

enter image description here

It doesn't seem to me that it's okay to mix these 2 5VDC power supplies like that. I assume that for the brief moment when the contact is engaged and the consumer is supplying 5v as well the circuit will not like it. I know that if the 5v power supplies are chained in series then the voltages add up and that would burn the relay, but I'm not sure what's the case when they are connected the way they are on the schematic. Also what if I add 2 diodes on the inner circuit that will only allow current to flow out? I basically have no idea how ignorant the stuff I'm saying actually is so I'll just cut it out here and let you guys tell me how far I am from reality.

EDIT: after looking at what I just posted I thought to myself am I fing stupid, isn't something like this going to work?

enter image description here

Best Answer

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Push to start. Auto power-off.

How it works:

  • Press SW1 - a momentary push-button with mains voltage rating and a current rating sufficient for your device. The device powers up.
  • The device provides 5 V supply to the relay coil and the relay contact closes. SW1 can now be released.
  • On completion of its task the device switches off the 5 V output, the relay is released and power to the device is removed.