Detecting switch downstream of a radiocontrolled relay.

Hello

I am designing a radio controlled switch for my lamps. The circuit consists of a power supply, an attiny85, an nrf24 module and of course a sugarcube relay.

I live in Denmark, and here we have a switch on most of our power outlets. Some of the lamps I want to remotely turn on/off, also have a switch. There are, then, two extra switches a part from my circuit switch. One upstream (power outlet), and one downstream (lamp switch).

So I do not want the relay to prevent from switching the lamp on/off manually! Somehow the circuit needs a way of detecting when:

  • downstream switch turns ON when the upstream switch is ON
  • upstream switch turns ON when the downstream switch is ON

In order to turn the relay ON, in case it's OFF.

I only have 2 attiny85 available pins with the nrf24+attiny 3 pin solution; one for the relay and the other for the LED, or maybe another relay. Any idea on how I could do this without using the logic of the Attiny85?

Try again. What is this supposed to mean?

  • upstream switch turns ON when the upstream switch is ON

It uses upstream twice and downstream not at all.

It seems to me that you may have to wire resistors (on the order of 1 megohm) across the switches (which is life threatening) and detect tiny currents in the presence of large currents if you cannot replace the switches with switches that have more poles. Good Luck!

vaj4088:
It uses upstream twice and downstream not at all.

It seems to me that you may have to wire resistors (on the order of 1 megohm) across the switches (which is life threatening) and detect tiny currents in the presence of large currents if you cannot replace the switches with switches that have more poles. Good Luck!

It is now corrected, thanks. Well, I expected something more sophisticated, but thanks for caring for my life! :stuck_out_tongue:

Could't be anything on detecting the induced large currents without having to connect a cable galvanically?

Because you used the NC terminal of the relay, it is unclear to me what is meant by relay off.

It is considered poor form to change a post in a way that invalidates following comments.

Current may be detected an/or measured non-galvanically by using a current transformer. You may need some other simple components such as a resistor, a diode and a capacitor as well. Details depend upon the current transformer and upon your code. The current may be detected in other ways as well, such as a couple of series diodes with the voltage across them sensed by an optocoupler.

I applaud your having posted a schematic. I wish that more people would do that when appropriate.

vaj4088:
It is considered poor form to change a post in a way that invalidates following comments.

Woops! excuse my manners. Well, at least your quote is there from when you first pointed it out :slight_smile:

vaj4088:
Because you used the NC terminal of the relay, it is unclear to me what is meant by relay off.

Well when I am using the NC pin of the relay, it will only allow current through it when the coil is energized. Then, if it is not energized from the attiny digital output signal, and I try to turn the lamp ON manually, I won't be able to do that.

I see your point when it comes to sensing the current from the upstream (upstream ON), but I would still need some sort of resistance check to see if the downstream (lamp) switch is ON or OFF (because if the relay is closed, there will be no current to sense there).

/Ivan

ivino:
Well when I am using the NC pin of the relay, it will only allow current through it when the coil is energized.

No.

When a switch is closed or contacts are closed, current can flow through the contacts. "NC" stands for Normally Closed. This means that current can flow through these contacts when the relay coil is NOT energized. "NO" stands for normally open which represents a contact that cannot conduct current unless the relay coil is energized.

ivino:
(because if the relay is closed, there will be no current to sense there).

No.

Relay CONTACTS may be closed, but a relay just IS. A relay is neither closed nor open. Notice also that (perhaps strangely enough) CLOSED contacts mean that current flows, and OPEN contacts mean that current cannot flow.

By the way, X-10 remote controlled switches used to do something like this. By using a tiny current, it was possible to detect when a lamp was manually controlled locally versus being controlled remotely.