The Planted Tank Forum banner

iAqua: My Touch Interface Aquarium Controller (Arduino)

1M views 2K replies 224 participants last post by  Dwisaputra 
#1 · (Edited)
#6 ·
Thanks! I'll start posting details early next week when I get back in town.

you SOB haha. I'm working on a raspberry pi project of similar scope. super cool project you've got going on here!
Ha! I think Pi might be better for the GUI stuff, but I haven't used one. The Arduino is great for hardware projects, and Pi is great for software ones.

Heh, looks nice.
Is this fully working or is it just a mock up?

I'm building a web controller but can only find a weekend here or there to work on it.
I've finally made it relatively secure from outside hackers.
It's fully functional and running on my desk right now. Every single feature is implemented and works, except the low temp alarm tone, which will probably take about 15 min when I get back. So short of bug testing or any other fine tuning, it's ready for assembly and then hookup.

Those pictures are mockups, because I can't take screenshots on it, but they basically look nearly identical to the screen itself (240x320). If I have time tonight before I leave, I might make a video tour of it, otherwise it'll be next week after I get home.

A web controller would be cool. For a follow up project, I was thinking of making one with pi and connecting it to the Arduino. Not sure what I'd do it remotely, but it might be fun.
 
#7 ·
Okay..
First, thank you so very much for taking your time to type this down.
Second, KUDOS. What a great DIY. I love it.

believe it or not but I have a similar thing in my mind. Of course, I have no experience in Arduino world. I wish they ran on PowerShell.
Its been 6-7 years I used C.
Anyway, to answer your question, YES! I will build this.
I have started reading about arduino and would probably have one here in about a week.
It will take me some time to get acquainted but I will DO this DIY for sure.
Believe me, this is such an awesome DIY.
Thanks once again.
 
#10 ·
Thanks so much for the kind words. I've been following your tank and excellent photography for a long time.

Isn't your DIY LED 4 channels? I haven't read much into your controller or how that's set up, but you should be able to control them with PWM since I included that in the code. It'd get you the scheduling with ramping and fading. Maybe you already have that though.

Details will follow when I return from vacation.

Very nice that it's fully functional. Yeah, I want to fully web enabled so I can go traveling and still keep an eye out on the tank.

I'm using the arduino mega & wifi shield.
Sweet! I'll be hitting you up for tips when I get that far. :biggrin:
 
#13 ·
MUHAHAHAHAHA! :icon_twis

This is a fantastic project. Thanks so much for sharing! I felt like referencing this thread in the stickies post on top of this forum. So I did. :proud:
Thanks! Wow.

So I just remembered one of the big features I have yet to program. I don't think it'll be that difficult, but it's very important. Right now when it starts up, it just starts up to default power settings (all on except aux1 and aux2) and doesn't touch the lighting modes. This is not ideal if it gets the power reset at an off time. So, the next thing I need to code it to read in all of the schedule data to determine where the lights should be and which power relays should be on/off. This'll be the first thing I work on when I get home.
 
#23 ·
Thanks for all the feedback everybody!



I am going to clean the whole thing up for final build. The breadboard is only for testing and initial building. Those links look great! Thanks!

I have no Internet at our cabin (I'm in town now), but I did bring my laptop. I wrote all of the smart startup code while my wife was napping yesterday afternoon. It will turn all power inputs to their appropriate state base on the schedule upon startup, and put the lights into the correct mode.
 
#19 ·
Nice controller, I like it. Have you considered consolidating all of the peripheral components onto a "shield" for the Mega? Plug-N-Play components rather than breadboards & wiring would make the controller much easier for the less electronically savvy to put together.

If you can provide a final draft of your wiring diagram- I'd be more than happy to design a shield for you.
 
#25 ·
Wow, I saw this in your journal but it's more impressive here. I will admit, I know absolutely nothing about coding and Arduino scares me but it keeps on appearing in almost all my hobbies in one way or another so at some point, I may just have to jump on board and see what's up. The electrical part doesn't scare me, I have done enough of that, just the coding.

I think it's awesome that you can change everything in the GUI. That's one thing I didn't know if you could do very easily, or at all with Arduino. That's what made me not so interested, the continuous code tweaking until it works, then you change or add things and redo. To me, that is punishment haha, I am not that type of person so this inspires me to maybe get into this, or get my brother to make me one, haha.
 
#31 ·
Well I would, except the only Internet I have up here (on Lake Superior north of Grand Marais, MN near the Canadian border) is when I'm in town with my phone. Laptop is at the cabin, and there is no service there. I'll be home tomorrow afternoon and should have time to post it.
 
#32 · (Edited)
I'm home safe and sound. As requested, I've uploaded my in-progress Fritzing document. I also verified this is how I indeed have my project wired. The resistor values are correct also. They don't have all of my exact parts, so I had to wing it on a few things (like the 8-relay board), but I think it's something somebody could build from. The breadboard diagram is complete up to where I am at in my project, and the wiring schematic in the file is maybe half done.

You can download the Fritzing file here EDIT: updated file 8/14/14: iAqua.fzz

Keep in mind, that's a living document on my end, and it's not final. :)

