Guide: Arduino based LED controller for Current Satellite LED+ - Page 34
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 05-14-2014, 03:45 AM   #496
Curt_Planted
Algae Grower
 
PTrader: (0/0%)
Join Date: Feb 2014
Location: San Diego, CA
Posts: 33
Default

Quote:
Originally Posted by nayr2 View Post
That really does look pretty slick Mustang
Kits?
Curt_Planted is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 05-14-2014, 03:48 AM   #497
Curt_Planted
Algae Grower
 
PTrader: (0/0%)
Join Date: Feb 2014
Location: San Diego, CA
Posts: 33
Default

Nayr, set the lighting where you want it and hard code it at each setting to one of the custom mode buttons on the remote. Then after each transition just send that command so it ends up where you want. Also make sure there is atleast a 200 ms delay between each transmission (I noticed them failing without it when looping). I haven't noticed any drift so not sure what is different...
Curt_Planted is offline   Reply With Quote
Old 05-14-2014, 12:30 PM   #498
Mustang5L5
Algae Grower
 
PTrader: (0/0%)
Join Date: Feb 2004
Location: Boston, MA
Posts: 138
Default

Quote:
Originally Posted by Curt_Planted View Post
Kits?
It would be nice, but can't. My work gives me a little leeway with side projects, but not going to push it.
__________________
-Mike

Last edited by Mustang5L5; 05-14-2014 at 04:25 PM.. Reason: Spelling
Mustang5L5 is offline   Reply With Quote
Old 05-19-2014, 03:48 AM   #499
AnotherHobby
Wannabe Guru
 
AnotherHobby's Avatar
 
PTrader: (8/100%)
Join Date: Mar 2012
Location: Apple Valley, MN
Posts: 1,213
Default

Today I just ordered 2 of these lights for my 60cm tank. I had never dropped into this thread before because I didn't own one. Reading through this, I'm super pumped! This is awesome! I happened to have all of the parts on hand from other projects, so I threw one together today. Near as I can tell, it should work when the lights get here. It's the same controller that I also use to run dosing pumps.

I don't like leaving stuff breadboarded, so I still need to solder it all up on that proto shield in the background.


Last edited by AnotherHobby; 06-17-2014 at 08:00 PM.. Reason: updated photo
AnotherHobby is offline   Reply With Quote
Old 06-03-2014, 03:12 AM   #500
nayr2
Algae Grower
 
PTrader: (0/0%)
Join Date: May 2014
Location: Canada
Posts: 7
Default

Floating what? Floating GROUND, NOOB. I figured out why I was losing commands randomly. When I went from the IR LED to hard-wiring it to the lights I pulled out the pulldown resistor I was using. I can't believe I didn't think of it but that's what you get when you drop out of electronics for software engineering and don't do any projects at home for a few years.

Glad I've got that sorted out, but I've been busy getting everything else set up. Found a stand and I've been rebuilding it to my liking. Ran plumbing and electrical, put in the sump and filter. Tomorrow, I drill the tank and attach the overflow.

Here's a timelapse of a sunrise. My camera ran out of juice before I could record a whole 24hours: https://www.youtube.com/watch?v=R5EA7GHj2FQ&hd=1

Last edited by nayr2; 06-03-2014 at 06:37 AM.. Reason: video
nayr2 is offline   Reply With Quote
Old 06-04-2014, 03:12 AM   #501
AnotherHobby
Wannabe Guru
 
AnotherHobby's Avatar
 
PTrader: (8/100%)
Join Date: Mar 2012
Location: Apple Valley, MN
Posts: 1,213
Default

Quote:
Originally Posted by nayr2 View Post
Here's a timelapse of a sunrise. My camera ran out of juice before I could record a whole 24hours: https://www.youtube.com/watch?v=R5EA7GHj2FQ&hd=1
That looks awesome!
AnotherHobby is offline   Reply With Quote
Old 06-18-2014, 06:18 PM   #502
biglos201
Algae Grower
 
biglos201's Avatar
 
PTrader: (0/0%)
Join Date: Jan 2013
Location: Jersey
Posts: 39
Default

Quote:
Originally Posted by AnotherHobby View Post
That looks awesome!
yeh, thats dope! So you set it to ramp up and down thats exactly what I'm looking for! I ordered the Ramp Timer pro but I hear its a bit clunky. I'll give it a shot, sucks thatI can't use my other dynamic mode
__________________
55G Planted Ecoxitoc E-120 LED Hi-Tech!
C02 -EI Fertz - Marci/Bosemani Rainbows - HiFin Loach - Bolivian Rams - Torpedo Barbs - Apistogramma - Harlequin Rasboras - Blue Neon Gourami -

