Hi guys,
I'm looking for some guidance to reach my end goal of programming an Arduino. I have spent some time on the Arduino site and YouTube watching tutorials and am still struggling to piece my plan all together. Any assistance or advise would be greatly appreciated.
Project:
Liquid chemical nutrient dosing of a water tank using peristaltic pumps. This is for a plant watering system.
There is 1 digital input for pump calibration.
There are 2 user selectable analogue inputs:
- the tank mix volume (10L, 20L, 30L, 40L, or 50L).
- the week of the grow cycle, which will determine the chemicals required
(Vegetative week 1, Vegetative week 2, Vegetative week 3, Flowering week 1,
Flowering week 2, Flowering week 3, Flowering week 4, Flowering week 5,
Flowering week 6, Flowering week 7, and Flushing.
Control method for analogue inputs - I was thinking of using a 5-position and an 11-position rotary selector switch to accomplish this. Each rotary switch would be connected to its own Analogue input. Then each position of the selector would have a different resistance value in series before returning the circuit to the input.
There are 6 outputs:
- peristaltic pump 1
- peristaltic pump 2
- peristaltic pump 3
- peristaltic pump 4
- peristaltic pump 5
- peristaltic pump 6
Control method - Each pump requires 12VDC to operate. I will use a separate 12VDC power supply capable of running all 6 pumps simultaneously, without being affected by voltage drop of the pump start up. Each Arduino output will switch its pump through a transistor with a fly-back diode over the motor terminals.
Table for nutrient dosing by week:
|V1|V2|V3|F1|F2|F3|F4|F5 |F6 |F7 |FLU|
|pump1 |5 |10|20|20|15|15|15|15|15 |15 |0 |
|pump2 |5 |10|20|20|15|15|15|15|15 |15 |0 |
|pump3 |10|20|20|0 |0 |20|20|20|20 |20 |0 |
|pump4 |0 |0 |20|20|20|20|20|20|20 |20 |20 |
|pump5 |0 |0 |0 |0 |50|50|50|50|50 |50 |0 |
|pump6 |0 |0 |0 |15|15|15|15|15|15 |15 |15 |
The table values represent a 'standard' 10 litre mix. Changing the input tank mix volume will multiply these figures accordingly.
Each value in the table is milliliters. I also need to calibrate each peristaltic pump to ensure the correct dose is administered. I need 1 digital input called PumpCal with another transistor switching a pump. The pump calibrate feature will run the peristaltic pump for 60 seconds and a known volume can be measured. Then I can test each pump prior to final installation and adjust the run timer to match the desired 10 litre mix output in the table. Additional benefit is any future pump, of any brand can be integrated by simply running a pump calibration prior to final installation.
I really need some guidance as to where to find sample code for the different aspects to achieve the above and I will try to piece it all together.
As I said earlier any help would be greatly appreciated!
Regards