My Neptune Apex web interface compatible DIY reef controller

dOughBoy,

I have the Arduino ATMEGA 2560, DS1307 RTC module and DS18B20 temperature sensor.

I've got the following on order - ethernet shield (5100 chipset), I2C 1602 LCD and pH probe on order.

I'll need to order the Atlas ph stamp on my next trip to the USA. Atlas Scientific wants to charge me $29USD to ship the Atlas pH stamp into Canada! Looking at the pictures on the site, it can't be more than 1-1/2" x 1-1/2". Shipping is simply just too EXCESSIVE!!

From my understanding, I can just rem out the pH section of the code. Is there anything else I need to begin the testing?

Thanks!
 
Very cool project! I am going to give it a go once I get a few items I am missing.

I was going to make my own waterproof ds18b20 sensors using stainless but the pre-assembled probes on Ebay will work out cheaper. The only ones I see on Ebay are inside stainless probes. Is anybody having any corrosion issues with these in salt water? I worry about the quality of the steel used in these.

I followed the instructions in the readme but I am getting some errors when I try to compile that I can't figure out. Any ideas?

Chauvet16.cpp:92:26: error: "˜EthernetUDP' was not declared in this scope
Chauvet16.cpp:92:53: error: expected primary-expression before "˜timeServer'
Chauvet16.cpp:92:63: error: initializer expression list treated as compound expression
Chauvet16.cpp:1612:1: error: "˜EthernetUDP' does not name a type
Chauvet16.cpp: In function "˜void initClock()':
Chauvet16.cpp:1616:3: error: "˜Udp' was not declared in this scope
Chauvet16.cpp:1617:53: error: "˜getNtpTime' cannot be used as a function
Chauvet16.cpp: At global scope:
Chauvet16.cpp:1702:26: error: redefinition of "˜long unsigned int getNtpTime'
Chauvet16.cpp:92:26: error: "˜long unsigned int getNtpTime' previously defined here
Chauvet16.cpp:1702:26: error: "˜EthernetUDP' was not declared in this scope
Chauvet16.cpp:1702:53: error: expected primary-expression before "˜timeServer'
 
Yes you can comment out the ph initialization and perhaps the code that sounds the buzzer. I highly recommend you get a buzzer. I got it from Tayda electronics. I think you can get it from their eBay store. Did you try atlas store on eBay? Shipping might be less. I don't know why shipping across the border is so expensive, I have not ordered an impeller for my skimmer because the shipping SWC charges to ship to US is quite high.

You also need a microSD card.
If you want to do the feeder or control jebao pumps, you need to get some transistors and resistors. And also relay board if you want to control outlets.
 
Very cool project! I am going to give it a go once I get a few items I am missing.

I was going to make my own waterproof ds18b20 sensors using stainless but the pre-assembled probes on Ebay will work out cheaper. The only ones I see on Ebay are inside stainless probes. Is anybody having any corrosion issues with these in salt water? I worry about the quality of the steel used in these.

I followed the instructions in the readme but I am getting some errors when I try to compile that I can't figure out. Any ideas?

Chauvet16.cpp:92:26: error: "˜EthernetUDP' was not declared in this scope
Chauvet16.cpp:92:53: error: expected primary-expression before "˜timeServer'
Chauvet16.cpp:92:63: error: initializer expression list treated as compound expression
Chauvet16.cpp:1612:1: error: "˜EthernetUDP' does not name a type
Chauvet16.cpp: In function "˜void initClock()':
Chauvet16.cpp:1616:3: error: "˜Udp' was not declared in this scope
Chauvet16.cpp:1617:53: error: "˜getNtpTime' cannot be used as a function
Chauvet16.cpp: At global scope:
Chauvet16.cpp:1702:26: error: redefinition of "˜long unsigned int getNtpTime'
Chauvet16.cpp:92:26: error: "˜long unsigned int getNtpTime' previously defined here
Chauvet16.cpp:1702:26: error: "˜EthernetUDP' was not declared in this scope
Chauvet16.cpp:1702:53: error: expected primary-expression before "˜timeServer'

Double check your EthernetClient.cpp and EthernetClient.h files again. You may have a typo when you edited the files.

No problem with the ebay temp probe. Make sure you get the one with the longer cable. I think 90% are selling the one with short cable. Sparkfun sells one ($10+shipping) that has a long 6ft cable and does not use metal enclosure.
 
