What's new
TerraForums Venus Flytrap, Nepenthes, Drosera and more talk

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

DIY remote controlled LED fixture

Index
Part 1 - DIY LED fixture (this post)
Part 2 - Custom PCB and electronic components
Part 3 - Software overview

Part 1 - DIY LED fixture
I'm in the process of assembling a DIY LED grow light fixture that is remotely and automatically controlled (MySGrowLED) and I thought that it may be worth sharing here. Most recent updates will be available on github.
This use an open source project, MySensors, that allow to wirelessly link sensors (temperature, humidity, soil moisture, pH, light levels, ...) or actuator (light, relay, switch, movement) using arduino and raspberry pi hardware.

Right now the setup is working but the electronic part is still on its prototype form. I designed and ordered a custom PCB which should be there soon, worst case scenario in a couple of weeks.
Once this part is finished I will also share it here. In the meantime, here is the basic setup for the LEDs, that can be controlled by a simple timer or switch.

Components
Total cost in parts is ~$95 for a real 60W LED light with a spectrum optimized for plant growth and photosynthesis (no green).
Most of the commercial solutions are extremely deceptive on their real output an power usage. In this example, as we are using 3*50W chips, this would typically be advertised as a 150W light.
This is totally wrong as only 60W of power will be used. It is not advised to run a LED chip at its nominal power as it will generate a lot of heat and will fail quickly!

To create this 60W LED fixture you will need the following materials:
- 3*50W full spectrum 45mil COB LED ($30, ~$10) each).
Can be bought on ebay, aliexpress, etc.
DIY_LED_1.jpg


- 3*heatsinks able to cool down your LED modules ($30,
231185535248
).
In this case we will be using a DC-HS11132 heatsink for passive cooling.
Heatsink come with 4 to 16 M3 screws and a pack of thermal paste for improved heat dissipation.
Using a smaller heatsink, or running more power in the LEDs would require a fan. Using this setup, the whole assembly is at ~40°C while running which is safe for the plants even at a close distance.
This specific heatsink can be mounted on a 35mm DIN rail which will allow to link the 3 LEDs on a single bar fixture.
DIY_LED_2.jpg


- 1*mounting track, 35mm DIN rail Type, 1m length, (~$7).
I used a 16-700DIN from Schneider Electric.
Heatsink will slide on the rail and then can be bolted to it using the existing holes in the rail.

- 1*60W LED driver to power the LEDs (~$16).
I use a LPC-60-1750 from Mean Well that will provide 34V at 1750mA. LEDs will be wired in parallel (34V, ~580mA each).
As this unit will be in charge of converting your main power (110-230V) to ~34V for more than 12h a day, every day, in potentially humid conditions it is very important to choose a power supply you can trust. You don't really want it to catch fire.
I would not recommend buying the power supply from ebay or directly from china as you may end up with a counterfeit unit unless you are sure of the seller.

- 1*PCB DIN rail mounting bracket (~$2)
Will be used to mount the PCB to the rail. This is optional, if you prefer using a timer, a switch or have another way to control your light you can use this LED fixture as a standalone without the MySGrowLED part.

- Misc (~$10)
You will also need some basic supplies that you may already have, or will find at your local hardware store. You will also need to solder the wires to the LED chip.
In this case you will need ~3m of solid 2-conductor cable and ~40cm of solid 3-conductor cable (optional if you are not using MySGrowLED).
I used thermostat cable that can easily bought in roll or cut at your size at your local store.
You will also need some wire terminal blocks to connect the wires, hex bolts and nuts to secure the heatsinks to the rail, some rope, hooks or any other way to suspend the LED fixture to your grow area.

Assembly
The whole process should not take too much time, probably around 1 hour without rushing it.

LED assembly
Start by removing the heatsinks from their package. They should come with at least 4 screws and a small pack of thermal paste.
DIY_LED_3.jpg


Grab a LED chip and lay it face down on a soft nonabrasive surface.
DIY_LED_4.jpg


Locate the thermal paste and carefully tear it open.
DIY_LED_5.jpg


Empty the whole packet content over the LED metal back...
DIY_LED_6.jpg


