No announcement yet.

Under kitchen cabinet LED lamps with mcsMQTT control

  • Filter
  • Time
  • Show
Clear All
new posts

  • lj502
    Pete, That is a nice controller, would have actually been better on my last project I just finished a couple days ago. Have a couple of replica gas pumps that are big curio cabinets and I converted them to Leds. Used some really nice RGB pucks that have larger plugs and heavy wiring, those terminal blocks would have been so handy.
    Click image for larger version

Name:	led puck.jpg
Views:	82
Size:	167.5 KB
ID:	1246682

    Click image for larger version

Name:	gas pump white.jpg
Views:	81
Size:	100.9 KB
ID:	1246683

    Click image for larger version

Name:	gas pump blue.jpg
Views:	81
Size:	72.2 KB
ID:	1246684

    Click image for larger version

Name:	gas pump harley.jpg
Views:	81
Size:	81.6 KB
ID:	1246685


    Leave a comment:

  • Pete
    Thank you John.

    The under the counter LED lamps will be on 24/7 at one light level or another.

    The in wall 120VAC switch controls the main power to the controller (and can be an automated switch) and the the RGB controller will automate the dim level and power.

    I have configured the Sonoff SV to auto power on the relay with 12VDC on. If it remembers the dim level that'll work out great. I am going to leave the pot in place for manual control.

    I did find a 120VAC switch combo LED power supply and 12VDC dimmer. These start at around $100 and go up to over $200 for a higher amperage power supply.

    Total spend on the LED power supply, RGB controller, Pot and case is less than ~ $30 plus the cost of the 120VAC switch.

    Today test mounted one light strip on the counter next to the stove. It illuminates the stove better than the overhead can and dual lamps next to the fan over the stove which is better for cooking. With one on each side mounted the light will be better. It is very easy to make and mount the aluminum tracks with diffusers.

    Leave a comment:

  • lj502
    Pete I use these small wifi contollers all over the house, and cheap too!

    Click image for larger version

Name:	led controller.jpg
Views:	266
Size:	239.7 KB
ID:	1246661

    Fun to solder, get to use my old man glasses!

    Click image for larger version

Name:	led controller flash wiring.jpg
Views:	274
Size:	151.3 KB
ID:	1246662
    They do retain the last settings if power is cut, comes back on to last setting.


    Leave a comment:

  • Pete
    It is similiar to the Sonoff SV board in design except that it has 5 channels that it controls using MOSFET chips and allowing dimming and on/off per channel.

    There is firmware available for it from the Tasmota, ESPeasy, ESPURNA and more. The authors have all tested this device with their firmware to work fine.

    Such that they speak Mosquitto. That said most of the firmware have configurations for OpenHab, Home Assistant and Domoticz.

    Here is a review of the RGB controller that I am using.

    The author of the ESPurna - Tinkerman seems to have tested the many WiFi LED controllers.

    A closer look at the H801 LED WiFi Controller
    Click image for larger version  Name:	H801A.jpg Views:	1 Size:	38.2 KB ID:	1246669

    They are all very similiar. Some weeks ago I talked about the Magic Home LED Controller as I was adding support for it in my ESPurna firmware. At the time a user pointed me to the H801 Led WiFi Controller by Huacanxing. The user in question (Minh Phuong Ly) even did a pull request with some preliminary support for it. So I decided to give it a go.

    The H801 is a 5 channels controller that you can find for about 9-10€ at Ebay or Aliexpress. It’s slighly more expensive than the Magic Home Led Controller (you can find the later for 7€ at Aliexpress) but it also is quite different from the insides…

    The outsides

    The first thing you notice is that this is quite bigger than the one by Magic Home. The later has also more “common” connectors both for power supply (the typical 2.1×5.5mm jack) and the strip connector since most have the same 4 lines for each channel (red, green and blue) and the common anode for power. The H801 uses screw terminals for every connection, input GND and VCC and the five channels (red, green, blue and two whites) and also the common anode.

    So the Magic Home is more ready for plug and play while the H801 is a more adaptative solution.

    Click image for larger version

