Allow 220v electricity when the power is on.

Hi guys,

I am quite new to all this arduino stuff but I've recently made a setup where I am reading sensor and then sending that sensor data via email, that's my knowledge so far of how to make things operate.

But now I have a thing to do that...in the house on the country-side that we have, sometimes our electricity happens to go
off here and there from time to time.

Now whenever the electricity is off, and then it gets back on, we have to allow the electricity to flow in by pressing a button on a switch that passes the 220v electricty through the switch and then the power is back into the house. My guess is that this switch is there to prevent any devices from unstable power that can go higher then predicted when the power is back.

My problem is that, I have no idea how would I read if there is power or not through the Arduino.

My idea out of the blue is: I need to detect if the power went off.
If it is off, wait for the power to get back on.
When it's on, allow the 220v to pass through (aka press the switch we have to usually do).

But I have no clue what kind of modules I would need to use or circuit to make this happen or to read into the Arduino. I have Arduino Uno.

Any advice or suggestion would be greatly appreciated.

Thanks.

Detecting whether power is available in the house (and when it goes off) is easy. Just plug in a mobile phone charger and connect the 5V output to a digital input. When the power goes out, the signal goes low.

Detecting when power is coming back may be harder as you have to somehow detect the presence of the power OUTSIDE your home, before the switch. Not knowing your house, no idea how that could be done. A clamp-on current sensor won't work at least as until the button is pressed there is no current.

Pressing the switch, that could be done using a servo or so.

Power the whole contraption with a rechargeable battery, one that's big enough to last the longest outage with enough power left for the servo, and charge the battery continuously while the power is available.

Is there anything in the house 'upstream' of the cutoff switch?

Can you not get the supply altered so when power comes back on there is no need to operate the switch .
If this is not allowed then pressing the switch remotely may also not be allowed .

Do you have access to the live wire that feeds power into this switch and do you have batteries or some such to power the electronics when the power is off?

By access to the live wire I only mean the insulated wire, not the actual copper, live, dangerous wire inside.

You can detect that it is live without connecting to it. Wrap 10 to 20 turns of insulated wire round the live wire. Connect that to an input on a CMOS 40106 hex Schmitt trigger. Also connect a 10M ohm pull up resistor. There will be enough electric field picked up by the wire when there is mains present to produce a square wave output from the 40106. You might have to play around with it a bit to get it working as you want. It might also work perfectly well using an Arduino input, but I’ve not tried it. Only do this if you are sure you can do it safely and you understand what ‘safely’ really means.

At the risk of overstating the need to avoid anything dangerous, at no point should you try to connect anything to the actual live wire.

@PerryBebbington I would use phone charger but it is also nice.

How do you know when to push the button?

Hey guys, thanks for your replies. It was a huge help. I think what I need actually is:

I'd need whenever the power comes back, arduino will turn by it self because it is on another power source, and then I need to let a 3 voltage cables through each of this relays ON after some period of time.

I am just not sure now, will I have any issue if I let these 3 voltage cables trough each of this relays separately?
Because obviously this power source I need to switch is 3 phased cable like you would use for an oven or electrical heating.

I am not sure side effects I could cause with this approach, but either way I'd not be doing this alone since that power source is coming directly from the street to the house so I'd need to call someone once I decide to connect this things.

If you have any advice for this as well or you think I should not do this, please tell me.

Thanks again.

I think you have to look for some more serious relays.

When the electrician you call to replace the button by the relays arrives and sees these, he may either start laughing or crying, not sure, it may depend on his overall mood that day. Either way he'll be very quickly on his way out.

This are toy relays, good for a few amps of current (switch a light, a fan, maybe even a small 500W heater). Not OK for any serious power.

If you have any advice for this as well or you think I should not do this, please tell me.

I'm not at all clear that you understand the risks involved, if you don't, or are not sure if you do, then don't do it. If you understand the risks, understand how this project will affect those risks and know how to mitigate any increased risk, or understand and accept the possible consequences of not mitigating them, then go ahead.

Otherwise, don't.

wvmarle:
I think you have to look for some more serious relays.

When the electrician you call to replace the button by the relays arrives and sees these, he may either start laughing or crying, not sure, it may depend on his overall mood that day. Either way he'll be very quickly on his way out.

This are toy relays, good for a few amps of current (switch a light, a fan, maybe even a small 500W heater). Not OK for any serious power.

PerryBebbington:
I'm not at all clear that you understand the risks involved, if you don't, or are not sure if you do, then don't do it. If you understand the risks, understand how this project will affect those risks and know how to mitigate any increased risk, or understand and accept the possible consequences of not mitigating them, then go ahead.

Otherwise, don't.

