Remote switch with "memory"

Discussion in 'The Projects Forum' started by André Ferrato, Jan 9, 2016.

  1. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Hello, i require some advices again. I believe you all know this arrangement of switches:

    TwoWayLightSwitch.GIF
    It allows a person to switch the same lamp at two differently located points in a house. In my case the second switch needs to be remotely controlled, so a electronical switch i mean. The problem is, first i designed the circuit using a HT12E and a HT12D sending a bit of information through a commonly used 433mhz ASK module, so i sent the information of the pressed switch that was on another room to control a relay on the main circuit, but the relay needs to be constantly fed, so i latched it with a CD4013 D Flip Flop type, it worked... But the thing is when the circuit first power up the position of the relay is always the same, the circuit does not "remember" the last position it was so it would keeps things natural, like if it was a mechanical switch. And without a bistable latching relay, a thing that is out of my reach for now, i don't know how to do it. I would like the relay that is remotely controlled to remember it's position, or even another device to remember it. It's not really necessary, but i would like to see some approaches to this problem. Thanks in advance.
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    Post a schematic.

    Using paragraphs would make your post easier to follow...
     
  3. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
  4. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    I dont have schematic, all i have are ideas to make this. I'll go through steps to see if it's easier:

    1) I am trying to make a remote switch that latches with two different positions, the switch will act as a relay(SPDT) with a common and two nodes to fit in that arrangement.

    2) As i didnt had any latch relay, i tried to make one with the HT12 encoder and decoder pair.

    3) To latch the output of the decoder i used a CD4013 D Flip Flop.

    4) Using this setup i can transmit the information of a switch that is connected to the encoder to the decoder using 433MHz ASK modules. Very simple setup.

    5) it works really well with just one problem: When you think about a mechanical latching switch it has "memory", it will stay in the last position forever.

    6) The remote switch needs to behave exactly as that.

    My ideas:

    - If i don't ever remove power, the switch will stay and act as a latch SPDT. So i could power this "secondary circuit" forever, use two rails of mosfets connected to a common.

    The mosfet takes almost nothing to stay latched and logical ones have a really low resistance.

    The CD4013 takes almost nothing also.

    The only thing that is going to suck the battery of this secondary circuit is the transmitter that takes about 8mA when receives a bit.

    The HT12D chip uses 0.1uA when on standby.

    SO, doing this.. when the "secondary circuit" or the "receiver circuit" were on standby it would consume less than 3uA, could these 3v batteries used in watches power this for a lot of time?

    PS: When i get home i will draw a schematic, i'm not at home now.
     
  5. dl324

    Distinguished Member

    Mar 30, 2015
    3,242
    619
    When the CD4013 is powered up, you can pick whether you want it to initialize HIGH or LOW; but you can't maintain state across power interruptions. To do that, you need a non-volatile memory element which could add significant complexity.

    How long to you want the circuit to remember it's last state?
     
    absf likes this.
  6. crutschow

    Expert

    Mar 14, 2008
    13,013
    3,233
    Yes it would.
    For example the common CR2032 Lithium 3V coin cell is rated at 250mAh so it would last about 250mAh / 3uA = 83,000 hours or about 9.5 years (likely near he shelf life of the battery).
    That's a solution to your memory problem that I would have suggested.

    But you have to isolate the cell from the power supply.

    You could use diodes for that but a better alternative might be to power only the flip-flop from the coil cell all the time and just switch the power to the rest of the circuit.
    You just have to make sure there's no significant load on the FF output when the rest of the circuit is off as that will add to the battery drain.
     
    djsfantasi likes this.
  7. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Yes, i think i'll breadboard this "solution" tomorrow and see how it goes. The HT12 chips produces very steady low and high transient signals, so i should expect problems only in the arrangement of the components.

    I am using the IRFZ46N mosfet in the power rail, do you think the Vds can be at least 0.1v ? So it wouldn't interfere with the 5v rail.

    I'll be using two CR2032 in series, because the mosfets need at least 4v( gate threshold).

    Also a latching relay would be perfect as pointed here, but i don't have acess to that.
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,013
    3,233
    Don't understand your question about the mosfet in the power rail with a Vds of 0.1V. :confused:
    Please post a schematic of what you are proposing.
     
  9. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Hello, instead of making a schematic a breadboarded it and worked pretty fine! The vds thing is because the mosfet is in series with the power rail, acting like a mechanical switch.
     
  10. crutschow

    Expert

    Mar 14, 2008
    13,013
    3,233
    The IRFZ46N is an N-MOSFET so it can't be used in series with a positive power rail as a high-side switch.
    For that you need a P-MOSFET.
    And you need more than the gate threshold voltage (which just barely turns the transistor on) to use it as a switch. For that you need a Vgs of 10V for a standard MOSFET or a Vgs of 3 to 5V for a logic-level type MOSFET.
     
  11. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Oh.. i noticed a strange behavior with one of the mosfets... So you are saying i should put these IRFZ46N connecting directly to ground ? Like a switch directly in to the ground rail, not the power rail ( After every single device) ? If you could take a look for me in the datasheet, it seens that with 5v the mosfet can pass at least 1A. My current requirements are under 800mA, like ~650mA.
     
  12. crutschow

    Expert

    Mar 14, 2008
    13,013
    3,233
    Yes, if you can float your load's ground then you can use the N-MOSFET as a ground-side switch.

    Yes, a nominal MOSFET (which is what the data sheet curves show) may pass over an amp at 4V Vgs, but a worst-case device, with a Vgs(th) of 4V wouldn't (since such a device is only conducting 250μA according to the data sheet).
    So if the particular device you have works in you circuit, that's okay, but I would not use that MOSFET part to build more than one of those circuits.
     
  13. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    I see and if i fed with 6v? Maybe will do better ?
     
  14. crutschow

    Expert

    Mar 14, 2008
    13,013
    3,233
    Of course.
    The higher the Vgs the more current it can carry (up to the rated 10V Vgs).
     
  15. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Will do that, i think it will work. It's already working kinda well... after it's finished, i'll post some pictures and schematics. Huge thanks @crutschow !
     
Loading...