Name:	H8010.jpg
Views:	84
Size:	10.0 KB
ID:	1246672

    The insides

    The H801 has four philips screws in the back and once you remove them you gain access to the insides of the controller. Things to notice: each channel is driven by a beefy DTU35N06 [pdf, datasheet] by Din-Tek, a 60V N-channel mosfet in a TO-252 package. These are rated 35A or 106W maximum power disipation and they use quite some space on the board, with thick traces running to the terminals. The ESP8266 interfaces the mosfets via an NXPHC245 DTU35N06 [pdf, datasheet] bus transceiver that does the level shifting.

    The W1 and W2 lines are routed back to the terminal using wires on the back, I guess the ran out of space in the PCB. Also on the back there is a AOZ1212AI [pdf, datasheet] buck regulator that is problably set to 5V output. And then the usual ASM1117 [pdf, datasheet] to lower it further down to 3V3 for the ESP8266.

    All in all it looks more roomy. Even thou I don’t know what mosfets the Magic Home Led Controller uses they are SOT-23 packages. The ones in the H801 look more solid. But the specs for both controllers are the same (according to some sources): 48W per channel. I’m not sure I would use 4A per channel on my 12V strips with the Magic Home controller, but I might try with the H801.

    Click image for larger version

Name:	H801B.jpg
Views:	90
Size:	85.6 KB
ID:	1246671

    Flashing it

    Another good thing the H801 has it that it exposes the required GPIOs for firmware flashing in an easy way, not the small pads in the Magic Home controller. There is a header with 3V3, GND, RX and TX labeled and a jumper to tie GPIO0 to ground when you want to boot into flash mode.

    Click image for larger version

Name:	H801C.jpg
Views:	83
Size:	25.6 KB
ID:	1246673

    The header with the programming cables (3V3 not needed if you are already powering the board via the screw terminals). Also, notice the jumper in place to enter into flash mode.

    ESPurna firmware supports H801 since version 1.8.0. It is defined by default as a 5-channels device (LIGHT_PROVIDER_RGB2W). If you want to use it with a standard RGB LED strip you might want to change the light provider to LIGHT_PROVIDER_RGB in the hardware.h file.

    To flash it add the jumper to J3 and connect the cables. Be aware that the labels in the header are from the programmer point of view, so wire TX to your programmer TX and RX to RX. If you are already powering the board via the screw terminals you don’t have to wire the 3V3 pin. Then run (assuming you already have PlatformIO installed):

    Once you have ESPurna in the H801 you can control your lights via MQTT, the REST API or third party home automation systems like Domoticz or Home Assistant.
    Other references

    These boards have been around for a while already and I’m not the first to review them or even reflash them. Check Eryk’s blog for another review and more code. Also Andreas Hölldorfer has an in depth review of the board.

    One curious thing about those two post is that in the pictures you can clearly see that the mosfets in those boards are different from what I found in mine. They use 20N06L [pdf, datasheet] by OnSemi very similar to the DTU35N06 but with a maximum power dissipation of 60W (the 20 in 20N06L stands for 20A and the 35 in 35N06 for 35A). Aside from that the boards look exactly the same.

    Also, I’d like to recommend you reading a great project by Denys Parnell where he shows how to repurpose the H801 as a motor controller. Very cool and so cheap!
    Last edited by Pete; September 10, 2018, 02:50 PM.

    Leave a comment:

  • mterry63
    Originally posted by Pete View Post

    Switching the Sonoff SV Mosquitto on and off controller to an RGBWW controller with dimming on it.
    Care to elaborate more on that controller Pete? Is it also MQTT capable? Source?

    Leave a comment:

  • Pete
    Built a couple of more LED lamps mounted on aluminum tracks with diffusers using the tiny clips to barrel connectors. PITA. Might go to soldering the leads on.

    Not sure that I want to wire them to the other side of the kitchen power supply.

    Might divide it up some using two or more power supplies.

    Switching the Sonoff SV Mosquitto on and off controller to an RGBWW controller with dimming on it.

    Leave a comment:

  • Pete
    06 of September, 2018 - LED lamp mounting modularity.

    Methodologies of LED lamp connectivity - one or more LED aluminum tracks with diffusers.

    A - 120VAC power on and off to LED driver ==> LED lamps
    B - 120VAC power on and off to 12VDC dimmer ==> LED lamps
    C - 120VAC power on and off to 12VDC automation control with dimmer box ==> LED lamps

    Modular pieces which will be plug n play.

    1 - LED power driver 1-2 AMP mounted in electrical box using 120VAC switch.

    Click image for larger version  Name:	LED-Driver1.jpg Views:	1 Size:	47.3 KB ID:	1245809

    2 - LED strips mounted on different lengths of aluminum tracks with diffusers and short pigtails with barrel connectors.

    I have made up a few of these of various lengths, LED warm 3000k, LED 5000k, low density and high density. The snap in to small brackets where as I use either 2 or 3 brackets.

    Click image for larger version  Name:	aluminumtrackswithdiffusers.jpg Views:	1 Size:	29.7 KB ID:	1245811

    3 - 12VDC power out under cabinet. Small footprint modular. Purchased female barrel connectors.

    Click image for larger version

