The Planted Tank Forum banner

1861 - 1880 of 2156 Posts

·
Registered
Joined
·
425 Posts
Does the code have any cloud effects? [/QOUTE]not as far as I know
If I understand correctly to run without IR control just pwm via meanwells all I need to do is change true to false, that's it?
"boolean lightCSP = true; // if you are controlling your lights directly with PWM, this is false"
[/QOUTE]yes that is the only thing
Do I need to use the TFT shield or can I just use resistors in line with the wires to the TFT screen to step down the voltage?
[/QOUTE]yes, as the shield contains logic shifters so resistors won’t work
Anyone with coding abilities still following this thread?
I would love some help modifying this code slightly as my ultimate goal is to use this to run an aquaponics setup I am putting together for my winter enclosed porch garden. I'm thinking I wont need help with changing the buttons or modifying the code to add some transfer pumps, humidity control, etc. I mostly need help with the lighting strategy as I would like clouds, and my channels will probably be a little different.

I am thinking I need to start taking notes and cruise through all this info again. If anyone is interested in providing some coding help it would be greatly appreciated, as I have some snippets of code, I'm just not sure how to integrate it with the existing code. Thanks.
Not me unfortunately.
 

·
Registered
Joined
·
224 Posts
Wow, what a great build with a ton of information. I confess to not having read every page, but definitely stoked to have found this thread as I already have a mega and TFT laying around aas well as a bunch of LDD's and 3w crees. It is the perfect start up to what I have in mind for my tank. I am hoping I didn't show up too late to the party as I have a few questions. Forgive me if this has been answered already, but;

Does the code have any cloud effects?

I am not interested in storms or worried about a east to west fading or anything too realistic just some decent random clouds would be nice.

If I understand correctly to run without IR control just pwm via meanwells all I need to do is change true to false, that's it?
"boolean lightCSP = true; // if you are controlling your lights directly with PWM, this is false"

Do I need to use the TFT shield or can I just use resistors in line with the wires to the TFT screen to step down the voltage?

Anyone with coding abilities still following this thread?
I would love some help modifying this code slightly as my ultimate goal is to use this to run an aquaponics setup I am putting together for my winter enclosed porch garden. I'm thinking I wont need help with changing the buttons or modifying the code to add some transfer pumps, humidity control, etc. I mostly need help with the lighting strategy as I would like clouds, and my channels will probably be a little different.

I am thinking I need to start taking notes and cruise through all this info again. If anyone is interested in providing some coding help it would be greatly appreciated, as I have some snippets of code, I'm just not sure how to integrate it with the existing code. Thanks.
No cloud effects but I did intend on adding them to my version of the code. Updated the EEPROM for cloud/storm effects but since i don't actually have a PWM controlled light I couldn't test it so never added it.

If you have thoughts on how cloud effects should work let me know and i can look into adding it.
 

·
Registered
Joined
·
8 Posts
Thank you, my original idea was to incorporate a random function, these are some bits of code I was tossing around but don't know that it'll work with the existing code:
Code:
randomSeed(analogRead(A0)); // get random numbers 
led.setTarget(255 - random(50, 100)); // some random but noticeable amount
#define CLOUD_INTERVAL    // max time between clouds 2 or 3 hours?
#define Min_Cloud_Duration 6  // min cloud duration 6 min?
#define Max_Cloud_Duration 30 //max cloud duration 30 min?
#define Min_Clouds_per_Day 3
#define Max_Clouds_per_Day 8
Basically I'm thinking a random number of fades to a random amounts with some rules governing cloud darkness, duration and frequency. I would be more than happy just dimming all the channels 30-50% a few times a day, nothing fancy. It would also be nice to display a cloud picture along with the sun icon. Let me know if you need any more specifics.

I planned on using your version of the code, and noticed it looks like you incorporated the TFT shield on your board (pg 88). Would you mind sharing what components are needed for this, or is it documented somewhere else? Ideally I'd like to make my own mega board with everything all together and use a header cable to attach the screen as I'm mounting it in a box with the screen on a door.

I just got my screen and shield but I don't see logic level converters on it anywhere, and I noticed I have the Sainsmart: "Due SAM3X8E ARM Cortex-M3, Arduino Compatible and 3.2" TFT LCD Display + Shield Board for Arduino Mega 2560 R3. I'm not sure what the differences are at this point, or if I can use any of it... will be looking into that.

Thanks again, I'm getting excited to get this on the test bench together and running.
 

·
Registered
Joined
·
224 Posts
Thank you, my original idea was to incorporate a random function, these are some bits of code I was tossing around but don't know that it'll work with the existing code:
Code:
randomSeed(analogRead(A0)); // get random numbers 
led.setTarget(255 - random(50, 100)); // some random but noticeable amount
#define CLOUD_INTERVAL    // max time between clouds 2 or 3 hours?
#define Min_Cloud_Duration 6  // min cloud duration 6 min?
#define Max_Cloud_Duration 30 //max cloud duration 30 min?
#define Min_Clouds_per_Day 3
#define Max_Clouds_per_Day 8
Basically I'm thinking a random number of fades to a random amounts with some rules governing cloud darkness, duration and frequency. I would be more than happy just dimming all the channels 30-50% a few times a day, nothing fancy. It would also be nice to display a cloud picture along with the sun icon. Let me know if you need any more specifics.

