Joshua
Junior Member
Posts: 75
|
Post by Joshua on Aug 27, 2018 21:40:40 GMT
Gentlemen,
Do you guys have a diagram for the following items? I'm looking to implement a simple LED strip (white at first) control from the RFM end node.
// 32 DIM1: Dimmer triac control for light intensity. Zerocross detector in this function. brump added // 70 POTCF: read potenttiometer for local ceiling fan speed control (BRUMP ADDED)
I've seen diagrams with MOSFET control. Can the DIM1 drive this?
Also, what potenttiometer resistance is used?
|
|
|
Post by greginkansas on Aug 28, 2018 22:50:47 GMT
Joshua, I use a node that has IR for LED strips. Then you use all the drivers that comes with it.
|
|
|
Post by papa on Aug 29, 2018 13:14:48 GMT
greg, thanks for the hint about "a node that has IR for LED strips." That sounds interesting. Could you please provide more information?
|
|
|
Post by greginkansas on Aug 29, 2018 23:29:13 GMT
Get a LED strip that has a IR remote, as a lot do, then you can use the IR lib to get the code for remote buttons. then setup the node to send IR on getting the commands from openhab. It works good for me, I have the TV and some LED strips on two nodes right now. Here is one nodes code the file is a mess but works
|
|
Joshua
Junior Member
Posts: 75
|
Post by Joshua on Sept 16, 2018 13:33:10 GMT
I've been able to add another node for the Led
// 35 LED_Driver: (JA added) control single color LED Strip D6. Brightness value 0-255
|
|
|
Post by papa on Sept 29, 2018 20:17:52 GMT
Thanks, Joshua. Also helpful would be OpenHAB entries (especially for the .items & .sitemap file).
|
|
|
Post by papa on Sept 29, 2018 20:28:26 GMT
^^ Code for Infrared Driver of an LED strip included in the latest Multi-Choice Node Sketch Joshua & perhaps greg, could you test that I included all the new code & that the version above will work to program the new node? As far as I see, to customize for this node, one only needs to: UNcomment #define LED_Driver ... Use a NODEID number unique in your RFM69 network Edit ENCRYPTKEY "xxxxxxxxxxxxxxxx" to match the key you gave your RFM69 Gateway UNcomment according to the frequency of your RFM69 radios Probably UNcomment #define IS_RFM69HW
PS To find the new code, search for: "ifdef LED_Driver" "send35" "case (35)"
|
|
|
Post by greginkansas on Sept 29, 2018 22:02:11 GMT
Joshua, after a quick scan of the code it looks like you are using the driver of the strip? I am not modding the strip just sending a IR command to the strip controller. Do not have to open the strip.
papa: My understanding is that the code uses a separate infrared LED to send infrared commands to the controller of an unmodified LED strip. Am I correct?
Joshua, does the LED strip you listed include a controller or in addition to the strip does one need a controller like what's part of this package?
papa: Apparently from what Joshua put below, I was NOT correct.
|
|
Joshua
Junior Member
Posts: 75
|
Post by Joshua on Oct 3, 2018 19:44:42 GMT
There's nothing special with the code, I'm using PWM output, for Arduino you can use analogWrite() on pins 3, 5, 6, 9, 10 or 11. I'm controlling via MOSFET wired directly to the led power inputs.
Item
LED_Dimmer (Dimmer) { mqtt=">[mqtt:mosquitto:home/rfm_gw/sb/node02/dev35:command:JS(ledconvert.js):default]" }
You can use a transform script to convert the range from 0 - 100 to 0 - 255
Transform script
ledconvert.js (In the transforms folder)
(function(i) { if(input >= 0) { return input / 100 * 255; } else { return null; } })(input)
Sitemap
Slider item=LED_Dimmer
|
|
|
Post by greginkansas on Oct 4, 2018 0:23:58 GMT
That's what I thought. I did not see a IR library loaded.
papa: I misunderstood. I thought the LED in Joshua's Fritzing diagram above was an infrared LED, but apparently the LED stands for the LED strip.
Joshua: "I'm controlling via MOSFET wired directly to the led power inputs"
papa: So apparently from the Fritzing diagram, the 9 volts provide the power for the LED strip & Arduino D10 controls the LED brightness via the MOSFET. Correct?
|
|
Joshua
Junior Member
Posts: 75
|
Post by Joshua on Oct 4, 2018 19:06:03 GMT
greginkansas: I updated fritzing to be more clear with the wiring. You can power both the led strip and the Arduino with the external power (9vdc in this case). However, you can go up to 12vdc for both.
|
|
|
Post by papa on Oct 4, 2018 22:33:37 GMT
Joshua, Looks like you are using a 5 volt Uno for this project. If so, how are you attaching an RFM69!radio, via a RFM69 breakout board that can handle more than 3.3 volts?
|
|
Joshua
Junior Member
Posts: 75
|
Post by Joshua on Oct 5, 2018 0:23:12 GMT
Will you shoot me the fzpz for the 3.3 Uno?
|
|
|
Post by papa on Oct 5, 2018 0:33:39 GMT
I don't remember if there is a separate fritz for the 3.3 volt Arduino compatible. & I'm away from my main computer for a couple weeks.
You might just add a note on the Fritz to use a 3.3 volt compatible rather than the Uno that is pictured because that is what is available.
One more change for the Fritz?? In the Fritz, you use the Arduino D10 pin (which is used for the RFM69 radio). In the sketch, you referred to D6.
|
|
Joshua
Junior Member
Posts: 75
|
Post by Joshua on Oct 5, 2018 1:20:27 GMT
Updated.
Papa: thanks
|
|
|
Post by papa on Oct 10, 2018 23:28:20 GMT
Joshua & I have moved this node to this new thread
|
|