My Neptune Apex web interface compatible DIY reef controller

If you mean the ultrasonic sensor to measure the ATO top off water container water level, look in the diagram for sonar trigger and sonar echo. Then you need +5 and Gnd for 4 wire connection to the ultrasonic sensor.
 
Thank you!
Price of this sensor is really low and resolutions very good still is there any experience how this ultrasonic sensors works in almost closed reservoars? I mean because of humidity and possible condens?
 
humidity is not a problem so far since I have started using this. The only problem I had was when my skimmer overflowed and started spraying water (from bubbles bursting on the skimmer cover holes) around my sump cabinet and getting the sensor wet with salt water. The saltwater corrodes it immediately. I had to replace my sensor twice already due to this. I now put a piece of rag on top of the skimmer just in case it goes crazy and starts overflowing, it will not spray saltwater everywhere inside the sump cabinet.

The reading fluctuation is about +/- 0.1 cm. I tested this on my sump return section, expecting the fluctuation to be higher due to water movement (as compared to ATO reservoir where water is not moving), but the fluctuation range is still the same. Although the sensor can be used to determine sump return section water level to trigger ATO, I think it is overkill since all that is needed is to determine a fixed water level, unlike the ATO reservoir where distance measurement is continuous from full to empty.
 
I'm almost finished with doser code. I just need to revise the doser calibration procedure to make it easier to calibrate the pumps. So far, I can dose a minimum of 1 drop (0.1ml) by running the pump for about 100ms.

I also modified the Feeder so the transistor circuit is not needed anymore. If you created a circuit board with the transistor, the new feeder will still work, as I now use the home sensor pin (A10) for output. This means the feeder itself will only have 2 connections, ground and A10. Ground is connected to the feeder battery negative terminal, the A10 connects to the feed switch (the terminal that is not connected to battey positive). I will elaborate more on this when I update the files on github.
 
As I check schematics you use ULN 2803 for outputs still for peristaltic pumps you use transistor circuit? Why? I think you could replace both dosers outputs and also this output for feeder with another ULN 2803.
With this you reduce number of parts and also still have 5 additional outputs to use if needed for some additional feature.
 
Another question regarding outlets :)

I understand after first reset default settings from Config.ini are used.

Still if we set-up new settings for outlets and save them this should be saved also in eeprom and read after next reset and not used default settings?

So after reset system first had to check if contents of eeprom is valid and if not used defaults.
 
As I check schematics you use ULN 2803 for outputs still for peristaltic pumps you use transistor circuit? Why? I think you could replace both dosers outputs and also this output for feeder with another ULN 2803.
With this you reduce number of parts and also still have 5 additional outputs to use if needed for some additional feature.

yes you can use ULN2803 for doser driver (protection diode, input resistors, etc already built in). I added this late and it is easier for me to add two transistors to my protoboard. I actually don't have the need for outlets 9-16, so the ULN2803 on my protoboard is not really doing anything, but it will take a lot of work for me to rewire the protoboard so I am just leaving it alone.

my original feeder circuit uses 5v, and it uses PNP transistors, so you can't use ULN2803. Anyway, the version 2 of feeder does not require a driver circuit. Just connect A10 directly to feeder switch button + ground. I had to use PNP in order to use only 3 lines to the feeder (stereo jack with 3 connections). Otherwise the motor control will need 2 lines plus one line for home sensor return and ground for total of 4 connections. With PNP, I am sourcing the 5v to the motor, which has a common ground with the home sensor line, so I am able to use 3 pins. Anyway, with the version 2, only 2 lines are needed.
 
Last edited:
Another question regarding outlets :)

I understand after first reset default settings from Config.ini are used.

Still if we set-up new settings for outlets and save them this should be saved also in eeprom and read after next reset and not used default settings?

So after reset system first had to check if contents of eeprom is valid and if not used defaults.

the eeprom values are overwritten by config.ini values during program startup ONLY if the value of EEPROMSIG from the config.ini is not the same as that on the eeprom.

Code:
#define EEPROMSIG 0xA0 //change this everytime you want the eeprom defaults to change
so if you change the default values in config.ini, but do not change the value of EEPROMSIG, the eeprom will not be overwritten.

Certain values of config structure can be changed via controller setup page and values are saved in eeprom when you click save button with two short and one long beep confirmation. So your description is correct.

I'm planning a way to save the values of config to file, so when the EEPROM sig is changed and config values are overwritten by default values defined in config.h, you can then import the saved config to restore your old settings (you can edit it first with a text editor before loading).

certain config values that are set only once (like reef controller name) can only be changed in config.ini. So if you want to change the controller name to something else, you must edit config.ini and change the EEPROMSIG value. Other config values that can change more frequently can be changed via controller setup page.

I typically will change EEPROMSIG value if the structure of config changes, like for instance with the coming update, I added doser fields to the config structure, hence the config stored in eeprom must be overwritten.
 
so the ULN2803 on my protoboard is not really doing anything, but it will take a lot of work for me to rewire the protoboard so I am just leaving it alone.

In this case maybe it would be better to use 74HCT595 serial shift register with latches or even CMOS 4094. In this way you need only 3 output lines and you could chain those serial chips one after another and add more of them still using all the time only thre output lines.
And also changes in sw in that way is not proiblem. Of course serial shifting of data to those data line takes a little bit time still this could be done extremely fast :)

At the end benefit is in wiring :)
 
no that will not work. If you are handy with programming, you can replace all the ph sensor routines with code that will work with this module. That looks like a really nice ph module. When I rewrite the sensor code, I will try to make it modular so in will be easy to replace the functions with one that works with other brand modules, since it seems like there are quite a few options out there.
 
I'm sure it can be made to work. Maybe if I can get one for cheap I'll write the code to make it work and have a second ph probe. I can split the connection off of the LCD I2C connection using a splitter.
 
I knew it was wishful thinking. Here is a link to the source code for the module. I may take a stab at it..... Does look like a good lower cost option. I picked it up on fleabay for 20$.

https://gist.github.com/rezahussain/bb7715534688d8dc0520

can you try running the calibration and test program and see how it works? accurate? stable reading?

I'm not sure yet how it does the temp compensation. It really does not make sense why he added an ambient temp sensor to the board when ph measurement will be made in some liquid whose temp will most likely be not the ambient temp.
 
can you try running the calibration and test program and see how it works? accurate? stable reading?

Will do as soon as my probe arrives...

I'm not sure yet how it does the temp compensation. It really does not make sense why he added an ambient temp sensor to the board when ph measurement will be made in some liquid whose temp will most likely be not the ambient temp.

I bid on more than one and if I win I will ship to you if you like.....:idea:
 
sure. I already have an extra ph probe.

I see a problem with this ph module, the i2c address is hard coded on the board, so you cannot use more than one of this without adding a multiplexer circuit.

The other thing is, if this module has pullups on i2c lines, it may not work with the rest of the circuit unless the pullups can be desoldered.

I emailed the seller with the i2c questions. I'll see what he says.
 
Last edited:
I have his code running on a UNO with the ph module attached. Still waiting on my probe to arrive. Just reads 0v. I did read on his blog the calibration is a manual thing in his code. Have to record the readings in a serial monitor and re-compile code with the values for 4 and 7.
 
Last edited:
Back
Top