# DIY dosing



## keano (3 Sep 2018)

Has anyone had any luck with DIY dosing with Rasberry Pi or Arduino ?

using a small dosing pump like this:

https://www.amazon.co.uk/dp/B017NFF...&pd_rd_r=b8711c34-af8d-11e8-8dbb-41abd883f66d


----------



## papa_c (3 Sep 2018)

I use similar but rated at 5v got them off eBay.


----------



## ian_m (4 Sep 2018)

The proper "big boy dosing" peristaltic pumps are these. Available in a whole range of dosing rates from less than 1ml per minute to over 10ml per minute.

http://www.williamson-shop.co.uk/

I used these in this.
https://www.ukaps.org/forum/threads/diy-dual-peristaltic-dosing-pump-with-alternate-switching.22332/

Just connect these to a mains timer running for a couple of minutes a day, rather than over complicating and reliability reducing using a hobby CPU board.

I have had mine since 2012 and work fine.

Then of course control using proper industrial rated PLC.
https://www.ukaps.org/forum/threads/how-to-use-a-plc-to-control-your-fish-tank.42993/

Not sure many people have achieved 100% reliability of fish tank controllers using Raspberry/Pi Arduino. At work I have used the industrial rated Raspberry Pi CM3 module, much better reliability hardware wise, that standard Raspberry Pi,  and much better software reliability wise using the commercial Kiel compilers. I wouldn't really recommend it for controlling peristaltic pumps, a lot of hardware, no real time clock, mains relay interface boards required, a lot of software required when in fact all could be done using a cheap (but reliable) mains timer.


----------



## markk (4 Sep 2018)

keano said:


> Has anyone had any luck with DIY dosing with Rasberry Pi or Arduino ?
> 
> using a small dosing pump like this:
> 
> https://www.amazon.co.uk/dp/B017NFF...&pd_rd_r=b8711c34-af8d-11e8-8dbb-41abd883f66d



Short answer - yes. Perfectly feasible with either an Arduino or Pi and I've had 2 similar 12v dosing pumps running for about 3 years.

Long answer...

As Ian said, if all you want to do is run a couple of pumps then the simplest solution is a timer - assuming the flow rate on the pump is suitable for the timer on/off internal and the amount you need to dose. No point in running a pump for 10 minutes if it is going to dose well over your needs.

Again, if you just want to run the dosing pumps, and not do anything else, then an Arduino is well suited. You'll need to add a Real Time Clock and a small motor driver board (both a few quid on ebay). Simplest approach again is to use 5v pumps and power the drivers and Arduino from a sufficiently powerful 5v supply. If using 12v pumps then use a 12volt supply and then UBECs (Universal Battery Elimination Circuit) used for RC cars/drones are cheap and reliable (probably about £5) - and will give you 5v for the Arduino. For bonus functionality add in a button to manually override the pump control - useful when you need to prime the pump.

If you want to do a little more than pumps, then the Pi is a better bet. I use them on all my tanks - my main planted tank has been up and running for over 3 years now with the same original Pi Model B. Reliability hasn't been an issue - the only thing you need to be wary of is powering it off without warning which is a known issue and will corrupt the SD card at some point.

On my main tank, the Pi controls the LEDs, CO2, dosing pumps, monitors temperatures (tank, case and LEDs) and can cut off the heater in the event of a failure. All monitored via a web interface. Other tanks mostly just LED control, temperature monitoring and alarms/logging - all using Pi Zero's. No need for mains control if you keep it all low voltage - although I do have a physically separated and isolated mains relay box for the CO2 and heater cut off.

The software is an ongoing project of mine (just in the process of adding streaming camera with the Pi camera)

https://github.com/mark-kendall/torc

but there are a thousand and one different home automation projects out there.

Regards
Mark


----------



## rebel (5 Sep 2018)

@markk , That's a fascinating project. Do you have any hardware schematics for the Pi, relays and your sensors etc?


----------



## papa_c (5 Sep 2018)

ian_m said:


> Not sure many people have achieved 100% reliability of fish tank controllers using Raspberry/Pi



Perhaps my set up is slightly more than a DIY solution, I'll pull together a complete post on it, it been running my tank for the last year via a rPi3, includes temparature control, dosing control, pH monitoring. Scheduled via Cron jobs, Writes to my home Server 2016 to SQL database, realtime tank status and ph profile on home hosted website, with web access and control over RESTful API's allowing manual switching of CO2 and lights.

Example of my web front end is in the image




 

 
Just a little project to keep me occupied between jobs!


----------



## keano (6 Sep 2018)

ian_m said:


> The proper "big boy dosing" peristaltic pumps are these. Available in a whole range of dosing rates from less than 1ml per minute to over 10ml per minute.
> 
> http://www.williamson-shop.co.uk/
> 
> ...



WOW amazing thanks Ian, and all the other replies. I'm going to do some research this weekend and i think, with a  baby on the way i'm trying to look for ways to mitagate against jobs that can be automated!


----------



## ian_m (6 Sep 2018)

keano said:


> WOW amazing thanks Ian, and all the other replies. I'm going to do some research this weekend and i think, with a baby on the way i'm trying to look for ways to mitagate against jobs that can be automated!


I first built my dosing pumps in 2012 as I was going away for 3 weeks to Disney, Florida, which meant tank would probably be unattended for 5 weeks, week before, 3 weeks away and 1 week after I got back.

The pumps were initially wired up to two B&Q mains timers one set for Mon, Wed and Fri and other set for Tues, Thu and Sat to dose macro and micro alternate days.

I then built the alternate dosing circuit so that only one mains lead and one timer was required.

Yes I would agree automate as much as possible, if you can, especially if you have a family taking your time away from your tanks...


----------



## keano (6 Sep 2018)

Think ill go with some 4 roller pumps and just some amazon digital mains timer sockets same as i use fo rlights and CO2 they've been bulletproof for years.

As a mechanical Engineer electrics are voodoo magic to me! So i'll be using a KISS approach.

Im presuming I can either buy 240VAC pumps or get 12V and a transformer, got a spare from an old solenoid from my CO2 Reg somewhere.

In terms of head, can the smaller RPM DC pumps cope with the metre and half / two metres head from floor to lid?

The williamsons pumps are steep at 50 quid a pop and a look on the RS website theyre silly money.


----------



## ian_m (6 Sep 2018)

keano said:


> In terms of head, can the smaller RPM DC pumps cope with the metre and half / two metres head from floor to lid?


Easily. I think are rated to 5m head or more.

Just make sure you try and get the ones with the largest tube (3mm ?) as tube less prone to damage & blocking and has longer life.


----------



## keano (6 Sep 2018)

just looking into the rasberry pi and the posibility is endless. with water sensors you could automate a water change


----------



## lazybones51 (6 Sep 2018)

keano said:


> just looking into the rasberry pi and the posibility is endless. with water sensors you could automate a water change


I'm using a Rasberry Pi running Reef Pi without any issues. Currently controlling lighting and will be implementing auto-dosing when I get around to it.


----------



## ian_m (6 Sep 2018)

keano said:


> just looking into the rasberry pi and the posibility is endless. with water sensors you could automate a water change


You can, but changing water is only half the required maintenance. What about vacuuming up the settled detritus, wafting detritus off the plant leaves, trimming plants, removing dropped leaves from filter inlets etc etc.

My 50% water change is very quick (20 mins for warmed water) but it is the other require faffing and maintenance that takes time.

Someone did build a large tank at his work that slid a series of water jets along the length of the tank to waft the detritus into the water to be filtered away before automatically changing 50% of the water. Still needed to trim plants and removed the missed detritus though.


----------



## keano (7 Sep 2018)

oh im not trying to make it maintenace free but every other water change perhaps just ideas at moment.

Im ordering an arduino anyway and some small DC peristaltic pumps to have a play with the dosing and lights / co2. I know my mains timers work, but thats easy and less fun!


----------



## Harry H (7 Sep 2018)

papa_cee said:


> I'll pull together a complete post on it, it been running my tank for the last year via a rPi3, includes temparature control, dosing control, pH monitoring. Scheduled via Cron jobs, Writes to my home Server 2016 to SQL database, realtime tank status and ph profile on home hosted website, with web access and control over RESTful API's allowing manual switching of CO2 and lights.



Looking forward to reading your post, My Pi3 still sitting in drawer, waiting for that opportunity. Did you code the software yourself? Sounds like you have dev back ground, RESTful API's may not make much sense to others


----------



## keano (10 Sep 2018)

Harry H said:


> Looking forward to reading your post, My Pi3 still sitting in drawer, waiting for that opportunity. Did you code the software yourself? Sounds like you have dev back ground, RESTful API's may not make much sense to others


I'll look forward to the English version.


----------

