Automatic Chilled Feeding Doser (Reef-Pi - Raspberry Pi)

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
Firstly, a huge thank you to @Ranjib and the other guys on the main Reef-Pi thread. I had dabbled with Linux a very small amount in the past but had even held a soldering iron until this project!

Yet, with the guides and some advice within the thread, I have been able to cobble together a Raspberry Pi which is currently powered via a 12v plug, barrel connection, voltage stepper and HAT; half of which is completely new to me.

Right! To the point of this...

I have a reef tank which has been up and running for almost a year now. It's a 6x2x2ft aquarium and is doing very well (touch wood) as I hone in the stability via various pieces of automation and frequent personal care by me.

However, I leave the house at 7am each morning for work and return home at 6pm and, with the exception of a flake auto-feeder, the fish do not get any food basically all day. I have anthias in my tank and the first drive towards an idea of a continual feeder of defrosted, chilled food-cubes was with the aim of feeding them throughout the day.

This idea has of course been done by many reefers in many different ways; but my method will be via a Reef-Pi controlled dosing pump and an electric wine cooler.

Current Situation
I have soldered all the parts as per Guide 7 of the reef-pi series with one exception: I have not soldered the Pi to the HAT. This was just in case I hadn't soldered the HAT properly so, for testing, I just have the two slotted together and it seems to work as the Pi is fully powered and working (I can access the desktop and reef-pi GUI).

Problem
The dosing pump seems to turn on and off based on the slightest physical movement instead of any command. Presumably because of the way the HAT is connected to the Pi, right? But how do I know I did all the soldering correctly before committing to soldering the all the little connectors? As mentioned, I'm new to soldering so having to UN-solder all of this would be a nightmare!

Also, via the reef-pi GUI, it seems that I cannot control the pump via the calibration menu. I press Run but nothing happens even though the pump obviously has power.

There is only one pump connected at the moment and I believe it is Pump 1

I have attached screenshots of everything. I hope you can help!

Thank you
Scott

20190125_211706.jpg 20190125_211716.jpg 20190125_211729.jpg

Screenshot_20190125-213553_Chrome.jpg 20190125_213634.jpg
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,077
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
This is awesome. Thank you for trying reef-pi and sharing your experience using it to automate one of the most common chores. I know anthias are demanding and this is exactly the sort of this the reef-pi should help you with.
Now, coming back to the problems
1) You should never solder the hat with the pi. You should solder a header with the HAT, that will allow you to secure the hat on pi, but you can remove it from pi easily when needed, since its press fit. This should address your random pump being turn on problem as well ( as I suspect thats coming from loose connection)
2310-09.jpg


2) Dont worry too much about the wiring. Make sure you understand it and test it (continuity) after you solder it. If you do mistake, you can remove and resolder, these perma proto hats are not like ordinary perf boards, they can withstand multiple soldering/de-soldering. It will be some work, but it will be fine.
Godspeed and keep us posted.
 
OP
OP
ScottF83

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
This is awesome. Thank you for trying reef-pi and sharing your experience using it to automate one of the most common chores. I know anthias are demanding and this is exactly the sort of this the reef-pi should help you with.
Now, coming back to the problems
1) You should never solder the hat with the pi. You should solder a header with the HAT, that will allow you to secure the hat on pi, but you can remove it from pi easily when needed, since its press fit. This should address your random pump being turn on problem as well ( as I suspect thats coming from loose connection)
2310-09.jpg


2) Dont worry too much about the wiring. Make sure you understand it and test it (continuity) after you solder it. If you do mistake, you can remove and resolder, these perma proto hats are not like ordinary perf boards, they can withstand multiple soldering/de-soldering. It will be some work, but it will be fine.
Godspeed and keep us posted.
I'm very happy you are as enthusiastic about this use of reef-pi as I am!

Thank you for the tips. I absolutely see what you mean now, so obvious after looking again. That is the trouble with being new to electronics :) miss the obvious

I will solder that connector to the HAT tomorrow hopefully and feedback on the result
 
OP
OP
ScottF83

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
I soldered the connector this evening and connected it all up. Pleased to report that the pump is now behaving as expected!

So the next step will be to calibrate the pump and house it in a project box.

In the meantime, could you advise me on the setup required in reef-pi to perform the following (using example figures only):

1. Dose 10ml forwards into the tank every 30 minutes

2. After the time needed to dose forwards the 10ml, reverse direction of the pump to return any liquid in the line back to the dosing container. Perhaps a little longer than step 1 to ensure all liquid is returned.

3. The dosing container is sat within an electric wine bottle cooler so the container is filled with RODI water and defrosted cubes of food which won't spoil

4. Go to '1'


Many thanks!
Scott
 
OP
OP
ScottF83

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
I've managed to calibrate it. I will of course need to adjust this once the unit is in its new home under the tank, but it's good to know everything is working as expected

Any chance of help on the macro required? :)

Thanks
 
OP
OP
ScottF83

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
I've been trying to solve this myself but running into some issues...

Each pump can only be set to a single time of day and cannot specify the output/direction in the setup.

The macro can change the output/direction but the pump stage of the macro still relies on the originally set single time of day.

Is the solution to have 24 virtual pumps (to accommodate a once per hour foward feed and a once per hour post-feed reversal), use the macro to switch the direction but somehow calculate the required wait times in between?

E. G.

Pump 1 set to 1pm for twenty seconds to dose the food

Macro activates to switch the direction and enters a Wait period of x seconds

Pump 2 activates in reverse mode due to the above to clear the line back into container

Wait period expires and macro sets back to forward mode and enters a new wait period for the remainder required to reach 2pm + 20 seconds

Repeat



Is that the only way to do this?
And how do you make macro repeat? I only seem to be able to manually run once
Would I be better doing this via a python script instead?

Many thanks
Scott
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,847
Reaction score
17,077
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Can you share a photo of your build with the pumps. I am not sure I understand the setup with two pumps, I was expecting the same pump will run forward and then backward.

So, if you have two pumps, then I am assuming you dont have to switch on/off outlets to control their direction on demand. You can just hardwire them to be in particular direction (forward or reverse), always. Assuming such a setup, all you need is two dosing schedule, something like this:
Screen Shot 2019-02-01 at 6.06.37 PM.png

the first schedule will turn on pump 1 (assuming its wired in forward direction) after every 30 minutes at 1st second, and run it for 10 seconds. The second schedule will run the second pump (assuming its wired in reverse direction) after every 30 minutes at 40th second (almost 30 second after the first pump is stopped) for 15 second. Adjust the speed as per your calibration
 
OP
OP
ScottF83

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
Thank you for your reply

The setup is just one pump using the 5 and 22 pins and jack 1

3de95232fef6665df5254bf4f4772291.jpg
 
OP
OP
ScottF83

ScottF83

Community Member
View Badges
Joined
Apr 15, 2016
Messages
72
Reaction score
80
Rating - 0%
0   0   0
https://www.instructables.com/id/DC-Motor-Control-With-Raspberry-Pi-and-L293D/

Using this link, I was able to figure out the pins used and write a simple python script to do the same thing.

Hopefully we can solve it with reef-pi but maybe this is a way of doing it until you've had time to incorporate it into reef-pi?

I'm having trouble with the sleep function (seems to go on longer than the code states) but I'll work it out :)
 

How much do you care about having a display FREE of wires, pumps and equipment?

  • Want it squeaky clean! Wires be danged!

    Votes: 78 45.1%
  • A few things are ok with me!

    Votes: 79 45.7%
  • No care at all! Bring it on!

    Votes: 16 9.2%
Back
Top