Name:	12VDCConnections.jpg
Views:	79
Size:	85.9 KB
ID:	1245816

    Thinking of:
    A - barrel connector mounted on a small piece of white plastic wall plate fixed to the wall under the cabinet. 2" X .5" maybe
    B - using a keystone jack with barrel connector mounted in a single network surface jack mount. It is a bit bigger footprint.
    Last edited by Pete; September 6, 2018, 06:38 AM.

    Leave a comment:

  • Pete
    Copied over endeavor to the help section. Rewrote it.

    It is over here: Under kitchen cabinet LED lamps

    Note that I cannot find it looking under the help section and only see it if I look at my last posts.

    Switched LED lamps as original ones were too bright and needed to be dimmed for normal use. New LED strip is fine fully powered and provides a night light look with dimming.

    Earlier I mentioned good WAF with installed LED lamps. Well this morning wife asked if that was the brightest setting. I said yes.

    So today ordered another strip of LED lamps...SMD5050 which are higer density and brighter. Maybe will install installed one to the top of the kitchen cabinet. Tested it on the top before installing it on the bottom and it creates a nice subtle indirect lighting mood.

    Will do a pictorial of

    1 - cutting the aluminum track. You can use a hack saw or dremel tool for the aluminum and scissors to cut the diffuser.
    1 - joining two sections of the aluminum tracks and diffusers to make one piece.
    2 - sticking on the LED strip to the aluminum
    3 - cutting the LED strip down to size.

    I have read that the clips sold are really worthless and best to solder the power connections on the little solder traces / tabs.

    1 - put a dab of flux on the solder tab
    2 - clean the small tip and put some solder on it
    3 - use a clamp with hands to hold one wire to tab or just utilize some tape to hold down the wire and led strip to solder the wire to the tab.

    Getting new SMD5050 brighter and denser light strip today.

    In preparation prepared aluminum track and diffuser joining two sections of track. Note that the aluminum is thin and easy to cut with a hacksaw. Be careful with the sharp edges when cut. I sanded them down a bit.

    If using a dremel wear goggles and a mask.

    Be safe. Baby steps!!!

    Clean the inside of the track with alcohol to get rid of the dust. One mounting bracket and diffuser and LED strip keeps the track together nicely. I used 3 included clamps to mount the track. The track just snaps in to place.

    The LED tape has double stick 3M tape to adhere it to the track. You can only cut it where it is indicated on the LED tape.

    Click image for larger version  Name:	LED-Aluminum-Diffuser.jpg Views:	1 Size:	93.3 KB ID:	1244625

    Mounted the new white lite SMD5050 LED lamps. WAF is higher now as she likes the white light more than the warm light and it is brighter now.

    Note originally mentioned 3 LED sets were 4000K, warm LED's were 3000K / SMD2835 and new ones are 5000k/SMD5050.

    Click image for larger version  Name:	LEDMounted.jpg Views:	1 Size:	56.9 KB ID:	1244750

    03 of September, 2018

    Tested the amperage draw of the LED lamps SMD5050 48" test under cabinet configuration.

    Used a 1 AMP LED power driver. The 2 AMP LED power driver is also available and the same size and about $1 more.

    Full brightness it is .75 Amps which is 9 watts.
    50% brightness it is .25 Amps which is 3 watts

    Easy to measure amperage draw with a VOM.

    1 - Just set the dial to Amperage.
    2 - disconnect the postive lead going to LEDs
    3 - connect one VOM lead to output terminal and second VOM lead to LED terminal. Doesn't matter relating to red / black leads on VOM.

    The LEDs in the aluminum track with diffuser gets a bit warm but not hot. Noticed wife likes full brightness when doing food preparation. It does provide a nice bright counter light. Leaving them on 24/7. At night dimmed around 30%.
    Last edited by Pete; September 3, 2018, 04:34 PM.

    Leave a comment:

  • Pete
    Got the LED strip today and mounted it in the diffuser. Easy to mount the LEDs to the diffuser. Easy to join two diffusers using clips to extend length.

    Click image for larger version  Name:	LEDMounted.jpg Views:	1 Size:	13.4 KB ID:	1243830

    Fixed the button thing for the variable. Kept the slider for time bean to motivate me to install a tiny dimmer circuit to Sonoff SV.

    Click image for larger version  Name:	toggle.jpg Views:	1 Size:	18.4 KB ID:	1243831

    Finished. Brightness is just right at default. Not sure on warm white color of 3000k. May change this to 5000k.

    Click image for larger version  Name:	KitchenLEDsDone.jpg Views:	1 Size:	51.9 KB ID:	1243868
    SwitchEX makes a combo 12/24 VDC transformer and switch for LED's. It is priced around $100.00 and larger than a standard automated switch.

    Said endeavor cost around $40 USD for LEDs, Aluminum LED track, Sonoff SV, 12 VDC 1 AMP / 12 watt Transformer, Leviton 120VAC dual paddle wall switch and 12VDC dimmer purchased on Amazon. Ebay would be much less.
    Last edited by Pete; August 27, 2018, 08:09 AM.

    Leave a comment:

  • Pete
    Installed Arduino IDE on laptops with Ubuntu 18.04 to start all over again with the Sonoff SV.

    I will install base Tasmota firmware and will then install mcsTasmota and be done with it.

    Thinking now that is what I had done with currently implemented Sonoff Basic WiFi devices which are working fine with the mcsTasmota firmware.

    It is best as you mentioned before just to keep one firmware on the SonOff device relating to stability.

    Got a slider ON and OFF graphic to work fine last night. Will leave the firmware alone for time bean.

    Utilizing a Sonoff SV to switch LED lamps on is a first here of using WiFi Low Voltage switching versus using UPB 120VAC powerline switching.

    I have read someplace about a SonOff controlled 12VDC dimming circuit board.

    Relay ==> 12VDC dimmer control via Sonoff ==> 12VDC dimmed output to LEDs.

    There is enough play room for the addition of another circuit board inside of the current project box.

    Currently configured the Sonoff SV relay to turn on when powered on automagically.

    Click image for larger version  Name:	HS3LED.png Views:	1 Size:	104.5 KB ID:	1243606

    Amazon 2 day prime order for LED strip should have been here on Saturday and it is now late one day. May install another light strip on top of the same kitchen cabinet with another Sonoff SV board / dimmer. This strip would also be using same 1 AMP power supply 12VDC output.
    The aluminum diffusers are 1 meter long (~3 feet). There are brackets to join them as one piece to extend them the length of the cabinet.

    Note all of this is very modular. The 120VAC wall switch just controls the power to the LED transformer. You do not need to use the combo dimmer / Sonoff SV at all.

    Modularity is very plug n play here especially if I go to all barrel connectors.

    1 - 120 VAC wall switch to LED PS ==> LED lamps - no dimming or automation
    2 - 120 VAC wall switch to LED PS ==> 12VDC dimmer to LED lamps - statically set dim when powering on at wall switch
    3 - 120 VAC wall switch to LED PS ==> 12VDC SonOff / Dimmer module to LED lamps.

    Currently using 3 12VDC LED plates (500 watt brightness) in the garage for daylight (for working on my automobile(s)).

    These are so bright you cannot look at them. The transformer is powered on and off by a UPB switch and will remain this way.

    Years ago had a large opossum follow the automobile in to the garage. It was mean and would not leave the garage until I left it open for a day or so. The garage was dark and today by default the garage is daylight when opening any door or via the wall switch. Last few years have seen coyotes wondering around at 3 AM tripping outdoor motion sensors and CCTV. They are about the size of medium dogs.
    Last edited by Pete; September 6, 2018, 05:07 AM.

    Leave a comment:

  • Pete
    Thank you Michael. Will check the device configuration on the button configuration.

    Click image for larger version

