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. 2 channel in wall dimmer

2 channel in wall dimmer

Scheduled Pinned Locked Moved My Project
54 Posts 15 Posters 24.2k Views 26 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.
  • ahmedadelhosniA ahmedadelhosni

    Thanks for answering.

    I have a question regarding dimmer circuit. I read that these circuits needs EMI filter. Is this something else rather than adding a snubber circuit ?

    This issue I found in this link : http://hackaday.com/2015/04/19/switch-mains-power-with-an-esp8266/

    the TRIAC will dump out a ton of EMI (that’s why most commercial dimmers have to have a choke in series with the load to be able to get FCC certification).

    D Offline
    D Offline
    Denke
    Hardware Contributor
    wrote on last edited by
    #24

    @ahmedadelhosni
    Hi This circuit is not tested yet and can as you describe put out some or as stated a lot of EMI (Electro Magnetic Interference). I have not yet taken this in to account when designing this but have had it in the back of my head for something to look in to.

    The snubber circuit is more to protect agains "current rush" when you switch of an inductive load. This is actually something you use on the 5 volt side of relays to protect the transistor from breaking down. Andyou should also use on the output side of a relay for example if the cable you are runnigng is long or you want to switch of an inductive load

    RaspberryPi-Openhab

    ahmedadelhosniA 1 Reply Last reply
    0
    • D Denke

      @ahmedadelhosni
      Hi This circuit is not tested yet and can as you describe put out some or as stated a lot of EMI (Electro Magnetic Interference). I have not yet taken this in to account when designing this but have had it in the back of my head for something to look in to.

      The snubber circuit is more to protect agains "current rush" when you switch of an inductive load. This is actually something you use on the 5 volt side of relays to protect the transistor from breaking down. Andyou should also use on the output side of a relay for example if the cable you are runnigng is long or you want to switch of an inductive load

      ahmedadelhosniA Offline
      ahmedadelhosniA Offline
      ahmedadelhosni
      wrote on last edited by
      #25

      @Denke clear enough. Thanks

      1 Reply Last reply
      0
      • ahmedadelhosniA Offline
        ahmedadelhosniA Offline
        ahmedadelhosni
        wrote on last edited by
        #26

        Hello @Denke , any updates about your progress ?

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

          This will make your box less
          https://ac-dc.power.com/products/linkswitch-family/linkswitch-tn/

          D 1 Reply Last reply
          0
          • Ivan ZI Ivan Z

            This will make your box less
            https://ac-dc.power.com/products/linkswitch-family/linkswitch-tn/

            D Offline
            D Offline
            Denke
            Hardware Contributor
            wrote on last edited by
            #28

            @Ivan-Z Thanks I will look in to this design and what it means to the design

            RaspberryPi-Openhab

            1 Reply Last reply
            0
            • ahmedadelhosniA ahmedadelhosni

              Hello @Denke , any updates about your progress ?

              D Offline
              D Offline
              Denke
              Hardware Contributor
              wrote on last edited by
              #29

              @ahmedadelhosni Going slowly at the moment had to do a respin on my thermostat project as i have made some small errors. Some of the design is the same so i will verify some things on the other design. Also waiting for chinese new years to end

              RaspberryPi-Openhab

              ahmedadelhosniA 1 Reply Last reply
              0
              • D Denke

                @ahmedadelhosni Going slowly at the moment had to do a respin on my thermostat project as i have made some small errors. Some of the design is the same so i will verify some things on the other design. Also waiting for chinese new years to end

                ahmedadelhosniA Offline
                ahmedadelhosniA Offline
                ahmedadelhosni
                wrote on last edited by ahmedadelhosni
                #30

                @Denke Yeah the holiday takes a long period there :)

                Actually yesterday I read a lot about AC-DC converters and really learned new things, but I may need your help in clarifying some points please. I watched this video which guided me to this type of circuit design. Modlet Smart-Outlet Teardown and Review - (IT'S A POS)

                Be aware that by this type of design with the transformer less design considerations needs to be taken when connecting computers and other stuff.

                1- What I learned yesterday is that a "transformless" design is not safe ( don't know to what level of safety though ), but I read that there is no isolation between Main inputs and low voltage.
                My questions:

                • Is this normal ? Would that affect the Atmega and other components ?
                • How to avoid this ?

                2- The above video mentioned that the Modlet outlet uses LNK304DN Datasheetwith outputs 12V. The below picture is from the datasheet and that reference was even used in the Modlet outlet as mentioned in the video.

                0_1454769854531_upload-006ff262-c868-415c-89c6-6d859b964de8

                My question:

                • There are different designs in the datasheet but I can't diffrentiate between them and what is the best to use, but in all cases, this design still lacks the safety procedures, correct ? Like there is no MOV, Fuse .. ? It is just the circuit to produce a 12V 120mA which shall be stable and not noisy. Correct ?

                3-

                The AC is on the left hand side. the 0.33 uF capacitor in series on the 240 sets the maximum current, which should be around 10 mA on the AC side

                I then changed some parts as the transformerless design would in simulation not give more than 10mA so I added the MAX 17552 circuit in between and set the input voltage to 24 V with the zener diode and by that I will be able to draw about 30 mA (starting current of the circuit that I tested is around 24 mA).
                Can you explain what the 0.33 uF does to set the maximun current ?

                • What is the maximum current and how was it calculated ?
                • How can I increase the output current to 100mA 5v/3.3v ?
                • Actually the schematic is not clear at all when I download the pictuers. Maybe resolution :)

                Thanks a lot for your support.

                T 1 Reply Last reply
                1
                • m26872M Offline
                  m26872M Offline
                  m26872
                  Hardware Contributor
                  wrote on last edited by
                  #31

                  @Denke Very nice project! Hope to see a working protype soon. Any thoughts about making a relay switch based on this design. Will there be space and power for a 10A relay?

                  D 1 Reply Last reply
                  0
                  • m26872M m26872

                    @Denke Very nice project! Hope to see a working protype soon. Any thoughts about making a relay switch based on this design. Will there be space and power for a 10A relay?

                    D Offline
                    D Offline
                    Denke
                    Hardware Contributor
                    wrote on last edited by
                    #32

                    @m26872 I guess there will be space for 1 or 2 relays. But it will be crowded, but nothing is impossible

                    RaspberryPi-Openhab

                    1 Reply Last reply
                    0
                    • ahmedadelhosniA ahmedadelhosni

                      @Denke Yeah the holiday takes a long period there :)

                      Actually yesterday I read a lot about AC-DC converters and really learned new things, but I may need your help in clarifying some points please. I watched this video which guided me to this type of circuit design. Modlet Smart-Outlet Teardown and Review - (IT'S A POS)

                      Be aware that by this type of design with the transformer less design considerations needs to be taken when connecting computers and other stuff.

                      1- What I learned yesterday is that a "transformless" design is not safe ( don't know to what level of safety though ), but I read that there is no isolation between Main inputs and low voltage.
                      My questions:

                      • Is this normal ? Would that affect the Atmega and other components ?
                      • How to avoid this ?

                      2- The above video mentioned that the Modlet outlet uses LNK304DN Datasheetwith outputs 12V. The below picture is from the datasheet and that reference was even used in the Modlet outlet as mentioned in the video.

                      0_1454769854531_upload-006ff262-c868-415c-89c6-6d859b964de8

                      My question:

                      • There are different designs in the datasheet but I can't diffrentiate between them and what is the best to use, but in all cases, this design still lacks the safety procedures, correct ? Like there is no MOV, Fuse .. ? It is just the circuit to produce a 12V 120mA which shall be stable and not noisy. Correct ?

                      3-

                      The AC is on the left hand side. the 0.33 uF capacitor in series on the 240 sets the maximum current, which should be around 10 mA on the AC side

                      I then changed some parts as the transformerless design would in simulation not give more than 10mA so I added the MAX 17552 circuit in between and set the input voltage to 24 V with the zener diode and by that I will be able to draw about 30 mA (starting current of the circuit that I tested is around 24 mA).
                      Can you explain what the 0.33 uF does to set the maximun current ?

                      • What is the maximum current and how was it calculated ?
                      • How can I increase the output current to 100mA 5v/3.3v ?
                      • Actually the schematic is not clear at all when I download the pictuers. Maybe resolution :)

                      Thanks a lot for your support.

                      T Offline
                      T Offline
                      tante ju
                      wrote on last edited by
                      #33

                      @ahmedadelhosni said:

                      My questions:

                      • Is this normal ? Would that affect the Atmega and other components ?
                      • How to avoid this ?

                      This is a matter of reference. When you have a power source with no contact to any othe rreference you are safe to touche one contact of that power source. If you make contact to the other one, you would be a resistor to the power source and act as esistor, having current runningthrough your body with all the negative impacts, including chance of death.

                      As explained, that is a matter of the reference. When you use a transformator, where secondary is not connected to anything else, you could safely make contact. In case you use any transfromless design, everything is somehow connected to mains. You are connected to grounds, so touching anything would be dangerous. As long as you do not touch anything, you are safe.
                      In fact a lot of electronics is tranformless with enough and safe insulation around it, so that no contact to grounds is possible. It is not only affecting persnal health, but could also be a source of fire if there could leak any current to grounds or mains from that circuitry. That's the reaosn for the insulation.

                      In fact this applies to transformators as well, as the primay side has contact to grounds.

                      So, it does not affect any Atmel or so, it just raises the level of security precautions you have to take care of for this type of circuitry.

                      ahmedadelhosniA 1 Reply Last reply
                      2
                      • T tante ju

                        @ahmedadelhosni said:

                        My questions:

                        • Is this normal ? Would that affect the Atmega and other components ?
                        • How to avoid this ?

                        This is a matter of reference. When you have a power source with no contact to any othe rreference you are safe to touche one contact of that power source. If you make contact to the other one, you would be a resistor to the power source and act as esistor, having current runningthrough your body with all the negative impacts, including chance of death.

                        As explained, that is a matter of the reference. When you use a transformator, where secondary is not connected to anything else, you could safely make contact. In case you use any transfromless design, everything is somehow connected to mains. You are connected to grounds, so touching anything would be dangerous. As long as you do not touch anything, you are safe.
                        In fact a lot of electronics is tranformless with enough and safe insulation around it, so that no contact to grounds is possible. It is not only affecting persnal health, but could also be a source of fire if there could leak any current to grounds or mains from that circuitry. That's the reaosn for the insulation.

                        In fact this applies to transformators as well, as the primay side has contact to grounds.

                        So, it does not affect any Atmel or so, it just raises the level of security precautions you have to take care of for this type of circuitry.

                        ahmedadelhosniA Offline
                        ahmedadelhosniA Offline
                        ahmedadelhosni
                        wrote on last edited by
                        #34

                        @tante-ju
                        Thanks for great clarification.
                        So does this only happens when the device is pluged in the wall ? In other words, there are a bunch of capacitors and passive components in the low side which has rederence to main inputs ( that's what i understood ) so touching is damgerous while plugged. But if i unplugged the device, will it still contain charges which can kill me ?
                        Suppose this is a wall plug and I have both terminals of the plug free to be touch ofcourse. So will the charges disappate through the terminals and then to my body ?

                        1 Reply Last reply
                        0
                        • scalzS Offline
                          scalzS Offline
                          scalz
                          Hardware Contributor
                          wrote on last edited by scalz
                          #35

                          @ahmedadelhosni : I agree too. yes mostly inwall. and yes there still can be some capa charged.
                          for the difference in the schematic. Generally you can use the standard schematic in datasheet for simple things even if you have to add few components. But for things like transformerless, which is more tricky for instance, it is not sufficient. you have to add components around. I don't remember right as I have already looked at this (and have a bunch of lnk306 and tny in stock), there are more complete schematics in appnotes or in the datasheet. But footprint increase to have something more secure or more optimized (the reason why I choosed hilink finally, but in some case transformerless makes sense and insulating is mandatory!). There are online tools at powerintegrations, to calculate what is possible to do regarding value of component.

                          1 Reply Last reply
                          2
                          • D Offline
                            D Offline
                            Denke
                            Hardware Contributor
                            wrote on last edited by Denke
                            #36

                            Thanks Tante-ju and Scalz for helping out with the answer. This is why i stated that you need to treat the equipment as hot, becouse that you don't have control of the reference to ground. But as long as it stays "inwall" and you are using 230 V rated switches on the low voltage switch then the insulations shall be ok and safe. But as soon as you open up and work with it you need to treat is as hot.

                            RaspberryPi-Openhab

                            1 Reply Last reply
                            1
                            • ahmedadelhosniA Offline
                              ahmedadelhosniA Offline
                              ahmedadelhosni
                              wrote on last edited by
                              #37

                              Thank you all. I still want to know whether there will be charges also when I unplug it or not ?
                              I am giving the example of a wall plug because it can be plugged and unplungged several times and the terminals can be touched.

                              D 1 Reply Last reply
                              0
                              • ahmedadelhosniA ahmedadelhosni

                                Thank you all. I still want to know whether there will be charges also when I unplug it or not ?
                                I am giving the example of a wall plug because it can be plugged and unplungged several times and the terminals can be touched.

                                D Offline
                                D Offline
                                Denke
                                Hardware Contributor
                                wrote on last edited by
                                #38

                                @ahmedadelhosni That all has to do if you have some sort of bleeder. or something that uses the charge. So in my design on the secondary side (+5V) there is always something that consumes the current. On the primary side you can see that there is bleeder resistors in paralell with the capacitor. So it should be safe from that aspect

                                RaspberryPi-Openhab

                                ahmedadelhosniA 1 Reply Last reply
                                0
                                • D Denke

                                  @ahmedadelhosni That all has to do if you have some sort of bleeder. or something that uses the charge. So in my design on the secondary side (+5V) there is always something that consumes the current. On the primary side you can see that there is bleeder resistors in paralell with the capacitor. So it should be safe from that aspect

                                  ahmedadelhosniA Offline
                                  ahmedadelhosniA Offline
                                  ahmedadelhosni
                                  wrote on last edited by
                                  #39

                                  @Denke yeah great. I understood now.
                                  I am thinking of using LNK304 to produce 120mA max. Still trying to investigate how to layout the pcb design correctly from a safety prespective.
                                  Thanks for support

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    Denke
                                    Hardware Contributor
                                    wrote on last edited by Denke
                                    #40

                                    Boards are now ordered. Lets hope they will work fine. I have some doubts about EMI coming from the boards when dimming. So now it will be measure and correct if needed

                                    RaspberryPi-Openhab

                                    1 Reply Last reply
                                    1
                                    • D Offline
                                      D Offline
                                      Denke
                                      Hardware Contributor
                                      wrote on last edited by
                                      #41

                                      Finally new boards have arrived..

                                      Assembly will start soon:)
                                      0_1458579519569_20160321_172537 [297989] (2).jpg

                                      RaspberryPi-Openhab

                                      ahmedadelhosniA 1 Reply Last reply
                                      2
                                      • D Denke

                                        Finally new boards have arrived..

                                        Assembly will start soon:)
                                        0_1458579519569_20160321_172537 [297989] (2).jpg

                                        ahmedadelhosniA Offline
                                        ahmedadelhosniA Offline
                                        ahmedadelhosni
                                        wrote on last edited by
                                        #42

                                        @Denke Nice :) I am really excited to see your results.
                                        Regarding the resistor which is in parallel to act as a bleeder. What value do you think the most suitable ? 100K ? 1M ? and howa much watt ?

                                        Thanks.

                                        D 1 Reply Last reply
                                        0
                                        • ahmedadelhosniA ahmedadelhosni

                                          @Denke Nice :) I am really excited to see your results.
                                          Regarding the resistor which is in parallel to act as a bleeder. What value do you think the most suitable ? 100K ? 1M ? and howa much watt ?

                                          Thanks.

                                          D Offline
                                          D Offline
                                          Denke
                                          Hardware Contributor
                                          wrote on last edited by
                                          #43

                                          @ahmedadelhosni
                                          Hi I have used 1M as bleeder in 0603 size. This resistor should be able to handle around 0.1W.

                                          If i have calculated right the power in the bleeder resistor should be around 0.05W

                                          RaspberryPi-Openhab

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


                                          9

                                          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