... and spread it evenly over all the back surface.
DIY_LED_7.jpg


Grab the LED chip and using the provided screws mount it on the heatsink. Do not screw tight each screw one by one but do it in multiple steps to spread the paste evenly.
DIY_LED_8.jpg


Repeat for the 2 other LED chips and heatsinks.
DIY_LED_9.jpg


Soldering
Cut your 2-conductor cable in ~1m segments. Decide which color will be the positive wire (red in my case) and negative (white).
Locate the positive and negative contacts on the LED. They are the tiny metal wings on each side of the LED. Usually the positive side is perforated with 2 holes while the negative side only have 1 hole. You may want to check this using a multimeter. If at the end your lights don't light up it's probably reversed on your LEDs. Don't worry, just switch the wires on the terminal connector (see below).

Remove the plastic insulator over ~1cm and solder the wire directly to the LED chip connector. Use as much solder as possible to create a good electric contact.
DIY_LED_10.jpg


Repeat the process for each LED unit.

Final assembly
Now that all units are ready you need to create the fixture using the rail.
Bend the cable around the heatsink to have it sandwiched between the heatsink and the rail. All wires should be oriented the same way, toward your power supply output.

Slide all heatsinks to their definitive position and secure them to the rail.
DIY_LED_11.jpg


On the end where all your wires are converging, thread the 2-connector cables into the second DIN rail hole. Thread the 3-conductor in the first hole (if using MySGrowLED) toward the second heatsink.
Use a terminal connector to link all 2-connector wires together according to their polarity. On the other side link the 3-conductor using the same colors, leaving the extra color alone.
Secure the terminal to the rail using a zip-tie.
If you are using MySGrowLED link the positive output of the power supply to the positive side of your LEDs (red wire in my case) and the negative output of the power supply to the extra color of the 3-conductor wire (green in my case). If you are using a different control circuit link the negative output of the power supply output directly to the negative side of your LEDs (would be white wires in this case). If your lights are not working, probably because of a polarity error, switch the wires at the terminal, no need to desolder the wires!
DIY_LED_12.jpg


Add some rope, chain, hooks or other to suspend the LED fixture to your grow space.
DIY_LED_13.jpg


Mount everything (in my case suspended to a $25 IKEA OMAR shelving unit)
DIY_LED_14.jpg


Plug the power supply to the electrical main and congratulations, you now have a LED grow light!
DIY_LED_15.jpg
 
Last edited:
Excellent work there. You should also note that running LEDs at their maximum power significantly reduces their power efficiency. Hopefully those COBs hold up too, I've heard the cheap ones generally aren't very good quality.

I definitely know what you mean about the power rating of LED fixtures. I've seen people ask questions after buying a "300W" LED light and after doing a little reading I discover that it only draws 135W from the wall so the LED power is even lower.
 
True, power efficiency decrease significantly too. There is a very interesting video from bigclive on this subject 20W vs 50W LED lux test in a 20W floodlight. - YouTube. He actually use the same setup than I do, underdriving a 50W LED at 20W.
If you are lucky enough to have a datasheet with the LEDs you usually see a sudden drop in efficiency when the chip is close to 70-75°C. Most of them will fail past 85°C.

I hope these COB will last, I actually did not find any reputable seller of full spectrum LED so I assume that for now these are actually good quality. You can find equivalent 50W white LED for $2 so hopefully this is will be ok.
I should add that cannabis home grower forums have ton of very good DIY LEDs setup (I ended up on this quite often while looking for informations). Most of these actually use more powerful white LEDs, which are totally fine for our carnivorous too, but as green is not necessary I wanted to try these.

Rating of LED fixtures is really annoying. It's also true with the E27 screw bulbs you find everywhere. On my first try I ordered a 15*3W LED bulb advertised as 45W on amazon. It was only $18 (already suspicious) but was actually drawing only 12W. For growing basil in your kitchen sure it may work but definitively useless for full sun plants. This one was sent back but looking at the inside revealed a 20W max power supply so anyway it would never have reached 45W.
Look in the comments section, people will complain about it, or else say nice things because they got it for free in exchange for a "honest review"...