Name:	button.jpg
Views:	86
Size:	82.9 KB
ID:	1243521

    It only created one graphic with one value of zero so created another one with one but it doesn't change the payload send.

    Click image for larger version

Name:	button2.jpg
Views:	80
Size:	8.2 KB
ID:	1243522

    Leave a comment:

  • Michael McSharry
    When you use the button then it uses the ValueStatusPairs to assign a payload value. Confirm from Device Management that 0 and 1 are mapped to Off and On. These can be edited, but should have been setup to be what was in the payload of the subscribe topic.

    Leave a comment:

  • Pete
    zero and one.

    Click image for larger version  Name:	zero-one.jpg Views:	1 Size:	6.6 KB ID:	1243507

    debug when shutting off with zero

    [100245] [MQTT] Received KitchenLEDs/relay/0/set => 0
    [100249] [RELAY] #0 scheduled OFF in 0 ms
    [100252] [RELAY] #0 set to OFF
    [100257] [MQTT] Sending KitchenLEDs => 0 (PID 333)
    [100315] [MQTT] Publish ACK for PID 333
    [100358] [MQTT] Sending KitchenLEDs/data => {"relay/0":"0","time":"2018-08-25 15:01:38"
    [100369] [MQTT] Received KitchenLEDs => 0
    [100372] [RELAY] Matched group topic for relayID 0
    [100384] [MQTT] Publish ACK for PID 334
    [101259] [RELAY] Saving mask: 0

    Debug when sending a one to turn it on.

    [190621] [MQTT] Received KitchenLEDs/relay/0/set => 1
    [190624] [RELAY] #0 scheduled ON in 0 ms
    [190628] [RELAY] #0 set to ON
    [190631] [MQTT] Sending KitchenLEDs => 1 (PID 335)
    [190641] [MQTT] Publish ACK for PID 335
    [190733] [MQTT] Sending KitchenLEDs/data => {"relay/0":"1","time":"2018-08-25 15:03:08"
    [190743] [MQTT] Received KitchenLEDs => 1
    [190745] [RELAY] Matched group topic for relayID 0
    [190758] [MQTT] Publish ACK for PID 336
    [191635] [RELAY] Saving mask: 1

    The light bulb graphic changes fine from zero to one or one to zero using number in configuration.

    If I change it to number to button it doesn't do anything.

    Click image for larger version  Name:	number.jpg Views:	1 Size:	78.3 KB ID:	1243510

    Last edited by Pete; August 25, 2018, 03:23 PM.

    Leave a comment:

  • Michael McSharry
    What payload do you send with KitchenLEDs/relay/0/set topic to make the relay turn on and off? What payload is received on KitchenLEDs/data:relay/0?

    Leave a comment:

  • Pete
    Thank you Michael. So trying it with mcsMQTT.

    Click image for larger version

Name:	sv-1.jpg
Views:	55
Size:	47.2 KB
ID:	1243480

    Works and changes the status except that it is a value change versus clicking on a button. If I change it to a button I see the button but it doesn't turn on and off the relay.

    Click image for larger version

Name:	sv2.jpg
Views:	55
Size:	6.6 KB
ID:	1243481

    Leave a comment: