Capacitive liquid level sensors are conductive pads or traces laid on non-conductive material such as PCB, plastic, or glass. The intrinsic capacitance of the PCB trace, pads, and other connections to the sensor results in a sensor parasitic capacitance (CP). When a capacitive sensor is excited by a voltage source, an electric field is created around the sensor. A small number of electric field lines couple with the nearby ground, while most of the electric field lines are projected into the nearby space of the liquid container.
When a target object such as water approaches the sensor, the electric field couples with it and adds small amount of liquid capacitance (CL) to the existing CP. The capacitive liquid level sensing technique involves measuring this change in the capacitance of a sensor when water is near the sensor.
The CY8CKIT-022 kit contains capacitive sensors attached to a liquid container. These sensors can be interfaced with PSoC 4 devices present on Cypress PSoC 4 Pioneer Kits through the Arduino-compatible header.
In the CY8CKIT-022 system, the CapSense circuitry in the PSoC device on the baseboard (such as CY8CKIT-042) senses the changes in the capacitance of the liquid level sensors on the CY8CKIT-022 kit. The PSoC calculates the liquid level based on the information about capacitance changes on different sensors received from the CapSense block.
Two-Sensor Flex PCBThe signal ratio from the two sensors (RX0 and RX1) provides a low cost method of determining liquid height. The pattern is similar to a backgammon game board, and is therefore referred to as the “backgammon” pattern. A third transmitter (TX0) sensor is provided to support the CapSense mutual capacitance scanning method, and can be connected as a CapSense transmitter. If CapSense self capacitance scanning is used, then the TX0 sensor is not required and must be grounded to avoid interfering with the RX0 and RX1 sensors. The flexible PCB comes with a non-conductive double sided adhesive already applied. To use the sensor, it must be adhered to the flat side of the supplied liquid container and attached to the kit shield board.
Each segment of the 12 sensor (RX[0:11]) pattern provides an incremental portion of the total liquid level. While the “segmented” pattern requires additional sensor elements and pin compared to the 2RX version, it allows liquid level resolution to be customized for each design. For use with CapSense self capacitance scanning, only the sensors RX[0:11] must be connected to the PSoC CapSense I/O pins and the TX0 sensor can be left floating or tied to ground. When CapSense mutual capacitance scanning is used, all of the RX and TX sensors must be connected. A small ground plane hatch between the RX and TX sensors is provided to help direct the electrical field into the liquid to increase sensitivity.
Connector (J5) allows easy connection of sensors to the PSoC on the Pioneer kit. The connector provides connection of up to 13 sensors (RX[0:12]). A single transmitter connection (TX0) is provided for use with sensors utilizing the CapSense Mutual-Capacitance Scan method. The TX0 signal includes a 470ohm series resistor to slow edge rates and reduce radiated emissions. The connector can be used with the kit supplied sensors or a custom user created sensor.
RX12 sensor on the shield board provides the ability to measure and compensate for environmental effects such as temperature on the liquid level sensors. Use of RX12 sensor for compensation is optional. RX12 is also brought out to the sensor connector (J5-9) although the supplied kit sensors do not use RX12. User can add an RX12 sensor connected to J5-9. In this case, resistor (R1) must be removed from the Shield board to disconnect the onboard sensor.
Two integration capacitors are provided to support CapSense Mutual-Capacitance Scanning method. The Cint capacitors on this shield can be used with Pioneer kits that do not natively support Cint capacitors.
A dedicated connection is provided to connect the PSoC 4 I/O pins on J4-1 and J4-2 to the KitProg UART pins on J6-1 and J6-2. The J6 shield pins connect to the pioneer kit’s KitProg J8 header, pin J8-9 (UART TX) and J8-10 (UART RX). The UART connection allows the liquid level sensing firmware to implement a terminal interface for user interaction.
The 32 oz Square PET plastic liquid container is provided for use with the flexible sensors. Your own container can be used in its place if it is compatible with the sensor dimensions. You can also purchase the kit container (Item Number: 70348) from www.usplastic.com. Hot water above 170 °F/80 °C can cause PET plastic to deform. Extremely hot water should be avoided as the liquid container provided in the CY8CKIT-022 kit is made of PET plastic.
Code ExampleCE202479 contains example projects that demonstrate the following features of CY8CKIT-022:
■ Liquid level measurement using capacitive sensors
■ Two sensor (2RX) project for use with the low cost 2RX flexible sensor
■ 12 sensor (12RX) project for use with the increased accuracy 12RX flexible sensor
Kit AssemblyFollow these assembly steps to operate the kit:
1. Remove the adhesive sticker from the back of one of the CapSense Liquid Level Sensor Flex PCB and then paste the sensor onto the liquid container. Center the sensor on one of the flat sides so the top of the sensor is aligned with the top of the flat section. This placement will result in the 0 mm (0%) line on the sensor being approximately 15 mm from the bottom of the container. Note If the sensor flex is placed too low on the container, the radius of bend on the flex tail may cause the container to become unstable.
Thoroughly press the entire sensor area to the container to ensure there are no air bubbles in the adhesive layer. Air bubbles allow the distance between the sensor and the liquid to fluctuate. Distance changes cause changes to the sensor’s capacitance resulting in reduced liquid level accuracy. Air bubbles can be observed through the adhesive layer on the back of the sensor through the bottle.
Connect the CapSense Liquid Level Sensing Shield onto the CY8CKIT-042 PSoC 4 Pioneer Kit Arduino header and confirm if the PSoC 4 Pioneers kits jumpers are in default positions.
Connect the CapSense Liquid Level Sensing Flex PCB to the CapSense Liquid Level Sensing Shield.
Connect the CY8CKIT-042 to your PC using the provided USB cable.
The compatible firmware and operating instructions are provided in code example CE202479 (attached here).
Comments