The Planted Tank Forum - Reply to Topic
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 > Guide: Arduino based LED controller for Current Satellite LED+

Thread: Guide: Arduino based LED controller for Current Satellite LED+ Reply to Thread
Title:
  
Message:
Post Icons
You may choose an icon for your message from the following list:
 

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:

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.



Additional Options
Miscellaneous Options

Topic Review (Newest First)
01-12-2015 04:47 PM
Linwood
Quote:
Originally Posted by kman View Post
You're not going to hit a specific PAR level without using a PAR meter to verify. 50% of clicks does not necessarily correlate to 50% of max PAR for the light. That would depend on the specific output curve used by the electronics, which to my knowledge, no one has ever attempted to map out. I would recommend simply shoot for ~50% (20-21 clicks) and see how it works in the real world, rather than obsessing over a mathematically-accurate number. In other words, just try it. Fine tune it once it's otherwise working.
One thing you can do that's probably more accurate than just picking the middle is, if you have one, put an ammeter on the power supply (either the 110v or 12v as you have capability for). If you then adjust until you get half the current draw for a given color combination you are probably somewhere a bit close to the 50% PAR. Though of course PAR is usable light and amps include heat generated, etc.... but many people have ammeters who don't have PAR meters.
01-11-2015 09:43 PM
kman
Quote:
Originally Posted by toaduck View Post
I'm not sure who's code I'm using.......I'll have to look. Does curt's code have the "color up" code in it. It would be nice to have it so I could be sure it was 50 %. I'm just trying to get to a certain par level.

I just tested doing it with the remote and sometimes it took 30 clicks and sometimes over 40. I tried it several times. Started to eat the remote one time....frustrated. lolol [emoji14]
You're not going to hit a specific PAR level without using a PAR meter to verify. 50% of clicks does not necessarily correlate to 50% of max PAR for the light. That would depend on the specific output curve used by the electronics, which to my knowledge, no one has ever attempted to map out. I would recommend simply shoot for ~50% (20-21 clicks) and see how it works in the real world, rather than obsessing over a mathematically-accurate number. In other words, just try it. Fine tune it once it's otherwise working.
01-10-2015 10:45 PM
toaduck
Quote:
Originally Posted by kman View Post
It's not always the same, but IIRC AnotherHobby pegged it at around 40 or so? Best to just count it. Once you have your middle level, save it to a preset.

Edit: Actually, per Curt_Planted's posts around page 32 of this thread, there are 42 steps between zero and max, for the Sat+. But each button press sends double commands for some reason, so you'll actually only press the remote button 21 times, going from zero to max. I'm not certain that 10 or 11 presses will definitely put you at a true 50% output, however, so you may have to futz with it until you find what you like.

Are you using Curt_Planted's code, or one of DaHammer's code versions?
I'm not sure who's code I'm using.......I'll have to look. Does curt's code have the "color up" code in it. It would be nice to have it so I could be sure it was 50 %. I'm just trying to get to a certain par level.

I just tested doing it with the remote and sometimes it took 30 clicks and sometimes over 40. I tried it several times. Started to eat the remote one time....frustrated. lolol [emoji14]
01-10-2015 09:31 PM
kman
Quote:
Originally Posted by toaduck View Post
Yea I know that but how many total clicks does it take to go from on to of. I wanted to determine where half way was.
It's not always the same, but IIRC AnotherHobby pegged it at around 40 or so? Best to just count it. Once you have your middle level, save it to a preset.

Edit: Actually, per Curt_Planted's posts around page 32 of this thread, there are 42 steps between zero and max, for the Sat+. But each button press sends double commands for some reason, so you'll actually only press the remote button 21 times, going from zero to max. I'm not certain that 10 or 11 presses will definitely put you at a true 50% output, however, so you may have to futz with it until you find what you like.

