Controlling ceiling light LEDs

I have been looking at LEDs and how I could control them for two days flat... and am getting nowhere.

I am adding LED lighting to all rooms; some rooms like open plan living will have up to 20 different Watt LEDs; and I wonder how to control these.
E.g. the open plan area has 4 zones, each with two sets of LEDs, direct/strong/hight wattage and light/background lighting/low wattage LEDs.

  • One idea is to use standard LED + driver (230V), connect to a 16-port relay board, and connect the input for the relay board to a triac trailing edge dimmer. this approach takes out any uncertainties about what Voltage each LED requires (as each LED has its own driver).
  • The other idea is to connect the LEDs with DC to a current source with PWM dimming capability and shared high Wattage power supply.

The advantage for 1. is standard off-the-shelf products, but from what I am reading the triac-dimming may result in flicker.
The advantage for 2. may dim better, but seems more difficult to build.

The LEDs will ultimately grouped into zones and controlled by home automation software; here openHAB.

If I can find the right circuit or diagram, I could build boards with 8 individual outputs, maybe where I can adjust V and A to adapt the output to different LED Wattage.

I opened a few drivers, and measured the V; 3W LED runs on 9.5V, and a 5W runs on 18V. It must have something to do how these LED lights are wired internally.

Maybe some DMX controller could drive this???

Any hints, comments appreciated. Thanks.

  1. I don't really get what you want to do but relays an dimming are not friends.. You just want fixed dim levels?

  2. Yes, that's the way I would go. Dimming leds via mains (aka, sin chopping) is a pain. And if it's done cheaply you end up with 100Hz dimming. Which looks okay if just sit but watch what happens when objects move at speed... Terrible...

MaxG:
The advantage for 2. may dim better, but seems more difficult to build.

Mm, depends. The pro is you don't have to mess with mains, mains filtering, triac driving etc. And you can just buy the led drivers as modules.

MaxG:
If I can find the right circuit or diagram, I could build boards with 8 individual outputs, maybe where I can adjust V and A to adapt the output to different LED Wattage.

Just but a module for the right wattage. And remember, you NEVER drive a led with voltage, just current. If you set the right current the voltage will just match.

MaxG:
I opened a few drivers, and measured the V; 3W LED runs on 9.5V, and a 5W runs on 18V. It must have something to do how these LED lights are wired internally.

Most of them are just 1W leds in series. As many to match the wattage. 9,5V / 3 = 3,2V, 18V / 5 = 3,6. Last is a bit high but as expected both are close to the forward voltage of a white led :slight_smile:

MaxG:
Maybe some DMX controller could drive this???

You can probably buy DMX led drivers. But that's going to be some specialist or pro equipment. Not going to be cheap or DIY (why otherwise post on a Arduino forum). And don't know if that's the best setup.

MaxG:
Any hints, comments appreciated. Thanks.

Try to break it up. Easier to have more Arduino nodes in every corner of the room then 1 über Arduino that has to manage 20 groups with long wires etc.

And if you're still building, go for a wired communication system. A RS485 bus or something. More reliable (not that wireless is really unreliable but yeah), less energy, less clutter of the spectrum, easier to secure etc.

