Lots of LEDs for strawberries

Hello from the Netherlands!

I apologize in advance for my ignorance; I know very little about electronics and programming. But I am eager to learn, and the Arduino seems a great thing to start with!

Anyway, I am in the process of building a controlled environment to experiment with growing strawberries. More particularly, I want to experiment with 5mm LEDs as growlights, and the effect of different wavelengths on the plant and fruit. For this purpose, I will construct two grow rooms, each with their own lighting and temperature control.

This is not a school project, and no, even though I'm from the Netherlands, I will not use this to grow weed. I don't smoke or do drugs and even if I did it would be much cheaper to just buy the stuff! :P

Anyway, I will start with one growlight, with about 500 LEDs in 8 different colours (50 blue, 50 royal blue, 50 green, 50 yellow, 50 orange, 150 red, 50 deep red, 50 far red). I would like to independently drive the different colours with an Arduino. If it works well, I will build the second (probably identical) light and upgrade the Arduino for extra outputs, possibly an LCD, etc.

I think I'll use one pin from an Arduino per array of one colour, using a transistor per ~50 LEDs (three transistors for the red LEDs on one pin). Each array of ~50 LEDs is hooked up series/parallel using the LED wizard from http://led.linear1.org/led.wiz for help.

I could use the Arduino's PWM pins to dim some of the channels. I'm not sure if it's possible to create a similar signal on the non-PWM digital pins but I would like to dim them in a similar manner.

Also, I would like to control the temperature in the growing environment using a simple temperature sensor or thermistor and one or more 12V computer fans.

If I can get the first light and the temperature control to work well, I would like to expand the system to a second 'chamber'; hooking up an additional ~8 channels of LEDs, another temperature sensor and some fans.

I hope to power the system from 12V DC. I'm not sure if it's easy to implement, but it would be nice if I could read out the amount of current going in.

I've read on this forum that it is possible to interface the Arduino with an SD card to store data. I am very much interested in this idea, because it would allow me to log the temperatures and the current used, without the need for an external computer being on all the time. However, this takes up 4 of the Arduino outputs (2 PWM).

I've also seen Arduino's hooked up to an LCD display. Together with a couple of buttons or potentiometers, this would allow me to monitor and control important aspects of the environment without having to interface with a computer and reset the Arduino. Is it possible to use the LCD and buttons from Nuelectronics' LCD Keypad for this? If I get that shield, that would take up port 4-9, and together with the SD card interface it would leave only 2 digital pins and the analog inputs. So if I want the LCD and SD card, I'll have to get a second chip to get enough digital outputs for the LEDs. I'll start out with one light and one Arduino, and if I can get that to work well I'll start adding things.

For the final thing, I'm thinking about the following layout: Bottom: Arduino/Freeduino board (master, powering LCD and SD) Middle: Protoshield(s?) with additional Atmega168 (slave, powering LEDs and fans) and a cable for an SD card Top: LCD shield

Inputs: Temperature sensors: 2x Buttons or potentiometers: 6x Current sensor?: 1x

Outputs: LEDs: 16x (dimmable, preferably PWM, 50-150 LEDs per channel) LCD display: Pin 4-9 SD card interface: Pin 10-13 Fans: 2-6x

I have a couple of questions, though. 1. Is it possible to read out the current supplied to the system, and does the fact that much of the load is PWM make this difficult? 2. Is it possible to dim the LEDs on non-PWM pins with a PWM-like signal? 3. Is the Arduino powerful enough to monitor sensors and buttons every second or so, send instructions to another chip (to control the LEDs), react to the data and log the it to an SD card, and also put out some of the data to an LCD? 4. Would the code for all that fit in the internal memory; ie is it a good idea to get an Atmega328 chip as master instead of an Atmega168?

In any case, this is a pretty ambitious project for somebody without any experience in electronics, but I am really looking forward to it! Thanks in advance for any help, and thanks for sharing so much valuable information on this forum (I've spent a couple of hours reading here already)! :)

Very ambitious project, even for someone with experience with electronics and programming.

I would suggest you start simple with the intent of learning the basics first. Build simple LED driver circuits and learn how to set the on current to not exceed the LED's maximum current ratings by calculating the proper resistor value to use. Learn to see how many LEDs you can wire is series with a 12volt source and still work to rated current. Learn to write code to dim them using a Arduino PWM output pin. Then expand to multi-output PWM LED circuits driving them with at different cycles, etc. Learn to use logic level power MOSFET transistors to drive multiple parallel strings of LEDS, each string with it's own current limiting resistor. Write software to control multiple PWM outputs such that you can choose a desired color and obtain it by the specific duty cycle value for each PWM channel that drives a single color LED string. Etc, etc, etc, etc.

You might then research and experiment with some phototransistors circuits to use as light level sensors, possibly with color filters such that you could measure the actual light level at various colors. The Arduino has 6 analog inputs so learn to use them to measure light levels. That's probably more useful then an indirect indication such as current consumption of the LEDs being driven by PWM.

Basically learn to walk before starting to build your strawberry fields forever project. ;)

