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. Announcements
  3. 💬 Dimmable LED Actuator

💬 Dimmable LED Actuator

Scheduled Pinned Locked Moved Announcements
59 Posts 27 Posters 13.7k Views 27 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.
  • mfalkviddM mfalkvidd

    @Creaky the dimmer uses PWM to control the light level, so the mosfet is always either in cutoff or fully saturated. So using IRLz44N with 5V will work just as well as 3.3V.

    CreakyC Offline
    CreakyC Offline
    Creaky
    wrote on last edited by
    #21

    @mfalkvidd Thanks for the reply!

    1 Reply Last reply
    1
    • mfalkviddM mfalkvidd

      @Creaky the dimmer uses PWM to control the light level, so the mosfet is always either in cutoff or fully saturated. So using IRLz44N with 5V will work just as well as 3.3V.

      CreakyC Offline
      CreakyC Offline
      Creaky
      wrote on last edited by
      #22

      @mfalkvidd Just so you know, there is no PWM involved in this sketch. I've just build this setup/node and it works great. You can see that the LED are continuously fed and brightness is changed by changing the voltage to the LEDs through the MOSFET.

      mfalkviddM 1 Reply Last reply
      0
      • CreakyC Creaky

        @mfalkvidd Just so you know, there is no PWM involved in this sketch. I've just build this setup/node and it works great. You can see that the LED are continuously fed and brightness is changed by changing the voltage to the LEDs through the MOSFET.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by mfalkvidd
        #23

        @Creaky the sketch linked in the first post uses pwm. But you might be using some other sketch?

        CreakyC 1 Reply Last reply
        0
        • riochickenR Offline
          riochickenR Offline
          riochicken
          wrote on last edited by
          #24

          It might be a very nice idea to use neopixels with this, a little expensive though when using a lot of LED's but still it's possible to dim them just by using code.. I am afraid I am not able to do that and it was just a small thought... :)

          1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @Creaky the sketch linked in the first post uses pwm. But you might be using some other sketch?

            CreakyC Offline
            CreakyC Offline
            Creaky
            wrote on last edited by Creaky
            #25

            @mfalkvidd Yikes, you're right! I drew my conclusion too soon and only by watching the LED strip at max brightness. At max brightness the switching frequency is so high it is no longer perceptible by the eye. Mea culpa...

            mfalkviddM 1 Reply Last reply
            0
            • CreakyC Creaky

              @mfalkvidd Yikes, you're right! I drew my conclusion too soon and only by watching the LED strip at max brightness. At max brightness the switching frequency is so high it is no longer perceptible by the eye. Mea culpa...

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #26

              @Creaky yes the switching is pretty quick. I guess that's the whole idea :) I have noticed a refraction pattern in the kitchen sink when using a thin jet of water though.

              The analogWrite function in Arduino is very poorly named, since it doesn't really write an analog value. But I guess it is hard to change now.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                antonholmstedt
                wrote on last edited by
                #27

                I plan to use a LED strip as a closet light, controlled by a magnetic door switch, and of course also controllable in Domoticz. What would be the right way to write the code, should the pro mini send the state of the magnetic switch to the controller and then let the controller turn on the light, or is it easier to let the pro mini turn on the light directly and then report the state back to the controller? Big difference in delay?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  antonholmstedt
                  wrote on last edited by
                  #28

                  It's a closet with two sliding doors and therefore two magnetic switches, and I want the LED to turn on when opening one of the doors, but also be able to turn it off remotely if we forgot to close it when leaving our home.

                  1 Reply Last reply
                  0
                  • boblasureB Offline
                    boblasureB Offline
                    boblasure
                    wrote on last edited by
                    #29

                    I would like to use this with a 48 Watt led which uses a constant-current power supply 54 - 87 VDC 600 ma output. This mosfet isn't high enough voltage rating, the IRF630MFP is rated at 200V 9amp, however I have questions about if the uC output will power the gate. The gate-source voltage is +/- 20. The VGS(th) gate threshold voltage is 2 to 4 volts with typ 3V. I would cut the negative from the power supply and connect to source, then connect the Led negative to drain, and connect the drain to ground on the uC? I need a reality check- does this sound possible or will I fry something?

                    1 Reply Last reply
                    0
                    • WieselW Offline
                      WieselW Offline
                      Wiesel
                      wrote on last edited by
                      #30

                      Hi,
                      I'm new in MySensors and build this Dimmer - LED with and without the rotary encoder which works fine.
                      Now I would like to decouple the rotary encoder as a battery powered "standalone" sensor which is (in best case) connected directly to the LED-Dimmer. Furthermore the decoupled rotary encoder should be always in sleep mode until the rotary encoder awake the arduino.
                      Is that possible ? I'm just stuck to seperate the code for the rotary encoder from the led-dimmer code.
                      Thank you in advance.

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        joschre
                        wrote on last edited by
                        #31

                        hi, i used the example sketch. i also changed from "delay" to "wait" in fade section. The problem: i can change the percentage for example 8 times and then the gateway crashes and reboots. In a other case it works 12 times and then the gateway crashes. All other nodes (Temp, Hum) works fine all the time.

                        mfalkviddM 1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          joschre
                          wrote on last edited by
                          #32

                          oh, i use mysensors serial gateway connected to a raspberry with fhem running.

                          1 Reply Last reply
                          0
                          • J joschre

                            hi, i used the example sketch. i also changed from "delay" to "wait" in fade section. The problem: i can change the percentage for example 8 times and then the gateway crashes and reboots. In a other case it works 12 times and then the gateway crashes. All other nodes (Temp, Hum) works fine all the time.

                            mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #33

                            @joschre could you post the debug output from the node?

                            1 Reply Last reply
                            0
                            • J Offline
                              J Offline
                              joschre
                              wrote on last edited by
                              #34

                              Problem solved! The 3.3v Form arduino nano was too Bad for the nrf24l01j pa lna with PA_LEVEL MAX. NOW i usw an external regulator an everything is fine :-) sorry for this newbie fault :-D

                              mfalkviddM 1 Reply Last reply
                              1
                              • J joschre

                                Problem solved! The 3.3v Form arduino nano was too Bad for the nrf24l01j pa lna with PA_LEVEL MAX. NOW i usw an external regulator an everything is fine :-) sorry for this newbie fault :-D

                                mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by
                                #35

                                @joschre great that you found a solution. Thank for reporting back.

                                1 Reply Last reply
                                0
                                • U Offline
                                  U Offline
                                  user2684
                                  Contest Winner
                                  wrote on last edited by
                                  #36

                                  Hi, I've noticed the V_DIMMER of the example is not (anymore?) available in https://www.mysensors.org/download/serial_api_20, am I wrong? Thanks

                                  mfalkviddM 1 Reply Last reply
                                  0
                                  • U user2684

                                    Hi, I've noticed the V_DIMMER of the example is not (anymore?) available in https://www.mysensors.org/download/serial_api_20, am I wrong? Thanks

                                    mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by mfalkvidd
                                    #37

                                    @user2684 you're right. I think it is supposed to be S_DIMMER (S_ is used for presentation)

                                    1 Reply Last reply
                                    0
                                    • LacesL Offline
                                      LacesL Offline
                                      Laces
                                      wrote on last edited by
                                      #38

                                      Dear Guys,

                                      How can I control an RGB ledstrip with this config may I add more MOSFAT or how ?
                                      Thank you very much.

                                      L

                                      korttomaK 1 Reply Last reply
                                      0
                                      • LacesL Laces

                                        Dear Guys,

                                        How can I control an RGB ledstrip with this config may I add more MOSFAT or how ?
                                        Thank you very much.

                                        L

                                        korttomaK Offline
                                        korttomaK Offline
                                        korttoma
                                        Hero Member
                                        wrote on last edited by
                                        #39

                                        @Laces yes you can. The principal is the same, just one mosfet per channel.
                                        Search the forum for RGB or RGBW and you sould be able to find some examples.

                                        • Tomas
                                        1 Reply Last reply
                                        1
                                        • PlantexP Offline
                                          PlantexP Offline
                                          Plantex
                                          wrote on last edited by
                                          #40
                                          This post is deleted!
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          15

                                          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