Total noob's question about building a PWM light controller



  • I'm completely new to this — my VeraLite is coming tomorrow — but one of the things I want to do is to control dimmable 12V LED strings from my Z-Wave home automation system.

    There appears to be a surprising lack of off-the-shelf Z-Wave modules for this. I know how to control the lights from an Arduino board, but not how to control the Arduino board by Z-Wave. Some googling led me here, but it seems that the focus here is on creating new sensors (inputs)... I'm trying to create a custom output.

    Am I in the right place? And what sort of hardware would I need to add to my Arduino to interface with the Z-Wave network?


  • Hero Member

    @JoeStrout You would use MySensors instead of z-wave rather than trying to integrate them by adding a MySensors gateway to your Vera and then making MySensors LED dimmers. If you want to stick with z-wave, have you checked the Fibaro RGBW controller or the Kichler under cabinet Z-Wave dimmer/controller? There's a posting on the HS board on how to make it work with LEDs.

    Cheers
    Al


  • Admin

    @JoeStrout, personally, I and others (@petewill) have had great success with controlling LED strips using MySensors from a Vera HA controller. You can see some of the formative work from the very early MySensors days here - http://forum.micasaverde.com/index.php/topic,23342.0.html and a MySensors Dimmable Actuator explanation here - http://www.mysensors.org/build/dimmer If you search the forums you will see where people have built upon this quite successfully including extensions to RGBW strips.

    Right now I am developing an IR Blaster actuator. Once that is in a near complete state, we will produce a multi-channel LED Strip Controller. I developed an initial board a while ago that operates up to 4 independent strips with current and voltage sensing for power consumption reporting. I'm not suggesting that you wait, because if you have a need, you should take the MySensors DIY approach because it is a great learning experience that I'm sure will prove to be rewarding and fun.



  • Thanks, that's quite helpful.

    I'm still a bit confused about the gateway. I gather that this is a box that connects physically to the Vera (via Ethernet or USB) and then speaks some completely unrelated radio protocol to the various MySensors modules around the house.

    But I've read through the impressive list of products at the MySensors store, and I don't see a gateway. I did find the instructions for building a serial gateway, but man, that looks like a lot of work just to get started. Is there really no off-the-shelf, pre-programmed gateway I can buy so as to focus on the sensors and actuators right away?


  • Hero Member

    @JoeStrout Yes, the gateway is a device that connects to the Vera (or other controllers) and will speak the MySensors protocol. In it's simplest form, the gateway is only two parts that need to be connected together - an Arduino and the NRF24L01+ radio module and then connected via USB to the Vera. There are other optional components for the gateway and you may need to add a capacitor to make it work reliably. Pretty much all of the MySensors world requires do-it-yourself work, but over time more pre-built modules will likely become available. Right now I'm not aware of any pre-built gateways.

    Cheers
    Al



  • OK, that's fair enough... though I would suggest that a pre-built (and programmed) gateway for each of the major HA controllers, plus maybe just a couple of pre-built modules (something simple, like a light sensor and a lamp relay) would help people get in and have confidence that it's going to work before they roll up their sleeves and learn to DIY.

    In my case, I've used Arduino before, but I've also tinkered with radio transmission enough to know that I don't care for it much... I've had problems with interference, linking, etc. You guys all seem like amazingly cool froods who all know where your towel is, so I'm happy to give it a try. The cost savings over off-the-shelf ZWave modules is quite dramatic ($115 for a dimmer, really Kichler?!?).

    What's really bugging me, I guess, is that it seems a bit rube-goldbergish to fill my house with (1) WiFi signals at 2.4 GHz, (2) Z-Wave signals at 900 MHz, and (3) MySensors signals at 2.4 GHz again. (Hey, will WiFi and MySensors interfere with each other?)

    If I have to power a 2.4 GHz radio on the dimmer module, I wonder if I can't bypass the MySensors gateway, and instead throw on a WiFi module and speak to it directly. But that may be a more difficult path.

    At any rate, you've given me a lot to think about, and I'm looking forward to tinkering with all this (and dragging my two boys into it with me!).


  • Contest Winner

    @JoeStrout said:

    What's really bugging me, I guess, is that it seems a bit rube-goldbergish to fill my house with (1) WiFi signals at 2.4 GHz, (2) Z-Wave signals at 900 MHz, and (3) MySensors signals at 2.4 GHz again

    those waves are there already!!!

    😉

    @JoeStrout said:

    instead throw on a WiFi module and speak to it directly

    you can certainly just create a WiFi or ethernet device with Arduino that can talk to your Vera controller.

    I did a kind of scene controller that works over ethernet... dimming LEDs and all. If you want, I'll share the code...

    When you get there, you can get some help here too. A lot of forum members have created Lua code to be able to do what you want (i.e. dimmer).


  • Admin

    @JoeStrout said:

    OK, that's fair enough... though I would suggest that a pre-built (and programmed) gateway for each of the major HA controllers, plus maybe just a couple of pre-built modules (something simple, like a light sensor and a lamp relay) would help people get in and have confidence that it's going to work before they roll up their sleeves and learn to DIY.

    We are going to offer just that - checkout @tbowmo 's gate way device that he is developing http://forum.mysensors.org/topic/1137/gateway-device It will be awhile before you can buy one so I recommend that you gin up a gateway device on a bread board in the interim. Pretty easy and will be a good learning experience that will underpin your understanding of how MySensor's works - see http://www.mysensors.org/build/serial_gateway

    There are a lot of people here who will help you along the way.



  • Thanks. Just one more question for now, and then I'll quit pestering you:

    If it's possible to create a WiFi device with Arduino that talks to Vera directly, then why use the gateway? What are the pros and cons of each approach?


  • Admin

    @JoeStrout said:

    Thanks. Just one more question for now, and then I'll quit pestering you:

    If it's possible to create a WiFi device with Arduino that talks to Vera directly, then why use the gateway? What are the pros and cons of each approach?

    Think of the gateway as a proxy that sits between an HA controller (e.g. Vera, Homeseer, etc.) and the MySensors mesh network comprising all your sensors and actuators. The gateway manages the MySensors inter-node network communication and provides a simple interface protocol (common abstraction) that extends the reach of any given HA Controller into the MySensors network. In fact, if you wanted, you could even have multiple gateways managing multiple MySensors constellations, each accessible by your standard HA controller using readily available plugins. Does this make sense? Oh, and don't worry about pestering - jump on board, ask away and learn 🙂


  • Contest Winner

    @JoeStrout said:

    Thanks. Just one more question for now, and then I'll quit pestering you:

    If it's possible to create a WiFi device with Arduino that talks to Vera directly, then why use the gateway? What are the pros and cons of each approach?

    building on @blacey's comments, the MySensors IDE (which includes the Vera plugin) gives you many sensor options with your Vera, so that you will not have to develop custom Vera device files for your ethernet/wifi nodes.

    So you can 'out of the box' attach many different types of devices, particularly because the MySensors team and community members has done a lot of work to get many of the most common devices connected.

    Oh yeah... the NRF radio modules are readily available and a lot less expensive than typical WiFi modules, though that Particle Photon at $19 looks promising.



  • OK, it's beginning to become clear. My initial gadgets & gizmos should arrive today, so I'll start tinkering, and I'm sure more clarity will come.

    Thanks for the quick responses, and for your patience. This is so far the best HA forum I've found anywhere!


Log in to reply
 

Suggested Topics

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts