Tutorial: Closed Loop Volume Controller Using Liquid Flow Sensors and Arduino
Quick Start Guide
Summary
This quick start guide is aimed at customers who have worked with our Liquid Flow Meter Kits and are evaluating Sensirion liquid flow sensors in a prototyping scenario. It demonstrates the Sensirion Liquid Flow Damping Kit and how it can be used with a pulsating pump and the SLF3x to achieve a stable dispense volume.
What you need
- SLF3S-1300F liquid flow sensor
- Sensirion Liquid Flow Damping Kit
- Arduino UNO
- Arduino motor Shield
- Power supply or battery for the pump
- A pulsating pump that can deliver flow rates in the 0-40 ml/min range (for example a peristaltic pump as it is used in this example.
- Tubing to connect the pump
What you have to do
- To assemble the fluidic line, follow the instructions of the Damping Kit
- To connect the SLF3x liquid flow sensor, use a multiplexer. You can follow these instructions (link). Optionally, it is also possible to only use a level shifter, however, this requires slight changes on the sample Code
- To use I2C and the LCD Keypad Shield and the Motor Shield stacked onto of each other, it is necessary to disable the break B and current sensing 0 by cutting the respective jumpers on the back side of the motor shield.
- Follow the instructions in the tutorial (link to multiple SF06) and make sure that the communication with the sensor is working properly.

Running the setup
If the communication with the SLF3x can be established, the startup screen will show.

Next it will request the target volume to be set. Use the up/down arrows for 1 ml increments and the left/right arrows for 10 ul increments. In this example, we choose 200 ul. Once you have set the desired volume, choose select to continue to the dosing menu.

The first row shows the set target volume and the second row shows the sensed volume.

Depending on the volume in your tubing, it will take a while to prime the line. Once the liquid has reached the sensor the sensed volume will increase and the pump will be stopped once the target volume is reached.

The program applies an automatic compensation for the flow that continues even after the pump has stopped. How large this effect is, depends on the type of pump and the pressure that is build up. The program will simply calculate the difference of the target and the sensed volume after each dosing and apply this as a correction to the next dosing, e.g. stop earlier.
