carloscesario
Posts: 3
Joined: Sun Jan 11, 2015 1:39 am

Three way switch and Lamp Status

Sun Jan 11, 2015 1:48 am

I 'm planning to control some lamps using relays and my current electrical structure including switches, (like the draw attached).

My main problem is identify when the Lamp is High when used by Switch. I cant get the current lamp status.
Does someone have idea/documentation how todo this? Some pages mean to use optocoupler, but I have no idea.

best regards,

Carlos


Image
Image

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 9:08 am

There's no easy way to do that without using a current sensor.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

gordon77
Posts: 5036
Joined: Sun Aug 05, 2012 3:12 pm

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 11:45 am

Maybe a light sensor, or wire a psu across the light and Detect the psu output.

carloscesario
Posts: 3
Joined: Sun Jan 11, 2015 1:39 am

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 12:04 pm

Any documentation? Example about these suggestion?

My idea is not usage additional components in curent environment. Eg add Sensors in each environmet.

Best regards

Carlos


User avatar
davidcoton
Posts: 5026
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 12:37 pm

carloscesario wrote: My idea is not usage additional components in curent environment. Eg add Sensors in each environmet.
You must have additional components to safely isolate the mains from your RPi. I think the light sensor suggestion is probably easiest to implement safely.
By careful with mains electricity. It can kill you or (less seriously) your Pi. If you have any doubts about safety, stop and get a qualified electrician or electrical engineer to check what you are planning.
Signature retired

carloscesario
Posts: 3
Joined: Sun Jan 11, 2015 1:39 am

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 2:44 pm

Hmmm, but with tis I will need add one component in each room.

Does exist another alternative ?

gordon77
Posts: 5036
Joined: Sun Aug 05, 2012 3:12 pm

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 2:59 pm

No. You appear to be trying to determine a current in the mains circuit when you are isolated, quite correctly, by a relay.

User avatar
davidcoton
Posts: 5026
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Three way switch and Lamp Status

Sun Jan 11, 2015 5:17 pm

carloscesario wrote:Hmmm, but with tis I will need add one component in each room.

Does exist another alternative ?
Probably more than one component per room. Enough components to determine the lamp status by measuring light, applied mains voltage, etc) and to signal that back to your Pi in a safe manner -- safe for humans and computers. You could detect the voltage at the relay common contact, but you MUST isolate that and convert it to a safe voltage (Pi inputs need 3.3V). Probably the simplest way is a mains operated relay which mimics the lamp, switching a GPIO input with an internal pull-up to ground. But be very careful.

Using some form of light sensor would enable the Pi to detect a lamp or fuse failure -- could be interesting, if of limited value in a home. Also to ensure the lamp was off in daylight -- could save money when teenagers forget to use the off switch.
Signature retired

Return to “General discussion”