Custom 24/7 LED light cycle, Any LED with an IR remote! - The Planted Tank Forum
 5Likes
  • 7 Post By Vinster8108
  • 2 Post By Vinster8108
 
LinkBack Thread Tools Display Modes
post #1 of 13 (permalink) Old 01-25-2017, 02:24 AM Thread Starter
Planted Tank Obsessed
 
Vinster8108's Avatar
 
PTrader: (4/100%)
Join Date: Sep 2016
Location: Columbus, OH
Posts: 397
Lightbulb Custom 24/7 LED light cycle, Any LED with an IR remote!

Hi all,

I have two Current Satellite LED plus lights over my 38 gallon. These lights are fully adjustable and programmable but, they do not offer a 24/7 day light cycle or any timed light cycle, like the Finnex Planted Plus 24/7 I have. So, I figured I could create a program to send a IR signals to the lights over the course of the day, making them a 24/7 custom programmed light. Yesterday, I got everything wired / coded up and Success! my own personal 24/7 light cycle, 100% customizable.

This can be adapted to any light with an IR remote. I think I will expand this to create new cycle for the planted plus 24/7 soon. Fair warning, I'm and engineer, so if things are a bit too technical I apologize haha. What was nice about this project is everything was google-able. Raspberry Pi has a very large online community of posts and answer along with coding in python.

Follow these steps and you should have no problem!

Part list (This is what I purchased):