Are you using Curt_Planted's code, or one of DaHammer's code versions?
01-10-2015 09:12 PM
toaduck
Quote:
Originally Posted by kman View Post
You should be able to set it to Yellow, or any of the other preset colors (not Dynamic modes, since those can't be altered), and then use the up and down arrows on the remote to lower the brightness.
Yea I know that but how many total clicks does it take to go from on to of. I wanted to determine where half way was.
01-10-2015 07:31 PM
kman
Quote:
Originally Posted by toaduck View Post
Hi. I'm trying to set my light to 50% intensity. How would I do this. I tried following curts instructions on his previous post but didn't work. Any help?
You should be able to set it to Yellow, or any of the other preset colors (not Dynamic modes, since those can't be altered), and then use the up and down arrows on the remote to lower the brightness.
01-10-2015 04:16 PM
toaduck Hi. I'm trying to set my light to 50% intensity. How would I do this. I tried following curts instructions on his previous post but didn't work. Any help?
12-14-2014 12:48 AM
kman
Quote:
Originally Posted by O2surplus View Post
Ah ha! The old "pre- Arduino 1.0" library incompatibility raised it's ugly head again. The libraries that you downloaded from "Sink"'s site haven't been updated to work with Arduino 1.0 & above.

Try these copies of the libraries. They work fine for me.
Ha! That did it, thanks! I'll definitely use that sketch next time I tinker with the code on my controller.

(I already have a current Time library, of course, it just needed the ds1307 one updated)
12-14-2014 12:21 AM
O2surplus
Quote:
Originally Posted by kman View Post
Hmm. I tried this code today, and I can't get it to compile and verify.

At first, it complained about RTC.set not being defined, but then I realized I needed to add the libraries from the link in the code. (in particular, ds1307rtc)

So I added the libraries and restarted the IDE, and now it's giving me a bunch of errors from within the ds12307rtc library:

Code:
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (Mac OS X), Board: "Arduino Uno"
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp: In static member function 'static void DS1307RTC::read(tmElements_t&)':
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:56: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:62: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:63: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:64: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:65: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:66: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:67: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:68: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp: In static member function 'static void DS1307RTC::write(tmElements_t&)':
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:74: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:76: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:77: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:78: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:79: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:80: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:81: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:82: error: 'class TwoWire' has no member named 'send'

Ah ha! The old "pre- Arduino 1.0" library incompatibility raised it's ugly head again. The libraries that you downloaded from "Sink"'s site haven't been updated to work with Arduino 1.0 & above.

Try these copies of the libraries. They work fine for me.
12-13-2014 10:16 PM
kman
Quote:
Originally Posted by O2surplus View Post
Here's the sketch that I use to set the time and date on my DS1307 RTC. This sketch was written by "Sink", a forum member here at PlantedTank.net This sketch pulls the time directly from your PC, and loads it directly to the clock chip. There's no need to adjust any variables, just open the sketch, & hit the upload button. Easy Peasy
Hmm. I tried this code today, and I can't get it to compile and verify.

At first, it complained about RTC.set not being defined, but then I realized I needed to add the libraries from the link in the code. (in particular, ds1307rtc)

So I added the libraries and restarted the IDE, and now it's giving me a bunch of errors from within the ds12307rtc library:

Code:
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (Mac OS X), Board: "Arduino Uno"
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp: In static member function 'static void DS1307RTC::read(tmElements_t&)':
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:56: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:62: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:63: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:64: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:65: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:66: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:67: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:68: error: 'class TwoWire' has no member named 'receive'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp: In static member function 'static void DS1307RTC::write(tmElements_t&)':
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:74: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:76: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:77: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:78: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:79: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:80: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:81: error: 'class TwoWire' has no member named 'send'
/Users/kman/Documents/Arduino/libraries/DS1307RTC/DS1307RTC.cpp:82: error: 'class TwoWire' has no member named 'send'
12-03-2014 03:51 AM
Greg0u812 WOW!!!!!
Thank you @kman !

I hope that instructional post can get get stickied around here.

I had a couple of very simple and stupid questions that Google has not been able to answer for me.

The answers were right in front of me!
12-03-2014 03:24 AM
kman Nice, O2! I'll grab that. It's better the one I'd been using. (Which was already way better than others I've seen!)
12-03-2014 01:18 AM
O2surplus Here's the sketch that I use to set the time and date on my DS1307 RTC. This sketch was written by "Sink", a forum member here at PlantedTank.net This sketch pulls the time directly from your PC, and loads it directly to the clock chip. There's no need to adjust any variables, just open the sketch, & hit the upload button. Easy Peasy

Code:
 /*
 * Name:    timeset.pde
 * Author:    User "sink" at plantedtank.net forums
 * URL:        http://bitbucket.org/akl/tank-control
 *
 * This code sets the time on a DS1307 RTC chip attached to an Arduino
 * microcontroller board.  The time is set to the system time when the
 * sketch was compiled (using preprocessor macros), so make sure that:
 *
 *     1. Your system (PC) time is accurate.
 *     2. You recompile the sketch and then upload immediately.
 *
 * The time is skewed forward some seconds to accomodate for compilation and
 * upload time.  If you find the time is consistently off by the same amount,
 * you can modify the adjustment constant below.
 *
 * This code requires the following libraries: Wire, Time, DS1307RTC
 *
 * The latest version of this code can always be found at above url.
 */

/*
 * Copyright (c) 2011, User "sink" at plantedtank.net forums
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.

 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.  
 */

#include <Time.h>
#include <Wire.h>
#include <DS1307RTC.h>

/*
 * Time adjustment forward in seconds.  Used to compensate for
 * compilation/upload time.
 */
const int kAdjustment = 25;

/*
 * Utility function for pretty digital clock time output
 * From example code in Time library -- author unknown
 */
void printDigits(int digits) {
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits);
}

