Guide: Arduino based LED controller for Current Satellite LED+ - Page 25
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-18-2013, 12:34 AM   #361
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2013
Location: South Central PA
Posts: 48
Default

Guide: Arduino based LED controller for Current Satellite LED+


I got the LCD working - soldering on the headers was the answer. The controller has been running fine for a few hours so far. We've experienced our first storm already this evening!

I have attempted to reduce the max length of the storm to 45 min. Can you tell me if I changed the code correctly for this?

randomSeed(analogRead(RANDPIN)); // Generate random seed on unused pin
byte RH = random(23); // Randomizer for RandomStorm
byte RM = random(59);
byte RS = random(59);
byte TSDurationH = random(0);
byte TSDurationM = random(45);


Also, if I want to reduce the chances of a storm on a given day, where would I change this in the code?
Aquatechtoo is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old 11-18-2013, 11:08 PM   #362
Dahammer
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2010
Location: Mississippi
Posts: 118
Default

Quote:
Originally Posted by Aquatechtoo View Post
I got the LCD working - soldering on the headers was the answer. The controller has been running fine for a few hours so far. We've experienced our first storm already this evening!

I have attempted to reduce the max length of the storm to 45 min. Can you tell me if I changed the code correctly for this?

randomSeed(analogRead(RANDPIN)); // Generate random seed on unused pin
byte RH = random(23); // Randomizer for RandomStorm
byte RM = random(59);
byte RS = random(59);
byte TSDurationH = random(0);
byte TSDurationM = random(45);
Yeah, that should work fine. Basically all it does it set a new alarm that changes to a non-storm mode after TSDurationH/M.

Quote:
Originally Posted by Aquatechtoo View Post
Also, if I want to reduce the chances of a storm on a given day, where would I change this in the code?
There is no built in way to do this. You'd need to write your own code to do what you wanted. The codes sets an alarm that calls the RandomStorm routine every day at 12:00. You could either change it to where it didn't call it every day or add code to the RandomStorm routine that just kicks it out on certain days, or add code that decreases the odds on certain days. You could decrease the odds by narrowing the window where they are allowed (only between 1 & 8 PM by default) or maybe run the randomizer more than once or some other way.
Dahammer is offline   Reply With Quote
Old 11-19-2013, 01:56 AM   #363
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2013
Location: South Central PA
Posts: 48
Default

Cool, thank you. It seems like there are a number of ways I can manipulate small pieces of the existing code without too much trouble, such as several options you mentioned. Now that I read through the RandomStorm routine, it makes more sense with your explanation. This whole project has opened up a number of things that Arduino controllers can solve for me outside of aquarium lighting that I never considered!

My hat's off to you, Indy, and the rest of the forum collaborators on this solution. It was probably a little cheaper than buying a commercial solution and much more educational! Your collective approach to something which started with Indy asking a seemingly innocuous question that grew into an open DIY solution is the way learning and collaborating ought to be approached more frequently. Instead of the siloed, departmentalized general business model created under the guise of maximizing profits, you all decided to share knowledge in a way that doesn't thwart creativity. It is a great example for the rest of us to follow! Soapbox = OFF.
Aquatechtoo is offline   Reply With Quote
Old 11-19-2013, 04:52 AM   #364
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 836
Default

Well it took me several hours but I read through all 25 pages of this thread and enjoyed every page. A great bunch of knowledgable folks on this project. I have a AI SOLS on my Apex controller for my reef tank. I wanted something along the same lines for my planted tank made for freshwater but wasn't about to spend that same amount of money I did for the reef tank for lights not built for a planted tank. After a lot of research I found the LED Plus+ and started doing some homework to see how I could have it do what the AI lights do. That's when I found this tread and I said ok I am sold lets get them. So I ordered two lights today and hopefully will have them no later than Thursday. Now just need to go get the goodies to build this box. I just have a couple of questions and ideas I want to pass by you guys if you don't mind.

1. If I understand this correctly the thunderstorms are entirely random correct?

2. The way I was hoping to set it up was morning, dusk/dawn mode, early/mid morning light, full spectrum for a few hours, afternoon light, then dusk/dawn mode again into moonlights for the night until the cycle starts over. Then randomly sprinkled in there both day or night rolling clouds and thunderstorms. Is that possible?

