The Planted Tank Forum banner

iAqua: My Touch Interface Aquarium Controller (Arduino)

1M views 2K replies 224 participants last post by  Dwisaputra 
#1 · (Edited)
#43 ·
I do have the TFT shield with the SD card, but I couldn't get the SD part working. That's why I got the little $3 stand alone SD reader. I'm assuming it was my own inexperience and lack of knowledge that was making it not work, so I am also hoping this shield makes it work for me. For exactly the reason you state. :)
 
#44 ·
Today I started putting the project case together. I did all of the AC wiring, which included the relay board, the power outlets, a circuit breaker, a power switch, and a power cord. I'm pretty happy with how it all turned out.

Here are is the relay board wired up. 120v will go into the terminal bar, distributing power to each relay. All of the wires coming out are positioned and bent to drop right into the outlets. Each outlet pair has the little metal piece that connects the two outlets removed on the hot side, so each outlet is wired individually to a relay.



Here is the relay board dropped into place, and now connected up to the power outlets. You can also see where the power cord comes in and where the switch and breaker are (in the upper right of the pic).



Here is how it will actually stand. I plan on attaching a slightly larger platform base, but will wait until the end because it's easier to work on this way. The switch and breaker are mounted in on a small piece of flat aluminum. You can also see a long hole at the top of the box, that's where the 40 pin ribbon cable will go out to the display.

 
#49 ·
Yeah, live and learn with electronics. I'm 90% certain I fried my touch screen by neglecting to use resistors. As I mentioned 10 days ago, I didn't notice until I was a ways along that I had not put them on. I thought it might be fine since everything was working great.

Earlier this week the screen went pure white and now refuses to display graphics. The code is running and active, so I know the Arduino is fine. I ordered a new one for $17 from China, but now I have a two week wait. Oh well, at least they are cheap.
 
#50 · (Edited)
I'm adding a new feature to my controller: CO2 Pressure Alarm

I've been thinking of a way to alert me when I run out of CO2. My 5 gallon CO2 tank lasts probably 6 months, so it's tough to keep remembering to look at the gauges. Furthermore, I use a reactor, so I can't see any bubbles.

Well today I came up with an idea. I hunted down and bought a MPX5700AP pressure sensor made by Freescale Semiconductor. I actually bought 2 for $24 shipped ($12 each) on evilbay. They look like this:



It'll sense from 0-101 PSI with a 2.5% margin of error. I'm going to hook it to the airline tubing that goes from the regulator into the reactor with a T connector. I've also already found code for how to read the values and convert them into PSI.

Once the iAqua controller turns on the CO2, if it doesn't come up to the correct PSI in the line within a minute (or however long), then I've got problems (empty tank, leak, dead power adapter on the solenoid, dead/stuck solenoid, etc). If it drops down before I cut power to it, I also have problems.

I can also kill the power to the solenoid if the PSI floats up higher than it should. I have a high quality dual stage regulator, so I shouldn't get an end of tank dump, but it'll be nice to know that I can kill if if something goes wonky. For anybody with a single stage regulator, this would be a nice piece of mind.

This seems to me to be a relatively easy way to tell if CO2 is working or not. Pretty cheap too since the sensors were only $12 each (although most of them are $20 each on evilbay).

EDIT: I was just thinking... This all assumes that when CO2 is running through a reactor under the tank there is more pressure in the air line than when CO2 is not running. I know that's the case with a diffuser, but I guess I'm less sure about a reactor. I think that's the case, but maybe I'm wrong and I just wasted $24. We'll see. :)
 
#53 ·
It'll be especially cool if it actually works! :D

neat sensor.
Do you mind if I steal the idea so my site? I have a whole section dedicated to sensors/components so it's easier to find.
Go for it! Here is a link to some code that should make it work: MPX5700 Pressure Sensor
 
#55 ·
You could put the sensor between the regulator and the needle valve. That pressure should always be the setpoint of the low side of the regulator.

