DIY Reef Controller

Here is the two screens side by side. The 5 inch screen is showing the main screen that displays all the tank stats. Since I am still using the sainsmart lcd shield which uses resistors instead of the IC chips the screen is having some power issues causing a few lines to be off by a pixel or two. I will be ordering the matching Itead sheild from Itead, hopefully they can just add it into the pcb order to save of shipping.

Once I get some touch screen examples working on the screen I will post a video.

IMG_2580_zpsdf5e482f.jpg
 
Here is the two screens side by side. The 5 inch screen is showing the main screen that displays all the tank stats. Since I am still using the sainsmart lcd shield which uses resistors instead of the IC chips the screen is having some power issues causing a few lines to be off by a pixel or two. I will be ordering the matching Itead sheild from Itead, hopefully they can just add it into the pcb order to save of shipping.

Once I get some touch screen examples working on the screen I will post a video.

IMG_2580_zpsdf5e482f.jpg
 
Due to the inferior lcd shield that uses resistors to converts the 5v to 3.3v the board can't run both the lcd screen and the touch screen. Both work fine by themselves but using them together causes the lcd driver to stop running which causes the screen to slowly turn white.

So any further development on this screen will have to wait until the shield comes with the boards around two weeks. :(

To anyone looking to into the project and is deciding which screen to use, the 5 inch screen is double the price from Itead at $50 but the screen size makes viewing the screen easier and provides much more room for UI. (800x480 pixels compared to 320x240)

The touch screen does work perfectly fine, and is giving reading from 0-800 on x-axis and 0-480 on the y-axis.
 
There does seem to be a few youtube videos that show the UTFT library working on the arduino due. I than unfortunately noticed that adafruit had some in stock. Since I haven't seen them in stock anywhere since they were released I figured it'd be smart to grab one.
 
Last edited:
Finally, up and running!

Finally, up and running!

:beer:

Well, after a good amount of time spend working with the sketches I got my mega 2560, 3.2 TFT LCD, and LCD TFT01 Mega Shield to work with the New Life Reef Controller. My LCD screen and shield are from ElecFreak (I had taken advantage of the free shipping but it took quite a while to get here) and I upgraded to UTouch which was simple to change over to.

Now to work on the LEDs and temperature probes.

Thank you NKD5024 for the great sketch.

Rott, thanks for your offer to help.
 
What was your issue? Did just switching the library solve the issue? The next release will use the utouch library.
 
Hey there, I haven't had a chance to read the whole thread yet and am not sure if this has been asked, but about how much $$ have you invested in this? Is it fairly cost affective compared to just buying a reef controller?
 
Hi nkd5024,

Congratulations, very nice 5", i was too busy at this time but now i can work again on arduino
I ordered too the 5" from Itead but can i use it with the sainsmart shield 3.2" or do i need to order a special shield for the 5"

Bye
 
Hello Everyone,

My first issue was loading the SD card with the 143 files from New Life Controller. As I was on a MAC, I followed MAC instructions but was unsuccessful. I ended up loading the files onto the SD card using a PC. It worked so I didn't research the MAC failure further.

Then my issue was getting the Touch on my ElecFreaks LCD to work with the controller.

For those interested in how I was able to get my equipment to work with nkd5024's reef controller program read on.

My Equipment:

Arduino Mega 2560 R3 from Mouser $38.95 for now attached with USB to my Mac
3.2" TFT LCD Screen model TFT01-3.2 from ElecFreaks $24.50
LCD TFT01 Arduino Mega Shield v1.4 from ElecFreaks $7.50
(note: ElecFreaks offered free shipping but took one month for delivery)
RTC module DS1307 ebay seller chip_partner $2.46

solder less breadboard and jumper wires (F/F and M/F) until I have a permanent design

Steps I took since I had altered the sketches so many times:

Deleted everything! Arduino app with all in it went into my TRASH folder

reinstalled Arduino application (downloaded arduino.app moved to applications folder)

downloaded from http://www.henningkarlsen.com/electronics/library.php Henning's libraries:
UTouch
UTFT
UTFT_tinyFAT
tinyFAT
and copied the 4 folders into the libraries folder (in Adruino/Contents/Resources/Java/libraries)

from my download of New Life Reef Controller I copies libraries:
Dallas_Temp_Control
OneWire
RTClib

copied New_Life_Reef_Controller folder that contains only the New_Life_Reef_Controller.ino file to my Adruino App (in Adruino/Contents)

What I edited in the files opening them with TextEdit.app:

Followed UTouch Manual and ran UTouch_Calibration sketch (using Mega as development board and TFT01_32 as LCD):

// Uncomment the next two lines for the Arduino Mega
UTFT myGLCD(TFT01_32,38,39,40,41); // Remember to change the model parameter to suit your display module!
UTouch myTouch(6,5,4,3,2);

(NOTE - After calibration I made these same changes above to the UTouch_ButtonTest and UTouch_QuickDraw and both worked so I knew I was okay.)

then edited UTouchCD.h accordingly:

//CALIBRATION DATE 01-17-2013

#define CAL_X 0x002BCEB2UL
#define CAL_Y 0x03A1C12AUL
#define CAL_S 0x000EF13FUL


New_Life_Reef_Controller.ino:

//#include <ITDB02_Touch.h> updated to UTouch 1/17/13
#include <UTouch.h>
#include <UTouchCD.h>

#include <avr/pgmspace.h>
#include <UTFT.h>
#include <tinyFAT.h>
#include <UTFT_tinyFAT.h>


#include <RTClib.h>
#include <Wire.h>
#include <OneWire.h>
#include <DallasTemperature.h>


//******** Declare Touch/LCD/RTC **********
UTFTtf myGLCD(TFT01_32, 38, 39, 40, 41);
UTouch myTouch(6,5,4,3,2);
RTC_DS1307 RTC;



---------then down further------


//*****************************************************************************************************

void setup(){

myGLCD.InitLCD(LANDSCAPE); //Initiate LCD Screen
myGLCD.clrScr();
file.initFAT(); //Initiate SD Card for FAT16 Lib
Wire.begin();
RTC.begin(); //Initiate Real Time Clock

myTouch.InitTouch(1); //Initiate Touch Screen for Landscape for UTouch use a 1 for LANDSCAPE, 0 for PORTRAIT
myTouch.setPrecision(PREC_HI);
myGLCD.setFont(SmallFont);

After all my changes were saved, I verified the New_Life_Reef_Controller.ino and I had no errors.

I uploaded the sketch and it worked!

NOTES:

I am using a MAC (so Arduino.app and folder placement is different on a PC)


As I understand from Henning's information-

The tinyFAT library was made by Henning's to communicate with SPI scan disk files.
The UTFT library is to communicate with the LCD screen.
The UTFT_tinyFAT lib ray provides "glue" between UTFT and tinyFAT libraries.
The UTouch library is an add-on to UTFT to handle the TOUCH aspects of the screen.

All LCD screens use LANDSCAPE and Touch can be either PORTRAIT or LANDSCAPE but if using UTouch WITH UTFT then BOTH should be LANDSCAPE.

Thus, in UTouch you use the NUMBERS 0 or 1 instead of the words.

I hope this makes sense. I tried to write it as simple as possible (that is how I like instructions). If you have any other questions or need something clarified, let me know.
 
Hello Everyone,

My first issue was loading the SD card with the 143 files from New Life Controller. As I was on a MAC, I followed MAC instructions but was unsuccessful. I ended up loading the files onto the SD card using a PC. It worked so I didn't research the MAC failure further.

Then my issue was getting the Touch on my ElecFreaks LCD to work with the controller.

For those interested in how I was able to get my equipment to work with nkd5024's reef controller program read on.

My Equipment:

Arduino Mega 2560 R3 from Mouser $38.95 for now attached with USB to my Mac
3.2" TFT LCD Screen model TFT01-3.2 from ElecFreaks $24.50
LCD TFT01 Arduino Mega Shield v1.4 from ElecFreaks $7.50
(note: ElecFreaks offered free shipping but took one month for delivery)
RTC module DS1307 ebay seller chip_partner $2.46

solder less breadboard and jumper wires (F/F and M/F) until I have a permanent design

Steps I took since I had altered the sketches so many times:

Deleted everything! Arduino app with all in it went into my TRASH folder

reinstalled Arduino application (downloaded arduino.app moved to applications folder)

downloaded from http://www.henningkarlsen.com/electronics/library.php Henning's libraries:
UTouch
UTFT
UTFT_tinyFAT
tinyFAT
and copied the 4 folders into the libraries folder (in Adruino/Contents/Resources/Java/libraries)

from my download of New Life Reef Controller I copies libraries:
Dallas_Temp_Control
OneWire
RTClib

copied New_Life_Reef_Controller folder that contains only the New_Life_Reef_Controller.ino file to my Adruino App (in Adruino/Contents)

What I edited in the files opening them with TextEdit.app:

Followed UTouch Manual and ran UTouch_Calibration sketch (using Mega as development board and TFT01_32 as LCD):

// Uncomment the next two lines for the Arduino Mega
UTFT myGLCD(TFT01_32,38,39,40,41); // Remember to change the model parameter to suit your display module!
UTouch myTouch(6,5,4,3,2);

(Note: I am using pins 6,5,4,3,2 for TOUCH, I have not moved them as nkd5024 has us move them eventually. So when ever I use the library for UTouch I have UTouch myTouch(6,5,4,3,2).)

(NOTE - After calibration I made these same changes above to the UTouch_ButtonTest and UTouch_QuickDraw and both worked so I knew I was okay.)

then edited UTouchCD.h accordingly:

//CALIBRATION DATE 01-17-2013

#define CAL_X 0x002BCEB2UL
#define CAL_Y 0x03A1C12AUL
#define CAL_S 0x000EF13FUL


New_Life_Reef_Controller.ino:

---NOTE: make sure to include the side ways arrows, the formatting of reef central posts seems to hide the information within the arrows so I deleted them here.

//#include <ITDB02_Touch.h> updated to UTouch 1/17/13
#include UTouch.h
#include UTouchCD.h

#include avr/pgmspace.h
#include UTFT.h
#include tinyFAT.h
#include UTFT_tinyFAT.h


#include RTClib.h
#include Wire.h
#include OneWire.h
#include DallasTemperature.h




//******** Declare Touch/LCD/RTC **********
UTFTtf myGLCD(TFT01_32, 38, 39, 40, 41);
UTouch myTouch(6,5,4,3,2);
RTC_DS1307 RTC;



---------then down further------


//*****************************************************************************************************

void setup(){

myGLCD.InitLCD(LANDSCAPE); //Initiate LCD Screen
myGLCD.clrScr();
file.initFAT(); //Initiate SD Card for FAT16 Lib
Wire.begin();
RTC.begin(); //Initiate Real Time Clock

myTouch.InitTouch(1); //Initiate Touch Screen for Landscape for UTouch use a 1 for LANDSCAPE, 0 for PORTRAIT
myTouch.setPrecision(PREC_HI);
myGLCD.setFont(SmallFont);

After all my changes were saved, I verified the New_Life_Reef_Controller.ino and I had no errors.

I uploaded the sketch and it worked!

NOTES:

I am using a MAC (so Arduino.app and folder placement is different on a PC)


As I understand from Henning's information-

The tinyFAT library was made by Henning's to communicate with SPI scan disk files.
The UTFT library is to communicate with the LCD screen.
The UTFT_tinyFAT lib ray provides "glue" between UTFT and tinyFAT libraries.
The UTouch library is an add-on to UTFT to handle the TOUCH aspects of the screen.

All LCD screens use LANDSCAPE and Touch can be either PORTRAIT or LANDSCAPE (depending on the model) HOWEVER if using UTouch WITH UTFT then BOTH should be LANDSCAPE.

Thus, in UTouch you use the NUMBERS 1 instead of the word LANDSCAPE.

I hope this makes sense. I tried to write it as simple as possible (that is how I like instructions). If you have any other questions or need something clarified, let me know.
 
Some words were omitted

Some words were omitted

Well, it seems that this formatter still omitted some words!

Under New_Life_Reef_Controller.ino:

include UTouch.h and UTouchCD.h

The first line with ITDB02_Touch.h I just added // to comment the line and the note that I updated, you can delete the entire line if you want.
 
benjaminoliver,

The amount I have put into the development of the project is higher than the cost of building one once its done. It seems to look like it will cost roughly the same as a standard reef controller depending on how much your willing to shop for bargains. Also if you are willing to throw the whole project into an ugly container and not spend money on a fancy enclosure the price will drop quite a bit. I still have to work out exactly what needs to be purchased for a build before I can definitively say show much it will cost. You will just have to look at the features offered by this controller and determine if you wanna take the plunge.

The obvious benefit over commercial reef controllers, other than the reef angel, is that if you don't like something and want to improve/add features the whole thing is open source so your able to do this.


luc.claudel,

The screen acts very unpredictably using the resistor based sainsmart shield. I have read on a few forums that the ITead version which uses ICs instead of resistors to convert the 5v signals to 3.3v works much better.

Seamonkey,

Very weird you had issues with the mac as the entire project was created on my mac with no issues. Thank you very much for you post, hopefully it can help rott and any other users having issues getting the UI example running.
 
Since the first working prototype of the controller will be released in the next few weeks I have realized that the project needs a nice name and logo, something meaningful that also sounds good.

I have thought about it and can't come up with much. If anyone comes up with a cool name/logo let me know. I am willing to trade all the pcbs required for the build in exchange for using your name/logo in the GUI.
 
Awesome work so far, gonna build this into my next tank... one question, why are you using both the mechanical and electrical relays? From what I can tell the mechanicals handle a lot more amperage and I personally feel like they would be a bit more reliable...?

Thanks for opening all our eyes!
 
Back
Top