Although this capacitive method is not fiber optical method, this might be useful.
- The valve "out" is closed and the valve "in" is opened and the fluid will be pumped into the tube.
- The capacitive sensor will be used to measure the water level in the tube.
- When the predetermined fluid level is reached, the valve "in" will be closed and the valve "out" will be opened and the predetermined fluid volume will flow out.
The capacitive sensor is based on a precision capacitance sensor (for example, capacitance sensors from TI as LaserSteve suggested). The capacitance sensor is used as follows:
- When the tube is empty, the sensor's capacitance is very low.
- When the fluid level reaches the bottom of the sensor, the sensor's capacitance starts increasing. When the fluid level has reached this point, the pump rate can be decreased if needed. This can be use also to monitor the pump health as the fluid should reach this level in a certain time window.
- When the fluid level reaches the top of the capacitance sensor, its capacitance will stop changing: This is the detection level that the tube is full.**
Now, you just need to adjust the tube's diameter and the capacitive sensor so that the water level tolerance is sufficient for you application. You could form the tube so that it is fatter at the bottom, and it will much narrower at the top in order to get high measurement accuracy and resolution.
** This is quite different from determining the fluid level as a function of capacitance: This is not dependent of the actual sensor capacitance or absolute accuracy of the sensor capacitance, but only the change of the measured capacitance. It is very easy to measure the change of the sensor capacitance even if the fluid has different properties or the properties of the capacitance sensor changes in time.