Need help for a project: monitoring aquarium water values and fertilization

Hello, my name is Christian Vari and I am an italian computer science student. I do not know if this is the right section to post. In the case I ask an admin to move the topic in the correct section.

I'm making a project to automatically measure the water values in the aquarium. In a second moment I would also like to add an automatic fertilization model based on the collected data. The idea is to take water from the aquarium, mix it with a few drops of colorimetric reagent and measure the value with a color sensor. Once the data are collected, they will be sent to a server that will analyze them and make graphs and suggest things to do if the values are not suited to an aquarium.

To do this I would like to use peristaltic pumps that are cheap and should be quite precise and to stir the solution a magnetic stirrer. The difficult thing will be to use a single tube to mix and different reagents with different peristaltic pumps without contaminating each other.

I would like to use a MEGA arduino and would like to write directly in C AVR without using the arduino IDE.

What do you think? In your opinion, is it feasible?

Thank you

What property of the water do you want to measure, exactly?

There may be easier ways than building an intricate robot to get your values.

Also here

AWOL:
Also here

yes, but it is a one years old thread... I opened a new one for this reason.

wvmarle:
What property of the water do you want to measure, exactly?

There may be easier ways than building an intricate robot to get your values.

I would like to measure nitrates, phosphates, carbonate hardness, total hardness, iron, potassium and ph.

pH can be done easily with a pH probe.

The others not - that's going to be a massive challenge to automate. There do exist some ion selective probes, but they're really expensive.

wvmarle:
pH can be done easily with a pH probe.

The others not - that's going to be a massive challenge to automate. There do exist some ion selective probes, but they're really expensive.

Yes, I know. For this reason i want to use colorimetric reagents. They are cheap and accurate for aquarist use.

Maybe I need something like this Stepper Motorized Micro Piston Pump - YouTube

In your opinion, why does it cost too much? High precision Stepper Motorized Micro Piston Pump - RobotDigg

I can use a sort of cnc in order to choose reagents… See the image