Finally as you mentioned, LED output is not the power usage too yes, when looking into the heatsink design I found that for white LED, 50% of the power was to be assumed as dissipated as heat (source: DIY LED Basics - choosing your heatsink (part 4/7) - YouTube ). It's surprisingly hard to measure the light output of a LED for plants (candela, lux, lumens, PAR?) even worse when not using a white light. This 60W fixture output between 7000 to 2000 lux depending on the distance and angle between the plants and the light source. But it means nothing as lux is designed for human eye which is the most sensitive in the green wavelength, mostly missing here...
This setup is running since one month, most of the plants turned red in a couple of weeks and seems to adapt to the LED (dew start to come back on some of the Droseras). This is the best feedback that I can give so far.

 
Part 2 - Custom PCB and electronic components
I received my PCB and so far everything seems to be working nicely so time for step 2: the control board.
With the electronic components in, it introduces a nice way to control light, humidity, temperature or any other parameters either using an external controller or autonomously.
You can use an array of sensors to provide feedback to the controller and then adapt the light levels and fan speed.

MySGrowLED_3D.png



Description

MySGrowLED_traces.jpg


MySensors module designed for wireless greenhouse automation (nRF24L01, 2.4GHz).

This module allow you to:
- control a primary LED light (5-40V input can be used to power the module)
- control a secondary circuit designed for a CPU PWM fan but can be used for a second light, humidifier, relay or anything else using 12V
- monitor temperature using an optional onboard DS18b20 sensor
- monitor external temperature by plugging external OneWire sensors
- monitor any additional parameters using additional I2C modules such as temperature, humidity, light levels, barometric pressure, etc...


Ordering

Gerber files are included, so you can order these PCB at your favorite PCB fab house.
For an easy ordering process you can directly order these PCB from DirtyPCB or OSH Park without having to do anything.
Components are highly customizable and the default list may not be the best for your specific use, but it will work for most of the cases. Double check that the power supplies, voltage regulators and mosfets are compatible with your project.


Options

This board is designed to be compatible with MySensors but can be used on its own (timer or sensors to control the lights) or another system using 2.4GHz communication if you adapt the arduino code.

ATSHA204 module
For security reason you can add a CryptAuthEE SHA256 chip. This will allow you to sign messages and will secure communications between the node and your gateway (this is not encryption, just signing).
If you only control lights, fan, or other non-essential hardware you probably don't need to bother with this chip.
Signing can also be done at the software level, without the chip if you decide to add this function later.

Eeprom module
This module is only used to perform OTA updates on the node. If you don't plan to use this feature you can also skip this chip.
You will also need to burn a compatible bootloader to your arduino (DualOptiBoot)


Assembly

Once you received your dirty package of PCBs (or any other Fab house) start by inspecting it carefully to look for scratches, dents, or anything that seems wrong. Do not use the board if you have any concerns.
PCB1.jpg


Markings are a little off, but nothing wrong on this one, good to go!
PCB2.jpg


Start by soldering the optional chips, if you plan to use them.
PCB3.jpg

PCB4.jpg


Then add all other surface mount components. Don't be affraid by their little size, they are actually easy to solder. If you never soldered SMD components before, be sure to look for a few video tutorials first.
PCB5.jpg


Finish by adding the regular through-hole components, starting by the smaller ones.
PCB6.jpg


Plug your arduino module and radio and you are good to go.
PCB7.jpg



Testing

You can upload MySGrowPCB_test to your arduino to test the setup:
- It will look for an ATSHA204 and return its serial number if detected.
- It will look for an eeprom and return its manufacturer ID if detected.
- It will alternatively switch the LED and Fan circuits ON and OFF for 10 seconds.


Usage examples

This module can be used on the DIY LED light exemple included (PCB compared to breadboard design)
PCB8.jpg

PCB9.jpg


Another possible use to control a germination chamber inside a plastic container (PCB compared to previous protoboard design)
PCB10.jpg

PCB11.jpg



Revision history

Version 1.0: Initial release.
 
Last edited:
Looking good! When I put together a couple COB lights recently I ended up ordering directly from the factory in China since the part availability is very poor here. I use this one with high bin, 4000K, 70CRI (lower CRI is higher PAR generally): Cree XLamp CXB3070 LED Array It's definitely more expensive this way, but the Cree CXB series has the absolute best power efficiency on the market as far as I'm aware.