Lefty Ps: You might also research a real time clock (RTC) circuit using a DS1307 chip as your ultimate project could probably use some automated time based functions. The Arduino library has such RTC examples.

Yes very ambitious. I thought the better lights for plants had a high UV content? You will only get very narrow emission frequencies from an LED. Even mixing different LEDs to form different colours will not give you a continuous spectrum just something that fools the eye maybe not the plant.

High power LEDs are very tricky, look at this thread:- http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1234273497

And also the links off it. This shows you what you need to drive power LEDs.

As well as temperature sensors you will have to arrange some form of forced air flow so that the temperature you measure is representative of the chamber and not just the spot the sensor sits in. Heaters, will inevitably have to be mains powered so you will need to control that with a solid state relay. Finally it will cost quite a lot, hope your pockets are deep. Best of luck.

Retrolefty, thank you very much for your input! You are right in that I will have to learn things bit by bit; that's why I'd like to use the Arduino to play with! There is a lot of information on the internet from which I can learn, and I also have friends at university that study electronics that can help me out. :)

As for measuring the actual light levels; I think that would be great, but I would only use it after I get everything else to work. It might be easier and cheaper to use a DIY spectrometer (using a webcam and a prisma) and estimate light levels per colour (at 100% on) and use those values, instead of constantly measuring them (ie open loop instead of closed loop).

As for measuring power consumption; you're right in that it gives little indication as to light levels. In fact, come to think of it, I don't need it at all!

As for a time-based functions; that seems like a good idea! I'll go looking for more information (in fact I'm looking at the RTC's datasheet right now) and see if I can use that to create a 24 hour cycle with different lights going on/off/dimming at different times.

Grumpy_Mike, thank you as well for input. :) Plants do not need UV for photosynthesis; in fact, UV can be quite harmful. They might have UV photoreceptors but so far I have found very little information about that. I decided not to use UV LEDs.

I am aware that LEDs have a very narrow emission frequency, but in this case that is not a problem. I am not looking at creating a continuous spectrum. Plants grow just fine with only a couple of colours, and I want to test which colours are best for stimulating growth. For instance, the relationship between blue and red makes the plant grow horizontally or vertically. The relationship between red and far-red is also important. Most LED grow lights only have red and blue LEDs (because those are most efficient for photosynthesis), but they have a bad red-far-red ratio (because there is no far red). It might be better to use orange instead of red, with added far-red, to change this ratio. In short, I do not want to create a continuous spectrum, but I would like to be able to control different colours and ratios between colours.

Also, I chose to use 5mm LEDs instead of high power LEDs because they are much easier to drive and available in many different wavelengths. But thank you for the link, there is quite some useful information in that thread.

As for the temperature control; I will place the sensors at the bottom of the chamber, out of the way of the airflow. I will probably not use heaters; the heat from the LEDs should be enough to keep the little chamber warm. The fans will only go on if it gets too hot, and if the LEDs are off, room temperature will be just fine. :)

Anyway, thank you for your replies!

I've got another question though. Could I use a cheap I2C led controller like the PCA9685 (http://www.futureelectronics.com/en/Technologies/Product.aspx?ProductID=PCA9685PWTNXP6821730) with 16 independent PWM channels for driving the LEDs? I looked at the data sheet, and it seems to me that it is possible.

Do you really need PWM? Can you just turn the normal digital line on and off to provide an appropriate ratio of light once every few seconds? That's actually what PWM is doing, you know, only a LOT faster.

vxir, I'm not exactly sure what you mean. Do you mean software-driven PWM at less than 1Hz?

I've found some more ICs with 16 PWM channels; the TLC59116 and PCA9635 (both have I2C, but unfortunately a TSSOP28 package); and the TLC5940. I think those would be easier to get than the PCA9685PW.

yes, I was trying to say that you can use the normal digital pins. Just blink them to get a certain amount of light. Strawberries probably don't care about a little bit of flicker. Or maybe they do? I'm no biologist.

Thanks, that's certainly something to think about. I don't know if the frequency of flickering would have any effect on the plant! Sunlight of course does not flicker, but most growlights do (most at 50 or 60Hz). There are a couple of different wavelengths that a plant reacts to by chemical reactions, for instance Pfr -> Fr with far red light and the opposite reaction with red light (or was it the other way around?). It could be that by repeatedly alternating red and far red light at a low frequency, the plant would convert these substances back and forth, costing a lot of energy. But that's just a theory; you might be right in that it doesn't matter a lot. It would be interesting to experiment with that as well!

Still, the idea of sending a single instruction to a PWM IC as opposed to constantly switching a pin on/off/on/off (albeit at a low frequency) sounds more appealing to me. But like retrolefty said; I'll have to start at the beginning and learn the basics first! I hope my first Arduino (actually a Freeduino) arrives next Monday :)

use ultrabright blue for growing (18h light) use ultrabright red for flowering (6h light)

google arround for led grow wavelengh.

just bought my arduino and wanted to create similar project but wanted to include sensors for temperature, Hydro sensor for air and soil, light controle, and heating controle also nutriens mixing control.

In future an solar panel so this thing could power itself if possible at all.