My Neptune Apex web interface compatible DIY reef controller

The LED is own Diy, have 5 channel:
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.

nice LED.

I am currently coding Jebao PWM to use 11,12,44,45. If you only need 2 PWM for Jebao, then you can use 11,12 for the LED. I am using the standard PWM settings, so the standard analogWrite will continue to work.

I paid $76 for WP-25. I think it is $90 for WP-40. The lowest price I found from China sellers is $69 for WP-25 on aliexpress. Not worth the $7 difference and have to wait one month for the pump to arrive.
 
The 2 10v pwm pins what can they control? Are they for mean well drivers D series

I can only say the circuit for the 2 10v pwm pins provide 0-10v PWM signal as shown in the schematic diagram. If your LED driver needs 10v analog, you need to add an RC to the output signal. If your LED drive accepts 5v PWM, then you can omit the OP-AMP circuit. You will need to research what works for the D series.
 
I've got the basic code for all 7 modes of the Jebao controller working.
H1 - 100% constant
H2 - 75% constant
H3 - 50% constant
W1 - pulse
W2 - 6 steps up 6 steps down
W3 - 6 steps up 8 steps down
ELSE - random value between 50%-100%

In my previous comment, I mentioned I measured voltage higher than 50% and 75% for H3 and H2. I see now that the PWM duty cycle is 50% and 75%, but the measured RMS voltage will be a little higher than 50% and 75%, which now makes sense.

I was looking at the waveform on my oscilloscope for the 7 modes, and noticed something interesting with W3 mode. The way it works looks interesting.
So on the first part, the speed of the pump will ramp up fast, to push water hard. Then it fades slowly back down to 50%. I think this is the equivalent of Lagoon mode in Ecotech pump. And ELSE is the equivalent of Reef Crest.

I see a lot of potential in the ability to define your own waveform mode. the design is you define each mode by setting the level value for 16 steps. And the program will use those values to control the pump speed on each time period.

for example, if you define 1 time period as 1 second, and you define your 16 step pattern as (this is W1 mode)
255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0
Then the pump will be at 100% for 0.5 seconds, and then off for 0.5 seconds, then repeat the cycle. If say you want the pulse to be at 25% duty cycle, then just use 255 for the first 4 steps, then 0 for the rest.
And also, it does not have to be an array of 16 fixed values. For ELSE, it returns the value of random(128,255). You can write your own waveform function.

I will be testing the program to control the pump this weekend.

other waveform suggestions welcome.
 
Hi,
can you tell me why you added the 8 channel 5v relay module in the basic setup (without the extra 8 outlets)?
Isn't the Chauvet SR-08 Relay pack enough?
I'm currently trying to get my head around controlling outlets myself like you do.
Thanks!
 
good question. my objective was to build everything in one box. in order to do that, I have to remove/replace the chauvet relay board with the smaller 8 channel relay board in order to fit the other parts inside the chauvet. This is completely optional of course, as some choose to build with another box and connect to an unmodified chauvet, and another chose not to use chauvet altogether and just build his own relay box using outlets and the 8 channel relay board.
 
I just finished the test code for jebao pump control. I will merge it to the main project once I verify it to work. (the web page UI will then come next, that is usually the hardest part to code)

The current design is (I tried to keep it simple).
I divide the day into 6 time segments (user definable time, currently at hour resolution, unless someone can convince me going down to minutes is needed)
These are the variables
time for the time segment
wave mode to run in that time segment (7 to choose from + you can define more)
speed to run in that segment (will ramp if values between two time segment is different)
frequency (or time per cycle) to run the selected wave (e.g. 2 seconds to run the W1 pulse)

so for instance, from midnight to 6am, you can run fixed speed at 50%, then from 6am to 9am you ramp from 50% speed to 100% on waveform W1, etc.

I coded pump1 to be the master, and you can specify pump2,3,4 to run independently, in sync or antisync (opposite) that of pump1.

since I only have one pump, I will not be able to test any of that sync feature, but in theory it should work. :)

