Answer the question
In order to leave comments, you need to log in
How to determine that a person turned on the light?
How can one distinguish the situation when a person, relatively speaking, plugged the plug into the socket, from the situation when the plug was in the socket, but there was no electricity, and then it appeared. In both cases, the power will turn on, but the device should work only if the inclusion is made consciously by the user. A plug is any switch that makes/breaks a contact.
What could be the solution?
Answer the question
In order to leave comments, you need to log in
Feed 220 should not turn on the device, it should only be turned on with a momentary button, just like we turn on a computer =)
Reliable and 100% - no way.
If the light went out at the power plant or the introductory switch to the apartment, it is likely that other appliances, such as a refrigerator, are also included in the network. This means that by applying a weak current to the 220V terminals through a 1MΩ resistor and measuring the voltage on them, you can figure out if there is another load in the network.
This must be done very carefully, it is forbidden to connect the arduino directly to 220 volts with any pins, only through resistors of at least 1 MΩ. The device must be battery powered so that it can work while there is no voltage in the 220V network.
Another option is to use a capacitive hand sensor hidden in a plug or switch. So that when turned on, we can determine whether a person is holding the plug.
If the input power is lost -> we transfer to the error state and do not turn it on until the user presses the button or turns it on / off.
And the load connection is easy to track with a current sensor (eg ACS758xCB).
Measure the length of the TDR wire by the method or by resistance, if the wire is long, then the plug is definitely stuck somewhere.
The question is how to link this with the fact that there can be 220 volts in the wire so that the length determination circuit does not die.
towin @towin
Reliable and 100% - no way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question