Aquarium controller - Choosing hardware

Hi, New to this forum and never even heard about Arduino until about 2 weeks ago. About me and my project: I'm a sailor with a passion about aquariums, but it's difficult to combine my work with my hobby, since I'm away from home every other month. My girlfriend does sadly not share my passion, and will not be able to do anything except feed my fish from time to time, which leaves everything else untouched for a month at a time. By everything else I mean water change, testing the water quality, dosing CO2 and other fertilizers, monitoring pH value, controlling lights and temperature and probably a bit more. Basically I want to ask for some advice about choosing the right board/option for me.

What I will need to control: Around 14-15 servos, this might become higher with time... Around 2-3 x Stepper motors Around 6 relays for switching 220 Volt 1 x Color sensor (for determining value of different tests) 2 x Float switches (for sensing water level) 3-4 x Optical sensors (for counting drops of falling liquid) 1 x TFT screen (TFT01 3.2”) 1 x Temperature sensor (waterproof) 1 x pH electrode 1 x RCT time module 1 x Ethernet module and maybe some cameras because it's possible :-)

So, about the Arduino board. From that I can see from the list above, it's a hell of a lot of connections. I understand that I can't control everything just from the Arduino board, but will need some controller boards and of course more power that the Arduino board can supply, so no problem there. What I'm worried about the the number of connections, which I think is more than even the Mega 2560 can handle. So what can I do? Will the Mega together with the Mux Shield (don't understand very well how it works though) be a good option? Or will I be better of with combining 2 or more Mega boards in a master/slave configuration? Any advice will much appreciated.

Kind regards Hans Jakup

Servos need timers. There are limited numbers of timers available, and a limit to how many servos a timer can operate.

Fourteen plus servos is going to require a Mega at least.

What are all these servos going to be doing?

and maybe some cameras because it’s possible :slight_smile:

Are you sure about that?

What are these cameras going to be doing? Not sending data to the Arduino, at any kind of meaningful frame rate, and certainly NOT for the purposes of the Arduino as server serving up the video feed.

Hi Paul and many thanks for your reply. Most of the servos will be used to open and close valves (individually) like this one: A lot cheaper than getting 10 or more solenoid valves, I guess. Other servos will lower and lift the overflow pipe, to control water exit the aquarium. The cameras, if possible, will be for sending static images to a web-server. This is so I can manually double check the water tests, and maybe monitor plant and algae growth. I'm only talking about 10 images or so every day. When I'm at sea, I'm on a horrible satellite internet connection, so I don't even want to bother with streaming video. Hans Jakup

I ran into a thing called "IO Expansion Shield For Arduino(V5)" http://www.dfrobot.com/wiki/index.php?title=IO_Expansion_Shield_For_Arduino(V5)_(SKU:_DFR0088) From what I can see it can operate up till 13 servos, which is enough for me to get started at least, but I can't find much information on this shield. And almost all the links I find on the net seem to return to the link above... Does anybody here have experience with it? Will it allow me to operate 13 servos individually? The servos in question are the 9G Micro-Servo. http://www.dfrobot.com/wiki/index.php/9g_micro_servo_(1.6kg)_(SKU:SER0006)

OK, getting a bit closer to order all the stuff I will need for this project, but I'm still in doubt what I should get? I made a little sketch, trying to imagine how it will appear. So, how will I best approach this? Do you guys think that I will be able to connect everything to a Arduino Mega board, or will I need 2 in a Master/Slave setup? I/O Expansion shield? As far as I understand, the screen uses a hell of a lot of pins (40 to operate the screen, touch and SD card), so maybe a dedicated Mega or Uno to control the screen in slave mode? I don't want to save a few euros and complicate things unnecessarily, as this project will probably end up costing 5-600 euros anyway. I will need to buy everything, even a soldering kit. So, again, any input is much appreciated. Regards Hans Jakup

Maybe a remote control girlfriend control would be cheaper? :)

If you need to see whats happening from anywhere in the world, I would consider an IP camera like one of these http://www.amazon.co.uk/webcam-Internet-infrated-Nightview-Wireless/dp/B003VUY5PW/ref=tag_stp_s2_edpp_url

That IO Expansion Shield has no active components (except the 485 transceiver) so it can't drive any more servos than the Arduino it's plugged into.


Rob

Just a word of caution, if you plan on driving more than 1 servo at a time, from the product page it says they draw 500mA which is around what most DC wall adapters for arduino's are. I would suggest using a series of relays to drive each servo, with a wall adapter of more than enough amperage for how many servos you plan to have on aat one time.

Also I really like your idea for servos and valves instead of solenoid valves. Im making a bar that requires about 8 solenoids and this seems to be the cheaper method. :) BTW, if you have access to a laser cutter these pinch valves with those servos might be better for your case (low psi): http://www.thingiverse.com/thing:12311

Do those pinch valves require constant pressure to shut off or do they go over centre and latch?


Rob

They require constant pressure (no latch) so they would be normally open.

Lakes: Maybe a remote control girlfriend control would be cheaper? :)

Maybe :) but she also has a silly job where she is out of the country for a few weeks from time to time.

Graynomad: That IO Expansion Shield has no active components (except the 485 transceiver) so it can't drive any more servos than the Arduino it's plugged into.

So for running a bunch of servos, I don't need such a thing? Just a control wire to the Arduino and some external power, and I'm good?

brettzky10: Just a word of caution, if you plan on driving more than 1 servo at a time, from the product page it says they draw 500mA which is around what most DC wall adapters for arduino's are. I would suggest using a series of relays to drive each servo, with a wall adapter of more than enough amperage for how many servos you plan to have on aat one time.

No worries there. I will only be running a single servo at a time.

brettzky10: Also I really like your idea for servos and valves instead of solenoid valves. Im making a bar that requires about 8 solenoids and this seems to be the cheaper method. :) BTW, if you have access to a laser cutter these pinch valves with those servos might be better for your case (low psi):

Hehe, thank you :) I was pretty proud of that idea also. Those small solenoids are pretty expensive, so I needed another solution, and so far it's the best I can come up with. Sadly I don't have access to a laser cutter, so that option is out of the question. Still I think that the valve is a better option for me, as I need to be able to open if very slightly so the fluid is only dripping at a rate of about 1 drop every 4-5 seconds.

Jensen_HJ:

Graynomad: That IO Expansion Shield has no active components (except the 485 transceiver) so it can't drive any more servos than the Arduino it's plugged into.

So for running a bunch of servos, I don't need such a thing? Just a control wire to the Arduino and some external power, and I'm good?

Correct, although there's certainly value in having a shield that you can directly plug servos into without having to do custom wiring.

You might want to look into the Maestro line of servo controllers if you're simply looking to increase the number of servo outputs. They can be controlled directly from the computer (USB) or from the Arduino (serial) and are daisy-chainable. The jacks are set up so you can drive the servos with external power just by changing a jumper.

Hans, are you familiar with the Tom's Aqualifter? It's an inexpensive diaphragm pump that can handle most aquaria-related liquids (so, maybe not battery acid). I use an Aqualifter on my saltwater coral reef tank, been working great for over a year now. It's not as precise as, say, a worm-drive doser pump, but if your source reservoir is wide and shallow so the "head" pressure doesn't change a lot, you can get a somewhat consistent output rate (and you can use an IV-type pinch clamp or an inline airline valve to slow it down).

The nice thing about these pumps is they only draw a couple watts so you can control them with small, inexpensive relays -- and relays are easier to add to an Arduino than servos. For example, you can use inexpensive SIPO shift registers, and daisy-chain them for dozens of relay outputs, even from an ordinary Uno. And, you can get 1-, 2-, 4-, and 8-relay modules from China so cheaply that IMHO it's not worth the effort to build your own transistor+diode+relay circuits.

Just a thought.

Chagrin: You might want to look into the Maestro line of servo controllers if you're simply looking to increase the number of servo outputs. They can be controlled directly from the computer (USB) or from the Arduino (serial) and are daisy-chainable. The jacks are set up so you can drive the servos with external power just by changing a jumper.

That is indeed something that I could use, but ordering from several places will just kill my budget due to shipping costs (32$ shipping for one board with FedEx). Anyway it's a clever device, and if I do run into unsolvable problems I will absolutely be looking for that thing. For that price, board + shipping I could just order an extra Arduino Mega 2560 and try to play with some Master/Slave setup. As far as I can see my main problem is that I really want to have the 3.2" TFT with Touch and crap, and it really eats a lot of pins (40 if I'm correct), so I will probably run into problems sooner or later anyway. For expanding the numbers of pins, I read somewhere that I could use something like a 74HC595, but I'm still searching for additional information or better a tutorial, but so far to no prevail.

tylernt: Hans, are you familiar with the Tom's Aqualifter?

Yes, I'm familiar with that pump, but as far as I remember it does not run on 220V, so It's not possible here in Europe.

tylernt: And, you can get 1-, 2-, 4-, and 8-relay modules from China so cheaply that IMHO it's not worth the effort to build your own transistor+diode+relay circuits.

Yes, I have seen those, and I will probably place my (enormous) order of bits and bobs in China. Stumbled upon this one: 8-Channel Relay Module Shield. Does anyone here have experience with that (ElectroDragon) company. Their prices are unbelievable!

Jensen_HJ:
For expanding the numbers of pins, I read somewhere that I could use something like a 74HC595, but I’m still searching for additional information or better a tutorial, but so far to no prevail.

Check out the Shifter library:

http://bildr.org/2011/02/74hc595/
http://bildr.org/2011/08/74hc595-breakout-arduino/

Jensen_HJ:
Yes, I’m familiar with that pump, but as far as I remember it does not run on 220V, so It’s not possible here in Europe.

I’m sure you can get an inexpensive 240VAC → 120VAC converter from one of those Chinese websites… should only need 1 converter for a bunch of Aqualifters, as they are only about 3W each.

Converter or no, as always, use caution when dealing with mains voltage due to the risk of death or fire.

3.2" TFT with Touch and crap, and it really eats a lot of pins (40 if I'm correct)

Try 2-3 pins.

http://www.4dsystems.com.au/prod.php?id=91 http://www.4dsystems.com.au/prod.php?id=113

And they have others, their new one is 4.3"

http://www.4dsystems.com.au/prod.php?id=156


Rob

tylernt:
bildr Can you move over? The 74HC595 8 bit shift register - bildr
bildr Arduino: Individually Control Shift Register Pins - bildr

Thank you for those links, I will have a look at them a bit later.

tylernt:
I’m sure you can get an inexpensive 240VAC → 120VAC converter from one of those Chinese websites… should only need 1 converter for a bunch of Aqualifters, as they are only about 3W each.

That is a good idea and maybe I will have a better look into that when I reach the part of dosing mikro, makro and other fertilizers to the aquarium.
For now I don’t need them since the reservoirs with testing liquid will only be about 20 ml, so I think a gravity fed system is better here. For dosing I would like to get some “real” dosing pumps, but they are just too expensive (almost 300 Euro for a three channel one). So I thought about another system for that. A small pump (ie the Tom’s Aqualifter) to pump liquid to a small chamber (ie a syringe). Close the tip with a servo operated valve (as I mentioned before) and poke a hole at the desired height (ie 10 ml), insert a silicone hose to work as overflow back into the reservoir. That way there is not so much control needed for dosing a bit larger quantities. Same principal as I have planned for feeding water for testing from the aquarium (see attached image. Sorry for the bad Excel graphics…) And then just repeating the process until the desired quantity of fertilizer is delivered.
Only the dripping of testing liquid is a bit crucial.

Graynomad:
Try 2-3 pins.
And they have others, their new one is 4.3"

I saw them before, but did not pay any attention since there are a lot of cheaper alternatives. Now I see the advantages, thank you for pointing that out for me.
A bit tempted by the 4.3". The resolution is quite a lot higher than on the 3.2", so may I ask how it performs compared to the smaller one? I’m currently on the sea, and the internet here is hopeless (128 kBit shared between 15 PC’s + iPad’s + Phones…) so searching and watching YouTube videos from here is not possible.
Thank you for the help so far guys.

Ah, you're testing rather than dosing. Your system from page 1 is quite ingenious. I approve. 8)

To save on servos, you could have just two on your "trolley"... one to extend a manipulator, the other to rotate the manipulator. The manipulator would, of course, open and close the valve it was positioned in front of.

Thank you 8) Testing is only a part of the planned setup, but it will probably be that hardest part to get working. Other functions will (hopefully) be: Changing water, controlling the CO2 system (based on pH and KH readings), lights, temperature, osmosis, feeding, UV lights and what else I can think of...

I like your idea of saving servos very much. Maybe another stepper motor "trolley" on the first "trolley", moving a servo with a little "fork" on the arm. Will have to think about that a bit :) I could probably save about 8 servos or so in the finished setup.

Jensen_HJ: I like your idea of saving servos very much. Maybe another stepper motor "trolley" on the first "trolley", moving a servo with a little "fork" on the arm. Will have to think about that a bit :) I could probably save about 8 servos or so in the finished setup.

Along those lines I wonder if a poultry nipple would work better. A poultry nipple is a little $2 valve that chickens peck at to get a drop of water (see youtube for examples). Obviously it would be much simpler pushing the nipple with a servo rather than turning a valve. It's a lot more fun pushing nipples too.