Reef Central Online Community

Go Back   Reef Central Online Community > General Interest Forums > Do It Yourself
Blogs FAQ Calendar Mark Forums Read

Notices

User Tag List

Reply
Thread Tools
Unread 03/27/2011, 09:33 AM   #251
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by Axlerod21 View Post
Will this rtc work with this project. http://www.gravitech.us/mii2creticlr.html
I already have it and cant figure it out. I have the screen working right. but cant figure out how to control the time.
Not sure, it looks like its compatible, but there is this "DS1307" code that needs to be compatible??? tell me again what you are experiencing...

did you check this???

Remember the "//" on post #217 of page 9....




.



Last edited by katchupoy; 03/27/2011 at 09:52 AM.
katchupoy is offline   Reply With Quote
Unread 03/27/2011, 09:42 AM   #252
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by TheFishMan65 View Post
Shouldn't these be the values for a P driver or the CAT4101

int whitepercent[11] = { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255 };
Yes this is the correct one. Thanks Fishman... Im just too lazy to compute the actual number and just rounded it off.

The sketch has been updated... Thanks again...



Last edited by katchupoy; 03/27/2011 at 09:51 AM.
katchupoy is offline   Reply With Quote
Unread 03/27/2011, 09:46 AM   #253
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
[QUOTE=shikhyung;18552738]
Quote:
Originally Posted by shikhyung View Post
int bluepercent[11] = { 0, 1, 2, 5, 8 ,12, 18, 27, 44, 80, 255 };// this line is needed if you are using meanwell ELN60-48D
int whitepercent[11] = { 0, 1, 2, 5, 8 ,12, 18, 27, 44, 80, 255 }


I understand there are 255 steps from 0 to full power, but what are these numbers stand for? thanks.
These are values divided by 10 to simulate 10 steps on ramp up and down. Actually you dont need this with "P" or "CAT?" But we also need to change some of the codes dramatically...

So for simpler more generic code that "P" and "D" can use, then we just made it this way.

actually if you are really good with codes and you are using "P" driver, then you can actually ignore these 10 steps.

Hope this helps.


katchupoy is offline   Reply With Quote
Unread 03/27/2011, 09:49 AM   #254
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by shikhyung View Post
Got it, thanks FisherMan.
int blueramptime = 60 ; // time for blue LEDs to dim on and off in minutes
int whiteramptime = 180 ; // 180 time for white LEDs to dim on and off in minutes

int photoperiod = 240 ; // amount of time array is on at full power in minutes

If I understand : Blues take 60' ram up , stay 120 ' and then take another 60' to ramp down. Then what happens to the Whites?
Please read this...
Page 10, Post 235


katchupoy is offline   Reply With Quote
Unread 03/27/2011, 10:02 AM   #255
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by TheReefNinja View Post
Ok so that didnt quote the sketch right and I can not edit it anymore.... so lets try the php code tag
Where in the code that says the temp probe will be using pin 8 (looking at the pic)????

Because I was hoping to save that for relay 2

I have availablee pin 9 and 10??? can we use this instead???

CRAP!!! Im running out of pins.... lol... CRAZY!!!


katchupoy is offline   Reply With Quote
Unread 03/27/2011, 11:13 AM   #256
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
Yes we can use any pin you want and good thing we can use this pin for any onewire device I think. The site isnt quoting the code right I tried the PHP tag a post or 2 below it.... please let me know of any further dev on your sketch so I can keep up with my changes... I have made no changes except adding the temp sensor so if you made any changes after the last published one let me know I am adding 2 (water temp and LED temp) temp sensors with high temp alarms from a pizo buzzer and trying to get a led to light with it, also with a button to enable/disable it and what not. I know we are running out of pins so adding a temp sensor is only 1 digital pin and buzzer and led are only 1 pin and I am working on making them analog pins


EDIT::::::

http://pastie.org/1722736 here is a link to the sketch


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..

Last edited by TheReefNinja; 03/27/2011 at 11:18 AM. Reason: code again
TheReefNinja is offline   Reply With Quote
Unread 03/27/2011, 12:56 PM   #257
ghellin
Registered Member
 
ghellin's Avatar
 
Join Date: Jul 2010
Location: Edmond
Posts: 1,844
Let me know if you you change to a 20 x 4 screen I really like the look of the bigger screen, and could use the space. I want to have water temp, heatsink temp, and a buzzer later. Will the bigger screen require more pins.


__________________
180. SRO 3000INT w/ANC. Fluval SP4. Gyre. DIY LED's/T5s. Apex. Bluefish. Clams. Tangs. SPS.
ghellin is offline   Reply With Quote
Unread 03/27/2011, 01:01 PM   #258
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
No the bigger screen wont need anything else it has the same driver as the 16x2 all we have to do is tell the code we have a 20x4. Mine will be here tomorrow I will post pics when I get it. I would really suggest the bigger screen katchupoy as I am finding out im running out of screen OHS NOS!

edit....

Haha your running out of pins I'm running out of screen lol


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/27/2011, 03:09 PM   #259
ghellin
Registered Member
 
ghellin's Avatar
 
Join Date: Jul 2010
Location: Edmond
Posts: 1,844
Awesome thank you!


__________________
180. SRO 3000INT w/ANC. Fluval SP4. Gyre. DIY LED's/T5s. Apex. Bluefish. Clams. Tangs. SPS.
ghellin is offline   Reply With Quote
Unread 03/27/2011, 05:22 PM   #260
Molehs
the H is silent
 
Molehs's Avatar
 
Join Date: Feb 2011
Location: Gurnee, IL
Posts: 297
Woohoo, my Arduino should be here tomorrow. Mine will have a big screen and lots of pins, so hopefully I'll have neither issue.

Granted I still have to figure out how to turn it on...heh.


__________________
"Do amphipods dream of underwater sheep?"
Molehs is offline   Reply With Quote
Unread 03/28/2011, 09:20 AM   #261
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
what screen did you get?


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 10:15 AM   #262
Molehs
the H is silent
 
Molehs's Avatar
 
Join Date: Feb 2011
Location: Gurnee, IL
Posts: 297
It just showed up!

http://cgi.ebay.com/ws/eBayISAPI.dll...ht_2521wt_1139

Is the one I got. A bit more complicated, but I've already got ideas on what I'll do with the extra screen space.

I made an onboard LED blink! I should have the whole thing finished in a year or two...heh.


__________________
"Do amphipods dream of underwater sheep?"
Molehs is offline   Reply With Quote
Unread 03/28/2011, 10:20 AM   #263
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
hmm ok I am not sure how that screen works I dont think it works the same as ours I believe it needs more pins and more code to display stuff. let me know if it works as if it does I might get that huge one.


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 11:24 AM   #264
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
katchupoy, I found a issue if we loose power currently its 12:23pm here and I was switching my power supply up and my blues only came back on at 1 when they were at like 6 or 7 before I unplugged it.


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 11:38 AM   #265
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by TheReefNinja View Post
katchupoy, I found a issue if we loose power currently its 12:23pm here and I was switching my power supply up and my blues only came back on at 1 when they were at like 6 or 7 before I unplugged it.
I thought i fixed that, in theory, it should catch up still...

Example... turn on at 10 am...

If for some reason needs to be restarted after 10, it will compute and still start at intensity 1 but will catch up with the schedule...

I dont know if i understand your question...


katchupoy is offline   Reply With Quote
Unread 03/28/2011, 11:45 AM   #266
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
Bah I should have re read that before I posted lol lets trey that again.....

Ok so I switched out my wallwart at around 12:30pm and the blues came back on at 10 but the whites are only at 1 when they were at 6 or 7 before. I will give this some time if at 1pm the whites are not 10 we know there is a small issue but if they catch up then awesome


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 11:55 AM   #267
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
also what pin are you thinking of for this temp sensor?


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 12:04 PM   #268
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by TheReefNinja View Post
also what pin are you thinking of for this temp sensor?

