Porting a Liquid-Level-Sensing Design (CE202479) from CY8CKIT-042 to CY8CKIT-042-BLE - KBA219109

Version: **

 

Question:

How do I port the design of a liquid-level-sensing design Kit (CY8CKIT-022) from CY8CKIT-042 to CY8CKIT-042-BLE? 

 

Answer:

The design CE202479 is designed for CY8CKIT-042 kit; therefore, the CapSense parameters are tuned for it

Do the following to port the design from CY8CKIT-042 to CY8CKIT-042-BLE:

  1. In PSoC Creator, open the project associated with CE202479, and change the device to CY8C4247LQI-BL483, which is the PSoC 4 device on the CY8CKIT-042-BLE kit.
  2. Assign pins per the table provided on CY8CKIT-022 Shield kit guide.  

    To use this design on the CY8CKIT-042-BLE, it is likely you will have to retune the CapSense Component to get your raw counts back in the range for the kit's parasitic capacitance.

  3. In the main.h file of the design, change the CapSense tuning parameters that are set for Modulation DAC and Compensation DAC current settings to the values given below to get reasonable raw count values. 
      /* CapSense tuning constants */  

    #define SENSOR_MODDAC (150u)       /* Modulation DAC current setting */ 

      

    #define SENSOR_CMPDAC (20u)        /* Compensation DAC current setting */ 

  4.  

    Build the design and program the device. 

      

    Note: To port this design to any PSoC 4 Arduino-compatible kit, you will have to retune the CapSense parameters for the kit. Guidelines for manually retuning the modulation DAC and compensation DAC settings to optimize the sensor raw counts can be found in the AN85951 - PSoC® 4 and PSoC Analog Coprocessor CapSense® Design Guide. Retuning the raw counts for liquid-level sensing follows the same process as tuning a touch interface detailed in the design guide.