My Neptune Apex web interface compatible DIY reef controller

make sure you unzipped the netload_atmega2560.zip, and put the hex file where you are running the avrdude command (looks like C:\Users\IBM). Or you can specify the full path where the hex file is located.
 
make sure you unzipped the netload_atmega2560.zip, and put the hex file where you are running the avrdude command (looks like C:\Users\IBM). Or you can specify the full path where the hex file is located.

got the boatloader uploaded and also can use the curl command. Next to try to upload a sketch
 
the current ntpserver ip is not working.
please change it to 76,73,0,4 in config.h while I work on a permanent fix for this. most likely I will have to do a dns lookup on pool.ntp.org to guarantee a working ip.
 
Ok, Just added Chiller option in addition to Fan.

Built myself an 80W Peltier effect Chiller, not hugely powerful, but tested durin the height of summer does drop the water temp by 6 degrees over 12hrs, which generally is workable.

Also added an ambient too low (6C) which triggers the central heating to override the home automation system, as I have doubts that the heater will be able to maintain the tank temp if the ambient falls below 6C.

M

Do you have ph, orp and cond? are they all connected? is the cond displaying correctly? can you post a screenshot?

tnx
 
I just uploaded latest fixes to github.

you must now specify your real dns server.
The dns lookup to get ip address of pool.ntp.org only works for me if I use comcast (my network provider) dns. it does not works if I use my router ip as the dns. Regardless if your router can do dns forwarding or not, I think specifying the actual dns ip will work for all cases.

fixed the lcd display of orp and conductivity readings.

fixed bug in updateSonar.

adjusted doser data storage location so it is ready for using the netload tftp bootloader.
 
d0ughb0y,

I picked up a SR-8 but does not look exactly like yours and I tested pinout..but seems different. But I modified the code per your previous post if I was only using a Chauvet. I have not connected it yet....but the status for the LCD for the ports seem wrong. Can you verify this this is correct?

void _outletOn(uint8_t p){
if (p<8) {
if (!(PORTA & _BV(p))) {//is off
PORTA |= _BV(p);
_outlogentry(p,true);
}
#if defined(_FEEDER) || defined(_FEEDER_V2)
} else if (p==Feeder) {
feed();
#endif
} else if (p==Pump0) {
FeedModeOFF();
}else {
if (!(PORTC & _BV(p-8))) {
PORTC |= _BV(p-8);
_outlogentry(p,true);
}
}
}

void _outletOff(uint8_t p) {
if (p<8) {
if (PORTA & _BV(p)) {//is on
PORTA &= ~_BV(p);
_outlogentry(p,false);
}
} else if (p==Feeder) {
} else if (p==Pump0) {
FeedModeON();
}else {
if (PORTC & _BV(p-8)) {
PORTC &= ~_BV(p-8);
_outlogentry(p,false);
}
}
}
 
d0ughb0y this new version could be also apply on old Arduino bootloader as your previous versions of sw?

Or we must first change bootloader and then install this new version?

the current code on github will work with or without the netload bootloader. it does not have the code to reboot remotely yet.
 
Are you setting up for 8 or 16 outlets?
your code makes all 16 outlets normal logic. 1=ON. 0=OFF (on the port side).
if you want the reverse, just do the opposite logic.

d0ughb0y,

I picked up a SR-8 but does not look exactly like yours and I tested pinout..but seems different. But I modified the code per your previous post if I was only using a Chauvet. I have not connected it yet....but the status for the LCD for the ports seem wrong. Can you verify this this is correct?

void _outletOn(uint8_t p){
if (p<8) {
if (!(PORTA & _BV(p))) {//is off
PORTA |= _BV(p);
_outlogentry(p,true);
}
#if defined(_FEEDER) || defined(_FEEDER_V2)
} else if (p==Feeder) {
feed();
#endif
} else if (p==Pump0) {
FeedModeOFF();
}else {
if (!(PORTC & _BV(p-8))) {
PORTC |= _BV(p-8);
_outlogentry(p,true);
}
}
}

void _outletOff(uint8_t p) {
if (p<8) {
if (PORTA & _BV(p)) {//is on
PORTA &= ~_BV(p);
_outlogentry(p,false);
}
} else if (p==Feeder) {
} else if (p==Pump0) {
FeedModeON();
}else {
if (PORTC & _BV(p-8)) {
PORTC &= ~_BV(p-8);
_outlogentry(p,false);
}
}
}
 
I just uploaded latest fixes to github.

you must now specify your real dns server.
The dns lookup to get ip address of pool.ntp.org only works for me if I use comcast (my network provider) dns. it does not works if I use my router ip as the dns. Regardless if your router can do dns forwarding or not, I think specifying the actual dns ip will work for all cases.

fixed the lcd display of orp and conductivity readings.

fixed bug in updateSonar.

adjusted doser data storage location so it is ready for using the netload tftp bootloader.


I don't have a problem with the time on my controller do I need to update anyway
 
I am going to use just the 8 ports of the Chauvet SR-8 for this build. Does the Chauvet use normal logic?

ok, I see what you are doing. you are keeping the chauvet unmodified and just driving it from the arduino circuit right? and you are using the uln2803 to drive the chauvet right?

you then also need to adjust isOutletOn logic. that is why your display is wrong.

which reminds me, I need to add that #define in config.h to invert the outlet logic.
 
I don't have a problem with the time on my controller do I need to update anyway

if you are using 16 outlets, you may want to update, as I have a fix there that prevents main loop hang if you are running 16 outlets.

I think you are using orp right? you need to update so the lcd displays orp reading, unless you already fixed that already.
 
ok, I see what you are doing. you are keeping the chauvet unmodified and just driving it from the arduino circuit right? and you are using the uln2803 to drive the chauvet right?

you then also need to adjust isOutletOn logic. that is why your display is wrong.

which reminds me, I need to add that #define in config.h to invert the outlet logic.

Everything stated is correct.
 
Could I just define if the relay is active high/low/none for each 8 ports and then run the appropriate logic and display with if/else statements like you have done throughout the code?
 
Do you have ph, orp and cond? are they all connected? is the cond displaying correctly? can you post a screenshot?

tnx

Still havig a bit of trouble with conductivity :(, so I parked it, but yes they are all connected, will look at it again tonight, unless you have a quick fix to hand?

M
 
Could I just define if the relay is active high/low/none for each 8 ports and then run the appropriate logic and display with if/else statements like you have done throughout the code?

yes, that is what I am going to do. I will be adding two defines.
#define OUTLET8INVERTED
and
#define OUTLET16INVERTED
and if you uncomment it, it will use the reverse logic for the outlets.
You can manually edit your code for now.

Still havig a bit of trouble with conductivity :(, so I parked it, but yes they are all connected, will look at it again tonight, unless you have a quick fix to hand?

M

The code is untested (since I don't have a cond stamp), so I am not expecting it to work. Just let me know what kind of issue/error you see and I will fix the code.
 
The author of the ariadne bootloader contacted me because he read the posts here.
I can tell he did a lot of work on the code and should not have used some words, for that I sincerely apologize.
 
D0ughb0y,

With the cond, init appears to fail before the cond circuit even reports back, one of things I tried was to open the delay timer from the 384ms to 1200ms.

The init sequence is working as the LED flashes green from blue indicating that the final r\r has output a reading.

M
 
ok, I think you are correct to change it to 1200ms. 1000ms should probably be enough. All the EZO datasheet mentions the reading is once per second. I can't find the old ph datasheet anymore, but I'm pretty sure it gives a reading once every 384ms which is what I used.

I'll add this fix in the next update. I'll also make sure updateAtlas is not called more than once every second.
Do you get a correct reading and display (decimal places etc) on the web page?

can you post a screenshot?

BTW, I just noticed all Atlas stamps price just increased :(

just checked the code, the current code already takes care not to send r\r command too fast, as it will send it again only after the response is received. so I think the only fix needed is changing the delay from 384 to 1000 in initAtlas.
 
Last edited:
Back
Top