Looking at the code you recently posted...
PHP Code:
int blueramptime 60 ;    // time for blue LEDs to dim on and off in minutes
int whiteramptime 180 ;  // 180 time for white LEDs to dim on and off in minutes
int bluemin ;          // minimmum dimming value of blue LEDs, range of 0-255
int bluemax 255 ;        // maximum dimming value of blue LEDs, range of 0-255
int whitemin ;         // minimum dimming value of white LEDs, range of 0-255
int whitemax 255 ;       // maximum dimming value of white LEDs, range of 0-255
int photoperiod 240 ;    // amount of time array is on at full power in minutes
int ontime 10 ;          // time of day (hour, 24h clock) to begin photoperiod fade in
int blue 3;              // blue LEDs connected to digital pin 3 (pwm)
int white 11;            // white LEDs connected to digital pin 11 (pwm) 
Your blue start at 10am.
1 hr of blue ramp up. = 10am-11am
then 3 hrs of white ramp up. = 11am-2pm

If for some reason there was a restart on the arduino after 10 before 11, it will compute remaining minutes and divide by 10 to catch up. So white will still start at 11am

If for some reason it was restarted after 11, I think blue will be at 100% and white will compute and catch up.

If it was restarted after 2pm, then blue and white will be 100%, then goes to next step for regular programmin.

etc,etc.

Worst come to worst, you will have a weird schedule only for one day and the next day it will be normal schedul...

Also, what do you mean when you switch out your wallwart? Do you turn your arduino off? I dont....


katchupoy is offline   Reply With Quote
Unread 03/28/2011, 12:05 PM   #269
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by TheReefNinja View Post
also what pin are you thinking of for this temp sensor?
I have 9 and 10 available on the code... but if you are not using relay 1 and 2, you can use those pins too....

But i really like the wavetimer feature... so your down to pin 9 and 10.


katchupoy is offline   Reply With Quote
Unread 03/28/2011, 12:09 PM   #270
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
Ahhhhhh I didnt catch the 3 hour white ramp time I thought it was 2 lol my bad and what pin do you want to run the temp sensor to connect to on the arduino so I can update the new sketch with the temp code and make it correct? I am in the middle of making my circuit board for connection to the arduino and lcd so I can plug and play


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 12:29 PM   #271
TheReefNinja
Imagination superfreak
 
TheReefNinja's Avatar
 
Join Date: Jan 2011
Location: West Chicago, IL. near RT. 59 and RT. 64
Posts: 1,698
Wait whats this relay? I want a wave timer...... can you post more about it and parts needed?

and I was switching to a less power hungry power supply

EDIT:

We will go with 9


__________________
Regards, Tom

Current tank: 45g acrylic cube, Sunpod 150w 14k bulb
Current Fish: Hey I gots some fish..
TheReefNinja is offline   Reply With Quote
Unread 03/28/2011, 12:34 PM   #272
TheFishMan65
Registered Member
 
Join Date: Aug 2009
Location: Northern VA
Posts: 4,618
I believe he is going to use the relay to turn a power head on and off to simulate a wave. Or maybe two on alternating cycles.

However if you want alternating cycles look for a double pole relay (I think that is the right name). It will have both normally open and normally closed contact. One or the other will be one, except at the moment of transition. You could not turn them both on or off, or have different cycles as you could with 2 relays, but you will get a pin back.


__________________
Click my home page for Thread Summaries

Current Tank Info: 75 gallon lps and fish
TheFishMan65 is offline   Reply With Quote
Unread 03/28/2011, 01:10 PM   #273
shikhyung
Registered Member
 
