I work in a Chemistry Lab and have zero background in electronics/electrical engineering. My aim is to better control and document the calibration of tests so, I wish to design a system in which user inputs a value to the system and the provided value of fluids flows out of the pipe. For the purpose; I imagine I would have to use a solenoid fluid control valve, a raspberry pi keyboard module with a display and a flowmeter to save the total fluid fed to the outlet in a file on the SD Card.
To this extent, I have a working setup to calculate total fluid outlet using the flowmeter and a separate setup to control a solenoid switch. But I do not know how to relate it. Because the level in the tank and thus pressure can't be pre-decided, I cannot just open the solenoid valve for an x amount of time to dose water to the system. I realize that I would have to control the valve somehow with the flowmeter where the flow sensor cuts off the solenoid at the value of user's input.
I want to know how many Raspberry PIs I need for the job. Since my sensor and solenoid valve both require a 5V pin and pi only has 1, I am confused and also, I want to know if I can control the solenoid valve with values from the flowmeter using the pi computer.