3. I have been doing some more research and homework on this. A really good base has been made on this and I thank those who have put a lot of time into this. I see it started way back in July. Now while it makes sense to use IR since the light excepts IR. I started thinking because I like clean installs under my cabinet or maybe hidden away in my office. I know no one will see it but I am OCD like that. What about changing out the IR for RF? Now hear me out first as it's just an idea. In theory it sounds good but may not be possible so wanted to ask. No modification to the light is needed. If anyone is familiar with Home Theater systems and the Logitech Harmony remotes. They have a RF blaster. The remotes can send IR or RF. If you use RF you need the blaster which the remote sends a signal to the box and then the box transmitters to a emitter connected to it a IR signal. It's mainly for those who hide their devices in cabinets. The idea I had uses the same premis. If they make a RF shield for the UNO, which I see they do make RF shields, not sure if it works with the UNO. You could add it to transmit a RF signal to a small box at the tank with a RF signal so the box could stay connected at the computer. The box at the tank would hold a RF Receiver with the IR Receiver from the tank in it. The RF Receiver would trigger the IR connected to it in the box. So it would be a very small footprint and could be hidden away under your cabinet with velcro or however you chose and the UNO could stay plugged into the computer who hidden somewhere else. Just an idea, would this be do-able? If not, I have a WiFi solution too.

4. Do they make any Audio shields for the UNO that has RCA jacks or shields with speakers on it? I think you see where I am going with this. I am not familiar with the UNO programing and I am sure with the memory size of the UNO but if you could have small wave files of thunder to trigger with the storms it would be a cool effect. Of course this would mainly just be ear candy to go along with the eye candy, but it could have its advantages if you can hear a storm and you're in another room you know triggers are being fired as they should. Just another idea.

If this is posible I think I am going to try to do it. I am good with hardware just not familiar with the Arduino stuff or software coding. I have an extensive background in Networking and web based coding and the languages use the same logic just in different formats. I am really interested in the RF/IR blaster box and if that doesn't work then I am sure I can come up with a WiFi solution with the research I have done so far.

Any input is greatly appreciated and can't wait to get my light and start playing.

-Thanks!
Texan78 is offline   Reply With Quote
Old 11-19-2013, 03:40 PM   #365
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 289
Default

First off thank you for making this easily accessible to newbies like myself!

I've got my parts on the way, the Arduino, breadboard and LCD arrived yesterday so I hooked them up and loaded the latest code.

I went with the Generic 4x20 LCD from Amazon for $9 and it seems a little different since it has a backpack to reduce the amount of pins needed to connect to the Arduino, I found some code on an Amazon review to get it going which worked fine to print "Hello World"

I tried to replace the correct parts in your code with the one for this LCD but it doesn't light up when running it, I'm not sure if that's because I don't have any of the other parts yet would cause the code to stall before initializing the LCD but I figured I'd post it here to see if anyone could tell me if it looks right or not to get a head start on fixing it if needed.

I also had to use a different LCD library to make it work with the backpack
LiquidCrystal_V1.2.1.zip

The Amazon LCD code

Code:
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

#define I2C_ADDR 0x27
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{
lcd.begin (20,4,LCD_5x8DOTS);
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
}

void loop()
{
lcd.setBacklight(HIGH);
lcd.home ();
lcd.print("HELLO WORLD");
}
(incorrectly?)Modified 3.6

Code:
///////////////////////////////////////////////////////////////////
// Current Satellite LED+ Controller  V3.6                       //
//   Indychus...Dahammer...mistergreen @ plantedtank.net         //
//   This code is public domain.  Pass it on.                    //
//   Confirmed on Arduino UNO 1.0.5                              //
//   Req. Time, TimeAlarms, RTClib, IRremote                     //
///////////////////////////////////////////////////////////////////
//
// This version uses Ken Shirriff's IRremote library to Rx/Tx the IR codes
// http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html
// 
// This code does NOT use PIN 13 on the Uno, as do previous versions
// Instead PIN 3, which is a PWM pin, is used. So you'll need to connect
// your LED to PIN 3 instead of PIN 13 for it to work.

// Install LCD per instructions at http://learn.adafruit.com/character-lcds/overview

#include <Wire.h>
#include <RTClib.h>
#include <Time.h>
#include <TimeAlarms.h>
#include <IRremote.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

#define I2C_ADDR 0x27
#define BACKLIGHT_PIN 3
#define En_pin 2
#define Rw_pin 1
#define Rs_pin 0
#define D4_pin 4
#define D5_pin 5
#define D6_pin 6
#define D7_pin 7

RTC_DS1307 RTC;
IRsend irsend;
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

