My Neptune Apex web interface compatible DIY reef controller

I would like to add an LED controller for dimming a single channel of moonlights. I do not want anything special as I cannot dim my T5 lighting, so there is no point in ramping the moonlights. Can I simply copy the PWM fan circuit as I will be running the LEDs off the 12V power supply?
 
Wouldn't that limit me to 5V/40mA per circuit, or just 2 LEDs? I was planning to run the LEDs off the 12V power supply so I could have 4 strings of 3 3.2V LEDs. I have a 120g tank so I was thinking either 9 or 12 LEDs to get the lighting I want, then the dimmer to control the brightness. Now that I think about it, it may be interesting to run 2 or 3 circuits so I can create a more dynamic lighting. I cannot find any way to control the the current with just the PWM pins without a transistor to control current flow in the 12V circuit.
 
Gotcha!

How hard would it be to add a screen to the web app to add test data and other logging information that is not electronic? For instance to record ammonia and nitrate levels or to log events like adding root tab. It would be really sweet if you could just type in a number, then it records the time and makes a plot with whatever data it has available over a given window.
 
Yes, I know there are many other services to handle manual logging. You can even set up an excel spread sheet to do it. I was just thinking that it would be really cool to integrate the logging into the controller. Not only for the sake of only having to open one application, but because a lot of the functionality already built into this controller could be made even smarter with that additional information. For instance, a high ammonia or nitrate reading could trigger an automatic water change, or maybe if you measure micros, you could change the dosing schedule or amount. It also would be nice when getting your system stabilized to be able to track pH, temperature, and, say, CO2 levels over a 24 hour period. Naturally, the usefulness of this would depend on the frequency of your tests, but I could see it being very helpful, especially during periods where you are performing a lot of tests and trying to dial in on the right dosing levels or stabilize the water chemistry after a change.
 
It would not be easy to add this feature. a good idea though.

I think you sent a link to an led driver circuit before you edited your post. That is the right idea, though the circuit in that link is a bad circuit. Find another one that use a resistor to connect from arduino pin to transistor base and a resistor in series with the led.
 
you cannot change the pin assignment of the pwm pumps. you can only define if you want 2 or 4 pwm pumps. The pins used are tied to cpu timers controlling the pwm, so you cannot just simply assign it to any pin.
 
you cannot change the pin assignment of the pwm pumps. you can only define if you want 2 or 4 pwm pumps. The pins used are tied to cpu timers controlling the pwm, so you cannot just simply assign it to any pin.

that sinks I was hoping to use the code written for the pumps for my LED dimming, untill i can get a code written that will work for me. I already made my board so I cant just attach to that pin.
 
Last edited:
d0ughb0y

few questions for you :rollface:

1. What are states of outlets if you turn controller on in the middle of the day and by default they are set to "Auto". Are states calculated and switch to right state on power up? Or let say if power down occurs and then power up starts?

2. If we shitch between on/off/auto mode on one outlet then after switch into auto mode again right stat for that outlet is calculated by hour of the day and setting of that outlet channel?

3. Is there any way to set-up as for example skimmer turn on 15min after power on of return pump?

4. Do you progress something regarding wifi module ESP8266?
 
For outlets, whatever the state before power off will be the state on power on. So if outlet is on manual off then your power down then power up, it will be off. If it is auto when you power off, then at a later time you power on, it will calculate the state at the time you power on based on the program schedule.

Currently there is no means to delay the power on of an outlet. I can look into it.

I am currently working on using CC3000 wifi module. The first one I got was not a good one so I just ordered another one from a U.S seller. February is a bad time to buy anything from China as it is a virtual standstill there due to Chinese New Year festivities. I still do not know yet if CC3000 is a good wifi module or not, as I've read it has a lot of problems, and there are no webserver code that works with wifi out of the box. I will still work on getting a webserver code to work using esp8266 module.
 
d0ughb0y thanks for explanation!

After few months of testing I still have problem with opening some logs.
I mean if I try to open Controller or Outlet log from my mobile phone thru wifi or from my laptop browser on cable network connection then I get:

Loading 1
Loading 2
Loading 3
Unable to connect to Apex. Timeout

As I check I could open those logs right after midnight when they are still not so full and smaller files. Still in the morning or later no luck to open logs.

Still Sensor log could be opened anytime.

If I check SD card I could see those logs and see contents of logs.
But I don't remember right now how bigger are those files after each day.
I could check that!
 
Your log file is probably too large and needs longer time than the max timeout value to complete the transfer This can also happen if the log file is corrupted. When you read the sd card files from a pc, browse through the file to see if all lines are complete and not truncated. While you have the file open, find out what is filling up the log. Like do you have an outlet that switch too much?
 
Btw, if it is too much trouble to get your sd card out of the controller, you can use curl to get the log files. Using curl will not be subject to the connection timeout..
 
i have a question on the custom pattern on the PWM pumps, what is the timing between steps on it, and how many diffrent settings can there be. im thinking about using that possibly for my LED dimming as I only need 2 channels with my current lights and I only have 1 wp25. Thank you
 
You can use the pwm pump to control your LED.

Here's how:
You can define a 6 time intervals where mode will change. The default is

#define INTERVALS {0,6,9,12,18,22}

The value is time of day in hours. midnight, 6am, 9am, noon, 6pm, 10pm for above.

For each of the 4 pumps, you define the pump mode and level.
To control LED, you just need to use H1 mode.
So lets say you want to use channels 2 and 3 for LED. with channel 2 to control main LED and 3 to control moon light.

You can do something like this
#define PUMP2 {{_master,H1,0,0},{_master,H1,0,0},{_master,H1,192,0},{_master,H1,255,0},{_master,H1,255,0},{_master,H1,0,0}}
#define PUMP3 {{_master,H1,5,0},{_master,H1,5,0},{_master,H1,0,0},{_master,H1,0,0},{_master,H1,0,0},{_master,H1,5,0}}

The above will do the following:
for channel 2
midnight - 6am off
6am - 9am ramp from 0 to 75%
9am - noon ramp from 75% to 100%
noon - 6pm 100%
6pm - 10pm ramp down 100% to 0%
10pm - midnight off

for channel 3 moonlight
midnight - 6am 2%
6am - 9am - ramp down from 2% to 0%
9am - noon - off
noon -6pm - off
6pm - 10pm - ramp up from 0% to 2%
10pm - midnight - 2%


FWIW, this is exactly the same way you define a schedule on a Maxspect razor for its 2 channels.
 
Back
Top