I planned on using your version of the code, and noticed it looks like you incorporated the TFT shield on your board (pg 88). Would you mind sharing what components are needed for this, or is it documented somewhere else? Ideally I'd like to make my own mega board with everything all together and use a header cable to attach the screen as I'm mounting it in a box with the screen on a door.

I just got my screen and shield but I don't see logic level converters on it anywhere, and I noticed I have the Sainsmart: "Due SAM3X8E ARM Cortex-M3, Arduino Compatible and 3.2" TFT LCD Display + Shield Board for Arduino Mega 2560 R3. I'm not sure what the differences are at this point, or if I can use any of it... will be looking into that.

Thanks again, I'm getting excited to get this on the test bench together and running.
So you basically want the LEDs to temporarily dim from full to a random reduced amount for a set time? Wouldn't be too hard, I was originally thinking they would dim up/down slowly over time (ie clouds rolling by vs constantly cloudy). I'm working on a WiFi LED driver/controller right now but once that's done I'll look into adding clouds to the code.

If you go to the post linked in my signature and download the PCB files it's got the schematic for the shield I designed. The Due uses 3.3V so if that's what you have it would explain the lack of level-shifters, not sure if the code will work as-is on the Due. Or if there's a lot of resistors on the tft shield then it might just be using resistor dividers to drop down the voltage, not as nice but should still work fine.
 

·
Registered
Joined
·
8 Posts
Yes, I know what you mean with the clouds rolling by, but I am using only 4 channels/12 LED's per tank so I don't think it would be a noticeable difference unless I were to scale up. It also seems like a lot more coding, lol. Either way is fine for me if you think it will still make a difference with so few LED's.

Ok, thanks for the info, I will check out the schematic,and possibly see if I can "Due" it with what I have for now. Otherwise I will be asking Santa for more electronic components, lol.
 

·
Registered
Joined
·
13 Posts
Wow cool board, very simple, could you share the pcb layout and schema, i would like to try your iaqua. 1 question, is this board still need the tft shield modification?
Hi,

Sorry for the late answer, I'm really busy these days...

Thanks for your interest in my pcb.
Yes, this board still need the tft shield modification.
Here is a link to download the Eagle files : Schematics and board

Hope this can help! :wink2:
 

·
Registered
Joined
·
504 Posts
really need to read thru this thread. looks like some good stuff but its changed so much from the original post. anyone making an idiot proof board to put one of these together that won't look like spaghetti? that and my solder skills are...lacking
 

·
Registered
Joined
·
224 Posts
@MrMan
Coralux storm x led controller have a nice cloud feature. You can download firmware here http://coralux.net/wp-content/uploads/wpsc/downloadables/storm-x-firmware.zip
It’s arduino compatible and Distributed under GNU GPL V3. Check make_cloud function.
Awesome, I'll check that out and see if I can incorporate it into my code! :grin2:

really need to read thru this thread. looks like some good stuff but its changed so much from the original post. anyone making an idiot proof board to put one of these together that won't look like spaghetti? that and my solder skills are...lacking
If you check the link in my signature you can check out the shield I designed for the Mega (and have extras of). There's a few parts that are tricky to solder but they can be left off and use a normal tft shield instead. O2 also designed a shield although I'm not sure if he posted the files for it.
 

·
Registered
Joined
·
95 Posts
Hi,
In feeding screen, if I press the restart button, the filter doesn't return to what it was (enabled) before the feeding.
In code I see:

Code:
if ((x>=124)&&(x<=172)&&(y>=223)&&(y<=271))  // restart button  
    { 
      feedingActive=false;
      screenFeeding();
    }
Is it ok?I think that feedingActive had to be true.
Do you guys have the same problem?
 

·
Registered
Joined
·
224 Posts
Hi,
In feeding screen, if I press the restart button, the filter doesn't return to what it was (enabled) before the feeding.
In code I see:

Code:
if ((x>=124)&&(x<=172)&&(y>=223)&&(y<=271))  // restart button  
    { 
      feedingActive=false;
      screenFeeding();
    }
Is it ok?I think that feedingActive had to be true.
Do you guys have the same problem?
I think if you change the code to

Code:
if ((x>=124)&&(x<=172)&&(y>=223)&&(y<=271))  // restart button  
    { 
      startFeedingTime = now();
    }
it should resolve the issue. Currently it will end up saving the feeding power states as the pre-feeding power states which will result in things not being turned back on correctly (ie your filter). Since this button is only visible if feeding is still active all the button should do is re-start the clock.
 

