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. My Project
  3. $8 Lamp (Outlet) "Smart Plug" Module

$8 Lamp (Outlet) "Smart Plug" Module

Scheduled Pinned Locked Moved My Project
109 Posts 34 Posters 97.4k Views 13 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.
  • sundberg84S Offline
    sundberg84S Offline
    sundberg84
    Hardware Contributor
    wrote on last edited by
    #57

    It was only to test coil failure and see if it was a power issue :)

    Controller: Proxmox VM - Home Assistant
    MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
    MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
    RFLink GW - Arduino Mega + RFLink Shield, 433mhz

    Moshe LivneM 1 Reply Last reply
    0
    • sundberg84S sundberg84

      It was only to test coil failure and see if it was a power issue :)

      Moshe LivneM Offline
      Moshe LivneM Offline
      Moshe Livne
      Hero Member
      wrote on last edited by
      #58

      @sundberg84 A self fulfilling prophecy :-)

      1 Reply Last reply
      0
      • Mohsin HassanM Mohsin Hassan

        Hi,

        any possibility of including a push button to manually trigger the switch on and off as well?
        And if possible update Vera on the status change.

        This way i can make it Wife safe and not get kicked out of the house...

        I'm not good with coding but if someone can point me in the right direction please...

        petewillP Offline
        petewillP Offline
        petewill
        Admin
        wrote on last edited by
        #59

        @Mohsin-Hassan said:

        Hi,

        any possibility of including a push button to manually trigger the switch on and off as well?
        And if possible update Vera on the status change.

        This way i can make it Wife safe and not get kicked out of the house...

        I'm not good with coding but if someone can point me in the right direction please...

        We are discussing this over here: http://forum.mysensors.org/topic/1607/safe-in-wall-ac-to-dc-transformers

        You want to be careful you use the right transformer so you don't burn your house down. :) The wife probably wouldn't appreciate that.

        I really want to do this too. I'm just waiting for the experts to weigh in on which transformer is safe.

        My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

        1 Reply Last reply
        0
        • sundberg84S sundberg84

          @petewill @Moshe-Livne . Coil activates when i try with a 9v battery, so either bad/cheap relays or to weak power plug. All measures +5v but its not enough. Ill order some new relays.

          petewillP Offline
          petewillP Offline
          petewill
          Admin
          wrote on last edited by
          #60

          @sundberg84 said:

          @petewill @Moshe-Livne . Coil activates when i try with a 9v battery, so either bad/cheap relays or to weak power plug. All measures +5v but its not enough. Ill order some new relays.

          So strange that it's not working. What is the power rating of your 5V transformer? Do you have a picture of your set up?

          My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

          1 Reply Last reply
          0
          • sundberg84S Offline
            sundberg84S Offline
            sundberg84
            Hardware Contributor
            wrote on last edited by sundberg84
            #61

            @petewill @Moshe-Livne

            I dont reallt wants to admit it...
            Well, I ordered the 5v relay from ebay (i have the reciept!) and looking at petewill video it says SRD-05VDC-
            Looking at mine it says SRD-12VDC so probalby the sent me a 12v relay...

            New one will arive soon i hope :) Thank you for the help and sorry for clogging the thread.

            Controller: Proxmox VM - Home Assistant
            MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
            MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
            RFLink GW - Arduino Mega + RFLink Shield, 433mhz

            Moshe LivneM petewillP 2 Replies Last reply
            0
            • sundberg84S sundberg84

              @petewill @Moshe-Livne

              I dont reallt wants to admit it...
              Well, I ordered the 5v relay from ebay (i have the reciept!) and looking at petewill video it says SRD-05VDC-
              Looking at mine it says SRD-12VDC so probalby the sent me a 12v relay...

              New one will arive soon i hope :) Thank you for the help and sorry for clogging the thread.

              Moshe LivneM Offline
              Moshe LivneM Offline
              Moshe Livne
              Hero Member
              wrote on last edited by
              #62

              @sundberg84 that makes so much sense! And its not even your fault! :-)

              1 Reply Last reply
              0
              • sundberg84S sundberg84

                @petewill @Moshe-Livne

                I dont reallt wants to admit it...
                Well, I ordered the 5v relay from ebay (i have the reciept!) and looking at petewill video it says SRD-05VDC-
                Looking at mine it says SRD-12VDC so probalby the sent me a 12v relay...

                New one will arive soon i hope :) Thank you for the help and sorry for clogging the thread.

                petewillP Offline
                petewillP Offline
                petewill
                Admin
                wrote on last edited by
                #63

                @sundberg84 That's good news! Unfortunately you have to wait for new one but at least it's an easy fix!

                My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                1 Reply Last reply
                0
                • petewillP petewill

                  @sundberg84 said:

                  Hi @petewill!
                  I made this :) Great video :+1:

                  I think i get bad reception or something because it works the first 5-6 times and then nothing...

                  This could also be a power or a wiring issue. But, the antenna is an easy modification so it wouldn't hurt to try this first. Another test is to move the device closer to your gateway. If it still stops after 5-6 times then it probably isn't communication issues.

                  In the end you describe an cat5 wire added as antenna because of bad reception.
                  Do you remove the plastic/shielding so its just copper?
                  Im afraid to short anything out with a long uncovered antenna if thats the case...

                  No, I left the shielding on the wire. Sorry, I should have specified that.

                  and if i hear you right its 3,28 inches which should be 33,31200 millimeters on the antenna?

                  I think 3.28 inches is 83.312 millimeters (at least that's what google says it is).

                  H Offline
                  H Offline
                  hyla
                  wrote on last edited by
                  #64

                  @petewill
                  Just out of interest: how did You come up with the length for the antenna?
                  I remember vaguely that You can calculate the length if You know the
                  used frequency but You connect Your wire to an already existing PCB-Antenna...

                  Christoph

                  petewillP 1 Reply Last reply
                  0
                  • H hyla

                    @petewill
                    Just out of interest: how did You come up with the length for the antenna?
                    I remember vaguely that You can calculate the length if You know the
                    used frequency but You connect Your wire to an already existing PCB-Antenna...

                    Christoph

                    petewillP Offline
                    petewillP Offline
                    petewill
                    Admin
                    wrote on last edited by
                    #65

                    @hyla I actually recently did a separate video on how I do this with a little more explanation. If you're interested it's here:

                    https://youtu.be/NpMnauHeR7Y

                    In summary, I measured the length of the existing antenna on the PCB then added additional wire to get it up to the required length for the 2.4GHz range (4.92 in).

                    My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                    barduinoB 1 Reply Last reply
                    1
                    • H Offline
                      H Offline
                      hyla
                      wrote on last edited by
                      #66

                      Thanx :)

                      Meanwhile I did some research too. The formula (as You all know :) ) is:
                      Lambda (m) = c(m/s) / f(1/s) with
                      c= 299711000 m/s
                      f= 2.400.000.000 hz

                      which comes down to 0.1248795833333333 m or roughly 4.92 in
                      The 1.64 in that are used on the PCB are actually Lambda/3.

                      Nicely done, Pete :)

                      C.

                      1 Reply Last reply
                      0
                      • sundberg84S Offline
                        sundberg84S Offline
                        sundberg84
                        Hardware Contributor
                        wrote on last edited by sundberg84
                        #67

                        @petewill
                        Now i got three working relays thanks to you, so again, great video!
                        Wanted to thank you and also show my sollution.
                        I hade some 433mhz cheap (not good working) relays with perfect case i could re-use:
                        The case had a status-led and a switch i use as well.

                        Relay.jpg

                        Controller: Proxmox VM - Home Assistant
                        MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
                        MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
                        RFLink GW - Arduino Mega + RFLink Shield, 433mhz

                        petewillP m26872M D 3 Replies Last reply
                        4
                        • sundberg84S sundberg84

                          @petewill
                          Now i got three working relays thanks to you, so again, great video!
                          Wanted to thank you and also show my sollution.
                          I hade some 433mhz cheap (not good working) relays with perfect case i could re-use:
                          The case had a status-led and a switch i use as well.

                          Relay.jpg

                          petewillP Offline
                          petewillP Offline
                          petewill
                          Admin
                          wrote on last edited by
                          #68

                          @sundberg84 Cool! That's nice to have a case like that.

                          My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                          1 Reply Last reply
                          0
                          • sundberg84S sundberg84

                            @petewill
                            Now i got three working relays thanks to you, so again, great video!
                            Wanted to thank you and also show my sollution.
                            I hade some 433mhz cheap (not good working) relays with perfect case i could re-use:
                            The case had a status-led and a switch i use as well.

                            Relay.jpg

                            m26872M Offline
                            m26872M Offline
                            m26872
                            Hardware Contributor
                            wrote on last edited by m26872
                            #69

                            @sundberg84
                            Nice! That one deserves its own project thread. I think we're many interested in the details.

                            1 Reply Last reply
                            0
                            • Ivan ZI Offline
                              Ivan ZI Offline
                              Ivan Z
                              Hardware Contributor
                              wrote on last edited by
                              #70

                              This is may realisation
                              IMG_6600.JPG
                              IMG_6601.JPG

                              1 Reply Last reply
                              2
                              • petewillP petewill

                                @hyla I actually recently did a separate video on how I do this with a little more explanation. If you're interested it's here:

                                https://youtu.be/NpMnauHeR7Y

                                In summary, I measured the length of the existing antenna on the PCB then added additional wire to get it up to the required length for the 2.4GHz range (4.92 in).

                                barduinoB Offline
                                barduinoB Offline
                                barduino
                                wrote on last edited by
                                #71

                                Hi @petewill

                                I've tried this and had inconclusive results rather then a significant extended rage. Not sure what I'm doing wrong or if it's the quality of my RF module.

                                I've used some wire (8.33 cm) I had left over but its not one solid copper wire, its has many "strings" inside. In your experiment did you use one solid copper wire and can this influence this hack?

                                Thanks

                                petewillP 1 Reply Last reply
                                0
                                • barduinoB barduino

                                  Hi @petewill

                                  I've tried this and had inconclusive results rather then a significant extended rage. Not sure what I'm doing wrong or if it's the quality of my RF module.

                                  I've used some wire (8.33 cm) I had left over but its not one solid copper wire, its has many "strings" inside. In your experiment did you use one solid copper wire and can this influence this hack?

                                  Thanks

                                  petewillP Offline
                                  petewillP Offline
                                  petewill
                                  Admin
                                  wrote on last edited by
                                  #72

                                  @barduino I am using solid copper cat5e wire. I don't know much about antennas but it may change the behavior. Do you have any old cat5 that you can cut and test with?

                                  My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                                  barduinoB 1 Reply Last reply
                                  0
                                  • petewillP petewill

                                    @barduino I am using solid copper cat5e wire. I don't know much about antennas but it may change the behavior. Do you have any old cat5 that you can cut and test with?

                                    barduinoB Offline
                                    barduinoB Offline
                                    barduino
                                    wrote on last edited by
                                    #73

                                    @petewill

                                    I'm going to try it.

                                    I'm also using a capacitor on the RF module, not sure if you did combine both techniques.

                                    On a last note, I've noticed some power setting on the MyConfig.h (1.5 lib) cant remember the values form 1.4.1

                                    /**********************************
                                    *  NRF24L01 Driver Defaults
                                    ***********************************/
                                    #define RF24_CE_PIN		   9
                                    #define RF24_CS_PIN		   10
                                    #define RF24_PA_LEVEL 	   RF24_PA_MAX
                                    #define RF24_PA_LEVEL_GW   RF24_PA_LOW
                                    

                                    So now I'm initializing the gatweway as

                                    // Instanciate MySersors Gateway
                                    MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL);
                                    

                                    instead of

                                    // Instanciate MySersors Gateway
                                    MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
                                    

                                    Not sure if there is a significant diference here...

                                    The results i'm getting now (after removing the antena, but with capacitor and changes on 1.5 MyConfig) are similar to the results I got from lib 1.4.1 with capacitor. I have a repeater about 15 meters from gateway and if i put it 17 meters it doesnt work anymore (there are some walls on the way)

                                    I'll just add a solid copper antena to see if results change.

                                    Thanks for the info!

                                    Cheers

                                    petewillP 1 Reply Last reply
                                    0
                                    • barduinoB barduino

                                      @petewill

                                      I'm going to try it.

                                      I'm also using a capacitor on the RF module, not sure if you did combine both techniques.

                                      On a last note, I've noticed some power setting on the MyConfig.h (1.5 lib) cant remember the values form 1.4.1

                                      /**********************************
                                      *  NRF24L01 Driver Defaults
                                      ***********************************/
                                      #define RF24_CE_PIN		   9
                                      #define RF24_CS_PIN		   10
                                      #define RF24_PA_LEVEL 	   RF24_PA_MAX
                                      #define RF24_PA_LEVEL_GW   RF24_PA_LOW
                                      

                                      So now I'm initializing the gatweway as

                                      // Instanciate MySersors Gateway
                                      MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL);
                                      

                                      instead of

                                      // Instanciate MySersors Gateway
                                      MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
                                      

                                      Not sure if there is a significant diference here...

                                      The results i'm getting now (after removing the antena, but with capacitor and changes on 1.5 MyConfig) are similar to the results I got from lib 1.4.1 with capacitor. I have a repeater about 15 meters from gateway and if i put it 17 meters it doesnt work anymore (there are some walls on the way)

                                      I'll just add a solid copper antena to see if results change.

                                      Thanks for the info!

                                      Cheers

                                      petewillP Offline
                                      petewillP Offline
                                      petewill
                                      Admin
                                      wrote on last edited by
                                      #74

                                      @barduino Yes, I always use a capacitor to filter power to my radio. I recently have been using 3.3v Pro Mini Arduinos so I have just been putting a 4.7uf cap very close to the radio.

                                      As far as I know the RF24_PA_LEVEL_GW is only used for the gateway. You can change the power level in the config file for the sensors but it looks like you already had it at the MAX. You can play with the power level depending on your radio model used with the gateway. On my gateway I experimented with an external antenna type radio and if it was set on max it completely wrecked my z-wave communication (there must have been interference like crazy since they are different frequencies). If you are using the PCB type antenna you can probably increase the power level to max without any issues. It's been a while since I did anything with my gateway (it's been working great for months) so I don't remember what settings I'm using. I do know I have the antenna hacked radio instead of the external antenna.

                                      My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                                      1 Reply Last reply
                                      0
                                      • Z Offline
                                        Z Offline
                                        Zeph
                                        Hero Member
                                        wrote on last edited by Zeph
                                        #75

                                        One thing to note is that adding an external antenna extension to the on-PCB antenna moves this into the realm of "RF magic". What I mean is that it becomes a very non-standard sort of hybrid antenna about which we can predict very little. Like receiving television with rabbit ears and aluminum foil, you will mostly have to work by trial and error rather than exact calculations.

                                        The on-PCB antenna should already be tuned for the RF wavelength, probably near the middle of the band. We can also calculate the appropriate length for a straight wire used INSTEAD OF the on-PCB. But when we solder a wire onto the PCB antenna, we wind up with a very complex antenna which may or may not work very well (but in general it's far easier to make a random antenna work poorly than to make it work well). There are questions of antenna gain (or attenuation), but also of directionality - adding the wire might make it transmit/receive better in some directions and worse in other directions!

                                        Part of my point is that we cannot necessarily predict the best length of wire to solder to the on-PCB antenna by using the calculations that would apply with no PCB antenna. It may depend where on the PCB antenna trace you solder the extra wire, and perhaps on how the wire gets bent (especially if it comes near electrical conductors).

                                        So after you have the node placed where you want it (including the orientation), you can try moving the added antenna around in the case for better reception - and you can also try changing the wire length because 8.33 cm is not necessarily optimal for this hybrid antenna. Of course it's easier to shorten a wire by just successively chopping off a little bit at a time; you can solder in a new wire if need be.

                                        The length does not have to be super precise by the way - a loose wire antenna is not a highly tuned (Hi-Q) antenna and a slightly suboptimal length doesn't dramatically alter the results. Which is good, since the modules operate over a range of frequencies - and because even without the PCB antenna to really complicate things, even the PCB trace between the chip and the wire is part of the tuning as well, not just the bendable wire.

                                        Stranded wire vs solid should not have a large effect, compared to the many other factors involved here.

                                        1 Reply Last reply
                                        0
                                        • TheoLT Offline
                                          TheoLT Offline
                                          TheoL
                                          Contest Winner
                                          wrote on last edited by
                                          #76

                                          Hi Pete,

                                          I'm new to this forum, but I wanted to give you a big thumbs up. I really enjoyed watching your videos and I learned a lot from watching them. It's because of people like you that made me decide to start using MySensors.

                                          I have an old 433Mhx power plug that is broken. I see if I can turn it in to a MySensors power plug ;)

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


                                          7

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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