My Neptune Apex web interface compatible DIY reef controller

let me see if I have this figured out...above is the part of the code that has to be altered to set the on/off times...so say I want my outlet to come on at 7am and off at 9pm, I would change the code to read like below



there's 25200 second from midnight til 7am, that's the initial off time, then on for 14 hours which equals 50400 seconds, then off the remaining seconds from 86400, which is the 24 hour cycle in seconds...did I figure that correctly ?


in the comment above the #define line you quoted is the instructions

//define the default outlet program here. outlets must appear in exact order defined in outlet names definition
//program outletname, initial off time, on time, off time, days active, mode
#define OUTLETSDEFAULT {{OUTLET1,0,SECS_PER_DAY,0,0xff,_auto},\

1. outlet name
2. initial off time in seconds
3. on time in seconds
4. off time in seconds
5. active days bit mapped into one byte
6. mode

cycle time is 2+3+4 and should multiple into 24.

the entry for 7am on 9pm off everyday is
OUTLET1, 25200, 50400, 10800, 0xff,_auto

The time for items 2,3 and 4 are interval times, meaning, 7 hours OFF, 14 hours ON, 3 hours OFF for a total of 24 hours total cycle time.

The SECS_PER_DAY is just a #define whose value is the number of seconds in a day, and the example is for an outlet that is ON 24 hours a day (hence OFF times are 0).
 
I see that you answer my question in post #137

yes it is in my todo list. I'll try to work on it this weekend.

I'm thinking of using one of the following options to indicate inverted cycle logic

add 0x80000000 to the interval values (set the most significant bit to 1)
use the 8th bit of the active days variable
add a new variable to specify normal or inverse logic.
 
in the comment above the #define line you quoted is the instructions

//define the default outlet program here. outlets must appear in exact order defined in outlet names definition
//program outletname, initial off time, on time, off time, days active, mode
#define OUTLETSDEFAULT {{OUTLET1,0,SECS_PER_DAY,0,0xff,_auto},\

1. outlet name
2. initial off time in seconds
3. on time in seconds
4. off time in seconds
5. active days bit mapped into one byte
6. mode

cycle time is 2+3+4 and should multiple into 24.

the entry for 7am on 9pm off everyday is
OUTLET1, 25200, 50400, 10800, 0xff,_auto

The time for items 2,3 and 4 are interval times, meaning, 7 hours OFF, 14 hours ON, 3 hours OFF for a total of 24 hours total cycle time.

The SECS_PER_DAY is just a #define whose value is the number of seconds in a day, and the example is for an outlet that is ON 24 hours a day (hence OFF times are 0).

awesome, I actually understood that, I ordered the Arduino for dummies book while ordering my pieces for the controller :D

I have a lot to learn but every time I mess with this little PC it amazes me more, I'm even more impressed with the minds out there that figures out all this coding to make aquarium controllers, you guys have amazing talent with this stuff...thank you for sharing it with us
 
doughboy, will this Ethernet shield work ? http://www.amazon.com/gp/product/B006J4FZTW/ref=oh_details_o02_s00_i01?ie=UTF8&psc=1

51xGU0orl7L.jpg


and I think I ordered the wrong LCD, not sure this will work ? http://www.amazon.com/gp/product/B006OVYI1G/ref=oh_details_o02_s00_i02?ie=UTF8&psc=1

51Tspp70mHL.jpg


but I think this one will, am I correct ? http://www.amazon.com/gp/product/B00813HBEQ/ref=gno_cart_title_5?ie=UTF8&psc=1&smid=A10EAPE4CAYC9P

51Xwer%2BfrSL.jpg
 

ethernet shield yes,
first lcd, no
second lcd, yes.
if you want to keep cost down and don't mind waiting 10-20 days, you can get most stuff on ebay for less. Sainsmart products cost a little more, but they are well made.

I have a chauvet sr-8 that I don't need that I am going to list for sale soon.
anyone interested can email me.
 
ethernet shield yes,
first lcd, no
second lcd, yes.
if you want to keep cost down and don't mind waiting 10-20 days, you can get most stuff on ebay for less. Sainsmart products cost a little more, but they are well made.

I have a chauvet sr-8 that I don't need that I am going to list for sale soon.
anyone interested can email me.

awesome, thank you Sir

I have the ethernet shield and an RTC already in the mail headed my way, along with the wrong LCD, but that is an optional piece so I can still get this thing going and add that later

it was the waiting that I was trying to avoid by going to Amazon instead of Ebay, but I found a place on Ebay that has most everything needed for this controller, they are dirt cheap on prices and located in the U.S. so shipping time may not be too bad

here's his link for those still looking for pieces to this :) http://stores.ebay.com/NY-PLATFORM?_trksid=p2047675.l2563 and I just placed an order for the correct LCD here, we'll see how fast shipping is soon :)
 
Last edited:
so far so good, I got my RTC, 8 channel relay board, Ethernet shield, pH stamp, and the incorrect LCD in today, plus I ordered a new soldering station and had to build it so I could use it LOL I actually enjoyed that, it gave me some more practice with the soldering iron :)

I tested the LCD and even though it's not the correct board for this build, it does work LOL

the RTC is working, I've got it connected to the Mega and running with the Jarduino sketch on my extra screen....

I've not tested the Ethernet shield yet, I didn't like that the USB port on my Arduino was touching the bottom of the shield and I wouldn't power it up....

I have a stackable proto shield on the way though, once it's here and I can confirm that the Ethernet shield is good, then I can start building :)

the LCD from NY-PLATFORM is in the mail and headed this way from Flushing NY....I wish I'd found that guy sooner, I could have almost built 2 of these for what I spent at Amazon :(
 
ok, I almost have everything, just missing a few more pieces. I got my ethernet shield today, so wanted to get some idea how it works. Sadly, I cant seem to connect to the shield at all via internet. Is there a specific port number I am suppose to use?
 
connection still times out using port 8000

nvm, got it working finally

what exactly did you have to do to get it working, mine keeps saying "network down" on the LCD...

I think I have the IP and Port setting all correct and in the correct places, what am I missing ?

is there a simple sketch I could load just to test the ethernet shield to be sure it's working properly ?
 
can somebody tell me exactly where to put the IP addresses and port numbers ?

is there somewhere else other than in the config.h file ?

I'm not getting anywhere with the Ethernet stuff and I'm almost convinced that I have a faulty Ethernet shield but thought I'd ask to be sure, I couldn't get it to connect with the Xively site either with just the Ethernet sketch
 
redtop03 you can try this, upload from the File, examples, ethernet, dhcpAddressPrinter and you should get the ip address for the ethernet shield
 
Hi, I came across this thread while looking into buying an Apex. I got one question, does this DIY support all of the probes the Apex does? Meaning, Temp, pH, ORP, Salinity.
 
redtop03 you can try this, upload from the File, examples, ethernet, dhcpAddressPrinter and you should get the ip address for the ethernet shield

I now have that IP but where do I put it at in the sketch ? is that my local IP or my router IP :)


edit: never mind, I got it and it works :) thank you wgraham
 
Last edited:
OK, next question, now that it is connected, and it updated it's time and date via the web, but how do access it from my other PCs ?

both my laptop and desk top are connected wirelessly and neither can see the Arduino, my son's PC is wired to the router and does see the Arduino but I can't do anything with it, what am I missing now ? :)
 
Hi, I came across this thread while looking into buying an Apex. I got one question, does this DIY support all of the probes the Apex does? Meaning, Temp, pH, ORP, Salinity.

This controller is compatible with Neptune Apex "web interface" and really has nothing to do with components in Apex. ph probe is standard, so you can use any ph probe with bnc connector, including the one that Neptune sells. You will need to add your own ORP (which is basically another ph circuit) and salinity circuit. Once you have the circuit, the probes are standard so you can use Neptune's probes. For temp probe, this use the one sparkfun sells.
 
OK, next question, now that it is connected, and it updated it's time and date via the web, but how do access it from my other PCs ?

both my laptop and desk top are connected wirelessly and neither can see the Arduino, my son's PC is wired to the router and does see the Arduino but I can't do anything with it, what am I missing now ? :)

if the wired router is also the wireless router, then it should not make any difference how the devices are connected, everything is on the same network.
 
if the wired router is also the wireless router, then it should not make any difference how the devices are connected, everything is on the same network.

that's what I thought too, I'm not sure why but it sees the Arduino as if it's a 2nd network....I'm guessing that I have something setup wrong in the sketch somewhere but I'm lost :)

I have a Motorola SBG6580 router/modem that my Cable company uses for their internet service and it is an all in one system

I do have an Ethernet hub between the router and the Arduino but I didn't think that would matter, all my PCs are wireless except for the PC in my sons room where the modem is located....

I didn't have long enough Ethernet cables to reach from the router to the Arduino without using the hub

if you've not figured it out by now, I'm a complete dummy with a lot of this stuff, especially with networking...I google to find answers but then don't understand a lot of what I read LOL

I really appreciate you guys with the help and your patients with a complete computer illiterate :)
 
Back
Top