How to get Physical state of AC loads?

Hello everyone,
I am working on Home automation project.
I need to get Physical state of AC loads such as fans,bulbs etc.
I need both switching manually (from buttons)and from microcontroller.(Nodemcu with relay).
With Physical state indication using LED Widget.
My question is

How to get physical state(ON/OFF)??
Does it required rectifier circuit to convert AC to DC to get physical state of AC load to microcontroller??
Or any other Device is available ??

Maybe the following thread will give you some ideas:

There are many good ideas.
But i need some simple one.
I have more than 5 outputs
Such as T.V,Computer,Desklamp,2fans,1tube light.

@saurabh47 you can use the example provided by Blynk
https://github.com/blynkkk/blynk-library/blob/master/examples/More/SyncPhysicalButton/SyncPhysicalButton.ino
it works fine for me :slight_smile:

1 Like

I had uploaded this code.my code is ready.
Please read topic carefully.
I need physical state AC Devices(such as T.V,Fan which runs on alternating current.)
I need two switching one from microcontroller &from buttons.

I am thinking about applying such logic for two switching


Any idea to get physical state

One of my friend given me a best solution that is to
Use DPDT switch.
This switches are really cheap.
This is simplest solution…:smiley:

You can just use a normal relay and a two way switching to do the same thing in the video. But if you want to show the physical state in the app you are going to need a sensor to check that (voltage regulator, step-down transformer, current sensor, etc).

This way you use the Blynk App to control the Relay and can also use the physical button. With a sensor close to your load you can see if it’s On/Off. The only problem is that depending on the position of your physical button the relay will have to stay activated to keep the load off, consuming some power.

1 Like