0 Replies Latest reply on Apr 30, 2019 10:22 AM by MichiyukiY_91

    CapSense Capacitive-Sensing: Liquid-Level Sensing (LLS)

      Liquid-Level Sensing (LLS) detects the presence and level of liquid in a container without any physical contact. There are various types of liquid-level sensors such as capacitive, mechanical float, inductive, magnetic, Hall effect, optical, acoustic density, and ultrasonic; each has advantages and disadvantages. Capacitive liquid-level sensing has become popular due to its low cost, high reliability, low power, sleek aesthetics, and seamless integration with existing control architectures.

      Cypress’s PSoC MCUs support liquid-level sensing with resolution down to 1 mm. Capacitive liquid-level sensing is provided through the use of the CapSense Component available in the free PSoC Creator™ Integrated Development Environment (IDE). The CapSense Component configures the on-chip CapSense peripheral hardware and provides required firmware for operation on PSoC MCUs. The following key liquid-level sensing benefits are provided using CapSense:

      • Non-contact measurement avoids contamination and cleaning problems.
      • Sensors located on the exterior of a non-conductive liquid container simplify industrial design and improve product user experience.
      • Optimized resolution and accuracy to support varying price points with a single, low-cost, base system
      • Sensors may be constructed out of low-cost materials such as plastic substrates and conductive ink.


      A capacitive LLS system comprises of two key design elements:

      • Capacitive sensor pattern to sense the liquid level
      • PSoC MCU with CapSense Component to measure the sensors and calculate the liquid level


      Cypress provides the CY8CKIT-022 Liquid-Level Sensing Shield Kit, which shows the simplicity of a PSoC MCU based LLS design.

      Liquid-Level Sensing Block Diagram with PSoC 4 MCUs


      We recommend that a later generation PSoC MCUs, such as PSoC 4 and PSoC 6 be used for optimal LLS performance. Development kits for PSoC 4 and PSoC 6 MCUs can be found here.


      CapSense Basics

      Capacitive liquid-level sensors are conductive pads or traces laid on a non-conductive material such as a PCB, plastic, or glass. The intrinsic capacitance of the PSB trace, pads, and other sensor connections is called the sensor parasitic (CP). when a target object such as water approaches the sensor, a small amount of liquid capacitance (CL) is added to the CP. LLS involves measuring the increased capacitance when a liquid is near the sensor.

                                                       Capacitance and Electric Field of a Capacitive LLS                          Added Capacitance (CL) when Liquid Approaches a Capacitive Sensor

      LLS E-fields.png                                                  LLS E-fields with water.png


      The CapSense Component measures the capacitance by injecting a current into the sensor with a current Digital to Analog Converter (IDAC). A timer measures how long it takes the IDAC to charge the sensor’s voltage to a reference voltage using a comparator. When the conversion is complete, the timer count value that measured the IDAC charge time is used as the raw sensor value used in calculations and is commonly referred to as the sensor count.


      To find out more about CapSense Liquid-Level Sensing, please refer to the Capacitive Liquid-Level Sensing AN and the PSoC 4 and PSoC 6 MCU CapSense Design Guide.