The pressure between the needle valve and reactor will depend on back pressure of the reactor, and may be very little.
That's kind of what I was thinking. Also not sure how check valves between the bubble counter and the reactor affect things. We will see once I get it in my hands for testing. I'll report my findings back in here. I'm really hoping I can make it work.
 
#57 ·
Ha! True enough! Well, I'm somebody who does usually finish things, but feature creep can happen. Right now I'm on hold until the replacement screen gets here, so I have time to putz. I also put a deadline on myself for completion at the end of summer, so I'm doing alright. It's also nice that I have a controller already ramping my lights and running my dosing pumps for me.

I actually bought an extra 2560 Mega, along with several other extra parts, and will probably buy an extra screen to allow me to continue development and tweaking without having to steal my controller back all the time. I want to be able to continually evolve the project, but I don't want to keep taking everything apart and interrupting what it's doing. Once it's in place, it needs to be stable.
 
#59 · (Edited)
I finally got my replacement screen today. Here is the good news (it works!):



The bad news is that they mapped the touch pins where I don't like. They took the of PWM pins I had set for RGBW control. I haven't dug in too deep yet because I control my lights with IR, but if you were to use this code with PWM, you'd probably have to do some minor hardware changes to the board, or just not use this board.

The only thing that appears to stand in the way of what I need is that they mapped the LCD backlight straight to power, so I'll need to modify something to send that to PWM for the auto-brightness adjustment.

As a bonus, the SD card slot works at max speed, so that saves a bit of wiring!
 
#60 ·
I hooked up the sensor to a little UNO and got it working today. It works perfectly, and as expected with a diffuser, but not with my reactor. With a diffuser, you can watch the PSI climb right up when the CO2 comes on, and you can watch it drop right off when you turn off the CO2.

However, there is almost no pressure required to push CO2 into a reactor, so the difference between on and off is't detectable near as I can tell. I do think putting it before the needle valve would do the trick, but I'll have to get a fitting to accomplish that. My other option would be to put a diffuser inside of my reactor, and plug the airline into it. That would pressurize the line also.

One way or the other, I'm going to make it work, because it's really slick!

 
#62 ·
Because I'm super excited to play with this thing, I just redid my regulator. It actually worked out great, because I've never liked how I built it to begin with. I had the low pressure fittings and valves all sticking way too far out to one side. I added a few bends in and got it much more compact.

I also made it so that if I decide not to do this anymore, or if I sell it, I can just add a 1/8" plug in where the airline fitting for the pressure sensor is.

Here is the updated regulator, and you can see the airline barb on the back with the sensor attached:



And the verdict? BOOM! It works fan-freaking-tastic!

Here is a 5 minute graph from the sensor. I turn the CO2 off, and you can watch the PSI drop over 5 minutes. At the end, I turn it back on, and you can see it instantaneously jump to pressurized.



So the verdict is, YES! I can monitor my CO2 pressure with the Arduino, and notify when the pressure isn't correct (empty, leak, broken solenoid, bad power adapter, etc). I'm super stoked!

:bounce:

Side note — I have to get a little clamp for the hose barb on the sensor. I do NOT need that hose popping off and draining all my CO2.
 
#68 ·
My Touch Interface Controller

Anotherhobby,

First thank you and all the others that contributed, I have been lurking for a couple of weeks and am in the process of gathering my parts.

One question I have, with the modifications that are happening, and hopefully keep happening are you planning on updating wiring and the sketch. Specifically, the screen shield which I think will use I2C and the new sensor. Also do you have any plans to incorporate PH monitoring.

Before I read your thread I never heard of Aduino, now I think with all my controller related purchases I feel like a major stockholder. The hardware part is pretty easy for me, it's the programming that throws me a curve. Haven't done anything in programming except some basic years ago. I have been visiting the forums and playing with a Uno trying to understand more. Could you recommend a book that would help?

Thanks and keep me motivated.:help::help:
 
#69 ·
Anotherhobby,

First thank you and all the others that contributed, I have been lurking for a couple of weeks and am in the process of gathering my parts.

One question I have, with the modifications that are happening, and hopefully keep happening are you planning on updating wiring and the sketch. Specifically, the screen shield which I think will use I2C and the new sensor. Also do you have any plans to incorporate PH monitoring.

Before I read your thread I never heard of Aduino, now I think with all my controller related purchases I feel like a major stockholder. The hardware part is pretty easy for me, it's the programming that throws me a curve. Haven't done anything in programming except some basic years ago. I have been visiting the forums and playing with a Uno trying to understand more. Could you recommend a book that would help?

Thanks and keep me motivated.:help::help:
Yes, I'll update my wiring sketch once I decide how to do it. I still haven't ironed that out exactly, but from looking over it all today, it's all doable. I just want to remap a few of the pins they chose. It'll still save me a ton of work and be a lot cleaner.

I don't have any books to recommend because I haven't read any. I've gotten by mostly with google and hacking away at the keyboard. I regularly do scripting and programming at work, it's just not in C/C++, so that was new to me, but it's not all that different.

Also, if you're a stockholder, I think you're motivating yourself. ;)
 
#72 ·
A made progress on two fronts today. First, I modified the TFT adapter shield to move the touch pins from 2, 3, 4, 5, 6 to 42, 43, 44, 45, 46 respectively. I removed the header pins from 2-6 and then made jumpers over to 42-46. It took less than 20 minutes and worked perfectly. Woohoo!

Header pins removed (center top):



Jumpers to the pins I wanted:



The next progress today was making the TFT acrylic housing to mount on top of the project box. I've been afraid of this, because I'm not super familiar with acrylic. It went really well, with my only mistake being the line across bottom of the face. It's not straight, but I didn't notice until it was glued. Oh well, it still looks good, so I'm happy with it. It's not perfect, but I'm proud of how it turned out:





 
#73 ·
This is a recap of my final modifications to the ElecFreaks TFT shield. I did this because I wanted this shield to do everything display related, and I wanted to remap some pins.

First, you do not need to do any of this if you don't care about the touch pins taking digital pins 2-6, and if you don't care about backlight dimming. If you want dimming, you should know that you can't really do dimming easily if you plug the screen directly to the shield. They wire the backlight directly to power, so it's not easy to intercept. I used a M/F 40 pin cable between the screen and shield instead, and then I just broke the LED backlight pin off on the male side of the cable so it never connected to the board.

From there I ran a separate jumper from the LED backlight pin on the display to a header pin that I mounted on the ElecFreaks shield. That header pin goes through a transistor and eventually do PWM pin 13 so I can control the backlight.

In the pic are 2 header pins at the bottom. One of the pins is for the backlight, and the other is only there because my cable is an IDE cable that doesn't have a pin in the middle, so I had to run it outside. On the back side of the board it jumpers to the missing pin. If you get a FULL 40 pin cable, this is unnecessary.

Here is what the shield looks like now:



Here is the display, you can see the 2 pins I've jumpered. They run to the two header pins seen in the picture above.

 
#74 ·
ALMOST THERE!

I'm getting close to finishing this beast. I'm going to post a few pics before I go to bed, and I can follow up with more details tomorrow.

I've finished building out my prototype board. This board will sandwich between the display board and the Arduino. It's wired *almost* the same as my initial diagram. I had to move a couple of pins, so I'll update the wiring diagram later. Here is the underside of the board:



Here it is stacked onto the Arduino. The board has the RTC and all of the external hookups. For making external connections, I decided to go with screw terminals since I had the space. All 8 relays, the temp sensor, both dosing pumps, the ambient light sensor, the IR led to control the lights, and the new CO2 pressure sensor all connect into the terminals. You can see the temp sensor and the ambient light sensor hooked up in this pic.



Here is the full stack with the modified display shield attached.



And here it is booted up!



So from here I basically have to mount everything into the box — boards, screen bezel, sensors, and all of that. It's still quite a bit of work left, but I'm getting close!!

I have to say I'm pretty stoked! :bounce:
 
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