And controlling it with OpenHAB is cool but don't forget buttons. It's a cool gadget factor you can do everything with your phone but nothing is quicker then pressing a button for normal operations (that can't be done automatic with sensors).

Thanks... :slight_smile:
What I want to do... use LED ceiling lights; e.g. like this LED recessed lighting panel... they usually come with a suitable and dimmable driver.

Given I want to do the whole house, say 6 rooms; all up 50-ish LEDs.

Envisage to have an Arduino per room.

Have Ethernet everywhere, and can run KNX, DALI, whatever (like DMX only an example); since I haven't built it, why I am asking.

The set-up won't have buttons, as it simply pointless, given the number of lights. This decision has been made with great considerations and debate, and I won't deviate from it other than: each room has one central LED Oyster, which also houses temp, light, humidity, microphone, presence and motion sensors -- hence, this light can be operated in a traditional way with a switch.

Have you got an example of module to buy? driver and dimmer?

I posted on electrical engineering and got chucked out, as the questions was to broad. However, this is a strategic question, I would expect an engineer would explore. I do not have the current knowledge to decide how to best drive these different wattage LEDs in different rooms, with a system that uses some sort of standard comms and components... while I am open to build circuits if I can't find them ready-made.
The components have to go on DIN rails and subpanels; happy to surface mount, or build circuits which fit on a DIN rail holder; but first I need to get to understand which LEDs, which drivers, and how to dim these.

If I have say 50 LEDs and buy modules for them, they seem to be significantly more expensive than the cheap stuff that comes with LED and runs on 230V... but then, maybe this module can dim the LED properly.

I will install more Watt than I need to light the rooms, and dim them to what I need based on activity or ambient light sensor levels, which simply augments the natural light with additional percent for the LEDs.

I hope this makes sense, otherwise please ask more questions.

The ceiling lamps like that I've had do indeed have nice light but the driver is always cheap and of the 100Hz (120Hz) mains PWM dimming. Aka, terrible...

And depending on how big a room is that might be okay. But if that means a single Arduino needs to control 8 groups I would rethink that and just scale it down. If you make small universal nodes it's easy to use more then one.

And ethernet is cool but it's not simple nor energy efficient... So I would just use some sort of dedicated wired bus. And if you want wireless I would use something like MySensors. But keep security in mind with wireless. Manufactures ignored that for to long...

And I had to look up "led oyster" :smiley: But do you mean every rooms still has a single, non-domotics light? Okay, it is personal preference but I think mixing normal (/manual) light into a smart home just detracts from the smart aspect...

And again personal preference, but I would hate it if I need to get my phone out of my pocket every time I just want to increase the light because I look for something or I want to start cooking and need more light or even if I want to enable the "romantic mode". Because that you can't detect with normal sensors... I rather just have a button. That buttons triggers a content aware event instead of stupidly turning on the light. So the number of lights is not a part of the equation, it doesn't matter.

And about drivers, the PT4115 is a cool driver. It's a switch mode step down led driver with PWM capability. And you simply set the desired led current with a sens resistor. Up to you to measure the current of the panels and the voltage. Not to drive them with a voltage but because it's a step down driver so you need a supply voltage bigger then that. You can also buy them as modules, already set for a specific current (but you can always change it by swapping the sense resistor).

And on the topic on dimming, keep in mind our eyes are not linear. So you need to implement gamma control if you want it to look more linear. And 8-bit is barely enough to give you some range. And if you need wayy more light then you normally do you might even find that 1/256 of the brightness (step 1 of 8-bit PWM) is still quite bright / to bright for a super low light setting (night mode, movie mode or whatever).

I faced the same problems when I wanted to change the lighting in my basement/workshop.
Solved it by designing my own 16-channel PCA9685 LED driver boards.

Currently two of these boards are connected via a 2-wire I2C bus to a Mega with ethernet shield.
The mega also has movement/daylight sensors etc., a voice recognition module with RF link, and a web page to control things. Each LED driver board has a beefy 24volt supply.
I am using the 60-LEDs/12watt downlights from your link, and had to modify them for a Vf of ~18-20volt.
It involved cutting the LED strip inside in half, and connecting the two 30-LED halves in parallel.
This would not be needed if you would use 30-LED/6watt downlights.
All working 24/7 without big problems.

I am currently experimenting/designing the same LED driver board with onboard "bare" ESP-12 WiFi module.
That would eleminate the Mega and I2C/ethernet wiring.
Could be a few months away though.
Leo..

septillion:
And ethernet is cool but it's not simple nor energy efficient...

Ethernet is a must, as I have everything wired... as I am wired and do not like radiation in my house...

septillion:
do you mean every rooms still has a single, non-domotics light?rom the smart aspect...

This is a compromise for all the nay sayers who think we need a light switch... however, I started to like the idea for two reasons:

  1. Any stranger / visitor can operate a light switch
  2. it provides a "housing" for my electronics I had to put somewhere; and this type of light fitting (so not to everyone's taste) is a nice 'case' to house my electronics/sensors.

septillion:
I would hate it if I need to get my phone out of my pocket every time I just want to

Me too :slight_smile: No, this is the first step of the puzzle... voice control will follow later...
Lights go on based on presence and by ambient lighting...

septillion:
drivers, the PT4115 is a cool driver

Had a look, should do the trick...

septillion:
dimming, keep in mind our eyes are not linear.

... understood.

Wawa:
I faced the same problems when I wanted to change the lighting in my basement/workshop.

Thank you! I have been waiting for a response like this for almost one year. The big picture questions was raised then, as it was now. I could not believe that I was unable to round up an answer to my question, because people were either concerned with connecting 'a' LED to an Arduino, or they used off-the-shelve products.

What you have done is very close to to what I envisage... and I am very interested in hard and software of your project.

There seems to be an advantage for using the same wattage, but I can see different, say, 16-port boards (when using the PCA9685 -- which I would use too), each covering a different LED power consumption range.

I would use MQTT for the messaging / comms -- as this is the standard I have adopted for home automation control (as much as possible).

Why was the modification for the 12W LEDs required?
I rather use 12W than having to go to lower watt LEDs. In fact I am aiming to use three different Watt LEDs, and distribute these like bubbles in soda; meaning in (seemingly) a random size random location on the ceiling. "Seemingly" because the bigger ones will sit where needed, while the smaller ones fill in.

MaxG:
Why was the modification for the 12W LEDs required?
I rather use 12W than having to go to lower watt LEDs. In fact I am aiming to use three different Watt LEDs, and distribute these like bubbles in soda; meaning in (seemingly) a random size random location on the ceiling. "Seemingly" because the bigger ones will sit where needed, while the smaller ones fill in.

Those ceiling lights have five 0.2watt LEDs in parallel.
Power rating of the light is how many of those groups of five are connected in series.
6 groups for a 6watt light, and 12 groups for a 12watt light.

Common/cheap (buck) CC LED drivers need a higher supply voltage than Vf (working voltage) of the LEDs.
If you use a 24volt supply (common/cheap), you should use LED strings of six (Vf 6 * ~3.3volt) for max efficiency.
A 6watt light (30 LEDs) is already a string of six, and can be used directly.
A 12watt light (60 LEDs) would need a 36-40volt supply.
Costly/rare, and buck LED drivers don't like such a high voltage.
Not too hard to cut the ribbon in half, and parallel the two.

This LED driver can be configurated for 6watt (330mA) or 12watt (660mA) with a solder bridge.

I would first order one of each light (they come with a small, not dimmable, mains power supply).
I think you will find that there is not that much light difference between a 6watt and a 12watt light.
Leo..

Thank you... this post makes it clear to me what has puzzled me for a quite a while... how these LEDs are build and why they have the V and A they have... just pulled a 3W of these apart and it has 15 diodes... this should be 3 groups of 5 LEDs or 5 x 0.2W = 1W with 3 in series = 3W; the driver puts out 9.5V.

Would you share code and PCB files so that I can replicate the project?

Well, your post has certainly given me some answers I was looking for...

Assuming I can build this board, I can solve the following problems:
a) it is a working solution
b) I have software control over it; e.g. theme-ing, grouping
c) I should be able to change the schematic to cater for, say 3 different LED wattages
d) it is low Voltage; hence, no need for an electrician to install (which at 230V is a legal requirement in AU)
e) no plugs and drivers in the ceiling; thus reducing the risk of fire or repair in the ceiling
f) the PCA9685 you've used staggers the switching on of LEDs, thus avoiding the initial spike if all come on at the same time.