Okey guys thanks for letting me know, thing is that I am not starting at all this "project" if u can call it like that unless I am sure I can somehow test it before actually getting involved. But the question for me rises how to test it and not to play with actual current and that's already enough dangerous for me so that's what blocks me from even doing it, i am generally try to find a solution to this and I'm for now searching my options and this was the only place that is familiar to me that can provide some solutions as I generally avoid to medle with electronics since i know my knowledge of it is limited and i have some phobias since i was a kid :slight_smile: so yeah...not doing anything unless i can find the best solution for it.

Ask an electrician then. Two things.

  1. is it OK to replace the push button by a relay?
  2. if so, what relay would he suggest? (add the requirement that the coil requires only 5V).
    When that’s done, you have the relay installed and ready to play with - the 5V side is safe when it’s installed correctly. That’s what the electrician is for.
    Now the main thing I’m still wondering: you mention the Arduino to come on when the power is back. But at that time the relays are still not activated, so how is the power going to reach your Arduino?

Dukirurkia:
I'd need whenever the power comes back, arduino will turn by it self because it is on another power source, and then I need to let a 3 voltage cables through each of this relays ON after some period of time.

how do you know when the power is back on ?
'another power source' is not a real answer.
the way I understand, the power company uses generators to create power
then sends it out to the distribution network.
there is one pole, with some wires that connect to your house.
the last part that the power company owns is the meter.
from the meter to your fuse/circuit breaker panel is some wires.
here in the US, there are usually 2 wires 220VAC to the breaker panel. and then the ground
there is one switch that turns off all the power. that is the main breaker. it also acts like a disconnect.
what you seem to be saying is there you have some way of knowing when the power fails, and then some way of knowing when the power is restored.
what do you have that allows you to know when the power is back on ?
in simple terms. if you have a circuit breaker, it will not turn off when you lose power, and it will not turn on when power is restored, it is like a wire. it will pass power when there is power and when there is no power, it does nothing.
the loss of power effecting something that then requires the press of a button is unfamiliar.
if you get power when the power comes back on, you should be able to turn on something.
more questions. you are not there, you lose power, there is no need for lights or radios or other stuff. so, why do you care ?
if you need to turn the power back on the the refrigerator or heater, then there should be a simple and safe way.
There is a saying that if you have to ask, the work may be above your abilities.
However, often there is an easy and safe way to do a thing.
And since you said you need someone who can do the main power and install the bits you need to get the results,
then this project is not too hard.
The question remains :
How do you know when power is back on ?
And what does the button really do ?
Automatic re-starts can be dangerous, but if you have someone doing that work then this is a workable project.

It sounds like what you have is an automatic disconnect. Typically, when the power goes down, this switch disconnects the breaker panel from the incoming main power and a generator is started to power the house. This disconnect prevents back feeding to the power lines, and protects the workers who will be trying to bring the power back up.

When the power comes back on, the switch (pushbutton) must be thrown to power the house from the main power lines again. It would also serve to turn off the generator and reset it to standby. If this is indeed the case then this switch is achieving nothing if there is no generator present. Except disconnecting the mains from the house. I would call your utility company or an electrician to inspect it and recommend a course of action. If it is to be removed the meter must be removed first to be able to safely take it out, and that is a job for a qualified individual.

If you are looking to do something like this with an Arduino system it is certainly possible but it is a wholly separate issue.

the basic device does sound like it has a set of contacts that are activated by hand, but automatically disconnect from the power grid.

the equipment is unknown
the reason for the equipment to exist is unknown

in our vacation house when I was a kid, we just removed the main fuses. that shut all power off to the house.
all manual, when we returned, we put them in.

in this case, it sounds like there is a disconnect before the mains breaker/fuses
and I would assume some form of indicator that shows power is present. a Neon lamp or some such.
that way, you have an indicator that there is mains power after it has been restored.

I would want to ask a local electrician to inspect what is there and to offer solutions.

if the power is needed to run a refrigerator or some such, I would want to know how long the power was lost.
put an ice cube in a plastic bag in the freezer. it if is still an ice cube, then the freezer never thawed. if it is a re-frozen puddle, then you know that it thawed, but not for how long.

Put an ice cube in a plastic bag in the freezer, if it is still an ice cube, then the freezer never thawed. If it is a re-frozen puddle, then you know that it thawed, but not for how long.

That’s clever!

hammy:
Can you not get the supply altered so when power comes back on there is no need to operate the switch .
If this is not allowed then pressing the switch remotely may also not be allowed .

I suspect the switch is there to prevent brown-out damage to fridges and so forth, so it would be triggered
on an outage and on a brown-out longer than a certain time.

(Mains brown-out can stall and then overheat motors in fridges and pumps etc, and plays havoc with
computers too).