/*********** BEGIN USER DEFINED VARIABLES ***********/
// DEBUG_IR adds the option to test the IR commands via the Arduino software's serial monitor
// You can send any value from 1 to 32 and it send the corresponding IR code
// The codes follow the remote controller, left to right, top to bottom
// e.g 1 = Orange, 2 = Blue, 21 = Moon1, etc
#define DEBUG_IR


int postDelay = 100;         // Delay after codes are sent
int randAnalogPin = 0;       // This needs to be set to an unused Analog pin, Used by ThunderStorm()

// Current Satellite+ IR Codes (NEC Protocol)
unsigned long codeHeader = 0x20DF; // Always the same

// Remote buttons listed left to right, top to bottom
unsigned int codeOrange = 0x3AC5;
unsigned int codeBlue = 0xBA45;
unsigned int codeRose = 0x827D;
unsigned int codePowerOnOff = 0x02FD;
unsigned int codeWhite = 0x1AE5;
unsigned int codeFullSpec = 0x9A65;
unsigned int codePurple = 0xA25D;
unsigned int codePlay = 0x22DD;
unsigned int codeRedUp = 0x2AD5;
unsigned int codeGreenUp = 0xAA55;
unsigned int codeBlueUp = 0x926D;
unsigned int codeWhiteUp = 0x12ED;
unsigned int codeRedDown = 0x0AF5;
unsigned int codeGreenDown = 0x8A75;
unsigned int codeBlueDown = 0xB24D;
unsigned int codeWhiteDown = 0x32CD;
unsigned int codeM1Custom = 0x38C7;
unsigned int codeM2Custom = 0xB847;
unsigned int codeM3Custom = 0x7887;
unsigned int codeM4Custom = 0xF807;
unsigned int codeMoon1 = 0x18E7;
unsigned int codeMoon2 = 0x9867;
unsigned int codeMoon3 = 0x58A7;
unsigned int codeDawnDusk = 0xD827;
unsigned int codeCloud1 = 0x28D7;
unsigned int codeCloud2 = 0xA857;
unsigned int codeCloud3 = 0x6897;
unsigned int codeCloud4 = 0xE817;
unsigned int codeStorm1 = 0x08F7;
unsigned int codeStorm2 = 0x8877;
unsigned int codeStorm3 = 0x48B7;
unsigned int codeStorm4 = 0xC837;

void SetAlarms()
{
  // Set up your desired alarms here
  // The default value of dtNBR_ALARMS is 6 in Alarms.h.
  // This code sets 12 alarms by default, so you'll need to change dtNBR_ALARMS to 12 or more
  Alarm.alarmRepeat(7,00,0, DawnDusk);
  Alarm.alarmRepeat(9,00,0, Cloud2);     // (HR,MIN,SEC,FUNCTION)
  Alarm.alarmRepeat(11,00,0, FullSpec);
  Alarm.alarmRepeat(15,00,0, Cloud2);
  Alarm.alarmRepeat(19,00,0, DawnDusk);
  Alarm.alarmRepeat(21,00,0, Moon2);
  
  // Comment these out if you don't want the chance of a random storm each day
  Alarm.alarmRepeat(12,00,00, ThunderStorm);
  ThunderStorm();  // Sets up intial storm so we don't have wait until alarm time
}
/************* END USER DEFINED VARIABLES *************/

void setup()
{
  Wire.begin();
  RTC.begin();
  lcd.begin(20,4,LCD_5x8DOTS);
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  Serial.begin(9600);
      //Serial.println(freeRam());
  
  if (! RTC.isrunning()) { 
    Serial.println("RTC Error");
    RTC.adjust(DateTime(__DATE__, __TIME__));}  //Adjust to compile time
    
  
  setSyncProvider(syncProvider);     //reference our syncProvider function instead of RTC_DS1307::get()
  
  Alarm.timerRepeat(900, digitalClockDisplay);  // Display the time every 15 minutes
  digitalClockDisplay();
  SetAlarms();
 Serial.print("SRAM : ");          //un-comment these line to check available SRAM
 Serial.println(freeRam());}   

void loop()
{
#ifdef DEBUG_IR 
  if (Serial.available() > 0) {
    delay(5); //Wait for transmission to finish
    CurrentCMDs(SerialReadInt());
  }
#endif
  Alarm.delay(100); 
  // Service alarms & wait (msec)
  lcdClockDisplay();
}

time_t syncProvider()
{
  //this does the same thing as RTC_DS1307::get()
  return RTC.now().unixtime();
}

