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. OpenHardware.io
  3. 💬 OH MySensors RGBW Controller

💬 OH MySensors RGBW Controller

Scheduled Pinned Locked Moved OpenHardware.io
mysensorspcbrgbwcontroller
106 Posts 18 Posters 29.6k Views 19 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.
  • Sergio RiusS Offline
    Sergio RiusS Offline
    Sergio Rius
    wrote on last edited by Sergio Rius
    #76

    I've been working on an sketch for this board. Somewhere in the path I started adding functionalities and it ended in a library. Perhaps it's way overkill, but I thought that could be easier add it to NodeManager like that.
    It's based on the work done here and some more ideas around the network. Thanks to LastSamurai for the board and code and also to Jan.
    You can find the sources there: https://github.com/SergioRius/RGBWDimmer

    This thing includes a serial manager that I use myself, but you can remove it and delete all the code for debugging, and perhaps add yourselves if necessary.
    Just clone the repo or download and install as a zip library on Arduino IDE.
    The example works for the OH! MySensors RGBW board as is.

    It's very self explanatory in the code, but in essence:

    • It can be used stand-alone or with mysensors
    • You simply send to the commands and the class does all for you.
    • Uses a non blocking system for the fading.
    • Configurable fading time and resolution
    • Several configurable fading curves
    • Option for gamma (brightness + hue) calibration.

    I'm currently debugging the fading curves equations other than linear, as the arduino mcu capabilities are tight and it's so easy to overflow it. Also I'm doing a program for calibrating the hue (arduino with leds and a rotary encoder for manually adjusting), so for now gamma only compensates brightness. You can change the values if you prefer. I'll be a good idea to lower the white channel.

    It still lacks some memory optimization, but for now I'm scared about overflows. I got one of those and it was a two days nightmare and I had to revert to ints to get something running.
    I'll soon add a stand alone sample and port to NodeManager.
    For the while, for using it alone the minimal it's:

    #include "RGBWDimmer.h"
    RGBWDimmer myDimmer(1, 3, 5, 6, 9);  ///< id (to remove), Red Pin, Green Pin, Blue Pin, White Pin
    
    bool JustDontBlockLoop = true;
    
    void loop() {
      if(JustDontBlockLoop) {
          myDimmer.setNewValues(255, 0, 150, 0);  ///< RGBW decimal values. If you prefer hex, use setNewValuesHex
          myDimmer.StartFading();
          JustDontBlockLoop = false;
      }
      myDimmer.loop();
    }
    

    I hope you like it. And if you have any idea for adding functionality, please tell me.

    1 Reply Last reply
    1
    • Sergio RiusS Offline
      Sergio RiusS Offline
      Sergio Rius
      wrote on last edited by
      #77

      I updated the repo for being easier to download and install.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        LastSamurai
        Hardware Contributor
        wrote on last edited by
        #78

        Wow nice! Might take me some time, but I will take a look at your code (and maybe add some of its features back to my sketches if that fine with you).

        Sergio RiusS 1 Reply Last reply
        0
        • L LastSamurai

          Wow nice! Might take me some time, but I will take a look at your code (and maybe add some of its features back to my sketches if that fine with you).

          Sergio RiusS Offline
          Sergio RiusS Offline
          Sergio Rius
          wrote on last edited by
          #79

          @LastSamurai Yes, of course.
          Just a question. How did you make the "values curve"? You said in excel and perhaps a graph... did you manage to change graph values and update data in any way?

          I've made the sketch for adjusting the gamma values, something with a Serial monitor menu that allows for increasing and decreasing the channels in real time. And adjusted the greens for a better hue (orange being orange, not a greenish yellow) but now I do't know how to adapt the curve.
          I refuse to modify the 255 values by hand.

          Now I'm making a case for 3d-print. Where do I have to post it, there or in a separate post? I read anything about posts becoming entries at hardware.io and ¿build?

          1 Reply Last reply
          0
          • ThetaDevT Offline
            ThetaDevT Offline
            ThetaDev
            wrote on last edited by
            #80

            Do you really need an external voltage regulator for this module? I mean the Arduino Pro Mini has its linear regulator already built in. You can only draw about 100ma from it, but wouldn't that be sufficient for the micro, radio and the mosfet gates?

            1 Reply Last reply
            0
            • L Offline
              L Offline
              LastSamurai
              Hardware Contributor
              wrote on last edited by
              #81

              @ThetaDev Maybe you you could get away with it but especially the radio is very sensitive concerning the power supply. Cheap pro minis often use very cheap regulators too and then this might become a problem.
              I also wanted to support the high power version of the NRF and that definitly needs more power than provided by the onboard regulator.

              1 Reply Last reply
              0
              • pepsonP Offline
                pepsonP Offline
                pepson
                wrote on last edited by
                #82

                Hi
                How i can modify sketch files INO to use it with radio RFM69HW with this adaptaer:
                https://www.openhardware.io/view/16/NRF2RFM69#tabs-design

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  LastSamurai
                  Hardware Contributor
                  wrote on last edited by
                  #83

                  I never tried that but as far as I know you have to tell Mysensors to use a different kind of radio by adding a define like:

                  #define MY_RADIO_RFM69
                  

                  Just do a quick search on this forum though ;)

                  1 Reply Last reply
                  0
                  • pepsonP Offline
                    pepsonP Offline
                    pepson
                    wrote on last edited by
                    #84

                    And your project works also with Home Assistant ?
                    Can you show how it looks in your automation ? Which controller you use ? (Domoticz or other)
                    And on MySensors 2.2.0 this also works ?

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      LastSamurai
                      Hardware Contributor
                      wrote on last edited by
                      #85

                      I only had Home Assistant installed for some days (did not really like it at the time) so I can't tell you that it works 100% but it did back then. You have to add some strange additional messages but I tried to integrate that into my code.
                      I am using my RGBW controllers with openhab 2 in one location and with domoticz in another. As it is controlled by MySensors it works (and looks) pretty much like any other mysensors node. Both installations run on 2.2. Hope this helps :)

                      pepsonP 1 Reply Last reply
                      0
                      • L LastSamurai

                        I only had Home Assistant installed for some days (did not really like it at the time) so I can't tell you that it works 100% but it did back then. You have to add some strange additional messages but I tried to integrate that into my code.
                        I am using my RGBW controllers with openhab 2 in one location and with domoticz in another. As it is controlled by MySensors it works (and looks) pretty much like any other mysensors node. Both installations run on 2.2. Hope this helps :)

                        pepsonP Offline
                        pepsonP Offline
                        pepson
                        wrote on last edited by
                        #86

                        @lastsamurai
                        Very thanks for info. I try build and test with Home Assistant.

                        1 Reply Last reply
                        0
                        • Sergio RiusS Offline
                          Sergio RiusS Offline
                          Sergio Rius
                          wrote on last edited by Sergio Rius
                          #87

                          Mmmmm... How much have you pushed this board? I mean, in terms of load.
                          I just had one fail at me and I'm trying to understand what component may have been the weak link.

                          It was driving a 5m white stripe when it turned himself off and on again, but although the light was still on the node was down. I took it out and almost burned my hand. Not the mosfets, but the arduino and radio. Nothing seems bad (components good looking, arduino seems to start) but as soon as you apply 12v, even without load it starts the barbecue.

                          It seems that the mosfets are good to 4,2Ah if I understand it. So what would be the boards specs? :thinking_face:

                          1 Reply Last reply
                          0
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #88

                            Have you checked the voltage on the arduino?

                            Sergio RiusS 1 Reply Last reply
                            0
                            • gohanG gohan

                              Have you checked the voltage on the arduino?

                              Sergio RiusS Offline
                              Sergio RiusS Offline
                              Sergio Rius
                              wrote on last edited by
                              #89

                              @gohan As you suspected, it was 12v.

                              1 Reply Last reply
                              0
                              • gohanG Offline
                                gohanG Offline
                                gohan
                                Mod
                                wrote on last edited by
                                #90

                                No wonder why it got hot, poor little arduino :D

                                Sergio RiusS 1 Reply Last reply
                                0
                                • gohanG gohan

                                  No wonder why it got hot, poor little arduino :D

                                  Sergio RiusS Offline
                                  Sergio RiusS Offline
                                  Sergio Rius
                                  wrote on last edited by
                                  #91

                                  @gohan Yeah, but what is not that intiutive for me is why when load increases in the mosfets side, the ams regulator goes away.

                                  Anyways, no one knows what max led strip length is this board good for?

                                  L 1 Reply Last reply
                                  0
                                  • gohanG Offline
                                    gohanG Offline
                                    gohan
                                    Mod
                                    wrote on last edited by
                                    #92

                                    https://www.openhardware.io/view/559/LED-RGBW-Controller

                                    You may also consider this one

                                    1 Reply Last reply
                                    1
                                    • Sergio RiusS Sergio Rius

                                      @gohan Yeah, but what is not that intiutive for me is why when load increases in the mosfets side, the ams regulator goes away.

                                      Anyways, no one knows what max led strip length is this board good for?

                                      L Offline
                                      L Offline
                                      LastSamurai
                                      Hardware Contributor
                                      wrote on last edited by
                                      #93

                                      @sergio-rius A little late, sorry, but that depends on the mosfets you are actually using. I am driving ~5m strips of white leds with most of my controllers and they don't even really get hot.

                                      There is also a big(ish) update from my side concerning this project: I have designed, 3d printed and tested my own case for the controllers and they work great. I have just added the stl files and some images to the project page!!
                                      For now this project is done from my side. The controllers have been working great for the past 2 years but due to the "huge" (~1s) delay with my Mysensors network (with signing and openhab on a raspi) when switching the leds I am currently testing some MQTT and wifi based RGBWW controller boards as an alternative.

                                      alt text

                                      1 Reply Last reply
                                      1
                                      • pepsonP Offline
                                        pepsonP Offline
                                        pepson
                                        wrote on last edited by
                                        #94

                                        Hello
                                        How long led strips in meters i can connect to this device ? What max power led strips support it ?

                                        1 Reply Last reply
                                        0
                                        • pepsonP Offline
                                          pepsonP Offline
                                          pepson
                                          wrote on last edited by
                                          #95

                                          Why on 5 picture POWER MOSFET IRLM2502 is other side solder than on picture 9 ?

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


                                          27

                                          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