Join Date: Sep 2006
Location: Ca
Posts: 1,310
Quote:
Originally Posted by katchupoy View Post
Looking at the code you recently posted...
PHP Code:
int blueramptime 60 ;    // time for blue LEDs to dim on and off in minutes
int whiteramptime 180 ;  // 180 time for white LEDs to dim on and off in minutes
int bluemin ;          // minimmum dimming value of blue LEDs, range of 0-255
int bluemax 255 ;        // maximum dimming value of blue LEDs, range of 0-255
int whitemin ;         // minimum dimming value of white LEDs, range of 0-255
int whitemax 255 ;       // maximum dimming value of white LEDs, range of 0-255
int photoperiod 240 ;    // amount of time array is on at full power in minutes
int ontime 10 ;          // time of day (hour, 24h clock) to begin photoperiod fade in
int blue 3;              // blue LEDs connected to digital pin 3 (pwm)
int white 11;            // white LEDs connected to digital pin 11 (pwm) 
Your blue start at 10am.
1 hr of blue ramp up. = 10am-11am
then 3 hrs of white ramp up. = 11am-2pm

If for some reason there was a restart on the arduino after 10 before 11, it will compute remaining minutes and divide by 10 to catch up. So white will still start at 11am

If for some reason it was restarted after 11, I think blue will be at 100% and white will compute and catch up.

If it was restarted after 2pm, then blue and white will be 100%, then goes to next step for regular programmin.

etc,etc.

Worst come to worst, you will have a weird schedule only for one day and the next day it will be normal schedul...

Also, what do you mean when you switch out your wallwart? Do you turn your arduino off? I dont....
Bare with me, I try to understand this a little bit.

So at 10Am Blue is ramped up 60'
Then 11AM White is ramped up 180'
Then all stay for 240'
Blue ramp down in 60'
White ramp down 180'

So total on time is 12 hours, correct?


shikhyung is offline   Reply With Quote
Unread 03/28/2011, 01:22 PM   #274
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
Quote:
Originally Posted by TheReefNinja View Post
Wait whats this relay? I want a wave timer...... can you post more about it and parts needed?

and I was switching to a less power hungry power supply

EDIT:

We will go with 9
Haha, I was hoping someone will comment about it when I posted it at Page 10 Post 232

But I guess no one is interested on that one.... haha... Thats suppose to be phase 2 of this project....


Its already in the code, you just need to connect the relays on pin 2 and 8...

No other parts needed except for that low voltage relay...

My trusty natural wavetimer died on me together with my ranco controller, thats why it pushed me to do this project....

Hope this helps...


katchupoy is offline   Reply With Quote
Unread 03/28/2011, 01:23 PM   #275
katchupoy
Moved On
 
katchupoy's Avatar
 
Join Date: Feb 2003
Location: Kent, WA
Posts: 1,548
shikhyung

you got it... that is correct... everything is customizable... but not thru buttons right now since we want it as simple as possible.... just thru sketch/code....

also your rampdown is reversed... white first then blue...

10:00 = blue starts ramp up for 60 minutes. = 60 minutes
11:00 = white starts rapm up for 3 hours. = 180 minutes
2:00 = all stays at 100% for the next 4 hrs. = 240 minutes
6:00 = white starts ramp down for 3 hrs = 180 minutes
9:00 = blue starts ramp down for 60 minutes = 60 minutes
10:00 = off



Last edited by katchupoy; 03/28/2011 at 01:29 PM.
katchupoy is offline   Reply With Quote
Reply

Thread Tools

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DIY Led Build of the Month plankton99 Do It Yourself 11 11/20/2011 08:21 AM
DIY leds...now with arduino Controlled lights... António Vitor Do It Yourself 4 05/18/2011 02:13 AM
Yet Another DIY LED Build Thread csarkar001 Do It Yourself 54 05/11/2011 05:55 PM
One quick DIY LED question Impossible Do It Yourself 4 10/27/2010 09:50 AM
Anyone DIY LEDs in their Biocube? bassplaya12 Do It Yourself 13 08/15/2010 01:03 PM


All times are GMT -6. The time now is 05:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Powered by Searchlight © 2024 Axivo Inc.
Use of this web site is subject to the terms and conditions described in the user agreement.
Reef CentralTM Reef Central, LLC. Copyright ©1999-2022
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.