For those that just want a quick glance, here is what the breadboard looks like (NOT INCLUDING THE SCREEN):

EDIT: updated image 8/13/14


As I said, what is not on there are the screen connections. That's because there are almost 30 of them, and it'd just clutter it all up. Below is an image of how the screen hooked up, with the exception that I hooked LCD pin 6 to 5v and not 3.3v. Also, pin 19 on the screen goes to the breadboard lead that says "LCD BACKLIGHT PIN." That allows for the auto-dimming and backlight brightness control that i wrote. The image was taken from the stilo documentation:



This is my first time ever using Fritzing, or ever making a wiring diagram. I'd love to hear if anybody has any pointers, or notices any mistakes.

Also, on the stilo project that got me started, he had put 20K resistors on every single pin between the Arduino digital pins and and the screen. I think I found somebody else that had none, but I don't recall. I've noticed that most things that plug into an arduino end up with a resistor on them. In the process of wiring my screen, I either copied a person that didn't use them, or I completely forgot. I just realized that I have no resistors, but it works fine. I would love input on if I should use them, and why. Go easy on me, I'm still in the early stages of learning this level of electronics. ;)

Also, I updated the first post with version 1.0.1 code: iAqua.zip

CURRENT VERSION: 1.0.1 (7/13/14)
  • created smart startup routine
  • fixed math bug with dosing pump speed saving to eeprom
  • changed PWM pins for dosing pumps to make room for RGBW PWM pins
  • changed from previous RTC library to the more common RTClib
The smart startup routine looks through the schedules and turns on any power relays that are supposed to be on. If it turns the lights on, it looks through the ramping schedule to see what mode it should be in. I didn't go so far as to pick up the ramp (too complicated with the CSP lights), but I did calculate if it's closer to the beginning or end of the ramp, and then it chooses that mode. I'm not sure if that's the best logic, but it's what I went with. Reboots shouldn't happen very often, so I think it's probably just fine.
 
#34 ·
Wonderful. Thanks so much again.
You're welcome. I realized I had to build the whole schematic anyway, because I have to rip it all apart to build it into it's case (a wood box from a bottle of Bookers bourbon). I could figure it all out again, but it'll be a lot easier with the schematic.

I have a very dumb kinda question here. Is there anything out there which can help simulate the circuit even before I attempt it? Something like circuitlab that electronics people use?
That would be cool. I have no idea, but it'd have to be super advanced to know all of the electronic devices, and how they'd work together. Plus, it'd have to emulate Arduino hardware and code.
 
#35 ·
Right now I'm pretty happy with where the code is at. I'm sure I'll find things to fix and tweak, but for now I'm going to start working on the case and assembly.

Below is the case I'll be using. It's free to anybody who enjoys a great bottle of bourbon. It's dimensions are roughly 4"x4" and 14" tall. It'll be in a "tower" configuration with the power outlets on the back of it. It'll sit on the floor next to my tank, which is next to my main sitting chair. The clear front panel slides out for easy access, and lets you see all of the nerd guts when it's in place.



The screen will be mounted in an acrylic housing that I'm making that'll be fixed at about a 45° angle tilt backward. I just picked up the acrylic today from a local acrylic shop. They have scrap pieces, so it was only $2 for way more than I need. Here is a quick sketchup of what I'm thinking of.

 
#36 · (Edited)
To make the touch screen easy to connect to the mega, I'm making an adapter board. One side will have 2 rows of 16 header pins (42 total) and the other side will be two rows of 20 header pins (40 total). I have a female-female 40-pin cable, and a male-female 40 pin ribbon cable.

The male-female cable will have the male end going to the mega's double row of pins (32 total) where all of the LCD pins are, and the female end will go to the two rows of 16 header pins on my adapter board. The outer 4 pins of the cable will go unused.

One end of the female-female cable will plug into the two rows of 20 header pins on the adapter board and the other end will plug into the 40 pins on the display.

The board will map the pins, so once it's soldered it'll just be simple plug-ins.

It'll go on a small piece of perfboard. This is the mapping from the bottom of the board. Also, since the outer pins on the mega cable care 5v and ground, I can use those to power the brightness PWM circuit on the same board, and just send one wire back to the mega for pin 4.

Also, if it really does need the 20k resistors, this is where they'd go. From what I read, the screen's communication was meant to run at 3.3v, and the mega's pins are 5v, so that's why some people had it hooked up with 20k resistors. It brought the voltage down to 3.3v. Mine's been running fine with no resistors for over a month, so I'm not sure what to think.

EIDT: <pic of board removed> Ordering a pre-built board on bigd603's recommendation, see below.
 
#38 ·
I saw that, but read it had issues. Maybe it would work. It also looks like it's using a bunch of pins it doesn't need to. I'm also not connecting the screen directly to the mega, but I suppose the cables I have could extend this connection as well. I should read up on it more.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top