I'll have to look into these control and monitoring modules in the future, and hopefully set up an automatic watering system with them as well.
 
Thanks.

Yes these Cree are among the best ones. But for the price of one Cree I had 5 purple ones so good enough for me ;)

Anyway if you run yours at 36V it should work with your Cree.
For a watering system if you use a 12V pump (I would say max 0.2A to be safe) it will work using the "Fan" channel.
Else you either have to use a relay on the Fan channel or use a module by itself, but it should work too.

Or you can even use a dedicated irrigation node to be extra fancy.
 
Hey emc2,

Just curious if you are running your LEDs in series you are running each one at 1/3 max Vf (~11V) and all 3 will draw respectively lower current at that voltage (I know the LEDs are current driven technically). Is this why the lights are so dim? My concern is for ex. with laser dioded before the optimal current/voltage some will emit in the wrong wavelength/mode or for example will not emit coherent light. Are LEDs affected in a similar way?
 
Last edited:
Actually these are in parallel (you can see it on the terminal block wiring, all red and white wire are together).
So they are all running at the same V=34V. The driver is a fixed current (1750mA) one so each LED is running at 1750/3=~580mA

If the lights are so dim on the last picture it's because of 3 factors:
- thanks to the electronic control by the arduino I have a dimmer function. For the picture I use a 5% level (~3W) which make the lights quite dim. I will detail the software part this week end to give an overview of the possibilities in the 3rd and final post.
- white balance being off, the camera don't like to take pictures of these things as it tries to adjust the balance while taking the picture (removing as much purple it can). I could turn that function off, but well usually I don't take pictures in a night club.
- very short exposure time on top of that.

I even had to add "space blankets" all around my shelfs, else the whole room was bright purple. It also "keep the light inside" by reflection which is actually better as I did not install any optics on the LEDs.

Here is an old picture (you can still see the breadboard) that was at 100% but still with a short exposure as else you can't see much except a purple light.
frGNUsU.jpg
 
Looking forward to the third post, as I am toying with the idea of building this or something similar!
I am very curious what Magic you are using to adjust/dim the output of the LPC-60 driver considering the specsheet says it is not supposed to be dimmable through external 0-10V DC voltage or PWM signal :scratch:. Admittedly, I am not an electrical engineer and my experience/knowledge is limited.

P.S. Why oh why did I see this thread today... Now i'm itching to build this and learn more about Mysensors project.
 
Last edited:
  • #10
I was not aware that it was possible to dim constant-current drivers either. As far as I'm aware, reducing the input power too low will cause the driver to cease functioning rather than reducing the output power.
 
  • #11
Everything is explained in "Harry Potter and the Secrets of Arduino PWM".

The driver by itself do not include the dimming function, but you can still add it yourself easily. You can also use a driver compatible with PWM, in this case you may be able to plug it directly to the arduino without mosfet but it may be messy as I use a 3.3V logic arduino for the radio. It's also cheaper to do it yourself and in my case easier to wire.

Both LED and Fan outputs are controlled by a mosfet linked to a PWM pin of the arduino (pin 5-6). Mosfets (power transistors) behave like a switch: when the arduino send some current to the gate, the switch is closed -> light on.
Dimming effect is performed by "switching on and off" the light faster than your eye can see it, resulting in a dim light level depending on the time ratio ON:OFF. Input power is always either 34V/1750mA or 0V/0mA but if you are using a multimeter you will detect a lower voltage. An oscilloscope will show you a square wave 0V/34V.

This on/off cycle is why in many LEDs, when dimmed to a low level, you may see a flicker in the light. Frequency is low enough for you to "see" the on/off cycle.

Doing that with an incandescent light, or CFL, would damage it in no time, but LEDs are perfect for this. That's what is used in any LED dimming appliance, bulb or other, I did not invent anything at all. No magic or anything fancy, totally safe and won't damage the LED or the driver.
 
  • #12
Everything is explained in "Harry Potter and the Secrets of Arduino PWM".

