Guide: Arduino based LED controller for Current Satellite LED+ - Page 26
Planted Tank Forums
Your Tanks Image Hosting *Tank Tracker * Plant Profiles Fish Profiles Planted Tank Guide Photo Gallery Articles

Go Back   The Planted Tank Forum > Specific Aspects of a Planted Tank > DIY


Reply
 
Thread Tools Display Modes
Old 11-22-2013, 09:50 PM   #376
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 835
Default

Thanks Aquatechtoo that was a big help. I guess the same thing could be wrote for random cloud cover too like with the thunderstorms? I would really like to have a nice random mix to mimic actual weather so I will learn how this works and hopefully see if I can mix that in with the thunderstorms. Don't think it should be to hard.

The sound option I figured would be stretching the memory. Only need like a very small like 2-3 sec wav file. If this is feasible I may get a Mega. I just picked up the Uno. I haven't played with this code before or yet but I don't see why it couldn't be possible to set a trigger based on the storm to trigger the .wav file. Only issue I see would be having the lights and sound synced. Then again I don't think it would matter ether way if it's synced or not. Not always do you hear thunder when you see lightning and vice versa. Hooking speakers up is the easy part.

I picked up my Uno just now and the resistor but this rat shack didn't have the IR emmitters. So I will need to look at some other places and if they don't have them order them when I order the LCD and box to enclose this all in. At the same time I am going to get the RF parts and experiment with that. I have been thinking about it for a few days and think I could get it to work. Only thing I need to sort out is powering the RF receiver box. I think a simple small battery like the RTC uses should work.

My logic is to have a small black box that has a small PCB in it just big enough to connect the RF receiver and an IR emitter in it. When the RF receives a signal from the Uno it will fire the IR emitter in the box which will also have the IR receivers for the lights in it. RF has better range than IR and will allow you to conceal the boxes and make changing the programing easier. Here is a small example on this page. As you can see when the Key FOB is pressed it lights a LED, which in our case would be an IR emitter would fire instead to trigger the light. This site has a kit that works with the Uno so this is something I am really going to dig into. This could really make this setup versatile. This is just in theory. Not sure if this would actually work.

http://www.karlssonrobotics.com/cart...FRFo7AodywIALA

Example

http://www.adafruit.com/products/1096
Texan78 is offline   Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 11-22-2013, 11:58 PM   #377
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 290
Default

Cool ideas!

Quote:
Originally Posted by Aquatechtoo View Post
Zodduska, how did you get the Custom settings into the controller? Didn't you need to use the IR receiver for that?

No receiver needed. Just save the preset you want on the regular remote by holding the custom button. When setting up the alarms these are what you'd put for custom functions:

M1Custom
M2Custom
M3Custom
M4Custom

All of the remote buttons are defined at the bottom of the code too. This is with 4.1
__________________
zodduska is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 12:20 AM   #378
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (2/100%)
Join Date: Mar 2013
Location: South Central PA
Posts: 49
Default

Perhaps you can write a similar random function for clouds like was done for the storm and then use a control structure like If/Else to pull them together!? Just a shot in the dark on my part; object-oriented programming is NOT a strength of mine.

Good luck with the sound, too. Keep us posted. I think it would be a more natural experience if the sound and lighting aren't in sync with each other. This concept also reminded me of Xmas lights syncing to music and a quick search reveled this: http://forum.arduino.cc/index.php?topic=87956.0 and while it isn't exactly what you are thinking about, it could serve as inspiration as you start devising potential solutions? This is a case where the lights and sound would fire in concert with each other, but if you could take this concept and offset the lights and sound by a second or two, it might take this idea of storms over a planted tank to a "4D" level!?
Aquatechtoo is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 01:04 AM   #379
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 290
Default

It seems like the dynamic fade functions are all pretty simple loops on the LED+, you could time lightning strikes pretty easily and add the right amount of delay(s) for the audio to sync then have it repeat until the random storm duration is up. Though I've no idea how to code it.
__________________
zodduska is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 01:09 AM   #380
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (2/100%)
Join Date: Mar 2013
Location: South Central PA
Posts: 49
Default

Quote:
Originally Posted by zodduska View Post
Cool ideas!


No receiver needed. Just save the preset you want on the regular remote by holding the custom button. When setting up the alarms these are what you'd put for custom functions:

M1Custom
M2Custom
M3Custom
M4Custom

All of the remote buttons are defined at the bottom of the code too. This is with 4.1
Oh, yeah - that's pretty obvious now that I read your explanation. Thanks.
Aquatechtoo is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 03:21 AM   #381
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 835
Default

Quote:
Originally Posted by Aquatechtoo View Post
Perhaps you can write a similar random function for clouds like was done for the storm and then use a control structure like If/Else to pull them together!? Just a shot in the dark on my part; object-oriented programming is NOT a strength of mine.
I am thinking the same thing as you. Just copy the random storms coding and and replace it with the rolling clouds calls. In theory that should create random clouds and random storms. I have the Current USA Ramp timer and have it hooked up and testing it. If it works out well I will use the ramp timer to control the cycles and the Uno to control the random weather events. That should also free up some memory for sound.

Quote:
Originally Posted by Aquatechtoo View Post
I think it would be a more natural experience if the sound and lighting aren't in sync with each other. This concept also reminded me of Xmas lights syncing to music and a quick search reveled this: http://forum.arduino.cc/index.php?topic=87956.0 and while it isn't exactly what you are thinking about, it could serve as inspiration as you start devising potential solutions? This is a case where the lights and sound would fire in concert with each other, but if you could take this concept and offset the lights and sound by a second or two, it might take this idea of storms over a planted tank to a "4D" level!?
I am very familiar with what you're talking about. I was doing those Christmas lights 7 years ago with the L.O.R. (Light-o-rama) controllers. LoL So I have a lot of experience with that.