Nice!

MaxG:
Ethernet is a must, as I have everything wired... as I am wired and do not like radiation in my house...

Not saying you must use Wifi or wireless at all. But I think it's a stupid connection method for just dimmers... It's made for speed, not efficiency. And every mode then needs to have a separate cable to a switch. So I would opt for a dedicated bus.

MaxG:
This is a compromise for all the nay sayers who think we need a light switch... however, I started to like the idea for two reasons:

  1. Any stranger / visitor can operate a light switch
  2. it provides a "housing" for my electronics I had to put somewhere; and this type of light fitting (so not to everyone's taste) is a nice 'case' to house my electronics/sensors.

Nothing against a switch or a "housing" :slight_smile: What I do find stupid in a smart home is to have non-smart lights mixed in... Just let the system control that light as well. And for the visitors, that switch is great. Just let it trigger a macro and let it do the expected aka turn on the light :slight_smile:

MaxG:
voice control will follow later...

If you like that, that's up to you. (Y) But for day to day tasks a switch is simpler and in my opinion voice commands are just a gimmick :slight_smile: Especially when I have the volume cranked up to 11 and I'm practicing my dance moves and I just want to turn on the work light (/work light mode) in the kitchen to start cooking.

Not saying you should not have voice commands! Just saying, don't skip on switches and/or control panels as well :slight_smile:

MaxG:
Lights go on based on presence and by ambient lighting...

That's indeed the minimum. Without it I wouldn't dare to call it smart :stuck_out_tongue: But keep in mind sensors can't sens every situation.

MaxG:
There seems to be an advantage for using the same wattage, but I can see different, say, 16-port boards (when using the PCA9685 -- which I would use too), each covering a different LED power consumption range.

If you make them yourself you can just wack on different sens resistors and mix and match what you need. Or if you really don't want to think about it while assembling, just add multiple and add jumpers to select the current. But I would say that's a bit overkill and just using the resistor you need is easier.

@Wawa, apart from 24V supplies being more widely available, is the efficiency that much better by dropping less? After all the PT4115 is a pretty efficient switch mode driver overall.

septillion:
@Wawa, apart from 24V supplies being more widely available, is the efficiency that much better by dropping less? After all the PT4115 is a pretty efficient switch mode driver overall.

Look at the efficiency graph in the PT4115 datasheet.
Efficiency of a buck driver is highest (>95%) if Vf is about 3-5volt less than supply.
A 3-string on 24volt drops to ~91%, and a single LED on 24volt drops to 80%.
24volt, and a string of six, works quite well.

24volt is also easier if you eventually want to run the whole lighting system on solar power.
Leo..

I would make a test setup with an Adafruit PCA9685 breakout board (clones on ebay).

And some CC LED drivers that can be changed from 330mA (6watt downlight) to 660mA (12watt downlight).
e.g. this one

Meanwell also has suitable (fixed) ones.

Then start coding, untill you are happy with the results.
I use this library.

Recent post.
http://forum.arduino.cc/index.php?topic=466709.0

Moving to a dedicated all in one circuitboard could be a final stage.
Leo..

septillion:
What I do find stupid in a smart home is to have non-smart lights mixed in...

Any system will have risks associated with it.
The dumb light will cater for a failure of the home automation (HA) system.
However, I could still make it controllable... :slight_smile:

Focussing on LED control on its own, I now understand:

  • why I need constant current (CC), and
  • why the V per LED fixture is different for different Wattages
  • why adding fixtures in series

The principle design of a 16-channel controller as I see it at present is:

  • Use of a PCA9685 for on, off, PWM dimming, to
  • drive CC modules -- most likely settling on either Meanwell LDD-L and LDD-H drivers
  • matching the number of fixtures to the driver

... all I need to do is figure out the combinations of fixtures and drivers, and whether I mix driver types per board for more versatility; e.g. 16 ports comprised of 8 x 6W, 6 x 12, and 2 x 18W...
Or base the multi-channel board on Voltage required; e.g. LDD-L all 6W on 24V and LDL-H 12/18W on 48V

I have ordered samples of all the components in order to start experimenting and prototyping.

Feel free to chip in if my principle design ideas are flawed which ever way... thanks :slight_smile:

The Meanwell LDD-L is designed for a 24volt supply (6-string LEDs).
It is basically the same as the PicoBuck boards. But fixed current, encapsulated and a higher price.
Use the -300 for 6watt downlights, and the -600 for modded 12watt downlights.

The LDD-H is the high voltage version. It could be used for 12watt/12-string downlights directly.
Downside could be the higher price of an 48volt supply.
Better choice ofcourse if you already have a high power off-grid 48volt battery-powered system.
These, and 48volt supply, is not a good match for <12watt downlights.
Leo..

Wawa:
48volt supply, is not a good match for <12watt downlights.

Since I have no issue with not dimming each individual light, I can put e.g. 2 x 6W in series.
I can see myself settling on 48V; it can be adjusted from 40 to 52V. When set to 43V, I will be in the ball park for high efficiency.
Then driving 2 x 6W in series, or 1 x 12W... this should work and simplify things.

E.g a smaller room will either have 2 or four lights.
Larger rooms a mix of 2x6W and 12W fixtures...

:slight_smile:

MaxG:
Since I have no issue with not dimming each individual light, I can put e.g. 2 x 6W in series.

I can see myself settling on 48V

Yes. If the lights are the same inside.

24volt is about AU$0.10/watt, shipped free from China. Compare that to 48volt.
Go for the natural cooled ones (you don't want to hear/replace fans).
Supplies have coil whine (buzzing noise).
Metal frame supplies have exposed mains power terminals.
You must use them in an "electrically safe" case/box/switchboard.

MaxG:
LDL-H 12/18W on 48V

Don't know what's inside an 18watt light.
Could be two strings of nine (Vf ~30volt) or a single string (Vf ~60volt).
LED CC rating of the power supply in the box will tell you.
Leo..

Found a 48volt/240watt supply here.
You can also get Meanwell circuit boards.
Leo..

Wawa:
Don't know what's inside an 18watt light.

No, why I have ordered a 6, 9, 12, 18W each, to rip apart :wink: ... and to measure what is happening.

While I would prefer the same hole size, I understand the benefit of a low profile that these LEDs have; also less heat is wasted on this design compared to others.

As I said elsewhere, the issue I'd like to focus on is solely:
a) understanding how these LEDs and drivers work
b) developing a circuit which can control (on|off|dim) these LEDs efficiently
c) which includes appropriate / suitable power supplies