The driver by itself do not include the dimming function, but you can still add it yourself easily. You can also use a driver compatible with PWM, in this case you may be able to plug it directly to the arduino without mosfet but it may be messy as I use a 3.3V logic arduino for the radio. It's also cheaper to do it yourself and in my case easier to wire.

Both LED and Fan outputs are controlled by a mosfet linked to a PWM pin of the arduino (pin 5-6). Mosfets (power transistors) behave like a switch: when the arduino send some current to the gate, the switch is closed -> light on.
Dimming effect is performed by "switching on and off" the light faster than your eye can see it, resulting in a dim light level depending on the time ratio ON:OFF. Input power is always either 34V/1750mA or 0V/0mA but if you are using a multimeter you will detect a lower voltage. An oscilloscope will show you a square wave 0V/34V.

This on/off cycle is why in many LEDs, when dimmed to a low level, you may see a flicker in the light. Frequency is low enough for you to "see" the on/off cycle.

Doing that with an incandescent light, or CFL, would damage it in no time, but LEDs are perfect for this. That's what is used in any LED dimming appliance, bulb or other, I did not invent anything at all. No magic or anything fancy, totally safe and won't damage the LED or the driver.

Since this will happen anyway I shall be the first to request it: We need a detailed step by step with a lot of pictures and Explain_Like_im_five elements tutorial here!!!
Don't get me wrong, I will traverse internet to explain anything that I don't understand or know, but this stuff I feel is way beyond my meager EE background and there is too much opportunity for mess-ups ;)
 
  • #14
You can also use a driver compatible with PWM, in this case you may be able to plug it directly to the arduino without mosfet but it may be messy as I use a 3.3V logic arduino for the radio. It's also cheaper to do it yourself and in my case easier to wire.

Both LED and Fan outputs are controlled by a mosfet linked to a PWM pin of the arduino (pin 5-6). Mosfets (power transistors) behave like a switch: when the arduino send some current to the gate, the switch is closed -> light on.
Dimming effect is performed by "switching on and off" the light faster than your eye can see it, resulting in a dim light level depending on the time ratio ON:OFF. Input power is always either 34V/1750mA or 0V/0mA but if you are using a multimeter you will detect a lower voltage. An oscilloscope will show you a square wave 0V/34V.

All this and the more pictures the better. This is a very visually oriented community we have here. As my manager keeps telling me "write up the experiment so that an idiot could repeat it" :)
 
  • #15
Part 3 - Software overview

Time for the final step, how to control and use this system.

To have everything working you will need a working MySensors installation. For that you will need:
- A gateway, such as a serial gateway. This is a simple arduino + radio module plugged to a USB port of the controller that will send and receive the radio signal.
- A controller. This is a small software, running on a computer, that will allow you to talk to your devices. Many are available, using Vera (IoT hardware), PC/MAC/Linux. I personally use Domoticz running on a Raspberry Pi (an old version B).

I will not detail how to setup Domoticz or MySensors, everything is extremely detailed on the respective websites and should not give you any problems. I will only give you a basic overview of what you can do with it.

Lights control
As I told you on the hardware part, you can dim the light. This is controlled on the software by sliding the switch left or right. You can also click on the bulb icon to switch on/off.
QYLdkZk.png


You can also setup timers based on fixed time, intervals or even better based on your local sunrise and sunset to create a seasonal light cycle. You can also choose at which level you want your lights (ON at 85% brightness with sunrise, OFF with sunset in this screenshot)
BaHaI6c.png


Temperature - Humidity - Other sensors
By adding the optional temperature sensor on the board you can follow the temperature at the light level. During normal operation at 100% heatsink temperature is stable at 40°C (~100F). The board being a few cm away temperature measured is around 32-34°C. Plant area is usually ~3°C higher than the room temperature, rising to 26-27°C at the end of the day when the sun is actually shining through my windows.
IV6tPwd.png


You can also add other sensors, like this one measuring light levels into my seedling farm (purple lights again so lux are irrelevant, this is only for comparison)
4pmMg0U.png


Graphs
The nice thing is to be able to follow these metrics over time. By default everything is logged and graphed.
Here is the inside of my germination chamber (plastic box with some led strips). Heating is mostly provided by the LED strip. A fan allow to regulate humidity (and temperature in extreme cases). More in the rules later.
2p6GZXV.png


A mobile (battery operated) temp-hum sensor resting on the plant shelfs allow me to monitor temperature and humidity at the plant level. If for some reasons temperature is too high, it will switch the leds off to cool down everything, before switching them on again. Or it can start a fan, humidifier, watering system, closing your blinds or send you a notification on your phone. Many options in domoticz.
K4l1XuI.png


Rules and automation
By merging data from sensors and ability to control devices you have precise control of your growing conditions.
You can program in lua, or for a easy programing you have a "blocky" editor included. By dragging logic elements you create your own program. Here is an exemple of the humidity control inside my germination chamber. You could translate the following sentence "During the day turn the fan on at full speed if humidity is over 98% and switch it off when it reach 80% or less" to this blocky rule
nfnKU4S.png


You can see on the first graph when the fan is turning on, humidity will quickly go down (temperature barely moves) and when fan turns off it will go up again. At night nothing happens, letting the humidity go back to 100%.

Depending on the sensors and devices you control possibilities are endless:
- Humidity drops? Turn on mister.
- Low water level in the tray? Turn on pump to fill them.
- Full sun on your plants? Turn off additional lights or start water circulation pump to cool down your darlingtonia roots.
- Dynamic sun simulator? Gradually increase you light levels from 0 to 100% up to mid day, and then gently back to 0% until sunset.
- Motion detected on your patio? Blast loud sound to scare the squirrel away.
- ...

Summary
I hope this example may give you some ideas on how to automate your grow area. I will try to answer your questions, but keep in mind that I did that as a hobby. I don't have any background in EE, just used google, so it may not be the best way to do things but it works. If you see anything that could be improved let me know, or even feel free to do any changes yourself to improve this or adapt it to your personal need. Everything is open source and available on github!
 
Last edited:
  • #16
Thank you for the write up. This is pretty intense!
 
  • #17
I'll have to read into this sometime in the future. Automated watering is my primary concern, but it would be great to be able to keep track of temperature and humidity as well.
 
  • #18
Thank you [MENTION=12066]emc2[/MENTION]! I wanted to mess around with micro-controllers for a while now and this would be a great project to do it. I will start the way you did in this thread with LED lights and later build controls around it them (with a lot of trial and error). This is a very motivational thread!

PS. Give us an update on how the plants look/grow under your lights sometime.
 
Last edited:
  • #19
Thanks [MENTION=8211]gill_za[/MENTION]. You can also just start with a basic 5mm LED, no need to start with the real thing. And if later on you want one of the a PCB for the real thing feel free to PM me.


Plants are doing well. Transition from the shade of the patio to the bright light was a little rough for most of them, but they recovered. I may have been more gentle too, but I don't mind having plants looking crappy for a few weeks.

I tried to do that scientifically, when I bough some hardware I also rescued a $4 typical VFT at Lowes. For ~3 weeks this was the only plant under the lights, as a guinea pig. It was surprisingly nice when I bough it, probably just received by the store:

A84Blsm.jpg


Now, after 6 weeks under the lights colors came up and new leafs are nicely shaped and no longer etiolated (as the leaf on the bottom left) :

zdBzFHL.jpg
R3uDlHZ.jpg




D. venusta took a long time before going dewy again, but for last 2 weeks new leafs look healthy again. It's also starting to flower which may not help the leafs.

7WgfCMR.jpg


D. binata multifida extrema only took 1 week to adapt, but this one is tough. Also start to put a flower stalk. And I still don't know how to take a nice picture of this sticky mess...

uIZSk4X.jpg
 
  • #20
Hi..Im new here from SA. Im super excited to see that the full spectrum leds can be used for CP.. Here in SA the CP are not so big and im am very envious of some of the stuff i see here.. Anyway just wanted to know if this will work with nepenthes to.. Im building a terrarium as a greenhouse is not possible for me... Thinking of using the full spectrum leds with one or 2 4000k leds for viewing as this will be in my living room..Whats your thoughts on this [MENTION=12066]emc2[/MENTION].
 
Last edited:
Back
Top