Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

create_sys
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

We are using PSOC 4 device [CY8C4014SXI-421 ] for proximity sensing application. 

We are using internal flash as EEPROM to store the  value of calibration in order to calibrate the sensor.

We have used UART interface to monitor value of proximity.

Normally we see what the value of proximity is without foreign object near to it and we call it as background noise.

After taking the object to be detected near to sensor we record the value of proximity sensor ( which is higher than the noise value ), which then continuously polled for detecting the object. 

This works perfectly fine. Hence we deployed this system in pilot lot. 

However to our surprise its observed that, background noise changes after few days. And sensor starts detecting the noise value ( as the noise value exceeds the calibration value )

Although nothing has been changed since from the 1st installation & calibration,  this random event is observed couple of times.

I am attaching schematic FYR.

Please advise so that can bring reliability to our application.

 

 

 

0 Likes
7 Replies
Hari
Moderator
Moderator 750 replies posted 500 replies posted 250 solutions authored
Moderator

Hi @create_sys 

 

Can you please let us know the application for this design? Is this being placed outdoors and are there any temperature of humidity changes in the environment near the controller?

Can you also confirm if the change is observed only during device reboots or if it is seen during continuous operation as well?

 

Note that CapSense is prone to temperature and humidity changes and typically, the baseline tracking algorithm ensures that the signal is not increased even in case of temperature or humidity variations. 

Would it be possible to share the tuner waveforms for the sensor signals when the error occurs?

 

Best regards, 
Hari

0 Likes
create_sys
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

The application is - Proximity Detection of Human Body. The solution is being deployed into a very high end diagnostic device which operates under very much controlled environment where temperature is managed by air conditioners. Whenever the arm of diagnostic device comes near to any body of part of human under test, the arm provide safety stop to avoid any possible accident. 

Solution is deployed in the field for more than a month now. But in run time we have not observed any change. Twice we observed that after turn on one sensor was continuously showing detection signal ( that means it crosses the previously set threshold for human detection ) without any human body part in the proximity.

We have applied a copper tape on the inner wall of head of diagnostic equipment which is prone to hit the human body. That copper tape act as a proximity sensor. We have applied conformal coating on the the top of copper tape and PCBA. So it provides basic level of humidity protection.

We will definitely check the tuner waveform if this problem comes again to see the noise value which we can compare with previously set threshhold.

0 Likes
Hari
Moderator
Moderator 750 replies posted 500 replies posted 250 solutions authored
Moderator

Hi @create_sys 

 

With a copper tape working as the sensor, there is a possibility of the sensor itself deforming and causing change in the capacitance. If this happens, the CapSense IP will detect this as an increased signal and behave the way you have described. Can you please confirm the sensor's positioning and shape in the units where you see the issue?

 

Another clarification we require is if you are using manual tuning or auto-calibration. Please note that in a setup like what is mentioned, it is recommended to use manual tuning with IDAC autocalibration also disabled. Could you please try this if it is not already in this configuration?

 

Best regards, 
Hari

0 Likes
create_sys
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

Hi Hari,

Thanks again for swift response.

Possibility 1 : Sensor Deformation

The copper tape is applied on a firm surface. And the the firm surface is hard enough that by itself it never deforms. So the possibility of sensor deformation can be completely ruled out.

Possibility 2 : Manual Tuning / Auto-Calibration.  

We are using below configuration.

Tuning Method : Manual with run-time tuning

Raw data noise filter : None

Compensation IDAC : Enabled

Tick on for Auto-Calibration 

We are using auto-calibration. 

I am not sure how to co-relate above as Tuning Method is Manual but IDAC compensation is enabled & Autocalibration is also ON. Please suggest.

I have attached the project archive along with a video which shows the working demo & few images which will help you to understand overall arrangement in better way

Click here to download 

Please download & suggest.

0 Likes
Hari
Moderator
Moderator 750 replies posted 500 replies posted 250 solutions authored
Moderator

Hi @create_sys 

 

Can you please try turning off the IDAC autocalibration? The compensation IDAC needs to be ON, but the manual IDAC calibration will make sure that the same raw count values are obtained every time and slight changes in the environment will not affect the calibration values. 

 

Best regards, 
Hari

0 Likes
create_sys
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

Hi Hari,

I have turned off IDAC calibration & kept compensation ON. Performance after this change is almost same as that of earlier performance ( when autocalbration is not turned off ). We will deploy the module in field and check if now sensor do not get self calibrated.

Apart from above I have specific observation as below

Incremental behaviour of Noise value

The value of noise after taking any object or human hand goes on increasing continuously. For example - If default noise value is 50,000 and I bring hand near to sensor ( distance is 5cm) then sensor value starts increasing and it keep on increasing till it gets saturated at 60,000 or nearby to it.

Can we restrict this incremental behaviour of noise values? Means if I bring hand close to sensor at distance of 50000 the value should not increment beyond 50,000. And again if I move hand closed at distance of 3 cm the noise value is increasing and staying constant at 55,000 or so.

Sensing delay

There is significant visible delay in sensing. Its almost equal to 1.5 to 2 seconds. After we bring hand closer to the sensor, it takes 1.5 to 2 seconds to detect the object. Can we eliminate this delay by some setting ?

Please suggest on above 2 points.

 

 

 

0 Likes
create_sys
Level 1
10 sign-ins 5 replies posted 5 questions asked
Level 1

Hi,

I am attaching the project here for detailed review.

The incremental behaviour & sensing delay is making the overall application very cumbersome to calibrate w.r.t. height of object with reference to capsense proximity sensor

 

Below is main 

for(;;)
{
/* Scan sensor and wait till the scan completes */

while(CapSense_IsBusy())
{
/* Wait until scan is complete */
}

/* Apply ALP filter on proximity sensors */
// CapSenseFilters_RunAdvancedLowPass(CapSense_SENSOR_PROX1_0__PROX);
/* Update baselines*/
CapSense_UpdateEnabledBaselines();

// Check if sensor is active. If so, find the difference counts and change LEDs' brightness based on amplitude of difference counts



/* Scan sensor2 and wait till the scan completes */
CapSense_ScanSensor(CapSense_SENSOR_PROX_0__PROX);
while(CapSense_IsBusy())
{
/* Wait until scan is complete */
}

/* Apply ALP filter on proximity sensors */
CapSenseFilters_RunAdvancedLowPass(CapSense_SENSOR_PROX_0__PROX);
/* Update baselines*/
CapSense_UpdateEnabledBaselines();

reading = CapSense_ReadSensorRaw(CapSense_SENSOR_PROX_0__PROX);
//SendUint16ToTx8Out(reading);
print_array(a1);
print_hex_byte(reading);

if (reading < THRESHOLD)
//if (reading < 2500)
{
SENS1_MCU_Write(0);
LED_Write(0);
}
else
{
SENS1_MCU_Write(1);
LED_Write(1);
}

if((BTN_TEACH_Read()==1) && (prev_BTN == 0))
{
if(CAL_EN1_Read() == 1)
{
THRESHOLD = reading;
print_array(b1);
print_hex_byte(reading);
array2[0] = THRESHOLD/255;
array2[1] = THRESHOLD - (array2[0]*255);
eepromReturnValue = Em_EEPROM_Write(LOGICAL_EEPROM_START, array2, LOGICAL_EEPROM_SIZE);
if(eepromReturnValue != CY_EM_EEPROM_SUCCESS)
{}
}
else
{
/* THRESHOLD1 = reading1;
print_array(b2);
print_hex_byte(reading1);
array2[2] = THRESHOLD1/255;
array2[3] = THRESHOLD1 - (array2[2]*255);
eepromReturnValue = Em_EEPROM_Write(LOGICAL_EEPROM_START, array2, LOGICAL_EEPROM_SIZE);
if(eepromReturnValue != CY_EM_EEPROM_SUCCESS)
{}
// LED_blink(250); EEPROM Error Conditon
*/
}
}
else
{
prev_BTN = 0;
}

}// END OF for(;;)

/* Send data to Tx8 */
#if TX8_ENABLE
//SendDataToTx8Out(NO_OF_SENSORS_ON_TX8);
#endif /* #if TX8_ENABLE*/


#endif /* #if TUNER_ENABLE */
}

0 Likes