iAqua: My Touch Interface Aquarium Controller (Arduino) - Page 125 - The Planted Tank Forum
 202Likes
 
LinkBack Thread Tools Display Modes
post #1861 of 2155 (permalink) Old 11-22-2017, 11:52 AM
Planted Tank Obsessed
 
fietsenrex's Avatar
 
PTrader: (0/0%)
Join Date: Oct 2014
Location: Netherlands
Posts: 425
[QUOTE=Downwardflight;10610850]Does the code have any cloud effects? [/QOUTE]not as far as I know
[QUOTE=Downwardflight;10610850]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
[QUOTE=Downwardflight;10610850]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
Quote:
Originally Posted by Downwardflight View Post
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.

I might be dutch but I don't have a dutch scape.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
fietsenrex is offline  
Sponsored Links
Advertisement
 
post #1862 of 2155 (permalink) Old 11-22-2017, 06:07 PM
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2017
Posts: 8
Ok, thanks for the reply
Downwardflight is offline  
post #1863 of 2155 (permalink) Old 11-23-2017, 12:24 AM
Planted Member
 
MrMan's Avatar
 
PTrader: (0/0%)
Join Date: Dec 2014
Location: Vancouver
Posts: 224
Quote:
Originally Posted by Downwardflight View Post
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.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
MrMan is offline  
 
post #1864 of 2155 (permalink) Old 11-24-2017, 04:52 AM
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2017
Posts: 8
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.
Downwardflight is offline  
post #1865 of 2155 (permalink) Old 11-27-2017, 09:18 PM
Planted Member
 
MrMan's Avatar
 
PTrader: (0/0%)
Join Date: Dec 2014
Location: Vancouver
Posts: 224
Quote:
Originally Posted by Downwardflight View Post
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.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
MrMan is offline  
post #1866 of 2155 (permalink) Old 11-27-2017, 11:29 PM
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2017
Posts: 8
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.
Downwardflight is offline  
post #1867 of 2155 (permalink) Old 11-28-2017, 04:33 AM
Algae Grower
 
PTrader: (0/0%)
Join Date: Jul 2015
Location: Chicago area
Posts: 17
@MrMan
Coralux storm x led controller have a nice cloud feature. You can download firmware here http://coralux.net/wp-content/upload...x-firmware.zip
It’s arduino compatible and Distributed under GNU GPL V3. Check make_cloud function.

Last edited by cairo; 11-28-2017 at 04:55 AM. Reason: License
cairo is offline  
post #1868 of 2155 (permalink) Old 11-28-2017, 10:30 AM
Algae Grower
 
Le Gui's Avatar
 
PTrader: (0/0%)
Join Date: Jun 2017
Location: France - Brive la Gaillarde
Posts: 13
Quote:
Originally Posted by zlpa chawngthu View Post
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!
Le Gui is offline  
post #1869 of 2155 (permalink) Old 11-28-2017, 10:58 AM
Planted Tank Enthusiast
 
PTrader: (1/100%)
Join Date: Nov 2015
Location: Kalamazoo Mi
Posts: 504
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
Kampo is offline  
post #1870 of 2155 (permalink) Old 11-28-2017, 04:40 PM
Planted Member
 
MrMan's Avatar
 
PTrader: (0/0%)
Join Date: Dec 2014
Location: Vancouver
Posts: 224
Quote:
Originally Posted by cairo View Post
@MrMan
Coralux storm x led controller have a nice cloud feature. You can download firmware here http://coralux.net/wp-content/upload...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!

Quote:
Originally Posted by Kampo View Post
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.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
MrMan is offline  
post #1871 of 2155 (permalink) Old 12-01-2017, 09:07 PM
Algae Grower
 
AgMa's Avatar
 
PTrader: (0/0%)
Join Date: Jan 2017
Location: Greece
Posts: 95
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?
AgMa is offline  
post #1872 of 2155 (permalink) Old 12-04-2017, 05:25 PM
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2017
Location: Aizawl
Posts: 22
Quote:
Originally Posted by Le Gui View Post
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!
Thank You very much, sorry for not replying early, i too was very busy these days.
zlpa chawngthu is offline  
post #1873 of 2155 (permalink) Old 12-04-2017, 05:42 PM
Planted Member
 
MrMan's Avatar
 
PTrader: (0/0%)
Join Date: Dec 2014
Location: Vancouver
Posts: 224
Quote:
Originally Posted by AgMa View Post
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.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
MrMan is offline  
post #1874 of 2155 (permalink) Old 12-04-2017, 10:19 PM
Algae Grower
 
AgMa's Avatar
 
PTrader: (0/0%)
Join Date: Jan 2017
Location: Greece
Posts: 95
Quote:
Originally Posted by MrMan View Post
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.

Last edited by AgMa; 12-04-2017 at 10:23 PM. Reason: Edit
AgMa is offline  
post #1875 of 2155 (permalink) Old 12-07-2017, 08:00 AM
Algae Grower
 
PTrader: (0/0%)
Join Date: Oct 2017
Location: Aizawl
Posts: 22
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/Free...311.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.
zlpa chawngthu is offline  
Reply

Tags
None

Quick Reply
Message:
Options

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:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



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
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome