My Neptune Apex web interface compatible DIY reef controller

Doubled check my board, I have it soldered correctly according to my notes. My only guess is that my probe is no good.

I do not remember if I verified it still worked after I waterproofed the probe. I used hot glue to water proof it. Would this screw it up?
 
Device not found is what I get with both dallastemperture test and ds18x20. So I will assume I got them inverted and will have to correct this.

Just got through re-testing my LCD as well. Using the LCD Test code I had found earlier this year, I ran it, and it works as expected, back light everything. However, with the Chauvet Code, I do not get my backlight.

Doubled check my board, I have it soldered correctly according to my notes. My only guess is that my probe is no good.

I do not remember if I verified it still worked after I waterproofed the probe. I used hot glue to water proof it. Would this screw it up?


Always test using the device test sketch to verify. If it works there, there is absolutely no reason why it can't work on chauvet code. Make sure the LCD pin assignments are correct in config.h.

If you verified the temp sensor connections are correct and the OneWire test program does not show temperature, then your sensor may be bad. If you are using one of those sensors from china with the stainless steel tip, some of them have incorrect wire color assignment. The very first one I ordered did not work following the sellers pin/color assignment. The seller sent me another one, and still the same problem. So I went and opened the first one and discovered the pin assignment was incorrect. When I rewired it correctly, the sensor still worked. So I found those these sensors can survive being subjected to reverse voltage and incorrect connections. So perhaps before you toss that one out, you can try the permutations of the 3 connections to see if one of them will work.
 
Always test using the device test sketch to verify. If it works there, there is absolutely no reason why it can't work on chauvet code. Make sure the LCD pin assignments are correct in config.h.

If you verified the temp sensor connections are correct and the OneWire test program does not show temperature, then your sensor may be bad. If you are using one of those sensors from china with the stainless steel tip, some of them have incorrect wire color assignment. The very first one I ordered did not work following the sellers pin/color assignment. The seller sent me another one, and still the same problem. So I went and opened the first one and discovered the pin assignment was incorrect. When I rewired it correctly, the sensor still worked. So I found those these sensors can survive being subjected to reverse voltage and incorrect connections. So perhaps before you toss that one out, you can try the permutations of the 3 connections to see if one of them will work.

I have the exact same settings from the test that is on the chauvnet. I know it was working before and after i permantly wired it, i did an update awhile back, that is when i lost my backlight, i just figured it was due to the light went out. But now i see the light working in the test sketch.


Same thing with the temp, its a china one yes, but never checked it after i water proofed it, so i will take it that it went bad.

Will show the code from e test that works, and the code that is on the chauvnet, going off ipad right now
 
From LCD Test and works with backlight:

Code:
/* YourDuino.com Example Software Sketch
 20 character 4 line I2C Display
 Backpack Interface labelled "YwRobot Arduino LCM1602 IIC V1"
 Connect Vcc and Ground, SDA to A4, SCL to A5 on Arduino
 terry@yourduino.com */

/*-----( Import needed libraries )-----*/
#include <Wire.h>  // Comes with Arduino IDE
// Get the LCD I2C Library here: 
// https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
// Move any other LCD libraries to another folder or delete them
// See Library "Docs" folder for possible commands etc.
#include <LiquidCrystal_I2C.h>

/*-----( Declare Constants )-----*/
/*-----( Declare objects )-----*/
// set the LCD address to 0x27 for a 20 chars 4 line display
// Set the pins on the I2C chip used for LCD connections:
//                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address


/*-----( Declare Variables )-----*/


void setup()   /*----( SETUP: RUNS ONCE )----*/
{
  Serial.begin(9600);  // Used to type in characters

  lcd.begin(20,4);         // initialize the lcd for 20 chars 4 lines, turn on backlight

// ------- Quick 3 blinks of backlight  -------------
  for(int i = 0; i< 3; i++)
  {
    lcd.backlight();
    delay(250);
    lcd.noBacklight();
    delay(250);
  }
  lcd.backlight(); // finish with backlight on  

//-------- Write characters on the display ------------------
  // NOTE: Cursor Position: Lines and Characters start at 0  
  lcd.setCursor(3,0); //Start at character 4 on line 0
  lcd.print("Hello, world!");
  delay(1000);
  lcd.setCursor(2,1);
  lcd.print("From YourDuino");
  delay(1000);  
  lcd.setCursor(0,2);
  lcd.print("20 by 4 Line Display");
  lcd.setCursor(0,3);
  delay(2000);   
  lcd.print("http://YourDuino.com");
  delay(8000);
  // Wait and then tell user they can start the Serial Monitor and type in characters to
  // Display. (Set Serial Monitor option to "No Line Ending")
  lcd.setCursor(0,0); //Start at character 0 on line 0
  lcd.print("Start Serial Monitor");
  lcd.setCursor(0,1);
  lcd.print("Type chars 2 display");  


}/*--(end setup )---*/