void ThunderStorm ()
{ 
  // Schedules a storm between 1 & 9 in the evening
  // It sets Storm2, followed by Cloud2 or DawnDusk or Moon2, depending on when the storm is over
  randomSeed(analogRead(randAnalogPin));  // Generate random seed on unused pin
  byte RH = random(23);                   // Randomizer for thunderstorm
  byte RM = random(59);
  byte RS = random(59);
  byte TSDurationH = random(2);
  byte TSDurationM = random(59);
  
  if (RH <= 12)
    {
      Serial.println("No storm today");
      lcd.setCursor(0,1);
      lcd.print("No storm today");
      return;
    }
      
  if (RH > 12)                             // If random value is after 1 pm, allow storm
    {
      Alarm.alarmOnce(RH,RM,RS,Storm2);
      Serial.print("Next Storm: ");
      Serial.print(RH);
      printDigits(RM);
      printDigits(RS);
      Serial.print("   ");
      Serial.print("Duration = ");
      Serial.print(TSDurationH);
      printDigits(TSDurationM);
      Serial.println();
     lcd.setCursor(0,1);
     lcd.print("Next Storm: ");
     lcdHRdigits(RH);
     lcdDigits(RM);}
      
      if ((RH + TSDurationH) < 19)   // Return to Cloud2 if storm ends between 1-7pm
        {Alarm.alarmOnce((RH + TSDurationH),(RM + TSDurationM),RS,Cloud2);}
      else if ((RH + TSDurationH) < 21)  // Return to DawnDusk if storm ends between 7-9pm
        {Alarm.alarmOnce((RH + TSDurationH),(RM + TSDurationM),RS,DawnDusk);}
      else                                       // Return to Night2 if storm ends after 9pm
        {Alarm.alarmOnce((RH + TSDurationH),(RM + TSDurationM),RS,Moon2);}
    }


void digitalClockDisplay()          // Digital clock
{ 
  Serial.print("Time = ");
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.println(); }

  
void lcdClockDisplay()  
  {lcd.setCursor(0,0);
    lcdHRdigits(hour());
  lcdDigits(minute());}

void printDigits(int digits)        // Add :
{
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}

void lcdDigits(int digits)        // Add :
{
  lcd.print(":");
  if(digits < 10)
    lcd.print('0');  
  lcd.print(digits);
}
void lcdHRdigits(int HRdigits)        // Preface hour with 0
{
  if(HRdigits < 10)
    lcd.print('0');  
  lcd.print(HRdigits);
}

#ifdef DEBUG_IR
int SerialReadInt()
{
  int i, numAva;
  char inBytes[3];                  // Array to hold the bytes
  char * inBytesPtr = &inBytes[0];  // Pointer to the first element of the array
      
    numAva = Serial.available();    // Read number of input bytes
    if (numAva > 2)
      numAva = 2;                   // Only allow 2 characters to prevent overflow
      
    for (i=0; i<numAva; i++)        // Load input bytes into array
      inBytes[i] = Serial.read();
    inBytes[i] =  '\0';             // Put NULL character at the end
    return atoi(inBytesPtr);        // Call atoi function and return result
}

void CurrentCMDs (int cmd)
{switch (cmd)
  {
    case 1:
      Orange();
      break;
    case 2:
      Blue();
      break;
    case 3:
      Rose();
      break;
    case 4:
      PowerOnOff();
      break;
    case 5:
      White();
      break;
    case 6:
      FullSpec();
      break;
    case 7:
      Purple();
      break;
    case 8:
      Play();
      break;
    case 9:
      RedUp();
      break;
    case 10:
      GreenUp();
      break;
    case 11:
      BlueUp();
      break;
    case 12:
      WhiteUp();
      break;
    case 13:
      RedDown();
      break;
    case 14:
      GreenDown();
      break;
    case 15:
      BlueDown();
      break;
    case 16:
      WhiteDown();
      break;
    case 17:
      M1Custom();
      break;
    case 18:
      M2Custom();
      break;
    case 19:
      M3Custom();
      break;
    case 20:
      M4Custom();
      break;
    case 21:
      Moon1();
      break;
    case 22:
      Moon2();
      break;
    case 23:
      Moon3();
      break;
    case 24:
      DawnDusk();
      break;
    case 25:
      Cloud1();
      break;
    case 26:
      Cloud2();
      break;
    case 27:
      Cloud3();
      break;
    case 28:
      Cloud4();
      break;
    case 29:
      Storm1();
      break;
    case 30:
      Storm2();
      break;
    case 31:
      Storm3();
      break;
    case 32:
      Storm4();
      break;
    default:
      Serial.println("Invalid Choice");}}
