My Neptune Apex web interface compatible DIY reef controller

Sorry for the basic question but I'm getting back into this and running into
all sorts of weird and wonderful errors with Arduino IDE 1.6.3.
I can make changes (and already have some errors sorted out) but it got
me wondering, what version of IDE is recommended to compile the current code?

For example, after finding a workaround for the Flash-5 library, here's a
sample of what I see:

PWMPumps.ino:205:15: error: 'prog_uint8_t' does not name a type
Sensors.ino: In function 'float getTemp(int)':
Sensors.ino:136:8: error: 'tempdata' was not declared in this scope
etc...

Anyway, awesome project and sorry if I missed something obvious :)

ETA: Please disregard - Found my answer after posting this, naturally...
 
Last edited:
Folks,

I wanted to ask if the idea of an LCD backlight "wakeup" button
was ever considered (or already implemented)? Same thing for
an "AC present" signal where the controller + router (on batteries)
would send an email regarding a power failure.

None of those features are hard to implement but if pins are already
reserved, I'd be interested to know.

What an overall great design - Cheers.
 
Once backlight turns off, it turns on whenever you access the controller from any browser. The controller does not detect power failure. I'm using 1.6.3 arduino.
 
assembled the led controller board today.



150E8614-7B1B-46C9-BEF8-BB4818104084.jpg~original


BD19F9A7-F28F-4181-B5D1-9E8623040126.jpg~original



parts on bottom of board.
15048F1F-976C-4E50-8D56-499BAFC74570.jpg~original
 
Last edited:
So it looks like you are further along with the LED controller than I thought. What about the software side of it? Have you figured that part out yet? Last I read you hadn't found time to get back to that. Just curious now that you have boards and integrated hardware parts. :)
 
Once backlight turns off, it turns on whenever you access the controller from any browser. The controller does not detect power failure. I'm using 1.6.3 arduino.

Thanks for the reply.

Yes, I realize that the backlight wakes up upon web access. I am suggesting
here a way to bring up the backlight when working at the tank (without
having to use my smart phone). Regarding the power failure, I am considering
using a digital input to indicate "AC power available" and trigger an alarm if
that signal is lost. Naturally, the controller and router must be UPS or battery
powered. All suggestions of course and just trying to make this the best DIY
controller bar none.

Interesting to read that you use 1.6.3. I could not get it to compile until
downgrading to 1.0.6. Perhaps just my initial IDE installation gone bad?
 
Folks,

I wanted to ask if the idea of an LCD backlight "wakeup" button
was ever considered (or already implemented)? Same thing for
an "AC present" signal where the controller + router (on batteries)
would send an email regarding a power failure.

None of those features are hard to implement but if pins are already
reserved, I'd be interested to know.

What an overall great design - Cheers.


regarding backlight, since there is no button on the controller itself, the only way to turn the backlight on is by accessing the controller web page. You can leave the backlight always on, and maybe add a circuit to dim the backlight. From what I was told in arduino forum, these lcd's led backlight will essentially last forever so it is ok to keep them on. I just added the option to turn it off so it does not glow so bright at night.

I think there are still pins available if you want to add ac detection. Are you thinking the battery backup will have a status pin that tells if it is on AC or on battery that the arduino can read?
 
Thanks for the reply.


Interesting to read that you use 1.6.3. I could not get it to compile until
downgrading to 1.0.6. Perhaps just my initial IDE installation gone bad?

it should work with 1.6.3. Most issues are due to arduino library setup. make sure it is in the right place and the ide is picking up the right copy of the library.

sometimes googling the error message will give you some idea what is causing the error and how to fix it.
 
regarding backlight, since there is no button on the controller itself, the only way to turn the backlight on is by accessing the controller web page. You can leave the backlight always on, and maybe add a circuit to dim the backlight. From what I was told in arduino forum, these lcd's led backlight will essentially last forever so it is ok to keep them on. I just added the option to turn it off so it does not glow so bright at night.

I think there are still pins available if you want to add ac detection. Are you thinking the battery backup will have a status pin that tells if it is on AC or on battery that the arduino can read?

I keeping with the concept of minimum changes here, you might well be right
regarding the backlight and I may be able to find an acceptable dimmed level
(and simply turn off the backlight control, as found in the config.h file).

