My Neptune Apex web interface compatible DIY reef controller

I just committed the changes to support inverse cycle to github.

an inverse cycle example is a refugium light. ON from midnight to 8am, then OFF till 8pm, then ON again till midnight. So it is reverse of a normal outlet function. You still define the outlet schedule as if it is a normal schedule, then check the inv cycle checkbox.

mjTRiq1.png


If you update your program to this version, all your outlet program will probably be on inverse cycle. You need to go to controller setup/outlet setup on a browser and uncheck the inv cycle checkbox for each outlet you do not want to function in reverse.
 
Last edited:
regarding using additional atlas sensor stamps, since there are only 3 serial ports available, I'm thinking of making it
1 ph, 1 ph or orp, 1 conductivity
and 2 temp sensors

I don't have or plan to use orp or conductivity sensors, so I will need someone to test the program once it is completed.
 
regarding using additional atlas sensor stamps, since there are only 3 serial ports available, I'm thinking of making it
1 ph, 1 ph or orp, 1 conductivity
and 2 temp sensors

I don't have or plan to use orp or conductivity sensors, so I will need someone to test the program once it is completed.

can you not use this little jewel for more ports ? https://www.atlas-scientific.com/product_pages/embedded/serial-port-connector.html

mux_demux.jpg


it uses one port from the Arduino and divides it among the multiple stamps, this is what Fernando is using with the Ferduino code



I will probable be using this https://www.atlas-scientific.com/product_pages/components/multi-uart-carrier.html same system but all built together for a much neater look

multi-uart-carrier.jpg
 
I just committed the changes to support inverse cycle to github.

an inverse cycle example is a refugium light. ON from midnight to 8am, then OFF till 8pm, then ON again till midnight. So it is reverse of a normal outlet function. You still define the outlet schedule as if it is a normal schedule, then check the inv cycle checkbox.

22a6ab25-8bfd-4624-9b3e-ace9515af79c.png


If you update your program to this version, all your outlet program will probably be on inverse cycle. You need to go to controller setup/outlet setup on a browser and uncheck the inv cycle checkbox for each outlet you do not want to function in reverse.

nice ! great idea
 
Another question do you still enter the sec as you define an outlet in the config like this
{OUTLET12,25200,46800,14400,EVERYDAY,_auto},\
 
the multiplexer board looks interesting.

I'll do this one step at a time.
I'll work on using the existing mega serial ports, then it should not be too hard for anyone to modify it to work with the multiplexer. I need to add for each sensor: reading data from the probe, logging it, displaying current reading, displaying graph and calibration. And code to allow use of current reading to trigger alarm or outlet state.

You can diy this, I think this uses a 74LS154 or similar multiplexer. You can get this chip for $1.

what combination of sensors would most people need?
I think 2 ph is quite common for those running calcium reactors, and perhaps conductivity to display Specific Gravity or salinity. The cost can easily go over $500 with four probe setup.
 
Another question do you still enter the sec as you define an outlet in the config like this
{OUTLET12,25200,46800,14400,EVERYDAY,_auto},\

all time values are in seconds.
The active days, I added new #define like EVERYDAY, MON, TUE...
I use the (active) days field to configure days+inverse.

bit 0 - 1 for inverse cycle, 0 for normal cycle
bit 1 - sunday
bit 2 - mon
bit 3 - tue
bit 4 - wed
bit 5 - thu
bit 6 - fri
bit 7 - sat

I used this format to follow the Time library convention for weekday.
 
the multiplexer board looks interesting.

I'll do this one step at a time.
I'll work on using the existing mega serial ports, then it should not be too hard for anyone to modify it to work with the multiplexer. I need to add for each sensor: reading data from the probe, logging it, displaying current reading, displaying graph and calibration. And code to allow use of current reading to trigger alarm or outlet state.

You can diy this, I think this uses a 74LS154 or similar multiplexer. You can get this chip for $1.

what combination of sensors would most people need?
I think 2 ph is quite common for those running calcium reactors, and perhaps conductivity to display Specific Gravity or salinity. The cost can easily go over $500 with four probe setup.

I personally will only be using conductivity and ph.

I just need a schematic to know where to put each additional circuit.
 
Would it be possible to add all four (2 pH, 1 Orp, and 1 conductivity and you comment out the one that you don't use.
 
since atlas stamps all respond to "I" command to identify itself, I might try to just query Serial1 Serial2 and Serial3 with I command and dynamically identify what is connected. Serial0 can be used but will probably need a jumper pin to disconnect the atlas stamp when uploading the mega program.
 
I don't think everyone would have all four of them hook up at one time, maybe a few would.

I think that will be simpler. I think I'll just use #define in config.h instead of detecting the sensor type to keep it simple.


would you also have code for the ph to control a calcium reactor

this is just turning on the co2 when ph is 6.9 and off at 6.5 right?
 
this is just turning on the co2 when ph is 6.9 and off at 6.5 right?

yes right I turn mine off at 6.4 and on at 6.6. That way I could get rid of pH controller.

I think that will be simpler. I think I'll just use #define in config.h instead of detecting the sensor type to keep it simple.

using #define in config.h would be a great way to go all you have to do is define in sensor.ini what serial port you are using. That way I could get rid of pH controller
 
Have a look at this d0ughb0y, https://www.sparkyswidgets.com
minipH and minieC and they work on i2c so you can chain heaps, his shipping isn't as messed up as atlas and probes can be had on chinese sites for <$20 that are fine
He is also just about to launch a ion selective board

I have the miniph and miniec and intend to get them running on your code
 
Have a look at this d0ughb0y, https://www.sparkyswidgets.com
minipH and minieC and they work on i2c so you can chain heaps, his shipping isn't as messed up as atlas and probes can be had on chinese sites for <$20 that are fine
He is also just about to launch a ion selective board

I have the miniph and miniec and intend to get them running on your code

I actually started out with sparkys ph, but ran into nothing but trouble. The circuit he used seem unstable so I switched to atlas and it worked on first try. He may have improved his circuit so I might look into it again. Are you actually using both his ph and conductivity circuit now? the circuits are out of stock. The ph probe that is <$20 has a cable length of like 3 feet maybe actually shorter, certainly not long enough for most aquarium setup use. For not too much more, you can get a real ph probe. pinpoint brand probe has 10 feet cable, which is what I recommend.

I see you said you got the ph and cond board. Let me know if you are able to get it to work. The i2c library used for this project is modified to run at 400khz. I don't think that should be a problem with most i2c devices, but just in case it does not work for sparky's boards, you can run it at the default 100khz speed.
 
Last edited:
NVM, I see that I need to also use pins D16 and D17

I am currently working on using Serial1, Serial2 and Serial3 for up to 3 atlas sensor boards (any combination of ph, orp and cond). Once this is done, I think it will be a lot easier to modify it to work with the multiplexer board. The only thing I'm not sure yet is how to loop through each stamp. My original plan is to send query (send r command) to each stamp, then collect the response from each stamp. But with the multiplexer, there is a good chance the response will be lost, so it may need to be query then wait for response, then go to the next stamp, etc.
 
Back
Top