Power Relay - when powered or reset it defaults to ON

Is there any reason why a power relay when initially powered it always has to be in the OFF state?

I am prototyping this product that controls a single 110V device and the need is to have it default to ON when power is restored or reset but I wanted to know if this a safety issue. My initial thought was a comparison to a extension cord. When you plug it in you expect to have power on the other end.

That depends on the type of relay you are using.

Some relays have a N/C (normally closed) some N/O (normally open) contact. Others have both.
Some have a active LOW some an active HIGH input on the control pin.

Each of these types have their dedicated use and reason for their behaviour.

For a N/O relay a good reason is safety as it should switch everything off in case of a fault condition (e.g. power cut to the controler or broken relay coil connection).

If we look at the WeMo smart plugs the default behavior for them is to be off on power restore and there is no way to change that. I’m trying to figure out is this a safety standard thing. In my application I need it to be ON so that is how I designed my particle prototype. I already have a few clients asking to use my product but I’m trying to figure out if this is a liability .

@oraclerouter, what load are you controlling? Also, it would be easy to use a Particle.function() or a jumper to set the default behaviour on reset/power ON.

The relay is rated at 10 Amps. I did try the function but there is that brief few seconds while the particle is booting that the state is off untill the code fully loads.

@oraclerouter, are you using SYSTEM_THREAD(ENABLED)? Also, are you looking for your device to be ON without interruption except for loss of power? It is not abnormal for a small delay after reset/power-on IMO, as long as the device returns to the programmed state.

BTW, indicating a 10A relay doesn’t say much about the load. Is it resistive (e.g. heater) or inductive (e.g. motor)?

Yes, I want the device ON after a power recovery and I got this going using a 3 way relay. I just wanted to know if this is a safety issue?

As far as the load I use it to power a resistive device.

If you want to solve the issue of a potential safety issue then put a 10 amp fuse or breaker into the unit.
To have the power on on boot (or microcontroller powered off) you could connect the load to the Normally Closed port of the relay or drive the relay through a NAND gate (configured as a NOT gate). This will swap your on/off logic in your program but will also swap the condition that you are seeing at boot.