Someone said something along the lines" you wouldn't post on this forum if it weren't for a cheap solution; a statement I totally disagree with, because while I have seen cheap, but also brilliant solutions, within a wide range of requirements, and lots of brains put in to arrive at a solid solution.

So, touching on cost, I am after a well engineered solution, which I can build myself where necessary (e.g. build the driver, but buy the power supply); yes, cost saving plays a role, but 'cheap' is certainly not my motivation -- well-thought out is.

Thanks for all your help... I reckon I have to wait for the LEDs to arrive and then continue the conversation / discussion.

MaxG:
Any system will have risks associated with it.
The dumb light will cater for a failure of the home automation (HA) system.
However, I could still make it controllable... :slight_smile:

That's bull :wink: You can still make light when the system doesn't what to. But that scenario is as likely as the system not letting you turn off light or randomly turning on light. An aspect most people don't think about. Don't know about you, but I think that's as annoying... :smiley: Especially when you're in bed... Both cases you're forced to reboot the system / get it working again. Because although if the system is down you have some light n a room, I don't call a single light instead of a dozen of downloads to be a livable situation either...

And to be clear, don't criticize a design choice you made, just to make you really think about if it's indeed as good as a choice as you think it is :slight_smile: When it comes to light an automation people tend to only fear sitting in the dark (even when we all have a flashlight on our phone_ but sitting in the light when you don't want to is as likely and in my opinion as big as a problem.

@Wawa, You're right, the scatter of the efficiently is bigger then I thought.

Wawa:
Those ceiling lights have five 0.2watt LEDs in parallel.
Power rating of the light is how many of those groups of five are connected in series.
6 groups for a 6watt light, and 12 groups for a 12watt light.

A 12watt light (60 LEDs) would need a 36-40volt supply.

Meaning each of the these LEDs has 60mA, 5 in parallel = 300mA at 3.3V ~ 1W
60 LEDs in a 12W light is still 300mA, but now at ~40Vf

There is a number of circuits out there catering for up to 60Vin...

I understand the "ideal" scenario is to run LEDs in series to avoid overrunning parallel LEDs from overrunning when one LED dies. But given the design of the LED lights (where 5 LEDs are in parallel) this seems to be a risk I have to live with.

They can sort off get away with that, because the LEDs are from the same batch.
And more important, they all have the same temperature, because they are mounted on the same heatsink.
(Vf of a LED drops with temp rise).

I'm using the ceiling lights you have linked to, and they have survived two years of normal use now.
Some hallway/entrance lights are running (dim) all through the night.
I have replaced several CF tornado lights in that time, but none of my LED downlights yet.
Leo..