Something funky is going on with my libraries. I double-checked the changes I made to those two files and they were correct.

I imported the Ethernet library from the menu (Sketch>Import Library) and it added a bunch of libraries:

Dns.h
EthernetServer.h
Ethernet.h
EthernetUdp.h
EthernetClient.h
Dhcp.h
util.h

And now it compiles! The why has me confused though. By commenting out these added lines I discovered that the critical library was 'Dns.h'. I just realized I am using Arduino 1.0 as this is what was installed through the Ubuntu software center. Maybe a difference in the included Ethernet library?
 
Doughboy where did you get your protoboard from and do you know the part #?
Also do you have a pic of the bottom side of the main board with the components mounted?
 
Doughboy where did you get your protoboard from and do you know the part #?
Also do you have a pic of the bottom side of the main board with the components mounted?

Protoboard is from eBay, just search for prototype board and look for the green one that is double sided with plated through holes. Using plated through holes makes soldering easier. Just get the size that matches what you need. I think I got the 20pcs one that comes with assorted sizes. You then just cut it to size.

As to cutting, I used a dremel for cutting the Protoboard as well as the holes on the chauvet.

I don't have a picture of the underside. It's just a mess of wires soldered from one point to another. If you are not doing to feeder or doser pumps and just 8 channels, then all you need on the Protoboard really is just to hold the connectors, rtc and the ph stamp. If you use chassis mounted connectors, you can actually do away with the Protoboard and cut the other end of the jumper wire from the arduino and solder it to the connector, rtc and ph stamp. You don't need to follow exactly how I did it.
 
Thanks for the info. I was wondering about that. I have a couple boards but don't like them. Im liking the board you used that's why I asked. I thought about doing chassis mount parts but think board mount would be easier for future changes etc.
 
Jerry do you recall where you got that LCD backpack? I'm never going to figure out how to port mine over.

I got it from seller accecity2006 on ebay, although I don't see the exact same i2c backpack on the current listing. I think there are only 2 or 3 different variations. The one I got is the original version, I think most you will get the later design. It works the same, just different pin assignments that can be configured in the config.h file.

What you need to do is run a test program on the LiquidCrystal I2C library until you get the right pin settings. You can also just trace the connection from the LCD to the I2C chip on the board. I think that is what I did to get the right pin assignments.
 
my temp sensor got corroded and stopped working. It seems to have happened overnight. My filter sock is rust colored and the spot where the stainless steel part is laying on my sump is surrounded with rust. Its like I got GFO. I don't see any major corrosion on the stainless steel tip, though it looks like it has a lot of small nicks and chips, perhaps one of them corroded through. I think the stainless steel surface was all nice and smooth when the temp sensor was new.

I just ordered the temp sensor from sparkfun (no metal part). I went and got a 2m sensor from ebay again as backup. I think the stainless steel probe lasted about 8 months.

If you do have the stainless steel sensor, you may want to coat it with some reef safe paint.
 
I'm sure this is easier than I am making it but I am failing. My LCD backpack is an MCP23008 and i traced the pinouts D7-6, D6-5, D5-4, D4-3, E-2, RS-1. Is this the only part of the code i need to modify?
#define LCD_ADDR 0x20
#define LCD_ROWS 2
#define LCD_COLS 16
#define LCD_NUM_MSGS 4
#define LCD_MSG_CYCLE_SECS 2
#define LCD_EN 2
#define LCD_RW 255
#define LCD_RS 1
#define LCD_D4 6
#define LCD_D5 5
#define LCD_D6 4
#define LCD_D7 3
#define LCD_BACKLIGHT 7
 
my temp sensor got corroded and stopped working. It seems to have happened overnight. My filter sock is rust colored and the spot where the stainless steel part is laying on my sump is surrounded with rust. Its like I got GFO. I don't see any major corrosion on the stainless steel tip, though it looks like it has a lot of small nicks and chips, perhaps one of them corroded through. I think the stainless steel surface was all nice and smooth when the temp sensor was new.

I just ordered the temp sensor from sparkfun (no metal part). I went and got a 2m sensor from ebay again as backup. I think the stainless steel probe lasted about 8 months.

If you do have the stainless steel sensor, you may want to coat it with some reef safe paint.

I have seen reports of using "Plasti-dip" with good results (liquid rubber solution) on other forums for Ebay temp sensors that are reportedly stainless steel. I have not tried it yet but with my partial "Jarduino" implementation (Screen v.1.2, temp monitoring and relay board only so far), I found the ebay "SS" probes installed in sump and main tank developed rust spots after a couple of months. Silicone is another option.

By the way d0ughb0y, excellent work, I have a chauvet ready to go, I just need to find the time (as usual) to implement, I think I have all the components around in the basement now and it should be my Christmas project....
 
Last edited:
I'm sure this is easier than I am making it but I am failing. My LCD backpack is an MCP23008 and i traced the pinouts D7-6, D6-5, D5-4, D4-3, E-2, RS-1. Is this the only part of the code i need to modify?
#define LCD_ADDR 0x20
#define LCD_ROWS 2
#define LCD_COLS 16
#define LCD_NUM_MSGS 4
#define LCD_MSG_CYCLE_SECS 2
#define LCD_EN 2
#define LCD_RW 255
#define LCD_RS 1
#define LCD_D4 6
#define LCD_D5 5
#define LCD_D6 4
#define LCD_D7 3
#define LCD_BACKLIGHT 7

The LiquidCrystal library works with PCF8574 chip. I don't think it supports the MCP23xxx chip, I think this is from adafruit. The adafruit one comes with its own lcd library, and the function calls are not 100% the same as the LiquidCrystal library. If you still want to continue using the MCP23xxx one, you can change all the lcd.xxx calls to match the one from adafruit. I actually used the mcp23xxx based one at the start in order to use the additional button inputs but scrapped that and went for the simplier display only. So I know you can modify the program to work with the adafruit compatible lcd library. To simplify things, my suggestion is for you to just get a PCF8574 based i2c board, its less than $2 on ebay.

I just did a quick search on ebay, the exact one I am using is available again for $1.43 shipped from seller princessdress08. Search ebay for
New 5V IIC/I2C Serial Interface Board Module For Arduino 1602 LCD Display
accecity2008 is another seller selling the same board ($1.53). Its the one with the small trimmer resistor for adjusting lcd contrast. The other board is the one with the large blue trimmer resistor for contrast adjustment.


check out the test programs from this page
http://arduino-info.wikispaces.com/LCD-Blue-I2C

it covers 3 versions of the lcd i2c board.
 
I'm done with the jebao pump control part of the web interface. I just need to finish the program/ configuration part, probably by next weekend.

roUC84u.png


Pump 0 is always master. The other pumps can be run as master, sync or antisync to pump 0. When pump is sync or antisync, the wave mode, max speed and pulse width are disabled since the pump operates with reference to pump 0 setting.
I'll be removing the save button since any change will immediately be saved so you can see the change on the pump immediately (like increasing/descreasing the speed). Any change in setting will set the pump into manual mode. To reset back to the programmed setting, click on auto.
 
Last edited:
Nice... I've got 2 wp25's on my tank and can't wait to ditch the 2 seperate contollers. I better get moving and get this thing together.


Awesome work doughboy.
 
This program is awesome! The only thing I really want that it doesn't seem to do it turn outlets on and off based on the time of day for my lights. I'm running good old T5's so I just need to turn them on and off, no pwm for me. I saw the work around using the macros a few pages back but I would rather not have to reset my lights every time the power turns off. Has anybody come up with code to do this? I'm just starting to learn how to program and am not sure how to go about this.
On another note I'm super excited about the Jebao's getting worked into the program. I plan on adding one to my setup along with two peristaltic pumps.
 
The work around you refer to is for the case where the "on" time crosses over midnight.

if you need to just turn the outlet on then off, once during a 24 hour period, or on equal intervals over a 24 hour period, then it is supported in the program.

The case where the "on" time crosses over midnight is on my todo list.

BTW, I got the temp sensor from sparkfun today and just hooked it up so I am getting temp readings again.
I modified the program so temp and ph sensors are not required (will read 0 if not present), and can be defined in config using
#define _TEMP
and
#define _PH
if present.

Also if _TEMP is defined, I made the program auto detect the presence of the temp sensor if it is plugged in (similar to LCD, if you plug it in, it will start displaying on LCD without resetting the controller).
 
Back
Top