Go Down

Topic: Aquarium Reef Controller, stage 1, the LCD shield, (Read 41 times) previous topic - next topic


Apr 16, 2010, 03:40 pm Last Edit: Apr 16, 2010, 04:39 pm by Harlequin Reason: 1
Thanks Ludnix, that thread you posted below is perfect for what i need, going to place an order for some parts probably in a moment. as far as soldering it and keeping it compact, that shouldnt be a problem, i bet you could get it down to about the size of 1" x 2" square if not smaller, (depends how confident you are to solder on 2 sides of some curcuit board) i've done enough soldering to be prett confident on getting it down to a minimum.

Secondly, i havent given much thought to encasing it, obviously i want it as small as possible im tempted to do it in 2 boxes, 1 with the controller and the electronics, the second with just the LCD screen and keypad etc, with a short cable linking the two (which i'll make desconectable) i could then mount the LCD into my stand/cupboard what ever and have the box hidden.

failing that theres some bigish project boxes i can get locally. infact some are huge, i'd like to do it in a custom built package but again i think id struggle getting the plastic cut to size, do you have any shops local that could cut it for you? i mean i thi nk its safe to say we're both pretty far off from that stage but still  :P.

I got told my DS18B20's got shipped yesterday and should be with me in 2-3 weeks. so thats good news.

well after spending about 1 hour or so trawling through electronic sites to try adn find a supplier who sells everything i need i finally found one and the cost was pretty good.

For £8.51(that includes P&P first class) i got all the little bits and bobs i needed for a RTC module,

the cheapest supplier of "arduino" parts wanted £5 plus P&P for the DS1307 chip and 32.7 kHZ crystal.

the cheapest supplier of a prefabricated PCB RTC was £13+ P&P,

i got:-

DS1307 Chip
IC 8 pin Chip holder (its an extra £0.08, saves me ruining a chip...)
CR2032 coin cell battery
CR2032 batter holder (we'll see on this one depends how big it is etc there was no photo, i might swap it out for a "slim line" one if its no good, it was only £0.40 so at the end of the world its not desasterous.)
32.768 kHZ watch crystal

plus because as i was ordering, i threw in a few led's for kicks/proto typing, i never have any spare led's and maplins my closest electronics store charges £1.23 for a 5mm .... i got 1 of each, red,yellow,green,blue, ultra bright white and pink (yeah they did a pink one.... havent seen one of those often...)

and i should hopefully have those by next week if all goes to plan, it will keep me out of trouble till i get my temp Chips  ;D


I just got my RTC from futurlec, I haven't wired it up yet, but you're right about the size. It's much bigger than I imagined and making it yourself should actually save space. The printed board they use has a lot of wasted space.

I'm going to play with the clock and see about writing some code to turn a relay on and off based on time, but other than that, I'm just waiting for my controller for the lcd and keypad, and the actual keypad itself and I should have all my components.  


man thats unlucky with your prefabed one, ah well least you have it to play with, although i havnet really looked at the RTC coding i would have thought it would be a pretty simple task to code it to turn on a relay and off at a certain point.

i did a quick search at probes today looks like i can pick up a PH probe for about £15-20 but trying to find any other types were pretty difficult.

but then i knew that really from looking at other projects.


Apr 17, 2010, 02:32 am Last Edit: Apr 17, 2010, 02:36 am by ludnix Reason: 1
It looked like they were having difficulty making a pH probe circuit that didn't require 2x 9v batteries, but I didn't look to far into it. I'm not going to be building a pH probe as it's never been an issue or concern for me. I have a nice hand held probe that I use for the occasional testing.

I played with the clock library and got it to display the set time on the screen, I'm not sure how I keep the clock set, it doesn't seem to work if I take out the code to set the time, but obviously I wouldn't it want it to set to the same exact time everytime it powers up since that will change.

Here's the code I'm using if anyone has any input on reading the clock's date. It seems like I should be able to set the clock once, and have it remember the time until the battery runs out right?
Code: [Select]
#include <LiquidCrystal.h>
#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h>

// Connections:
// rs (LCD pin 4) to Arduino pin 12
// rw (LCD pin 5) to Arduino pin 11
// enable (LCD pin 6) to Arduino pin 10
// LCD pin 15 to Arduino pin 13
// LCD pins d4, d5, d6, d7 to Arduino pins 5, 4, 3, 2
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);

int backLight = 13;    // pin 13 will control the backlight

void setup()
 RTC.set(DS1307_SEC,1);        //set the seconds
 RTC.set(DS1307_MIN,55);     //set the minutes
 RTC.set(DS1307_HR,3);       //set the hours
 RTC.set(DS1307_DOW,6);       //set the day of the week
 RTC.set(DS1307_DATE,16);       //set the date
 RTC.set(DS1307_MTH,4);        //set the month
 RTC.set(DS1307_YR,10);         //set the year
 pinMode(backLight, OUTPUT);
 digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off.
 lcd.begin(4,20);              // rows, columns.  use 2,16 for a 2x16 LCD, etc.
 lcd.clear();                  // start with a blank screen
 lcd.setCursor(0,0);           // set cursor to column 0, row 0 (the first row)
 lcd.print("Aquarium Controller");    // change this text to whatever you like. keep it clean.
 lcd.setCursor(7,1);           // set cursor to column 0, row 1

void loop()
lcd.print("Aquarium Controller");


Nevermind, removing that section that sets the time in the setup does work for keeping time. I just happened to look when the time was 0 and thought it wasn't working!


I got the two temperature probes working and modified the clock to display in a 12hr style instead of military. I also ordered the Ethernet shield they sell at the website you linked where you got the LCD shield. Should be fun to play around with the networking side of it.

Go Up