You still need a few more steps.
One step being where you place the cups in your colour sensor (this should be shielded from all ambient light, and have the cup placed between a light source and a detector in a way that the cup itself doesn't affect the measurement).
Another step where you empty the cup - in some kind of waste liquid container.
Then the step where you thoroughly clean and dry the cup to prepare for the next time use.

wvmarle:
You still need a few more steps.
One step being where you place the cups in your colour sensor (this should be shielded from all ambient light, and have the cup placed between a light source and a detector in a way that the cup itself doesn’t affect the measurement).
Another step where you empty the cup - in some kind of waste liquid container.
Then the step where you thoroughly clean and dry the cup to prepare for the next time use.

Thanks for the reply. I want to close all this machine in a box so ambient light isn’t a problem. The second two steps are simple, i can pump the liquid in the cup (around 10 ml) to a conteiner and do the same thing with a wash solution.

The problem is that the piston pump is very expensive and I will have the problem of the air in the tibe avery first time i active the machine. What do you think if i use a DC peristaltic pump and, flux sensor and a solenoid valve? I can activate the peristaltic pump, read the sensor and when the volume is reached i will close the valve.

How can i do the “cnc” to select reagents?

Sounds simple - may not be this simple.
You have to clean all liquid from the cup, not easy. You have to make sure that whatever you use for pumping does not affect the mixing or so of the new liquid. Getting rid of ALL liquid in the cup is another problem, but maybe using distilled water to rinse it is good enough. 10 ml is a small volume, and a small cup. It'll make the suction tubes look big.

Peristaltic pumps dispense a very exact volume per time, and due to their pumping method don't need solenoids. Getting flow sensors that can measure such small flows pumped at such an irregular rate may be really hard. Weighing the container is likely to be a better way of measuring the content.

But you have to fill your tubes with the liquid you want to measure! Running them backwards for a bit may not guarantee all old liquid is out, but then you have tubes full of air. Maybe you can compensate with timing.

christianvari:
How can i do the "cnc" to select reagents?

My thought is to have a row of nozzles one for each solution and each with it's own peristaltic pump to prevent cross contamination.

The cup would be mounted to a servo that will dump the contents into a funnel to a waste container. Place the rinse nozzle above the funnel so the cup can be overfilled for thorough rinsing.

The servo is mounted on a set of rails so it can move to position the cup under each nozzle and the sensor.

When not in use the servo can keep the cup upside down so it can dry.

christianvari:
Yes, I know. For this reason i want to use colorimetric reagents. They are cheap and accurate for aquarist use.

In order to accurately determine the color of the liquid, you need a light source that has a compatible range of wavelengths. Perhaps an argon lamp.

Paul

That's another thing indeed.
Those indicator liquids may work in two ways: either changing colour depending on the value measured (such as pH which goes from red to yellow to green to blue), or it changes colour depending on the amount of reagent added (usually from clear to a specific colour or the other way around).
I don't know which one will be harder to implement, really... An RGB colour sensor most likely won't do.

Hutkikz:
My thought is to have a row of nozzles one for each solution and each with it's own peristaltic pump to prevent cross contamination.

The cup would be mounted to a servo that will dump the contents into a funnel to a waste container. Place the rinse nozzle above the funnel so the cup can be overfilled for thorough rinsing.

The servo is mounted on a set of rails so it can move to position the cup under each nozzle and the sensor.

When not in use the servo can keep the cup upside down so it can dry.

thanks, but how can I dose the reagents with milliliter (or less) precision whit a peristaltic pump? It isn't so simple...

Paul_KD7HB:
In order to accurately determine the color of the liquid, you need a light source that has a compatible range of wavelengths. Perhaps an argon lamp.

Paul

Thanks for the reply. In your opinion, is it impossible with led light and a software calibration?

wvmarle:
That's another thing indeed.
Those indicator liquids may work in two ways: either changing colour depending on the value measured (such as pH which goes from red to yellow to green to blue), or it changes colour depending on the amount of reagent added (usually from clear to a specific colour or the other way around).
I don't know which one will be harder to implement, really... An RGB colour sensor most likely won't do.

yes, I have to implement both methods because I have to use both types of reagents. Why do you think it is not feasible to use a rgb sensor?

christianvari:
thanks, but how can I dose the reagents with milliliter (or less) precision whit a peristaltic pump? It isn't so simple...

Use a syringe with linear actuator.

Thanks for the reply. In your opinion, is it impossible with led light and a software calibration?

yes, I have to implement both methods because I have to use both types of reagents. Why do you think it is not feasible to use a rgb sensor?

Learn more about light.

There's more to it than the three colour bands an RGB sensor detects. You may be able to measure the colour using an AS7265x sensor array for the pH (but for that you should use a regular pH probe).

For the other reactions - the ones that go from clear to a specific colour and where you have to count drops to find the values - I guess the best bet is to figure out which wavelength they actually absorb, find a matching LED for each, and a regular light intensity sensor on the other side. Then there should be a significant drop in intensity the moment the colour changes.

wvmarle:
Use a syringe with linear actuator.

Yes, I prefer syringe to peristaltic pump.

Maybe I could make a rotating mechanism that exchanges the syringes of the various reagents on the same linear actuator. In this way I would avoid cross-contamination and use only two servomotors instead of 1 + # reagents.

wvmarle:
Learn more about light.

There’s more to it than the three colour bands an RGB sensor detects. You may be able to measure the colour using an AS7265x sensor array for the pH (but for that you should use a regular pH probe).

For the other reactions - the ones that go from clear to a specific colour and where you have to count drops to find the values - I guess the best bet is to figure out which wavelength they actually absorb, find a matching LED for each, and a regular light intensity sensor on the other side. Then there should be a significant drop in intensity the moment the colour changes.

I had not thought about it, it’s a good idea. I will ask a chemist for the absorption spectrum of the solutions.

If you lay out the requirements for each system, you might find that the answer presents itself.

for the perisolic pumps, the pump is fixed and you just connect your chemicals
for the hypodermic, you have to manually fill

another thing to test is the cross contanimation.
what is the exact result when you have a dirty vial and attempt to fill and take new readings?

if you have a vial, add reagent, add water, test and drain. your water/reagent mix might be 100:1
when you empty, your volume might go to 1%
your new batch would contain an existing solutin of 1% of volume that contains 1% of the other reagent.
it would be good to know if there was a complete invalidation of the new samples or if the old chemicals were so small as to have no detectable effect.

with my fish tanks, I would test, then empty the vial, then add more water and chemicals and test again. my level of precise was so sloppy, I did not know better, but had great results with the Fish.

Also, it seems that the measuring you propose will be in one unit with the stirrer and senors, and you dose with different reagents. the sensor station would be teh same no matter of your choise of dosing means.
it would seem that you can get 2 perisolitc pumps and start your testing and get results and as you go, make evaluations of the operation. it is hard to design out all the possible flaws before building and testing.

dave-in-nj:
If you lay out the requirements for each system, you might find that the answer presents itself.

for the perisolic pumps, the pump is fixed and you just connect your chemicals
for the hypodermic, you have to manually fill

another thing to test is the cross contanimation.
what is the exact result when you have a dirty vial and attempt to fill and take new readings?

if you have a vial, add reagent, add water, test and drain. your water/reagent mix might be 100:1
when you empty, your volume might go to 1%
your new batch would contain an existing solutin of 1% of volume that contains 1% of the other reagent.
it would be good to know if there was a complete invalidation of the new samples or if the old chemicals were so small as to have no detectable effect.

Thanks for the reply, a 1% contamination isn't a problem... I don't need to be so precise.

dave-in-nj:
with my fish tanks, I would test, then empty the vial, then add more water and chemicals and test again. my level of precise was so sloppy, I did not know better, but had great results with the Fish.

Also, it seems that the measuring you propose will be in one unit with the stirrer and senors, and you dose with different reagents. the sensor station would be teh same no matter of your choise of dosing means.
it would seem that you can get 2 perisolitc pumps and start your testing and get results and as you go, make evaluations of the operation. it is hard to design out all the possible flaws before building and testing.

Yes, I have ordered some pumps and sensors in order to do some test.

This popped up on my Hackster feed this morning, might be useful for you. It's interesting that "This code cycles through red, green, blue, and 'white' transmission" and reads 3 LDR's every time although they don't do anything with the raw data except print it.

Hutkikz:
This popped up on my Hackster feed this morning, might be useful for you. It’s interesting that “This code cycles through red, green, blue, and ‘white’ transmission” and reads 3 LDR’s every time although they don’t do anything with the raw data except print it.

https://www.hackster.io/ericlowe71/aquaneers-1de903?utm_campaign=new_projects&utm_content=6&utm_medium=email&utm_source=hackster&utm_term=project_name

Thank you for the link, it’s very interesting. I’m waiting for the material to arrive. I’ll keep you up-to-date.