#endif

void SendCode (unsigned int code, byte numTimes, const char *sMessage)
{unsigned long irCode = (codeHeader << 16) + code; // Header is 2 bytes, shift all the way to left & add code to it
  
  for( int i = 0; i < numTimes; i++)
  {irsend.sendNEC(irCode,32); // Send code
    Alarm.delay(postDelay);}
    
  Serial.println(sMessage);  // Print message
  lcd.setCursor(6,0);
  lcd.print(sMessage);
  for(byte i = sizeof(sMessage); i <= 14; i++)
    lcd.print(" ");
  digitalClockDisplay();}

void Orange()
{SendCode(codeOrange, 2, "Orange");}

void Blue()
{SendCode(codeBlue, 2, "Blue");}

void Rose()
{SendCode(codeRose, 2, "Rose");}

void PowerOnOff()
{SendCode(codePowerOnOff, 1, "Power On/Off");}

void White()
{SendCode(codeWhite, 2, "White");}

void FullSpec()
{SendCode(codeFullSpec, 2, "Full Spectrum");}

void Purple()
{SendCode(codePurple, 2, "Purple");}

void Play()
{SendCode(codePlay, 1, "Play/Pause:");}

void RedUp()
{SendCode(codeRedUp, 1, "Red Up");}

void GreenUp()
{SendCode(codeGreenUp, 1, "Green Up");}

void BlueUp()
{SendCode(codeBlueUp, 1, "Blue");}

void WhiteUp()
{SendCode(codeWhiteUp, 1, "White Up");}

void RedDown()
{SendCode(codeRedDown, 1, "Red Down");}

void GreenDown()
{SendCode(codeGreenDown, 1, "Green Down");}

void BlueDown()
{SendCode(codeBlueDown, 1, "Blue Down");}

void WhiteDown()
{SendCode(codeWhite, 1, "White Down");}

void M1Custom()
{SendCode(codeM1Custom, 2, "Custom Mix 1");}

void M2Custom()
{SendCode(codeM2Custom, 2, "Custom Mix 2");}

void M3Custom()
{SendCode(codeM3Custom, 2, "Custom Mix 3");}

void M4Custom()
{SendCode(codeM4Custom, 2, "Custom Mix 4");}

void Moon1()
{SendCode(codeMoon1, 2, "Moonlight 1");}

void Moon2()
{SendCode(codeMoon2, 2, "Moonlight 2");}

void Moon3()
{SendCode(codeMoon3, 2, "Moonlight 3");}

void DawnDusk()
{SendCode(codeDawnDusk, 2, "Dawn/Dusk");}

void Cloud1()
{SendCode(codeCloud1, 2, "Cloud Cover 1");}

void Cloud2()
{SendCode(codeCloud2, 2, "Cloud Cover 2");}
  
void Cloud3()
{SendCode(codeCloud3, 2, "Cloud Cover 3");}

void Cloud4()
{SendCode(codeCloud4, 2, "Cloud Cover 4");}

void Storm1()
{SendCode(codeStorm1, 2, "Thunderstorm 1");}

void Storm2()
{SendCode(codeStorm2, 2, "Thunderstorm 2");}

void Storm3()
{SendCode(codeStorm3, 2, "Thunderstorm 3");}

void Storm4()
{SendCode(codeStorm4, 2, "Thunderstorm 4");}

int freeRam () {
  extern int __heap_start, *__brkval; 
  int v; 
  return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); 
}
I'd really appreciate any advice as to whether or not this looks right.

edit: sorry if this is a stupid question, I'm very inexperienced with coding. I also noticed the newer versions as I've just finished reading the whole thread.
__________________

Last edited by zodduska; 11-19-2013 at 07:44 PM.. Reason: fixing code format
zodduska is offline   Reply With Quote
Old 11-21-2013, 05:58 AM   #366
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 289
Default

Got it running without the LCD for now, very cool! I'll desolder the LCD from the back pack tomorrow.
__________________
zodduska is offline   Reply With Quote
Old 11-22-2013, 03:35 PM   #367
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 289
Default



Ended up just snapping off the LCD backpack after an hour of failing to completely desolder it.

If anyone wants very dim moonlights, what I did is turn all the channels down manually then up one notch for each of the RGB and save it to a Custom preset. You could also sacrifice one of the Custom presets for a non-toggle "off" setting by turning all the channels down and saving it.
__________________
zodduska is offline   Reply With Quote
Old 11-22-2013, 03:38 PM   #368
Indychus
Planted Tank Enthusiast
 