void loop()   /*----( LOOP: RUNS CONSTANTLY )----*/
{
  {
    // when characters arrive over the serial port...
    if (Serial.available()) {
      // wait a bit for the entire message to arrive
      delay(100);
      // clear the screen
      lcd.clear();
      // read all the available characters
      while (Serial.available() > 0) {
        // display each character to the LCD
        lcd.write(Serial.read());
      }
    }
  }

}/* --(end main loop )-- */


/* ( THE END ) */

Portion of the code from the Chauvet, works, but no backlight
Code:
//you can just comment the line below to use 400khz TwoWire bus speed. It is not necessary to edit the Wire library
#define TW_400
#define RTC_ADDR 0x68
#define LCD_ADDR 0x27
#define LCD_ROWS 2
#define LCD_COLS 16
#define LCD_NUM_MSGS 4+MAXPWMPUMPS/2
#define LCD_MSG_CYCLE_SECS 2
#define LCD_EN 2
#define LCD_RW 1
#define LCD_RS 0
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7
#define LCD_BACKLIGHT 3 

#define STDTZOFFSET -8

By the way, I am also getting errors when I uncomment
Code:
define _HEATER

Code:
Sensors.ino: In function 'void checkTempISR()':
Sensors:246: error: 'Heater' was not declared in this scope
Sensors:248: error: 'Heater' was not declared in this scope


Also, here is my previous post from on here that showed I got it to work:
I got the LCD working using this test sketch:
http://arduino-info.wikispaces.com/LCD-Blue-I2C#v1

But cant seem to get it to work with your sketch. I am dumbfounded today.

odd I went back to define everything from my last post, and I am getting no backlight again, even unplugged it, and plugged back in, still no backlight.

#define LCD_ADDR 0x27
#define LCD_ROWS 2
#define LCD_COLS 16
#define LCD_NUM_MSGS 4+MAXPWMPUMPS/2
#define LCD_MSG_CYCLE_SECS 2
#define LCD_EN 2
#define LCD_RW 1
#define LCD_RS 0
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7
#define LCD_BACKLIGHT 3
#define LCD_blpol POSITIVE

ok, got it, I went to Chauvet16 and changed this value:
LiquidCrystal_I2C lcd(LCD_ADDR,LCD_EN,LCD_RW,LCD_RS,LCD_D4,LCD_D5,LCD_D6,LCD_D7,LCD_BACKLIGHT,NEGATIVE);
to
LiquidCrystal_I2C lcd(LCD_ADDR,LCD_EN,LCD_RW,LCD_RS,LCD_D4,LCD_D5,LCD_D6,LCD_D7,LCD_BACKLIGHT,POSITIVE);
and in the config.h I have it:
#define LCD_ADDR 0x27
#define LCD_ROWS 2
#define LCD_COLS 16
#define LCD_NUM_MSGS 4+MAXPWMPUMPS/2
#define LCD_MSG_CYCLE_SECS 2
#define LCD_EN 2
#define LCD_RW 1
#define LCD_RS 0
#define LCD_D4 4
#define LCD_D5 5
#define LCD_D6 6
#define LCD_D7 7
#define LCD_BACKLIGHT 3

lol, I just noticed why I dont have my backlight no more, forgot I had changed the Chauvet16 as well. Oh well, I will take care of that tomorrow.
 
if you uncoimment #define _HEATER, you will need to define an outlet to be Heater.

if you are going to plug your heater to OUTLET1, then change that to "Heater" and change the first item in OUTLETDEFS to Heater (no quotes).
 
if you uncoimment #define _HEATER, you will need to define an outlet to be Heater.

if you are going to plug your heater to OUTLET1, then change that to "Heater" and change the first item in OUTLETDEFS to Heater (no quotes).


ok, that is done.


Is there anyway I can upload the sketches to my controller with out having to unplug it all and bring it back to my computer. I tried using a USB Repeater, but it times out using that. I know I can update the WebPages on the SD Card by using Curl, but am hoping there is a way to upload updates to controller in a similar fashion.
 
jross - curious about something. When you ran the test sketch for the Temp Sensor, did you change the pin assignment in the example to Pin 48? I believe the default is 10.
 
yes, I changed the pin to 48, and no results. Then I re did the test putting the test itself back at it's default 10, and plugged the pin on pin 10, still no results. Did this to rule out pin 48 being messed up. But since pin 10 is analog, I tried the test again, this time at pin 50. Did the same with both dallastemperature and DS18x20 tests.
 
as for uploading your sketches remotely, there are a few options out there. I have tried Bluetooth options, and it's 50/50. I still just take my laptop over and do it via a 5 ft USB Cable.
 
