Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Part time standalone sensor + parallel control of nodes

Part time standalone sensor + parallel control of nodes

Scheduled Pinned Locked Moved Development
18 Posts 7 Posters 6.8k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rvendrameR Offline
    rvendrameR Offline
    rvendrame
    Hero Member
    wrote on last edited by
    #6

    As I mentioned I've running for 6 months without any glitch. I used old 5V phone-charges (very cheap ones), and didn't have any problem so far. I will post some photos as soon as I find them (as currently I don't want to disassemble the wall boxes).

    But our Brazilian "4x2" box is big enough to fit the arduino, radio, power supply and the regular switch (and nothing else, said). Make sure you isolated everything very well.

    Home Assistant / Vera Plus UI7
    ESP8266 GW + mySensors 2.3.2
    Alexa / Google Home

    BulldogLowellB M 2 Replies Last reply
    0
    • rvendrameR rvendrame

      As I mentioned I've running for 6 months without any glitch. I used old 5V phone-charges (very cheap ones), and didn't have any problem so far. I will post some photos as soon as I find them (as currently I don't want to disassemble the wall boxes).

      But our Brazilian "4x2" box is big enough to fit the arduino, radio, power supply and the regular switch (and nothing else, said). Make sure you isolated everything very well.

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #7

      @rvendrame said:

      As I mentioned I've running for 6 months without any glitch. I used old 5V phone-charges (very cheap ones), and didn't have any problem so far. I will post some photos as soon as I find them (as currently I don't want to disassemble the wall boxes).

      But our Brazilian "4x2" box is big enough to fit the arduino, radio, power supply and the regular switch (and nothing else, said). Make sure you isolated everything very well.

      yes, curious to see how you sense change at the mains power switch and have the arduino sense that. Brazil is 220 volt, yes?

      1 Reply Last reply
      0
      • rvendrameR Offline
        rvendrameR Offline
        rvendrame
        Hero Member
        wrote on last edited by
        #8

        I have re-wired the original switch to go to Arduino (it shorts GND and a digital input). So the original switch does not control the lamp directly anymore (only arduino does, via mysensors and local switch).
        Yes 220v, the phone charges are okay as they usually accept AC between 100 to 240v.

        Home Assistant / Vera Plus UI7
        ESP8266 GW + mySensors 2.3.2
        Alexa / Google Home

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Cory
          wrote on last edited by
          #9

          Here is a quick example of the setup.
          The Switch is connected to GND and a digital input on Arduino. Activate the internal pull-up on the digital input and sample the pin in order to detect the position of the switch. The Arduino sketch can then treat the switch as a 3-way switch and toggle the light (relay) when switch state changes.

          switch_example.PNG

          1 Reply Last reply
          0
          • M marcusvdt

            Hi all!
            I'm planning my home automation in a way I can still control the things locally if the mysensors stuff somehow does not work (radio interference, gateway down, controller down, repeater's nodes down, etc). For example, in my house, all light actuators will respond to a clap pattern, plus the activation through the controller, and I will also keep the existing normal light switches, in parallel with the sensor (I know how to do that using a 3 way switch and a 3 way relay). So if anything goes wrong with the comms, I can still use a clap pattern. And if the circuit goes down entirely, I can still use the normal switch.
            I call it wife-safe system ;-) It means my wife will not complain when the automation has a problem because the good old way will still work.

            I'm looking for help in mainly two points:
            1-My wife will probably be using mostly the normal switches, so how can I "sense" when the light is turned on through the normal wall switch so the node can inform the gateway and then pass this status to the controller? Light sensors are not an option because natural window light will fool the controller. I heard something about using current sensors, but have no idea about them. If you guys can post some links mainly to how they work and where can I buy them, it will help me a lot. Feel free to suggest other ways too!

            2-Is there any disadvantage (other than the controller not be updated with the current status of sensors) of allowing a sensor to act standalone, even when the controller is not reachable?
            Will it keep trying to update all the time generating generating any kind of radio traffic? Once the gateway turns on (in the event it was off by some incident), will the node be able to detect it and then send the updated current status of that sensor?

            BulldogLowellB Offline
            BulldogLowellB Offline
            BulldogLowell
            Contest Winner
            wrote on last edited by
            #10

            @marcusvdt said:

            My wife will probably be using mostly the normal switches, so how can I "sense" when the light is turned on through the normal wall switch...

            @Cory said:

            Here is a quick example of the setup.

            doesn't seem to meet the requirement of the OP.

            1 Reply Last reply
            0
            • rvendrameR rvendrame

              As I mentioned I've running for 6 months without any glitch. I used old 5V phone-charges (very cheap ones), and didn't have any problem so far. I will post some photos as soon as I find them (as currently I don't want to disassemble the wall boxes).

              But our Brazilian "4x2" box is big enough to fit the arduino, radio, power supply and the regular switch (and nothing else, said). Make sure you isolated everything very well.

              M Offline
              M Offline
              marcusvdt
              wrote on last edited by marcusvdt
              #11

              @rvendrame said:

              As I mentioned I've running for 6 months without any glitch. I used old 5V phone-charges (very cheap ones), and didn't have any problem so far. I will post some photos as soon as I find them (as currently I don't want to disassemble the wall boxes).

              But our Brazilian "4x2" box is big enough to fit the arduino, radio, power supply and the regular switch (and nothing else, said). Make sure you isolated everything very well.

              @rvendrame
              Did you used some kind of box to isolate the circuit inside the 4x2 wall enclosure? My goal is to do exactly that, but my circuit is a little bigger now because of the sound sensor module (for the claps) plus the power supply which certainly is bigger than yours.

              Regarding the normal wall switch, I think I will need to do either as you said, or maybe using a momentary switch (like the ones used for bell) to allow for the same wall switch to be used either to program a new clap pattern or to switch the light on/off (I would control it on the sketch, depending on the time the momentary switch got pressed. Long press=program mode ; quick press = turn light on/off).

              Did you made something different for normal light switches that you already had a 3 way wall switch in parallel with another 3 way switch?

              @Cory thanks! This is exactly the schematic that I considered using but was not too happy about it, because I wanted to be able to control the lights if the circuit goes down. However @rvendrame told us he is having a good experience with this, then I think I'm going for that.

              @BulldogLowell the solution proposed allow control with the normal switches, but it still depends on the circuit to be perfectly working. So it partially achieves my requirement because my wife will scream only if the circuit is dead, which seems unlikely to happen.

              Even being more inclined now for doing it the way @Cory and @rvendrame said, I'm still interested in finding some information about how the AC current sensor would fit my needs (mostly about the size and additional components that would be required if using it that way,)

              Thanks everybody,

              SparkmanS 1 Reply Last reply
              0
              • rvendrameR Offline
                rvendrameR Offline
                rvendrame
                Hero Member
                wrote on last edited by
                #12

                @marcusvdt said:

                Did you used some kind of box to isolate the circuit inside the 4x2 wall enclosure? My goal is to do exactly that, but my circuit is a little bigger now because of the sound sensor module (for the claps) plus the power supply which certainly is bigger than yours.

                Here in my country the wall-boxes are generally made by plastic (placed in brick walls).

                I also kept the original power suply box (in fact it is more a plug than a box), I only removed the two pins from it, and ran the wires from inside out. Everything fitted perfected.

                Please note that in many countries this is not legally acceptable --- Only certified stuff can be put inside the wall box! (and it should only be worked by certified electricians ;-) )

                Regarding the normal wall switch, I think I will need to do either as you said, or maybe using a momentary switch (like the ones used for bell) to allow for the same wall switch to be used either to program a new clap pattern or to switch the light on/off.

                Either a momentary (push button) or regular (on-off) switch will work, it is just a matter of adapt the way arduino will interpret the reads from the input pin.

                Did you made something different for normal light switches that you already had a 3 way wall switch in parallel with another 3 way switch?

                I didn't install it in any 3 way circuit (will do it soon), but I see two ways:
                1- use a 2-pole relay playing the role of one of the switches (and in this case Arduino will not know if the light is on or off)
                or maybe better
                2- move all the 3 way circuit to the GND & Arduino PIN, so You keep the 3-way behavior, and your controller knows if the light is ON or OFF.

                Hope it helps...

                Home Assistant / Vera Plus UI7
                ESP8266 GW + mySensors 2.3.2
                Alexa / Google Home

                1 Reply Last reply
                0
                • M marcusvdt

                  @rvendrame said:

                  As I mentioned I've running for 6 months without any glitch. I used old 5V phone-charges (very cheap ones), and didn't have any problem so far. I will post some photos as soon as I find them (as currently I don't want to disassemble the wall boxes).

                  But our Brazilian "4x2" box is big enough to fit the arduino, radio, power supply and the regular switch (and nothing else, said). Make sure you isolated everything very well.

                  @rvendrame
                  Did you used some kind of box to isolate the circuit inside the 4x2 wall enclosure? My goal is to do exactly that, but my circuit is a little bigger now because of the sound sensor module (for the claps) plus the power supply which certainly is bigger than yours.

                  Regarding the normal wall switch, I think I will need to do either as you said, or maybe using a momentary switch (like the ones used for bell) to allow for the same wall switch to be used either to program a new clap pattern or to switch the light on/off (I would control it on the sketch, depending on the time the momentary switch got pressed. Long press=program mode ; quick press = turn light on/off).

                  Did you made something different for normal light switches that you already had a 3 way wall switch in parallel with another 3 way switch?

                  @Cory thanks! This is exactly the schematic that I considered using but was not too happy about it, because I wanted to be able to control the lights if the circuit goes down. However @rvendrame told us he is having a good experience with this, then I think I'm going for that.

                  @BulldogLowell the solution proposed allow control with the normal switches, but it still depends on the circuit to be perfectly working. So it partially achieves my requirement because my wife will scream only if the circuit is dead, which seems unlikely to happen.

                  Even being more inclined now for doing it the way @Cory and @rvendrame said, I'm still interested in finding some information about how the AC current sensor would fit my needs (mostly about the size and additional components that would be required if using it that way,)

                  Thanks everybody,

                  SparkmanS Offline
                  SparkmanS Offline
                  Sparkman
                  Hero Member
                  wrote on last edited by
                  #13

                  @marcusvdt said:

                  I'm still interested in finding some information about how the AC current sensor would fit my needs (mostly about the size and additional components that would be required if using it that way,)

                  You can get current sensing modules on eBay relatively cheap. Just go to eBay and search for "Arduino current sensor". You'll see a number of options that are designed for different amperages and some will slide over your existing wiring and others will need to be connected with screw terminals. The output of those will connect to an analog input on the Arduino.

                  There are also split core current transformers that you can clamp over wires without having to undo them. Here's an example: http://www.crmagnetics.com/Assets/ProductPDFs/CR3100.pdf. They'll need some additional (burden) resistors in order to use them with an Arduino. Be careful with them though, as without the resistors, the voltage on them can go very high (in the kv range).

                  Cheers
                  Al

                  1 Reply Last reply
                  0
                  • rvendrameR rvendrame

                    Just to add my two cents --- Since begin of this year, I've installed relays and dimmer (all mySensor based) to controll the lights in my house.

                    I rewire each original wall switch to reach the GND and a Input Pin on arduino, and the sketch I've upload in arduino accept commands from radio as well as from original (local) switch.

                    Everything is working flawless , I never had to replace any module or re-work anything. Even if the controller (I have Vera) gets offline, the wall switch still commanding the arduino (and thus the ligths controlled by it).

                    And everything survived to the raining season here (Brazil is the country with more lightning storms I think), it is very common end up with burned fixed phones / TVs / etc after a heavy tropical storm. Also the power eventually goes up&down more than once during every storm. mySensors braved resisted to all of this, never gave up!

                    Just an experience to share.

                    J Offline
                    J Offline
                    Jan Gatzke
                    wrote on last edited by
                    #14

                    @rvendrame What power supply do you use for your nodes? This is a kind of show me because I did not find a safe, cheap and tiny power supply I can install in the wall. And relays consume to much client to power them with batteries...

                    1 Reply Last reply
                    0
                    • rvendrameR Offline
                      rvendrameR Offline
                      rvendrame
                      Hero Member
                      wrote on last edited by
                      #15

                      I used some similar (or same) as this one (I removed the pins):

                      http://www.aliexpress.com/item/Micro-USB-Wall-Charger-Power-Adapter-For-Samsung-Galaxy-S4-S3-S2-i9300-i9100-EU-PMHM320/1995358184.html

                      For my further modules, I found something that looks like a more "professional" solution (not sure if really is):

                      http://www.dx.com/p/switching-power-supply-board-module-green-5v-600ma-151578#.VVeCTWDOmtA

                      But I didn't install those "in production" yet, As my new nodes still 'under development' . The PSUs at least provided the said 5V, so no issues for now ;-)

                      Home Assistant / Vera Plus UI7
                      ESP8266 GW + mySensors 2.3.2
                      Alexa / Google Home

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        Jan Gatzke
                        wrote on last edited by Jan Gatzke
                        #16

                        Ok, that is the only affordable solution I found, too. I am still searching for a cheap encapsulated power supply which fits behind the mains switch (together with arduino, relay and nrf24 :D) Those power supplys do exist, but are too expensive for buying one for every light switch in the house.

                        Did you add some kind of fuse to your installaion? Do you mind sharing some pictures of the hardware?

                        1 Reply Last reply
                        0
                        • rvendrameR Offline
                          rvendrameR Offline
                          rvendrame
                          Hero Member
                          wrote on last edited by
                          #17

                          I took some pictures but I need to look for them. Now the modules are installed and I don't want to touch everything.

                          No I don't have a fuse in the wall box, only at the main panel (a circuit breaker for every wire in the house).

                          Note that this is not allowed in many countries. Here in Brazil the walls are generally brick-maden , within plastic boxes for switches / outlets. So in general it is not too dangerous if a device like that fire up.

                          The the 'single' wall box here have 10 x 7 x 7 cm "usable" space. It is tight, but somehow possible to accommodate the phone charger + arduino + radio + triac or relay + original switch + original wires (and some air). ;-)

                          The double box is aprox. 10 x 14 x 7cm , much better for it.

                          .

                          Home Assistant / Vera Plus UI7
                          ESP8266 GW + mySensors 2.3.2
                          Alexa / Google Home

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            Jan Gatzke
                            wrote on last edited by
                            #18

                            Here in Germany the wall boxes are round and have a diameter of about 6 cm and a depth of about 4-6 cm. Compared to that your 10x7x7 box is huge. :) I think I would have to dsign a custom Arduino pcb. Still waiting for someone to do this job.

                            1 Reply Last reply
                            0
                            Reply
                            • Reply as topic
                            Log in to reply
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes


                            12

                            Online

                            11.7k

                            Users

                            11.2k

                            Topics

                            113.1k

                            Posts


                            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • MySensors
                            • OpenHardware.io
                            • Categories
                            • Recent
                            • Tags
                            • Popular