·
Registered
Joined
·
95 Posts
I think if you change the code to

Code:
if ((x>=124)&&(x<=172)&&(y>=223)&&(y<=271))  // restart button  
    { 
      startFeedingTime = now();
    }
it should resolve the issue. Currently it will end up saving the feeding power states as the pre-feeding power states which will result in things not being turned back on correctly (ie your filter). Since this button is only visible if feeding is still active all the button should do is re-start the clock.
Yes you are right. It saves the power states as it is now, but they are turned off, so it saves the off state.
Btw changed it to true and did not work. The clock now don't restart, it continues counting.
I will try it thanks.
 

·
Registered
Joined
·
22 Posts
Just sharing you for cheap LCD+Shield+MEGA. What i thought that i had ordered only LCD Shield+Mega at $10.07, to my surprise it came with the 3.2" LCD, meaning that i bought LCD+LCD Shield+MEGA for $10.07, what a buy, here is the link,

https://www.aliexpress.com/item/Fre...32283081828.html?spm=a2g0s.9042311.0.0.dhn9G8

I think the seller misplaced my order, now i have 2 LCDs, 1 i ordered separately and 1 which came with this order.:grin2:
 

·
Registered
Joined
·
95 Posts
I have a float switch for my ATO system.
The problem I encounter is that if water level is high, the icon suddenly changes to low and after that to high again for many times, without any change in water level.
This is not happening if water level is low. It will remain low until I add water.
I noticed that this is happening when the second relay (with the second light fixture) energizes.
Could that be noise because of the long cable between ATO and arduino?
Will the hysteresis work?
Any help would be greatly appreciated as this may damage my ATO devices (they are programmed to turn off when water level is low).
 

·
Registered
Joined
·
224 Posts
I have a float switch for my ATO system.
The problem I encounter is that if water level is high, the icon suddenly changes to low and after that to high again for many times, without any change in water level.
This is not happening if water level is low. It will remain low until I add water.
I noticed that this is happening when the second relay (with the second light fixture) energizes.
Could that be noise because of the long cable between ATO and arduino?
Will the hysteresis work?
Any help would be greatly appreciated as this may damage my ATO devices (they are programmed to turn off when water level is low).
Never had that issue myself and my cable for the float switch is ~5 feet. You've got a 1K pullup on the floatswitch pin right? You could try adding a capacitor from the pin to ground to eliminate any noise.

Also, try disconnecting your floatswitch/cable and see if it ever goes between high/low, should let you know if the problem is due to the addition of the switch/cable or just an issue regardless.
 

·
Registered
Joined
·
95 Posts
Never had that issue myself and my cable for the float switch is ~5 feet. You've got a 1K pullup on the floatswitch pin right? You could try adding a capacitor from the pin to ground to eliminate any noise.

Also, try disconnecting your floatswitch/cable and see if it ever goes between high/low, should let you know if the problem is due to the addition of the switch/cable or just an issue regardless.
No, I'm using INPUT_PULLUP resistor.
If I disconnect the cable from arduino, it stays to high. Doesn't change between high/low.
 

·
Registered
Joined
·
9 Posts
Hello friends
I am using MrAqua_2_3_6 version, and i still have the problem with LED lights(15 cree XPE 3w with 5 x LDD700H board). with all channels up the light intensity of the first LED channel decreases then it was with single channel. Eventually when all the 5 channels are ON it does not give me enough light which is expected from this cree @700ma.

When nothing is connected to LDD board, just Arduino output measured on PWM pins.
@100% all the channels read ~5v, and @0% they all read ~0v(was not able to add a table here), so i feel code or dimming is fine.

Current measured on Channel 1, gradually switching ON other channels at 100%
Only Ch1 ON @ 100% PWM, current in Channel 1 is - 550ma
Now Ch2 ON @ 100%, and Ch1 @ 100%, current in Ch1 is - 500ma
Now Ch3, & Ch2 ON @ 100%, and Ch1 100%, current in Ch1 is - 452ma
Now Ch4, Ch3 & Ch2 ON @ 100%, and Ch1 100%, current in Ch1 is - 420ma
Now Ch5, Ch4, Ch3,Ch2 ON @ 100%, and Ch1 100%, current in Ch1 is - 380ma

I have 5 strings with 3 cree XP-E LED’s each connected to LDD700h and using PSU 12v8amp.

With 12v PSU directly(without PWM) connecting to LDD700 looks fine.

Is this a normal behavior or i need to upgrade my PSU and LDD700 to LDD1000. or is it something to do with connections
Inputs and help appreciated.
 

·
Registered
Joined
·
8 Posts
What's the output rated at on your power supply? Sounds like it might not be enough. 45w of led/12V=3.75A assuming the power supply and LDD's are 100% efficient. So you are going to want at least 4A-5A or 50-60W power.
 
1861 - 1880 of 2156 Posts
Top