I'll look into ethernet based bootloader. I took a quick look at one, and it still requires to manually reset the arduino. But I think I can add a code to force a reboot via http, then you just need to start your program upload within the time period the bootloader waits for ethernet connection. An ISP programmer is needed to load the new bootloader though. You can probably get one for around $2 though (I think that's how much I paid for mine a while back)
 
as for uploading your sketches remotely, there are a few options out there. I have tried Bluetooth options, and it's 50/50. I still just take my laptop over and do it via a 5 ft USB Cable.

Options I have seen so far are as thus:

Bluetooth
external programmer
xbee wireless

External programming seems difficult. While bluetooth, as you suggested is 50/50, and xbee wireless seems as well as 50/50. Was hoping there was a way I can do it over the network, and have it work. I have a laptop running Linux, however for some odd reason I am having all kinds of problems to get the code to run. Something about a file being to short and other shared library errors. Been working on that since I woke up, and have failed repeatedly.

My only other option is using my Desktop that has everything done and ready to go, this is what I have been using. I tried repeatdly using a USB 50ft Repeater. But it just ends up timing out on me and does not load the sketch. Thinking I am going to try that route again.

Although, the repeater is able to power the arduino with no problems or interrupts, just does not want to transfer the sketch over.

Binary sketch size: 82,670 bytes (of a 258,048 byte maximum)
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
 
Doughboy, I downloaded the Neptune Apex Ipad App, and it does work, however I keep getting feed back saying the the request timed out.

I have the setup as is:

Name: Keeblers Reef
Host: **My public broadcast IP**
Port 8000

Network timeout
seconds 10

data retention
days 7

Not sure if the network time out has anything to do with it or not, is there something I should be looking for to change?

Noticed that it times out after searching for other "AquaControllers"
 
I don't think it works anymore because Neptune changed their API, which is not common in software engineering practice. I have a modified version of the m-apex.htm that works with new Neptune API, but I did not bother updating the one for chauvet.

The Neptune apps don't really do much, that is why I wrote my own m-apex client. Initially I planned on buying an apex controller and use the m-apex I wrote for client, but soon enough I discovered it cannot do half the things I needed and apex is not extendable so ended up with this diy. You won't be able to display any of the PWM Pump, Sonar sensor, etc info using the Apex apps anyway.

If I have an apex controller, I can probably figure out the aquabus protocol so users can make diy add ons for it.
 
I don't think it works anymore because Neptune changed their API, which is not common in software engineering practice. I have a modified version of the m-apex.htm that works with new Neptune API, but I did not bother updating the one for chauvet.

The Neptune apps don't really do much, that is why I wrote my own m-apex client. Initially I planned on buying an apex controller and use the m-apex I wrote for client, but soon enough I discovered it cannot do half the things I needed and apex is not extendable so ended up with this diy. You won't be able to display any of the PWM Pump, Sonar sensor, etc info using the Apex apps anyway.

If I have an apex controller, I can probably figure out the aquabus protocol so users can make diy add ons for it.

That is sad that it does not display any of the PWM Pump info, I personally am not to worried about the Sonar Sensor since I opted out of that option for my build. If Neptunes UI is able to display the Salinity (dont know if it does since I dont have it on my build just yet) then it would seem only the PWM Pump I will be missing, oh and the camera.
 
That is sad that it does not display any of the PWM Pump info, I personally am not to worried about the Sonar Sensor since I opted out of that option for my build. If Neptunes UI is able to display the Salinity (dont know if it does since I dont have it on my build just yet) then it would seem only the PWM Pump I will be missing, oh and the camera.

apex can only do linear ramp up/down for controllable (tunze and jebao) pumps, and not custom waveforms like the chauvet. I don't think you should expect their app to display features they don't have.

The latest chauvet code has code to display salinity, just untested since I don't own a conductivity probe so may still need some minor tweaking.
 
I believe this is the right kit

https://www.atlas-scientific.com/product_pages/kits/ec_k1_0_kit.html?
not sure if it is possible to get this at a lower price. but apex pm2 and probe alone costs over $200.

k1.0 range is 5us/cm to 200,000us/cm
salinity of 35ppt is 53,000us/cm which is in the range.

if you are getting other probes, I think other probes may not use BNC connection.

the only part of the conductivity stamp documentation that is not clear is the format of the values returned.
 
I believe this is the right kit

https://www.atlas-scientific.com/product_pages/kits/ec_k1_0_kit.html?
not sure if it is possible to get this at a lower price. but apex pm2 and probe alone costs over $200.

k1.0 range is 5us/cm to 200,000us/cm
salinity of 35ppt is 53,000us/cm which is in the range.

if you are getting other probes, I think other probes may not use BNC connection.

the only part of the conductivity stamp documentation that is not clear is the format of the values returned.

That is where I will be getting it from. But from what I read, on the atlas site, is the k1 is for brackish water. While the k10 is for saltwater. Have not gotten it yet dueto the expense.
 
Back
Top