Since I will be opening up my chauvet to modify the connections, I am thinking of converting my currently 2 generic IO lines to 2 12V output lines for controlling 12v peristaltic pump. I am thinking of using that either for dosing 2 part, or for automatic water change. The advantage of my code is everything is executed from interrupt so I can control the pump down to 1ms (actually less than that, like 100us). Once calibrated on the volume per unit time, I can add feature to dose x ml over 24 hours evenly. For water change, it will be like you specify the gallons (or liters) and the pump will run according to the calibration rate (with pause every few minutes, as I think these $15 peristaltic pumps from ebay are not designed to run continuously)

I will be converting the lines I originally designated for use with X10 to control 2 jebao PWM pumps.

I will update the schematic diagram once these are all done.
 
Hello!

If you interested take a look at my code for DC pumps.

https://github.com/FernandoGarcia/Ferduino_Portuguese/blob/master/Ferduino_Portuguese/Wavemaker.ino

to "modo_selecionado" equal 3 I get it:

10613197736_5b036d2f97_b.jpg


Like "Tidal Swell mode"" from Vortech.

EcoSmart-Tidal-Swell-Mode.png


Fernando Garcia

Sorry for english.
 
Last edited:
Hi Fernando,

nice!
the way I coded is the wave definition will call a "callback" function. So I suppose a function using your sine wave formula can be written. I don't think my 16 intervals per cycle will be sufficient though. I think your interval is period (or periodo) right? is that in milliseconds? I see the range is 100-10000 for mode 1 and 2, and mode 4 is fixed at 400.

is that tidal swell mode 2 or is it mode 4?

can you explain the different modes?
mode 1 pumps run on opposite of sine function
mode 2 both pumps run on same value from sine function
mode 3 based on the array value
mode 4 looks like the tidal swell mode?
mode 5 looks like it runs the fixed value from touch screen input?

are you using this on jebao or tunze pumps?
 
Hello!

To modes 1 and 2 "periodo" is the period of a wave in milliseconds.

Like this:

image2.jpg


Tidal Swell is Mode 3 with array values.

With mode 4 I get this:

10614734344_364251e835_b.jpg


I tried to do as reefcrest mode from Vortech.

ecotech_marine_vortech_ecosmart_reef-crest_lagoonal_modes.jpg


In mode 5 the pwm is selected manually.

Still have not bought the pumps, but I'll buy the WP40.


Fernando Garcia
 
ok, so you use period in the sine function, and you just call WaveMaker() function as many times as possible in the loop()?

I have to figure a better resolution for my code, since it is running inside an ISR, it is not practical to do all the calculations on every interrupt (once every 1024us). Hence I split the period (same thing as your period) into 16 intervals and only call the function 16 times per period. Which obviously will not be enough resolution to handle something like the tidal swell. For the Jebao pump modes, 16 intervals is good enough. I guess I'll add an interval (or resolution) parameter so user defined functions can define how many times to call it per period. So if the period is 4000ms and the interval is 400, the function will be called every 10ms. My code right now will just divide 4000ms by 16.

thanks for sharing. great work.
 
I think Vadim is the same person that contacted me, doing that jarduino project. Is yours based on jarduino also like Vadim? I think he was interested in my web interface.
 
I think Vadim is the same person that contacted me, doing that jarduino project. Is yours based on jarduino also like Vadim? I think he was interested in my web interface.

Yes, Vadim has a version based on Jarduino.

His nickname in Reefcentral is Svyaz.

My code is based on version 2.1 of Stilo.

Available here: https://code.google.com/p/stilo/

Some things related with LEDs control I used Jarduino as reference.

My web interface is very simple.

https://xively.com/feeds/69337
 
is your webserver running on ethernet shield? it push data to an external server or all the pages served from the arduino? its just status and no control?

I use web interface for all UI, it keeps the arduino code small. everyone has a smartphone nowadays.
 
Fernando,

I am working on revising my code to increase resolution, you know you can optimize your code for speed by just converting your sin function formula into a lookup table similar to mode 3. the table lookup will run several times faster than using the sin function.

this function

value = int(128 + 127 * sin(2 * PI / periodo * times));

you can just create a 30 value array and map the time to an index just like in your mode 3.
since you use the same function in modes 1,2 and 4, you can use that same array for the 3 modes.
</pre>
 
Back
Top