Pages: [1] 2 3 ... 9   Go Down
Author Topic: Billie's Hydroponic Controller  (Read 69842 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everybody,

As promised i would post again on this forum smiley-wink
As mentioned in the previous post i'm making a hydroponics controller, which can monitor and adjust pH, Temperature and Humidity. Write a log to SD card with the data of all the inputs plus the amount of light measured, tagged with the current Date & Time.
My build is nearly done. I'm currently at the stage where I'm testing it small scale...

Here is a video i made to show of the graphic menu. Something where I put quite a lot of work in...


Since I've began programming there where not to many people out there that where willing to share their code, that's a shame really...because it's all open-source...
So...I attached the code I wrote for this project. smiley-grin Use it, Mod it, do what you will with it smiley-wink

Edit: It's written with Arduino IDE 1.0...

* HydroController_beta_1_0_1.ino (30.94 KB - downloaded 1105 times.)
« Last Edit: November 02, 2012, 05:29:22 am by BillieBricks » Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 32
Posts: 1867
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Billie, This is a really nice project. Lots of people will be interested in doing something very much like this.

To help us, could you post some drawing/diagram of the input and output devices and how they connect to the Mega?

Also, exactly what display are you using, and what code/library do you use to drive it?

Did you research different pH sensors? What did you find? That's a key part.

Nice work!
Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Terry,

I can draw a diagram on paper and scan it if you like, with CAD or Fritzing i'm not so good smiley-wink
I'm using the Sainsmart 3.2" TFT touch screen. Ordered it from Ebay. It uses the UTFT and ITDB02_Touch library from Henning Karlsen
For the pH I'm using a Phidgets 1130 pH/ORP module, this has got a BNC connector where I can connect the pH probe (also ordered from Ebay) to. The pH probe itself is the cheapest thing I could find, because the primary idea behind this project was to make a cheap pH controller which wouldn't break my wallet smiley-wink
I must say that the accuracy of the probe is more then enough for hydroponics use. It has got an accuracy of 0.02, which isn't to bad at all. After that was complete the implementation of all the other sensors was a piece of cake smiley-wink

All other hardware and libraries are mentioned in de code, if you want to know...
Logged

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a 'simple' diagram of all the sensors.


The 3.2" TFT fits on top of the mega. But you only need to connect pins 2-6 for the touch, 22 - 41 for the display & connect GND, VCC and 3.3V
Then for the SD card...you can use pin 50 --> MISO, 51 --> MOSI, 52 --> SCK, 53 --> CS.
The RTC module...SDA --> pin 20, SCL --> pin 21
The four channel relay is pretty self explanatory smiley-wink

Without the cables attached..


And with...


Greetings... smiley-wink
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Nicely done.

Very interesting to see the redraw times for those displays, not exactly lightning eh? I've got a couple of similar displays (not used yet) and have never been able to get a good idea of how fast they will be.

______
Rob
« Last Edit: November 02, 2012, 07:11:06 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Rob,

If you check out the code you will notice that there's about one and a half second delay time. This affects the screens refresh rate also smiley-wink
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
there's about one and a half second delay time
But surely not in the middle of drawing a screen.

For example the function mainscr() does nothing but draw stuff, as indeed do all the functions that draw a screen as far as I can tell, and yet it's pretty slow. I'm just wondering if that's a common thing with these type of displays.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess it's the case with mine, but the refresh rate is fast enough for my application. So I'm quite happy smiley
Today I connected all the sensors to the box and after some debugging...one VCC cable which had a bad connection...got it running.


In front you see the pH probe and between the probe and the case is the photo-sensor encased in some plastic tubing.


On the left side is a 'recovered' serial connector from an old pc. It houses the connection to the two float sensors and the photo-sensor. On the right hand side is the BNC connector for the pH probe. Between these is the SD card.


Tomorrow I'll put the sensors in a small barrel (20L) and start building the dosing station so the next tests can be run...
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 132
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Silly Question.. where do you found your project box? I want one box with transparent material in front but i dont know where to buy one (water resistance)
Logged

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I ordered mine at conrad. They got loads of different boxes. Mine is polycarbonate and has a moisture seal between the lid and box itself... As I'm going to install it in my greenhouse.

Oh, and i've got an update for the sketch...
Rewritten the pH algorithm. Which included incorporated 'smoothing' and a pulsing (on/off) effect for the dosing pumps.

Greetings... smiley-wink

* Hydroponic_Controller_v1_1_0.ino (45.71 KB - downloaded 240 times.)
« Last Edit: November 13, 2012, 02:43:53 pm by BillieBricks » Logged

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've also made a new videoclip. Turn up the volume though, then you'll hear the pumps turning on and off...

Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks good, but I don't think Steven Spielberg has anything to worry about smiley

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Belgium
Offline Offline
Jr. Member
**
Karma: 11
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Funny...Just had a meting with Mr. Spielberg about this...In 2018 the new clip comes out. I can say that the soundtrack will be awesome!! smiley-wink
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8475
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Can't wait, he does good stuff.

_____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow Billie this is so cool..

I'm planing to monitor hydroponics over the internet. I bought the arduino mega328 and the ethernet shield.. Where do I start with? Can you give the steps on which area should I work on? Any help is so much appreciated.

Thank you
Logged

Pages: [1] 2 3 ... 9   Go Up
Jump to: