Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by
and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty
provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom
software and or firmware in support of licensee product to be used only in conjunction with a C ypress integrated circuit as
specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this
Source Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials
described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit
described herein. Cypress does not authorize its products for use as critical components in life-support systems where a
malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product
in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies
Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
PSoC and CapSense are registered trademarks and PSoC Creator, F-RAM, EZ-BLE, and PRoC are trademarks of Cypress
Semiconductor Corp. All other trademarks or registered trademarks referenced herein are property of the respective
corporations.
Flash Code Protection
Cypress products meet the specifications contained in their particular Cypress PSoC Data Sheets. Cypress believes that its
family of PSoC products is one of the most secure families of its kind on the market today, regardless of how they are used.
There may be methods, unknown to Cypress, that can breach the code protec tion features. Any of these methods, to our
knowledge, would be dishonest and possibly illegal. Neither Cypress nor any other semiconductor manufacturer can
guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as ‘unbreakable’.
Cypress is willing to work with the customer who is concerned about th e integrity of their co de. Code p rotecti on is constantly
evolving. We at Cypress are committed to continuously improving the code protection features of our products.
The Liquid Level Sensing Shield Kit contains ESD-sensitive
devices. Electrostatic charges readily accumulate on the
human body and any equipment, and can discharge without
detection. Permanent damage may occur on devices
subjected to high-energy discharges. Proper ESD
precautions are recommended to avoid performance
degradation or loss of functionality. Store unused kit boards
in the protective shipping package.
End-of-Life/Product Recycling
This kit has an end-of life five years from the date of
manufacture mentioned on the back of the box. Cont act your
nearest recycler for discarding the kit.
Regulatory Compliance
The CapSense Liquid Level Sensing Shield Kit (CY8CKIT-022) is intended for use as a development
platform for hardware or software in a laboratory environment. The board is an open system design,
which does not include a shielded enclosure. This may cause interference to other electrical or
electronic devices in close proximity. In a domestic environment, this product may cause radio
interference. In such cases, you may be required to take adequate preventive mea sures. In addition,
this board should not be used near any medical equipment or RF devices.
Attaching additional wiring to this product or modifying the product ope ration from the factory default
may affect its performance and cause interf erence with other apparatus in the immediate vicinity. If
such interference is detected, suitable mitigating measures should be taken.
The Liquid Level Sensing Shield Kit, as shipped from the factory, has been verified to meet with the
requirements of CE as a Class A product.
ESD can damage boards and associated components. Cypress recommends that you perform
procedures only at an ESD workstation. If such a workstation is not available, use appropriate ESD
protection by wearing an antistatic wrist stra p attached to the chassis ground (any unpainted metal
surface) on your board when handling parts.
Handling Boards
CY8CKIT-022 boards are sensitive to ESD. Hold the board only by its edges. Do not slide the board
Thank you for your interest in the CapSense® Liquid Level Sensing Shield Kit (CY8CKIT-022). This
kit is intended to demonstrate the Liquid Level Sensing (LLS) capabilities of the CapSense technology in Cypress’s PSoC
This kit supports the following liquid level sensing features:
■ Non-contact measurement of liquid levels from sensors located on the exterior of the non-
conductive liquid container . Av oids contamination and cleani ng issues found with mechanical and
contact sensors, simplifying industrial design and improving user experience.
■ Supports two different sensor patterns. A two sensor ‘Backgammon’ shaped pattern provides
liquid level sensing at a low cost point while a multi sensor ‘Segmented’ pattern provides
increased accuracy that can be optimized for each design by varying the number and shape of
sensors.
This kit guide provides details on the kit contents, hardware, schematics, and BOM. See Code
Example CE202479 for example projects developed for use with this kit and
AN202478 - PSoC 4 - Capacitive Liquid Level Sensing for theory, design guidance, and sensor
layout information.
®
4 products.
1.1Kit Contents
The CapSense Liquid Level Sensing Shield Kit contains the following, as shown in Figure 1-1.
Cypress provides a wealth of data at www.cypress.com to help you select the right PSoC device for
your design, and to help you to quickly and effectively integrate the device into your design. For a
comprehensive list of resources, visit http://www.cypress.com/psoc. The web page includes a list of
PSoC device families, integrated design environments (IDEs), and associated development kits. In
addition, refer to the following documents to get started with PSoC 4 devices and CapSense
technology:
■ CE202479 - Code Example for Liquid Level Sensing
■ PSoC 101 Training Series
1.4Hardware Requirements
CY8CKIT-022 plugs into any Arduino™ hardware-compatible development platform from Cypress.
CE202479 provides example projects targe ting the CY8CKIT-042 PSoC 4 Pioneer Kit.
Introduction
Figure 1-2 shows how the CY8CKIT-022 kit connects to the CY8CKIT-042 kit.
Visit http://www.cypress.com/CY8CKIT-042 to purchase the CY8CKIT-042 kit.
Figure 1-2. CY8CKIT-022 Connected to CY8CKIT-042
The CY8CKIT-022 kit does not have any programmable/configurable devices onboard, so it does not
need any software for configuration. However, the PSoC device present on the CY8CKIT-042
baseboard requires firmware which you can develop with the PSoC Creator IDE (Version 3.3 CP1 or
later).
1.5.1PSoC Creator
PSoC Creator allows concurrent hardware and application firmware design of PSoC 3, PSoC 4, and
PSoC 5LP systems. PSoC systems are designed using classic, familiar, schematic-capture technology supported by pre-verified, productio n- re a dy PSoC Com pon en ts™.
PSoC Components are analog and digital virtual chips represented by icons that you can drag and
drop into a design and configure to suit a broad array of application requireme nts. You can configure
each Component in the rich, mixed-signal Cypress Component Catalog with the Component Customizer tool. These Components include a full se t of dynamically generated API libraries. After you
have configured the PSoC system, you can write, compile, and debug the firmware within PSoC
Creator, or export the firmware to other IDEs such as those from IAR, Keil, and Eclipse.
You can download the latest version of the PSoC Creator software from http://www.cypress.com/
psoccreator. Refer to the Release Notes for the minimum and recommended system requirements.
Introduction
1.5.2PSoC Programmer
The PSoC Programmer software is used to program the PSoC devices on the CY8CKIT-042 kit with
hex files. You can download PSoC Programmer at http://www.cypress.com/go/psocprogrammer.
guidance, and sensor layout information for explaining this kit s oper ation as we ll as develop ing a
new liquid level sensing design.
■ CE202479 contains example projects that demonstrate the following features of the
CY8CKIT-022 kit:
❐ Liquid level measurement using capacitive sensors
❐ Two sensor (2RX) project for use with the low cost 2RX flexible sensor
❐ Twelve sensor (12RX) project for use with the increased accuracy 12RX flexible sensor
❐ See the 3. Example Projects chapter in this kit guide for details.
1.7Technical Support
For assistance, visit Cypress Support or contact customer support at +1 (800) 541-4736 Ext. 2 (in
the USA) or +1 (408) 943-2600 Ext. 2 (International).
You can also use the following support resources if you need quick assistance:
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, as shown in Figure 2-5. Center the sensor on one of the flat sides so the top of the sensor is a lign ed with the to p 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 co ntainer, the radius of bend on the flex tail may
cause the container to become unstable.
Figure 2-5. Placing the Sensor
Kit Hardware
2. Thoroughly press the entire sensor area to the cont ainer to ensure the re 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.
3. Connect the CapSense Liquid Level Sensing Shield onto the CY8CKIT-042 PSoC 4 Pioneer Kit
Arduino header, as shown in Figure 2-6, and confirm if the PSoC 4 Pioneers kits jumpers are in
default positions.
For a detailed explanation on the theory of operation of this kit, refer to AN202478 - PSoC 4 -
Capacitive Liquid Level Sensing.
This section provides a high-level description of the principle of capacitive sensing and describes
where the CY8CKIT-022 kit and PSoC devices fit in a capacitive liquid level sensing system.
2.3.1Principle of Capacitive Liquid Level Sensing
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 (C
voltage source, an electric field is created around the sensor. A small number of electric field lines
couple with the nearby ground, while mo st of the electric field lines are projected into the nearby
space of the liquid container, as shown in Figure 2-7.
When a target object such as water approaches the sensor, the electric field couples with it and adds
small amount of liquid capacitance (C
liquid level sensing technique involves measuring this change in the capacitance of a sensor when
water is near the sensor.
Figure 2-7. Capacitance and Electric Field of a Capacitive Liquid Level Sensor
) to the existing CP, as shown in Figure 2-8. The capacitive
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 Arduinocompatible headers, as shown in Figure 2-9.
Figure 2-9. CY8CKIT-022 System Block Diagram
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.
Kit Hardware
You can program the PSoC device on the baseboard through the onboard KitProg hardware, which
communicates to the software programming tool (PSoC Programmer) through the USB interface on
the board. You can develop firmware applications for PSoC 4 devices by using PSoC Creator.
CE202479 provides code example projects that you can use with the CY8CKIT-022 system to
The signal ratio from the two sensors (RX0 and RX1) provides a low cost method of determining
liquid height. The pattern shown in Figure 2-10 is similar to a backgammon game board, and is
therefore referred to as th e “backgammon” pattern. A third transmit ter (TX0) sensor is provided to
support the CapSense mutual capacitance scan ni n g me thod, an d can b e con nected a s a Ca pSen se
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 side d adhesive already app lied. To use the sensor, it must be adhered to
the flat side of the supplied liquid container and attached to the kit shield board.
Figure 2-10. 2RX Sensor Pattern
Kit Hardware
2.4.212 Sensor Flexible PCB
Each segment of the 12 sensor (RX[0:11]) pattern shown in Figure 2-11 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 se nsors is provided to help dire ct
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
shown in Figure 2-12 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 470 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.
Figure 2-12. Sensor Connector
Kit Hardware
2.4.4Arduino-Compatible Headers
The I/O headers (J1-J4) comply with the Arduino™ UNO (R3) kit form-factor to support similar formfactor baseboards, as provided in Table 2-1 through Table 2-4.
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) shown in Figure 2-13 must be removed from the
Shield board to disconnect the onboard sensor.
Figure 2-13. Sensor RX12
2.4.6Integration Capacitors
Two integration capacitors are provided to support CapSense Mutual-Capacitance Scanning
method. Figure 2-14 shows the capacitors C
this shield can be used with Pioneer kits that do not natively support C
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 PSoC 4 device used on the CY8CKIT-040 kit does not
provide a UART peripheral; therefore, the UART connection is not used with this kit. All other
Pioneer kits provide an onboard UART connection; therefore, the J6 connection is not used with
these kits. The UART connection shown in Figure 2-15 allows the liquid level sensing firmware to
implement a terminal interface for user interaction.
Figure 2-15. UART Connection
Kit Hardware
2.4.8Liquid Container
The 32 oz Square PET plastic liquid container is provided for use with the flexible sensors. User
supplied container can be used in its plac e 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.
CY8CKIT-022 can be used with Cypress PSoC 4 Pioneer Kits to evaluate the liquid level sensing
capabilities of CapSense in Cypress PSoC products. Code Example CE202479 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