/*
 * Display time
 * Adapted from example code in Time library -- author unknown
 */
void digitalClockDisplay() {
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.print(" ");
  Serial.print(month());
  Serial.print("/");
  Serial.print(day());
  Serial.print("/");
  Serial.print(year()); 
  Serial.println(); 
}

void setup() {

  // convert compilation time and set system clock
  char const *date = __DATE__;
  char const *time = __TIME__;
  int sec, min, hour, day, month, year;
  
  char s_month[5];
  static const char month_names[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
  sscanf(date, "%s %d %d", s_month, &day, &year);
  month = (strstr(month_names, s_month)-month_names)/3;
  sscanf(time, "%d:%d:%d", &hour, &min, &sec);

  setTime(hour, min, sec, day, month+1, year);
  adjustTime(kAdjustment); // crude fwd correction
  time_t t = now();

  // set RTC
  RTC.set(t);

  Serial.begin(115200);
}

void loop () {
  digitalClockDisplay();  
  Serial.println(); 
  delay(1000);
}
12-02-2014 07:40 PM
AnotherHobby
Quote:
Originally Posted by toaduck View Post
and this text below (time alarms lib) in red is the number you change to increase time alarms correct? I increased to 25




Code:
//  TimeAlarms.h - Arduino Time alarms header for use with Time library

#ifndef TimeAlarms_h
#define TimeAlarms_h

#include <inttypes.h>

#include "Time.h"

#define dtNBR_ALARMS 25   // max is 255

#define USE_SPECIALIST_METHODS  // define this for testing
Yes.
12-02-2014 07:07 PM
toaduck and this text below (time alarms lib) in red is the number you change to increase time alarms correct? I increased to 25




Code:
//  TimeAlarms.h - Arduino Time alarms header for use with Time library

#ifndef TimeAlarms_h
#define TimeAlarms_h

#include <inttypes.h>

#include "Time.h"

#define dtNBR_ALARMS 25   // max is 255

#define USE_SPECIALIST_METHODS  // define this for testing
This thread has more than 15 replies. Click here to review the whole thread.

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


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


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