Indychus's Avatar
 
PTrader: (8/100%)
Join Date: Feb 2013
Location: Irmo, SC
Posts: 645
Default

Looking good man!

Sent from my HTC One X using Tapatalk
__________________
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
Old 11-22-2013, 04:06 PM   #369
salman
Algae Grower
 
PTrader: (5/100%)
Join Date: Apr 2013
Location: New York
Posts: 130
Default

Really nice work. I'll try this since i just got my satellite+ yesterday. @Indychus all of your images are not displaying for some reason in the thread. Were those deleted? thanks.
salman is online now   Reply With Quote
Old 11-22-2013, 04:06 PM   #370
zodduska
Planted Member
 
zodduska's Avatar
 
PTrader: (4/100%)
Join Date: Aug 2013
Location: Oswego, IL
Posts: 289
Default

Thanks, I had a ton of fun putting it together and figuring out how everything works. I've got a smoke Arduino box and PSU from Adafruit on the way so I can clean it up and solder it to a pcb.

One thing I don't really understand though, what's the purpose of the IR receiver? To capture codes if they were to be different from the original Current ones? If I was following the thread correctly it seems one of the pins it was connected to ended up being taken over by another component.
__________________

Last edited by zodduska; 11-22-2013 at 04:12 PM.. Reason: .
zodduska is offline   Reply With Quote
Old 11-22-2013, 05:05 PM   #371
Indychus
Planted Tank Enthusiast
 
Indychus's Avatar
 
PTrader: (8/100%)
Join Date: Feb 2013
Location: Irmo, SC
Posts: 645
Default

Not sure why some pics are missing, but I'll check into it.

The receiver is not necessary unless you have different IR codes. Current had said they were changing their protocol, but as of now they have not that I'm aware of.

Sent from my HTC One X using Tapatalk
__________________
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
Old 11-22-2013, 05:20 PM   #372
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 836
Default

I got mine yesterday as well so I will probably start building one starting tomorrow if all the parts are local. Otherwise I will need to order them all.

Also waiting on some feed back on my previous post before I move forward.

http://www.plantedtank.net/forums/sh...&postcount=364

-Thanks!
Texan78 is offline   Reply With Quote
Old 11-22-2013, 08:33 PM   #373
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2013
Location: South Central PA
Posts: 48
Default

Quote:
Originally Posted by zodduska View Post
Thanks, I had a ton of fun putting it together and figuring out how everything works. I've got a smoke Arduino box and PSU from Adafruit on the way so I can clean it up and solder it to a pcb.

One thing I don't really understand though, what's the purpose of the IR receiver? To capture codes if they were to be different from the original Current ones? If I was following the thread correctly it seems one of the pins it was connected to ended up being taken over by another component.
Zodduska, how did you get the Custom settings into the controller? Didn't you need to use the IR receiver for that?
Aquatechtoo is offline   Reply With Quote
Old 11-22-2013, 09:04 PM   #374
Aquatechtoo
High Tech Redneck
 
Aquatechtoo's Avatar
 
PTrader: (0/0%)
Join Date: Mar 2013
Location: South Central PA
Posts: 48
Default

Texan78, I'm not the best one to answer your questions, but if I understand it correctly, yes, the storms are random. However, RandomStorm will only be called between the hours of 1:00 PM and 8:00 PM, based on how these guys wrote the program.

I'm sure you can mix this in, but I wouldn't know how to do it. I think it would take some re-writing to include 2 codes in memory for that random function. Expanding the time the RandomStorm function would be called should be as easy as allowing it to be called earlier than 13:00.

I've thought of using sound too, and I think you can use an Arduino board to process sound w/ RCA cables, but I have not looked up RF options. One question I would have is how much memory the Uno has free if the same board is managing the lights and sound. I don't think we're close to the max with just the lights, at least as v4.1 is written, but I don't know how much mem is left. I like the idea, too, but I'm not sure if this board could process both signals?

I know this isn't much help, but hopefully I'm not giving you any wrong information. If I am, I'm sure someone will jump in and correct me.
Aquatechtoo is offline   Reply With Quote
Old 11-22-2013, 09:50 PM   #375
Texan78
Planted Tank Enthusiast
 
Texan78's Avatar
 
PTrader: (0/0%)
Join Date: Nov 2013
Location: North Texas
Posts: 836
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
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 03:25 AM.


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