biglos201 is offline   Reply With Quote
Old 06-21-2014, 04:37 PM   #503
Curt_Planted
Algae Grower
 
PTrader: (0/0%)
Join Date: Feb 2014
Location: San Diego, CA
Posts: 33
Default

Looks great Nayr! Did you specifically have it up the reds more at the start? I've been meaning to try playing with that to make the hues match the changes in a real sunrise (red to orange to yellow to white).
Curt_Planted is offline   Reply With Quote
Old 06-24-2014, 04:30 PM   #504
nayr2
Algae Grower
 
PTrader: (0/0%)
Join Date: May 2014
Location: Canada
Posts: 7
Default

Yeah a little red first, then a bit of green to make yellow, and finally blue. This project is on the backburner as I've been setting up the rest of my tank. I drilled it, sumped it, set up co2 injection last week, and have been spending most of my time admiring my very healthy aquascape of glorious hair algea.
nayr2 is offline   Reply With Quote
Old 06-28-2014, 05:05 PM   #505
Linwood
Algae Grower
 
PTrader: (0/0%)
Join Date: Jun 2014
Location: Cape Coral, Florida
Posts: 149
Default

I'm working on doing a similar setup but with Raspberry Pi, so it is easier to network, and just ... well, because I wanted to do something with pi.

Was any solution found to the power toggle? I'm thinking of running all four colors to minimum intensity as "off" instead of using power, though that's not exactly a pleasant option. My second thought was to put a photo sensor that has the light visible, when the power is toggled, and if it goes the unexpected way (on -> dimmer) then toggle again, but that sounds really kludgy also. The final alternative which is more hardware intensive than may be worth it is to put a relay in and run either AC or DC through it before the light, instead of using the IR code for power.

All of these are a lot more complex than a discrete on/off code, but I gather you never got one?

PS. Is there any interest in a Pi version, if so when I get this done I'll post something. At present I have a web-based remote image where you click buttons and all work, but no scheduling. My intent is a simple minded web based scheduling as well, and then if I get ambitious some sensors in the tank to display as well.

[EDIT] PS: I found I could turn it off reasonably quickly by sending a white command followed by 50 white-dimmer commands (50 is automated, minimal pause, it's maybe 5 seconds or so). Another alternative but it depends on preprogramming would be to set a preset (e.g. M4) to completely dim on all LED's, then invoke that as "off", but that depends on the user not changing anything. So this handles a pseudo "off" discrete code, I have no idea how to do an "on" without knowing the initial state, but in terms of using it as a scheduler in this way I can just not ever send a power toggle.

Last edited by Linwood; 06-28-2014 at 09:32 PM.. Reason: Add postscript
Linwood is online now   Reply With Quote
Old 06-29-2014, 03:22 AM   #506
AnotherHobby
Wannabe Guru
 
AnotherHobby's Avatar
 
PTrader: (8/100%)
Join Date: Mar 2012
Location: Apple Valley, MN
Posts: 1,213
Default

Quote:
Originally Posted by Linwood View Post
Was any solution found to the power toggle? I'm thinking of running all four colors to minimum intensity as "off" instead of using power, though that's not exactly a pleasant option. My second thought was to put a photo sensor that has the light visible, when the power is toggled, and if it goes the unexpected way (on -> dimmer) then toggle again, but that sounds really kludgy also. The final alternative which is more hardware intensive than may be worth it is to put a relay in and run either AC or DC through it before the light, instead of using the IR code for power.

All of these are a lot more complex than a discrete on/off code, but I gather you never got one?
I'm building a touch screen controller that has relays so that I can just physically power them off. The relays are very easy to interact with, and a bank of 8 was only $12. If you just want one, then a single relay is $3 from DX.com.
AnotherHobby is offline   Reply With Quote
Old 06-29-2014, 01:18 PM   #507
Linwood
Algae Grower
 
PTrader: (0/0%)
Join Date: Jun 2014
Location: Cape Coral, Florida
Posts: 149
Default

Quote:
Originally Posted by AnotherHobby View Post
I'm building a touch screen controller that has relays so that I can just physically power them off. ....[/URL].
I may end up just going that route, though I was trying not to have to loop either DC or AC power from the lamp through the device. But maybe that's not a goal worth it. I need to look at the DC connector, maybe I can put a male and female version of it on the PI with relay in the box, and it will look OK, plus not have to splice the cable. I'd really rather not have 110v running into the PI case.

I don't like what I did with the White-then-dim, as it has to flash white if you were already in a dim scene, so think next try is to require programming M4 to off, and use it instead (I can actually automate the programming of M4).

Then off to scheduling.
Linwood is online now   Reply With Quote
Old 07-03-2014, 03:37 PM   #508
AnotherHobby
Wannabe Guru
 
AnotherHobby's Avatar
 
PTrader: (8/100%)
Join Date: Mar 2012
Location: Apple Valley, MN
Posts: 1,213
Default

I'm trying to figure out how to send the M1 thru M4 commands to actually tell the light to save a mode. To do this with the factory remote, you hold the button down for 4 seconds. The code here sends the command quickly though. Does anybody know how you'd send the 4 second command to save one of the memory button spots?
AnotherHobby is offline   Reply With Quote
Old 07-03-2014, 04:00 PM   #509
Linwood
Algae Grower
 
PTrader: (0/0%)
Join Date: Jun 2014
Location: Cape Coral, Florida
Posts: 149
Default

Quote:
Originally Posted by AnotherHobby View Post
I'm trying to figure out how to send the M1 thru M4 commands to actually tell the light to save a mode. To do this with the factory remote, you hold the button down for 4 seconds. The code here sends the command quickly though. Does anybody know how you'd send the 4 second command to save one of the memory button spots?
I have that working on the Raspberry PI using LIRC. I do a SEND_START, then wait 5 seconds and SEND_STOP of the Mx key.

The up/down are similar, I just SEND_START on the down for 9 seconds, and then SEND_STOP.

There are issues with this on the rPI, in that there appears to be a certain amount of buffering somewhere, so the times need to be experimented with a bit.

Here's the whole bash script I'm using. It's just brute force and not pretty, and 90% of the code is generating the HTTP response, but I'm still in the experimental stage and it's easier to instrument/debug/change like this:

The only significant portions are the SLEEP and IRSEND which should be somewhat self explanatory.

I also tried this in a straight loop, but on the pi the SEND_ONCE is asynchronous, so there's no way to know when it is actually done, so if you send too many too fast you get an error. On the Arduino, you may have more control over the buffer/timing, but my suggestion is just send them as fast as you can for 4+ seconds.

Code:
#!/bin/bash
if ERROR=$(irsend SEND_ONCE ledplus White  2>&1 >/dev/null)
then
    sleep 1
else
    echo "Status: 500 Error"
    echo "Content-type: text/plain"
    echo ""
    echo "Error code from White process = $ERROR"
    exit
fi
if ERROR=$(irsend SEND_START ledplus WhiteDown  2>&1 >/dev/null)
then
    sleep 5
else
    echo "Status: 500 Error"
    echo "Content-type: text/plain"
    echo ""
    echo "Error code from WhiteDown process = $ERROR"
    exit
fi

if ERROR=$(irsend SEND_STOP ledplus WhiteDown 2>&1 >/dev/null)
then
    sleep 1
else
    echo "Status: 500 Error"
    echo "Content-type: text/plain"
    echo ""
    echo "Error code from WhiteDown process = $ERROR"
    exit
fi

if ERROR=$(irsend SEND_START ledplus M4  2>&1 >/dev/null)
then
   sleep 1
else
    echo "Status: 500 Error"
    echo "Content-type: text/plain"
    echo ""
    echo "Error code from WhiteDown process = $ERROR"
    exit
fi

if ERROR=$(irsend SEND_STOP ledplus M4  2>&1 >/dev/null)
then
    echo "Status: 200 Success"
    echo "Content-type: text/plain"
    echo ""
    echo "Sent successfully"
else
    echo "Status: 500 Error"
    echo "Content-type: text/plain"
    echo ""
    echo "Error code from WhiteDown process = $ERROR"
fi
Linwood is online now   Reply With Quote
Old 07-05-2014, 03:30 PM   #510
AnotherHobby
Wannabe Guru
 
AnotherHobby's Avatar
 
PTrader: (8/100%)
Join Date: Mar 2012
Location: Apple Valley, MN
Posts: 1,213
Default

In case anybody cares, here is how I got it to save the 4 memory positions. You basically just send it the memory button and then blast the footer for 2 seconds. I'm pretty new to C/C++, so there is probably a better way of doing this. This is for memory button 1.

HTML Code:
void saveM1()
{
  SendCode(0x20DF38C7, 1);  // send M1 button

  unsigned long currentMillis = millis(); // get current millis
  unsigned long blastMillis = millis(); // get current millis

  while ((blastMillis-currentMillis)<3000)  // blast IR footer for 3 seconds
  {
    irsend.sendNEC(0xFFFFFFFF,32);
    blastMillis = millis(); // get current millis
  }
}

Last edited by AnotherHobby; 07-05-2014 at 04:22 PM.. Reason: update
AnotherHobby is offline   Reply With Quote
Reply

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not 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:41 AM.


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