Light regulation is now active

DSC_5256Apologies for the long absence of information regarding my Plant watering project

Today I hung up a lamp above my plant in order to provide it with enough light as the Norwegian summer goes over to fall/winter.

The process required only a programmable relay (the RelayX1 from GHI Electronics, which is a simple on/off switch controllable from my Fez Hydra mainboard.

The intent, of course, is to preserve bulb life and energy by only providing enough light when the outside light from the window is insufficient. The plant, a ficus benjamina, requires a solid 15 hours of light every day to be happy, and with this, I’ve ensured that as far as light goes, it will smile all year round!

Image: The RelayX1 is the blue box in the middle of the picture that regulates the light on/off

Rules for turning the light on/off

The time frame the light bulb operates in is between 06:00 and 21:00 (15 hours). The following rules/pseudo code are then applied every second:

  1. Outside of the time frame (21:00 – 06:00)
    1. If the lamp is on, then turn it off immediately
    2. If the lamp is already off, then do nothing
  2. Inside the time frame (06:00 – 21:00)
    1. When the amount of lux is below our threshold and the lamp is off,  only then do we turn it on
    2. If the lamp has been on for at least one hour, and there is now sufficient light coming in through the window, then turn it off, otherwise, keep it on.


DSC_5252As advised on the light bulb documentation, I’ve placed the lamp around 0.5m from the top of the plant, as you can see on the image.

You can check out the values that my plant is emitting at the following url:

The site should be semi-responsive!

About digitaldias

Software Engineer during the day, photographer, videographer and gamer in the evening. Also a father of 3. Pedro has a strong passion for technology, and gladly shares his findings with enthusiasm.

View all posts by digitaldias →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.