|
10/28/2013, 09:20 AM | #76 |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
|
10/28/2013, 09:25 AM | #77 | |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
Quote:
|
|
10/28/2013, 10:19 AM | #78 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
Yes in the config.h, I updated to the latest index.htm and when I change to 16 outlets and call out heater on outlet 9 still want open in the webpage. Also I was thinking about making this a slave mega and using a master with a touchscreen lcd to see the ph and temp reading on the touchscreen and everything else on the webpage. So I don't need to use the LCD pin. So can use the rest for the pumps. So far I got the temp and ph reading on my master LCD screen. I control all my lighting on the master with 9 channels of led's using different colors.
|
10/28/2013, 10:21 AM | #79 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
Thanks for all your help
|
10/28/2013, 10:46 AM | #80 | |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
Quote:
#define EEPROMSIG 0xA0 //change this everytime you want the eeprom defaults to change change it to any value, like 0xA1. That was supposed to be a checksum, but for now, just manually enter a different value. you will know the EEPROM got updated if you hear the 2 short + 1 long beep confirmation. changing to use I2C to communicate with another mega will be a big undertaking compared to just getting it to work on the web page. And I think it should be the other way around, the LCD display is the slave, not the master. Last edited by d0ughb0y; 10/28/2013 at 11:00 AM. |
|
10/28/2013, 11:42 AM | #81 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
I already had the mega with the touchscreen controlling my lights and just use I2C to communicate the ph and temp data to it, using the wire library. But when I'm just testing the code I don't have the I2C in the code just how you got it. I change the #define EEPROMSIG 0xA0 every time I change anything. My problem is that I have 9 channel of lights over the tank and I like your interface. So basically I have two controllers on the tank. Everything work just fine as is, just wanted to use more of the outlets. I could just use one of the outlets that I don't think I will need and replace it with the heater.
But if you get a chance to see if it's just me doing something wrong with changing from 8 to 16 max outlet let me know and also when change back to 8 the page loads back up. Thanks |
10/28/2013, 11:42 AM | #82 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
How do you like the WP25
|
10/28/2013, 01:42 PM | #83 | |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
Quote:
as to using I2C, remember I changed my I2C to run 400khz. The default is 100khz. You will need to setup an I2C slave to wait for requests from your light controller if you want to set that up as I2C master. There should be plenty of example code making two arduinos communicate via I2C. I've only used it for a day. I like the fact that they make it easy to control. I removed my 4 koralias and replaced it with one wp-25. Strictly speaking, I can actually get by now with just 3 outlets (return, kalk/ato, heater). I only use outlets that need to be controlled on a schedule. Things like media reactor pump that are always ON I do not use on the controller outlet. I've already got a basic code for controlling the pwm and the frequency. next I need to come up with a method to define the patterns and the program schedule. |
|
10/28/2013, 03:23 PM | #84 |
Head zoo keeper
Join Date: Nov 2005
Location: Toledo ,Ohio
Posts: 710
|
does your sketch have pwm pins for lighting? ramp up in the am and ramp down at night?
for 2 pins or maybe more. if not using wp pumps |
10/28/2013, 06:28 PM | #85 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
Hello thanks again by putting a 9 in max outlets made the webpage come up. Also I can see that I have 9 outlets. So I guess if I add more outlets just change it to the number I'm using up to 16
|
10/28/2013, 07:05 PM | #86 |
Registered Member
Join Date: Jul 2013
Posts: 12
|
thank you and you help!!!
other question: 1. I have 2 DIY Leds, The Leds need 5 channel PWM. and I have 2 wp40 need use 2 channel PWM. But you program use 4 timer, then I only have 9,11,12 pin. PLS tell me, what pin can I use? 2. if I need 9:00am poweron and 20:30PM poweroff, what can i set on webpage. |
10/28/2013, 07:23 PM | #87 |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
|
10/28/2013, 07:29 PM | #88 | |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
Quote:
2,3,5,9,11,12,44,45 if you move the temp sensor from pin 46 to any other free digital pin, you can use pin 46 for pwm as well for a total of 9 PWM pins. in Sensors.ino, change #define TEMPPIN 46 to the new pin number that is not a PWM pin. That is all the usable PWM lines on the Mega. Since you cannot use pins 4, and 10 since they are used by ethernet shield, and pin 13 is used by LED. The outlet scheduler is for turning the outlets on/off on a schedule. You must write your own routine to control the PWM lines for the LED. I am currently working on the code for WP pumps. |
|
10/29/2013, 01:55 AM | #89 |
Registered Member
Join Date: Jul 2013
Posts: 12
|
I was change code for PWM, not use loop. and add code update_leds() to ISR(TIMER4_COMPB_vect).
The PWM code like this: Code:
static int bl = 0; lcd.setCursor(0,3); lcd.print("B:"); if (bluePins[bl] < blueChannels) { value = SunLight(bluePins[bl],BluePWMHigh[bl],BluePWMLow[bl],BlueFull[bl],m_year,m_month,dayOfMonth,rtcHrs,rtcMins,m_second); Serial.print(map(value,BluePWMLow[bl],BluePWMHigh[bl],0,100)); Serial.print("% "); analogWrite(bluePins[bl], value); bl++; }else{ bl=0; } I want to add ORP&WI-FI module, and make this controller in china, are you agree? If you disagree, I must stop it! Last edited by sdtimer; 10/29/2013 at 02:32 AM. |
10/29/2013, 11:00 AM | #90 | |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
Quote:
What LED are you using? If I can get a unit to test and use, I can write a code for it. It is possible to add ORP, Wifi etc. ORP and Conductivity/Salinity (specific gravity) probes are currently supported when using the htm with Neptune Apex controller. Arduino Wifi shield will be easier to convert. Using wifi like RN-XV wifly with serial interface will take a lot more work to convert. Do you have any low cost wifi module you plan to use? Please email me regarding your plan with the controller. |
|
10/29/2013, 11:48 AM | #91 |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
I'm still thinking of the best way to hook up the jebao pump to the controller.
My controller currently use stereo jacks for connection. So for one stereo jack, I can put out 2 control lines plus ground to control two jebao pumps. I have the option to open up the jebao controller case, and add a switched mono jack that will pass through the control signal if nothing is plugged into the jack, but will use the control line from the mono plug if plugged in. The second option is to use a 3pin connector in series and pass through the 24v lines and use the control signal from my controller. This option does not require modifying the controller. HTML Code:
jebao controller 3pin male => 3pin female => 3pin male=>3pin female to pump || \/ to controller I'm leaning towards option 2 with the DC jack. I can just unsolder the male connector from the controller and use that. |
10/29/2013, 01:26 PM | #92 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
Sound good, so with option 2 how would the arduino control the different functions
|
10/29/2013, 01:47 PM | #93 | |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
Quote:
Once I complete the code, it will include a web interface to modify settings like select mode, cycle length, and limit max, and to select sync or anti-sync for a pair. I know a lot of people need a way to limit the max output of the jebao pumps for use in smaller tanks. |
|
10/29/2013, 01:54 PM | #94 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
do we have to add a filter to make it analog
|
10/29/2013, 02:03 PM | #95 |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
I have not tested it.
I am currently using the arduino default 490hz pwm. If that does not work, I can try to bump up the pwm frequency. In theory, it should work. It should not be an issue to add the RC filter if needed. |
10/29/2013, 05:18 PM | #96 |
Registered Member
Join Date: Aug 2004
Posts: 292
|
Is the Return outlet for the main return pump or it is for something else
|
10/29/2013, 05:28 PM | #97 |
Premium Member
Join Date: Nov 2006
Posts: 355
|
this build just keeps on getting better i am also planning to use the jebao powerheads in my upcoming build, will most likely start it in the next few weeks.
|
10/29/2013, 08:32 PM | #98 |
Registered Member
Join Date: Mar 2008
Location: sf bay area
Posts: 5,165
|
|
10/29/2013, 11:17 PM | #99 | |
Registered Member
Join Date: Jul 2013
Posts: 12
|
Quote:
1, Cree white 7000-8300K 8pcs; 2, Cree blue 465-470nm 8 pcs; 2, PHILIPS deepblue 450-455nm 8 pcs; 3, Purple 415-420nm 4 pcs; Purple 400-410nm 4 pcs; 4, Yellow 585-595nm 2pcs; Green 515-530nm 4pcs; Red 655-660nm 4pcs; Per cnannel 1 Meanwell LDD-1000H. The power is Meanwell 360W 36V. I am using arduino 2560 pin 2,3,9,11,12 Control PWM is OK. And how much wp25&wp40 in USA. Last edited by sdtimer; 10/29/2013 at 11:26 PM. |
|
10/29/2013, 11:29 PM | #100 |
Moved On
Join Date: Oct 2013
Posts: 53
|
Nice DIY controller!
|
|
|