My Neptune Apex web interface compatible DIY reef controller

d0ughb0y I see that you commented out the atlas probes limits, do we still need to put them in.

no need. I left it there just in case I need to put it back.
I replaced it with a double reading filter (look 3 lines down from the commented lines). If the current reading is different from the previous reading by over 10% then the reading is not used. I think this is a more effective noise filter and does not restrict the range.
 
The current code works in Serial mode only, and will work for either old or EZO type. I am currently working on I2C for EZO type.

As for chauvet, you can compare the cost and effort of building the outlet box yourself vs the price of a chauvet or any 8 outlet box.
 
Also I found this SainSmart Mega2560 R3 ATmega2560-16AU + ATMEGA16U2 will this work ? note not 8U2

As for chauvet, you can compare the cost and effort of building the outlet box yourself vs the price of a chauvet or any 8 outlet box.

Yes, I forgot that you don't use its relays.


I am looking to buy all the parts I need to start this project, and my total is $115. Not bad ha?
 
Also I found this SainSmart Mega2560 R3 ATmega2560-16AU + ATMEGA16U2 will this work ? note not 8U2



Yes, I forgot that you don't use its relays.


I am looking to buy all the parts I need to start this project, and my total is $115. Not bad ha?

The R3 mega is fine.

I imagine by this time, the prices of most components have come down, so even with the new ph stamp at $34+shipping, anyone can still build this controller for around $150 give or take.
 
I got the atlas stamp I2C code working.
I'd say using serial is better than I2C.
with serial, you get a dedicated connection. You can send a series of commands in one send and you can pause and resume sending/receiving if needed.

with I2C, you share the bus with other I2C devices. You have to send one command at a time, and must read the response. If after you send the command, and the response code is pending (read the response too soon), you must resend the command again. Unlike serial, if it is pending, then you can come back later and read again without resending the command.

I have to rewire my test setup so I can est running 2 stamps, one serial and one i2c to make sure everything works together. I think this should be ready sometime next week.
 
I got the atlas stamp I2C code working.
I'd say using serial is better than I2C.
with serial, you get a dedicated connection. You can send a series of commands in one send and you can pause and resume sending/receiving if needed.

with I2C, you share the bus with other I2C devices. You have to send one command at a time, and must read the response. If after you send the command, and the response code is pending (read the response too soon), you must resend the command again. Unlike serial, if it is pending, then you can come back later and read again without resending the command.

I have to rewire my test setup so I can est running 2 stamps, one serial and one i2c to make sure everything works together. I think this should be ready sometime next week.

How difficult would it be for a mini or micro to be the serial interface for the stamps and then deliver back to the main controller through the I2C bus?

Would that provide for a better solution?
 
How difficult would it be for a mini or micro to be the serial interface for the stamps and then deliver back to the main controller through the I2C bus?

Would that provide for a better solution?

serial is better than i2c, so I don't see how converting serial to i2c will make it better, it will just add more devices to the i2c bus.
I would use up all serial ports first and then only use i2c if there are no more serial ports. I have not tried it, but I think a serial device can use serial port 0. You may need to disconnect the power to that device when uploading program though, or if you have the uspasp programmer, you can upload arduino program via icsp pins and not use RX0/TX0 for upload (this means the arduino will not have any bootloader). As it is now, RX0/TX0 are only used for uploading arduino program.

if you want to convert serial to i2c, you will need to make the i2c side support all the i2c commands of atlas stamp (which is not too bad since it is just a subset of serial commands). I can see how this will be needed if say the main (master) board is an UNO or PRO mini with just one Serial port.
 
The code for sensors is complete. I just need to do the serial and i2c test together.
This is the calibration screen for conductivity. I added the calibration for 150000 for those using K10 probe. You click calibrate 80000 if using K1 probe. Either probe will need to do the dry, then the calibrate 12800 then either 80000 or 150000.

orp calibration has calibrate 225, calibrate - and calibrate +. 225 is used if you have EZO orp stamp, the +/- for old orp stamp.

For ph, there are 3 buttons, calibrate 4, calibrate 7 and calibrate 10.

The new sensor code currently does not do temp compensation. For conductivity, the difference is about 0.3 salinity, and it also fluctuates with temperature. The reason I did not add it is the conversion from a floating point to ascii will take up some execution time.

qUZtMDI.png
 
Last edited:
My Neptune Apex web interface compatible DIY reef controller

The code supports one conductivity, one ORP and multiple ph. I think typical setup will only use one ph. I don't think it is necessary to use the serial multiplexer on a mega. That will be quite useful for UNO based controller.

I2c is still new and atlas will improve it in future versions. I know even for serial, the commands have improved on each new version.
 
Last edited:
Can you explain what you use pump as named in the outlet defines for. It is apparently only active for 15 minutes and off for 2:45. I would like to use for my gfo/carbon reactor. Also the same for the unused2 outlet. I would like that to use that for an U.V. sterilizer.
 
That is for a maxi jet pump in my overflow. I just turn it on for a few minutes to kick up any detritus at the bottom of the overflow. I used to run it continuously on and changed it to this to reduce power consumption. Same for my skimmer, I don't run it always on anymore.
 
Back
Top