Quote:
Originally Posted by zodduska View Post
It seems like the dynamic fade functions are all pretty simple loops on the LED+, you could time lightning strikes pretty easily and add the right amount of delay(s) for the audio to sync then have it repeat until the random storm duration is up. Though I've no idea how to code it.
That is an excellant idea! That makes a lot of sense. Just find out the timing between the flashes and add a delay. I will have to figure it out and play with it. I should be able to figure it out once I start digging into the code and learning it.

I am getting all my parts together now for this. I am really thinking this RF thing could work. I have found all the parts and there is even an Arduino Library for these RF parts. If you could have a small box hidden behind your tank or under it so you and keep the Uno plugged in somewhere else so you can make easy changes that will be sweet!
Texan78 is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 12:46 PM   #382
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (2/100%)
Join Date: Mar 2013
Location: South Central PA
Posts: 49
Default

Texan78, I just had a realization that may help you with identifying the amount of memory available on the Uno as you start implementing on your idea. The geniuses who worked on this code included the ability to identify the amount of free SRAM. In latter versions of their code, you can see the amount of free SRAM from the serial monitor printout! In my case (I'm using Dalhammer's v4.1 code and tweaked a few minor things and I have a few more alarms firing during the day) I have 967 bytes free.
Aquatechtoo is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 06:45 PM   #383
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 835
Default

Quote:
Originally Posted by Aquatechtoo View Post
Texan78, I just had a realization that may help you with identifying the amount of memory available on the Uno as you start implementing on your idea. The geniuses who worked on this code included the ability to identify the amount of free SRAM. In latter versions of their code, you can see the amount of free SRAM from the serial monitor printout! In my case (I'm using Dalhammer's v4.1 code and tweaked a few minor things and I have a few more alarms firing during the day) I have 967 bytes free.
Great thanks! I remember during all my reading somewhere where that was mentioned so I will go back and see if I can locate it. I am about to head out and see if I can locate some of the last parts I need to at least get the basic functions work then I can go from there with getting the RF capabilities working and then adding the other features.

I bought the ramp timer for this as well to test and play with it. It works fine on the preset I was using to dim the lights. I was disappointing with the fact it doesn't dim to moonlight, it just dims them to off. So I am probably going to send those back. I was hoping to use the Ramp Timer to control the dimming of the lunar/day cycle and use the Uno to handle events hoping that will free some memory up too. Looks like that won't be the case. Just so I have an understand and clear. With this mod this will dim to moonlight at night?

-Thanks!
Texan78 is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 07:25 PM   #384
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 290
Default

With the way it's set up by default it's switching the built in modes at the end of the day to the dusk/dawn dynamic fade before switching to moonloght, its not set up yet for a true ramp up/ ramp down. You could do it with a bunch of alarms using the individual channel intensity adjustments but you'd need a lot at intervals, the TimeAlarms library is limited to 256 and I'm not sure that's the cleanest way to do it as you may run out of memory before that limit is reached.
__________________
zodduska is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 07:32 PM   #385
Indychus
Planted Tank Enthusiast
 
Indychus's Avatar
 
PTrader: (8/100%)
Join Date: Feb 2013
Location: Irmo, SC
Posts: 652
Default

The best way to trigger a fade would be to use a sinusoidal function to repeatedly press the up or down command for each channel. You'd have to write a new function for this, and just trigger the function with a single alarm. This is something I have been toying around with, but I've been out of the country with work and haven't had much time to play with it.
__________________
The Fraternity of Dirt
Check out my open-source Arduino-Powered Light Controller Guide for Current LED+ and other IR switchable lights.
Indychus is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 07:39 PM   #386
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 835
Default

Awesome, guess I need to get this set up and at least to a working state first and play catch up then go from there. Good to know it is at least possible. Oh wait, in order to have it to dim to moonlight it would have to have control of 2 separate channels right?
Texan78 is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 07:42 PM   #387
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 290
Default

Oh nice, sounds like that'd be a lot easier to set up, I just tested and it takes 42 "White Down" for the White LED to go from max to off with my setup.
__________________
zodduska is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 07:45 PM   #388
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 290
Default

Quote:
Originally Posted by Texan78 View Post
Awesome, guess I need to get this set up and at least to a working state first and play catch up then go from there. Good to know it is at least possible. Oh wait, in order to have it to dim to moonlight it would have to have control of 2 separate channels right?
The code would have send signals to dim the red, green, blue and white individually.
__________________
zodduska is offline   Reply With Quote Quick reply to this message
Old 11-23-2013, 08:09 PM   #389
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 835
Default

Quote:
Originally Posted by zodduska View Post
The code would have send signals to dim the red, green, blue and white individually.
Ah crap you're right. I forgot it has RGB plus white. So it would need to control 3 channels. But this is possible since the remote can fade out each RGB and white channel. Hmmmmmmm This is getting interesting. Ok I am heading out. I need to play catch up so I start playing and digging into this.
Texan78 is offline   Reply With Quote Quick reply to this message
Old 11-24-2013, 10:13 PM   #390
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 290
Default

cleaned up my temporary build a little

__________________
zodduska is offline   Reply With Quote Quick reply to this message
Reply

Tags
arduino, automation, current led+, diy, light controller

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:
Location
Your Location. As precise as you feel comfortable with.
Security Question
While balancing on a piece of wood, two inches by four inches known as a 2x4, John and his friend Sally both spotted a dalmatian inside of a truck with sirens. The animal with John and Sally is a _ _ _?
Insurance
Please select your insurance company (Optional)

Log-in

Human Verification

In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.



Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 02:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright Planted Tank LLC 2012