Regarding AC detection, I was thinking about powering up the controller
either using a UPS or a battery system (+ charger) and have a "house" AC
wall wart feed an opto-isolator (via resistor) which would hold one of the
spare input pins (say A14 or A15) to logic low in normal circumstances. This
can be polled (similar to ATO) and an email sent if found high. Another such
input would be "skimmer cup full" (my skimmer can go nuts at times). I would
keep this custom code in a separate source file and hook it up to the main
code. What I need to look at is whether changes are needed in index.htm
for live inputs via web.

BTW, your LED controller board looks neat. Keep up the good work!
 
I mounted the pcb on top of a 200w power supply for the LED. Tested most of the functions: Wifi, buzzer, RTC, Temp, Fan, SD card. So far everything works. I'll test PWM functions and meanwell LDDs next.

3AE3FAA7-C0E0-4C52-ACC5-3B7B78E835CF.jpg~original
 
Last edited:
It's so much nicer to work with a laid out board instead of the bread board setup. I love when my projects get an actual board to work with. Hope that helps the progress on the whole project. It's looking good.
 
It's so much nicer to work with a laid out board instead of the bread board setup.

With the added bonus of less chances of a costly Oopsie that, at this voltage
and current, would be less forgiving (ask me how I know...)

D0ughb0y: FYI, I have reduced my LCD backlight intensity with a resistor
(I=33mA) and I find no need to mess with a wakeup button. Since I have
a 4x20 LCD, I have re-worked the display of parameters and wanted to
add something about Internet availability. It appears that netCheck()
only goes as far as the router. What would you recommend as a valid
check? I could ping Google I suppose. Also, I don't want to derail your
thread here so let me know if you'd prefer to be PMed here (or not at all!).

Cheers
 
I hooked up the LED and it is working.
Everything I tested on breadboard before finalizing the circuit works.
I did not test the op-amp circuit on breadboard, and I am only getting PWM voltage between 7 and 11.6V. I calculated the resistors to give a range of 3.3 to 10 v. I suppose resistor values need to be tweaked, but it will work as is to output 10v PWM. The other thing I did not test was I2C. I did not add pullup resistors, but using the i2c_t3 library to use internal pullups I was able to get it to work. I'm thinking maybe of connecting an I2C oled display.

D241E59A-3D7F-458A-83FF-3DFCC53FDF60.jpg~original


8775A0D8-720A-48A1-9473-0D690EA0093E.jpg~original
 
Last edited:
This is the op-amp circuit

opamp.png~original


R18 is a10K trimmer.
So gain is (R14+R18)/R13
If trimmer R18 is set to 0 ohms, gain is 1
If trimmer is set to 10k, gain is (4.7+10)/4.7 = 3.1

so if input pwm is 3.3V, I figure the output PWM should range between 3.3v and 10.23V. Maybe I am missing something. I think even if the range is just between 5 and 10v should be ok. I don't think there are devices that will need 3.3v pwm.

The transistor+mosfet fan driver and SD card circuit I did not test on breadboard and those worked ok.

I think I can go on and work on the software.
 
Last edited:
ok, I just realized the correct gain formula is

(R13+R14+R18)/R13

so the min gain is 2, and max gain is 4.1
which gives 6.6-13v range (the actual voltage measured is 7-11.6v).

So I think I need to remove R14,and the min gain will be 1 and max gain is 3.1 for a range of 3.3 to 10.23.

I'll remove R14 and short it to fix the circuit.

I think the error occurred because I originally had a fixed resistor then decided to make the gain variable and added the trimmer instead of replacing R14 with a trimmer.
 
I fixed the circuit.
Added the I2C pull ups. Then I used the leads I cut off from the resistor to jumper R12 and R14. Everything is on bottom of pcb so this will not be visible.

381C0827-C2D4-41DE-8B67-37D53F6A46A6.jpg~original


BTW, I saw a listing on ebay from someone selling "atlas scientific" K 1.0 conductivity probe for $49.95+$6 shipping. This is a good price if it works. Atlas sells the probe now for $126. It seems like everytime I go to atlas website, the price goes up. The conductivity stamp is now $58. I was looking at alternatives for ph and cond, but did not really find anything. I'm not sure if one from sparky's widget works better now or not. Maybe the ph, since it is verion 3. The conductivity may not. besides, they are always out of stock.
 
Last edited:
im fairly sure i saw this question somewhere but im going to be lazy and ask it anyway. is there a way to set up a outlet that will turn on when the temp is to high, so that i can hook up a fan to my sump. thank you.
 
Back
Top