Raspberry Pi (probably don't need this exact one)
https://www.adafruit.com/product/3058

IR LEDs and Receivers
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

Transistor & Resistor
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1
https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1

Keyboard, mouse, monitor w/hdmi also required.


Next, Follow this guide haha.
I followed this technical blog on how to set up the Raspberry Pi and get the LIRC going.
Setting up LIRC on the RaspberryPi - alexba.in


This was very well done. Be sure to set your raspberry pi keyboard to US from GB.

I deviated from the IR circuit, making the resistor connect directly to gpio 22 directly, not ground. ( I'm not very good with circuits but, this worked for me.)


Once I had the LIRC working on the Pi, I programmed in my remote.

Here's the configured file for the Current Satellite LED plus Remote that I created with the above technical blog.

# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Mon Jan 16 18:18:24 2017
#
# contributed by
#
# brand: /home/pi/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

name Satellite
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100

header 8960 4475
one 563 1674
zero 563 556
ptrail 571
repeat 8960 2234
pre_data_bits 16
pre_data 0x20DF
gap 107482
toggle_bit_mask 0x0

begin codes
Key_Power 0x02FD
key_playpause 0x22DD
key_1 0x3AC5
key_2 0xBA45
key_3 0x827D
key_4 0x1AE5
key_5 0x9A65
key_6 0xA25D
btn_1 0x2AD5
btn_2 0x0AF5
btn_3 0xAA55
btn_4 0x8A75
btn_5 0x926D
btn_6 0xB24D
btn_7 0x12ED
btn_8 0x32CD
key_prog1 0x38C7
key_prog2 0xB847
key_prog3 0x7887
key_prog4 0xF807
key_f1 0x18E7
key_f2 0x9867
key_f3 0x58A7
key_f4 0xD827
key_f5 0x28D7
key_f6 0xA857
key_f7 0x6897
key_f8 0xE817
key_f9 0x08F7
key_f10 0x8877
key_f11 0x48B7
key_f12 0xC837
end codes

end remote






Next step is to write a code to send the IR signals out to the lights. I used python for this. Below is the full code I am currently running.


# Daylight cycle for Current Satellite Plus using Raspberry Pi, LIRC& Python
# Creator: Vinny Anderson
# Date: 1/21/2017

# loading in os to send commands in R-Pi terminal
import os # Code to call IRSEND os.system("irsend SEND_ONCE REMOTE KEY_X");
import datetime
import time

# begin light cycle
now = datetime.datetime.now() # get current time
T = now.hour*3600+now.minute*60+now.second # convert to sec

# find where to start
if T<=28000:
sent = 0
elif T<= 30600:
sent = 1
elif T<= 32400:
sent = 2
elif T<= 33600:
sent = 3
elif T<= 34800:
sent = 4
elif T<= 36000:
sent = 5
elif T<= 37800:
sent = 6
elif T<= 39600:
sent = 7
elif T<= 43200:
sent = 8
elif T<= 57600:
sent = 9
elif T<= 64800:
sent = 10
elif T<= 68400:
sent = 11
elif T<= 69600:
sent = 12
elif T<= 70200:
sent = 13
elif T<= 77400:
sent = 14
elif T<= 81000:
sent = 15
elif T > 81000:
sent = 0
print(sent)


while True:

now = datetime.datetime.now() # get current time
T = now.hour*3600+now.minute*60+now.second # convert to sec
while T == 28800 and sent == 0: # time == 8 am
os.system("irsend SEND_ONCE satellite key_power") # Turn on light
print("IR-SENT Key_power")
os.system("irsend SEND_ONCE satellite key_prog1") # Very Low light
print("IR-SENT Key_prog1")
sent = 1 # breaks out of while loop
time.sleep(1759) # sleep/pause

while T == 30600 and sent == 1: # time == 8:30 am
os.system("irsend SEND_ONCE satellite key_f4") # sunrise dynamic fade
print("IR-SENT Key_f4")
sent = 2 # breaks out of while loop
time.sleep(1759) # sleep/pause

while T == 32400 and sent == 2: # time == 9 am
os.system("irsend SEND_ONCE satellite key_prog2") # Low light
print("IR-SENT Key_prog2")
sent = 3 # breaks out of while loop
time.sleep(1159) # sleep/pause

while T == 33600 and sent == 3: # time == 9:20 am
os.system("irsend SEND_ONCE satellite btn_7") # Increase light intensity
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
time.sleep(1)
os.system("irsend SEND_ONCE satellite btn_7") # Increase light intensity
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
print("IR-SENT btn_7 12x")
sent = 4 # breaks out of while loop
time.sleep(1158) # sleep/pause

while T == 34800 and sent == 4: # time == 9:40 am
os.system("irsend SEND_ONCE satellite btn_7") # Increase light intensity
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
time.sleep(1)
os.system("irsend SEND_ONCE satellite btn_7") # Increase light intensity
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
print("IR-SENT btn_7 12x")
sent = 5 # breaks out of while loop
time.sleep(1158) # sleep/pause

while T == 36000 and sent == 5: # time == 10 am
os.system("irsend SEND_ONCE satellite btn_7") # Increase light intensity
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
time.sleep(1)
os.system("irsend SEND_ONCE satellite btn_7") # Increase light intensity
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
os.system("irsend SEND_ONCE satellite btn_7")
print("IR-SENT btn_7 12x")
sent = 6 # breaks out of while loop
time.sleep(1758) # sleep/pause

while T == 37800 and sent == 6: # time == 10:30 am
os.system("irsend SEND_ONCE satellite key_1") # change light to key_1 - full light -orange
print("IR-SENT Key_1")
sent = 7 # breaks out of while loop
time.sleep(1759) # sleep/pause

while T == 39600 and sent == 7: # time == 11 am
os.system("irsend SEND_ONCE satellite key_5") # change light to key_5 - Full light - all color -max
print("IR-SENT Key_5")
sent = 8 # breaks out of while loop
time.sleep(3559) # sleep/pause

while T == 43200 and sent == 8: # time == 12 pm
os.system("irsend SEND_ONCE satellite key_power") # power off, Afternoon light break ~ 4 hours
print("IR-SENT Key_power")
sent = 9 # breaks out of while loop
time.sleep(14359) # sleep/pause

while T == 57600 and sent == 9: # time == 4 pm
os.system("irsend SEND_ONCE satellite key_power") # power back on
print("IR-SENT Key_power")
sent = 10 # breaks out of while loop
time.sleep(7159) # sleep/pause

while T == 64800 and sent == 10: # time == 6 pm
os.system("irsend SEND_ONCE satellite key_2") # swtich to full light blue
print("IR-SENT Key_2")
sent = 11 # breaks out of while loop
time.sleep(3559) # sleep/pause

while T == 68400 and sent == 11: # time == 7 pm
os.system("irsend SEND_ONCE satellite btn_8") # decrease light intensity
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
time.sleep(1)
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
print("IR-SENT btn_8 12x")
sent = 12 # breaks out of while loop
time.sleep(1158) # sleep/pause

while T == 69600 and sent == 12: # time == 7:20 pm
os.system("irsend SEND_ONCE satellite btn_8") # decrease light intensity
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
time.sleep(1)
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
os.system("irsend SEND_ONCE satellite btn_8")
print("IR-SENT btn_8 12x")
sent = 13 # breaks out of while loop
time.sleep(558) # sleep/pause

while T == 70200 and sent == 13: # time == 7:30 pm
os.system("irsend SEND_ONCE satellite key_f3") # sunset dynamic fade
print("IR-SENT Key_f3")
sent = 14 # breaks out of while loop
time.sleep(7159) # sleep/pause

while T == 77400 and sent == 14: # time == 9:30 pm
os.system("irsend SEND_ONCE satellite key_prog3") # Lowest light
print("IR-SENT Key_prog3")
sent = 15 # breaks out of while loop
time.sleep(3559) # sleep/pause

while T == 81000 and sent == 15: # time == 10:30 pm
os.system("irsend SEND_ONCE satellite key_power") # power off
print("IR-SENT Key_power")
sent = 0 # breaks out of while loop -- Resets to beginning, sent == 0
time.sleep(34159) # sleep/pause






I attached is a picture of my IR LEDs and receiver circuit. Also, is the current 24/7 cycle on the aquarium.


Let me know what you think! Hopefully, you can build your own 24/7 cycle for all of you aquariums!
Attached Thumbnails
Click image for larger version

Name:	IMG_3434.jpg
Views:	132
Size:	72.7 KB
ID:	714826  

Click image for larger version

Name:	IMG_3421.jpg
Views:	119
Size:	116.1 KB
ID:	714834  

Click image for larger version

Name:	IMG_3422.jpg
Views:	118
Size:	126.7 KB
ID:	714842  

Click image for larger version

Name:	IMG_3423.jpg
Views:	117
Size:	108.9 KB
ID:	714850  

Click image for larger version

Name:	IMG_3424.jpg
Views:	120
Size:	128.6 KB
ID:	714858  

Click image for larger version

Name:	IMG_3426.jpg
Views:	122
Size:	130.8 KB
ID:	714866  

Click image for larger version

Name:	IMG_3429.jpg
Views:	121
Size:	130.4 KB
ID:	714874  

Click image for larger version

Name:	IMG_3430.jpg
Views:	125
Size:	125.7 KB
ID:	714882  

Click image for larger version

Name:	IMG_3431.jpg
Views:	123
Size:	117.4 KB
ID:	714890  

Click image for larger version

Name:	IMG_3432.jpg
Views:	121
Size:	58.6 KB
ID:	714898  

ttatummm, DaveK, DaveK and 4 others like this.

75g Tank Journal:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Forest's Edge:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Vinster8108 is offline  
Sponsored Links
Advertisement
 
post #2 of 13 (permalink) Old 01-25-2017, 10:56 AM
Wannabe Guru
 
PTrader: (0/0%)
Join Date: Jul 2010
Location: Outside Philadelphia, PA
Posts: 1,845
That's a great project.

I've got two Current Satellite LED plus pro's on my 90 gal tank, and while I like the light I get, the control functions it has are very limited. I might even try a similar project.
DaveK is offline  
post #3 of 13 (permalink) Old 01-25-2017, 11:30 AM
Planted Tank Guru
 
Freemananana's Avatar
 
PTrader: (12/100%)
Join Date: Jan 2015
Location: Leesburg, FL
Posts: 2,830
Very cool project. I had contemplated something similar!

https://www.plantedtank.net/forums/20...llite-led.html

I recall this thread being a hot topic when I was joining the forum. Very good idea and lots of fun. Arduino boards work well too.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Freemananana is offline  
 
post #4 of 13 (permalink) Old 01-25-2017, 11:43 AM
Planted Member
 
Brian Rodgers's Avatar
 
PTrader: (0/0%)
Join Date: Oct 2016
Location: Sapello New Mexico 87745
Posts: 202
Well done. We have our 50 gallon planted tank in the living-room so we see the transition from t-off to on with our Beamsworks LED. It is pretty awful from our side of the glass I can imagine what it feels like to the fish and plants. Thanks for sharing this awesome project.

Brian Rodgers

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Brian Rodgers is offline  
post #5 of 13 (permalink) Old 01-25-2017, 12:40 PM Thread Starter
Planted Tank Obsessed
 
Vinster8108's Avatar
 
PTrader: (4/100%)
Join Date: Sep 2016
Location: Columbus, OH
Posts: 397
@DaveK Thanks! Once you get going, everything is pretty straight forward. You could even create two separate IR LED circuits, pointing them at each of the lights separately, changing them independently. That would create some cool color effects across the depth of your tank!

@Freemananana Nice! I'll have to check this out. I bet it would have been a lot of help haha.

@Brian Rodgers Thanks! Yea, before my lights would kick on, very abruptly, at full brightness. I have a small apt so, my tank is in the bedroom. Now when the lights come on, they wont wake me up. Also, at night they go just dark enough for my BN pleco to come out, got some good photos of him last night.

75g Tank Journal:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Forest's Edge:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Vinster8108 is offline  
post #6 of 13 (permalink) Old 01-25-2017, 01:29 PM
Wannabe Guru
 
PTrader: (0/0%)
Join Date: Jun 2014
Location: Cape Coral, Florida
Posts: 1,286
Nice. I did mine on the Pi a couple years ago, and it just sits and runs and works. I really should look around for other applications, like smarter remote controls.

Linwood

Latest tank build:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Linwood is offline  
post #7 of 13 (permalink) Old 01-26-2017, 02:07 AM
Algae Grower
 
PTrader: (0/0%)
Join Date: Dec 2016
Posts: 51
This is great I want one. Whoever invents a programable 24/7 light is going to be a very rich man. I love my Finnex but it's too bright at the wrong times of day. Also I'd love for it to have a cloudy afternoon seista to help me control algae. Ah one can dream haha.

Sent from my XT1080 using Tapatalk
skipcharlie is offline  
post #8 of 13 (permalink) Old 01-26-2017, 03:13 AM
Planted Tank Guru
 
natemcnutty's Avatar
 
PTrader: (8/100%)
Join Date: May 2016
Location: Portland, OR
Posts: 2,359
I'm sure it's coming, but a wifi enabled light that can be controlled and programmed via a web interface would be excellent. Then you could import/export settings, live preview your settings, etc. Add in Alexa skills or similar, and you'd be all set

Sent from my Nexus 6 using Tapatalk
natemcnutty is online now  
post #9 of 13 (permalink) Old 01-26-2017, 02:39 PM
Wannabe Guru
 
PTrader: (0/0%)
Join Date: Jun 2014
Location: Cape Coral, Florida
Posts: 1,286
Quote:
Originally Posted by natemcnutty View Post
I'm sure it's coming, but a wifi enabled light that can be controlled and programmed via a web interface would be excellent. Then you could import/export settings, live preview your settings, etc. Add in Alexa skills or similar, and you'd be all set
Well, but that's exactly what some of these do. The Pi version I did is wifi, web based, programmable to any series of events you want.

You just need to have skills with a soldering iron.

Frankly what someone needs to build are inexpensive and accurate test probes, so that these systems could get chemical and flow rate readings, and some serious aquarium controllers could be built on the cheap. But the costs of such devices is SO far above the cost of things like a Raspberry Pi, that it isn't cost effective.

But light control, even something like dosing pump control is really easy.

Linwood

Latest tank build:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Linwood is offline  
post #10 of 13 (permalink) Old 01-26-2017, 06:11 PM Thread Starter
Planted Tank Obsessed
 
Vinster8108's Avatar
 
PTrader: (4/100%)
Join Date: Sep 2016
Location: Columbus, OH
Posts: 397
My next steps will be adding my Finnex Planted Plus 27/7 to the program so I can run a 24/7 cycle that goes completely off at night. (Note, the new 24/7 SE does go completely dark, great improvement!) That shouldn't be too much trouble.

Next will be to set up a web control option and have a few pre-set programs to run and choose from. That might take me a bit longer haha.

75g Tank Journal:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Forest's Edge:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Vinster8108 is offline  
post #11 of 13 (permalink) Old 06-20-2018, 02:15 PM
Algae Grower
 
davgriggs's Avatar
 
PTrader: (0/0%)
Join Date: Apr 2018
Location: JACKSONVILLE, FLORIDA
Posts: 25
So easy a caveman could do it

David A. Griggs
davgriggs is offline  
post #12 of 13 (permalink) Old 10-11-2018, 01:40 AM
Planted Member
 
PTrader: (0/0%)
Join Date: Mar 2017
Posts: 172
Does anyone sell one of these here? I am a) overwhelmed with a newborn, b) a total noob when it comes to anything like this. But I really want to program my satellite pro plus differently!
TheLordOfTheFish is offline  
post #13 of 13 (permalink) Old 10-17-2018, 02:27 PM Thread Starter
Planted Tank Obsessed
 
Vinster8108's Avatar
 
PTrader: (4/100%)
Join Date: Sep 2016
Location: Columbus, OH
Posts: 397
They are pretty custom, I haven'T seen any for sale on here. The issues would be your remote. The IR signals might not be the same, it's why you have to program in the remote. If you can find a tech friend, you might be able to convince them to help you build one.

75g Tank Journal:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Forest's Edge:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Vinster8108 is offline  
Reply

Tags
24/7, ir led, led, raspberry pi, satellite led plus

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome