Controlling the speed and direction of a DC motor programatically

I was wondering if it would be possible to control the speed and direction of a 12v DC motor with out the need of user interaction. In the project I am working on I require 3 12v pumps, and I need each to pump varying amounts of liquid. How would I go about doing this? Thank you.

I am trying to automate a small living fish tank I have, but some of the supplements that I need to add, I only need a few drops at a time. The pumps are rated for 20-60 ml/min so what I really want to do is just slow the pump as much as possible and do a little bit of experimentation in terms of how long the pump should be on. Would this be a viable, accurate, option? After the liquid is pumped, I would like to reverse the direction of the pump and any liquid in the line to the container they are stored in. I’ve been looking that an H bridge could be an option, but all I can find is ones with user interaction per a button. I want to incorporate a DS1307 RTC in order to keep the nutrients on a weekly and bi weekly schedule. Thank you for reading.

Measure the output of each pump versus time and use that information to energize the pumps for a specified time to transfer the volume required. Install flow meters and use them to set the volume transferred. Use tank level sensors. Use float switches. What, specifically, are you trying to do?

The answer is almost certainly yes, but you need to specify what conditions are supposed to cause the pumps to operate.

marshalladam: How would I go about doing this?

Understand what control algorithm you want to implement i.e. whether the motor speed is to be controlled by feedback from some sensor, simply by elapsed time, or some other criteria.

Set up the hardware to power and control the motor and write a simple sketch that carries out a simple sequence of motor actions to confirm you know how to control the motor.

Set up the hardware for any sensors you need and write a simple sketch that demonstrates you're capable of reading data from those sensors and get the results you expect.

Write the code which implements your chosen control algorithm to control the motor based on whatever inputs it needs.

Test, fix, repeat as necessary until it is good enough for your needs.

DS1307 is well-known for poor accuracy. Use a DS3231, it's far better and still uses the same library.