Pan Detection in PSOC1

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

cross mob
akac_3894371
Level 1
Level 1
First like given

Hi,,

Good Evening,

I'm working on PSoC1 CY8C22x45 MCU, and for induction applications testing the feedback

signals, like voltage, current, IGBT temperature, similarly testing for PAN sensor feedback,

by generating error condition when PAN is placed and not placed, but i'm getting error

method when PAN is placed also instead should get the error when PAN not placed,

as per the datasheet port assignment is correct, and conditions in the code is given

by comparing with the ADCCurrent for detecting the PAN conditions,

so kindly suggest me the solution to resolve this issue.

Regards,

Akash

0 Likes
1 Solution

Hello Akash,

There is an error in the code you have downloaded. Here is the correct line

#define VOLTAGE_MIN        (BYTE)(158)        // 185v (220*85%=187)

A byte value of 219 corresponds to 250V, and a byte value of 158 corresponds to 185V.

To see how the PWM is varied, I request you to go through Section "PI Close Loop Control Algorithm" on page 9 in the Application Note AN50475 - Induction Cooker Design with CapSense®

Kindly note that this Application Note is obsoleted. Hence I request you to not proceed with developing a new product based on this Application Note, or the PSoC1 family. Consider the newest PSoC4 family for developing new products.

Best regards,

Sampath

View solution in original post

6 Replies
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello Akash,

The first point to check would be to provide a voltage at the ADC input and check if you are getting a correct reading. Then check if there is a change in the output of the current sensor when PAN is placed.

Do kindly let me know the design document you are following. This will help me advice you more precisely.

Best regards,

Sampath

0 Likes

Thanks for the reply sir, as per your suggestion checked the voltage across ADC, so getting the value

across it , but as when the PAN is placed initially the current draws, sir below is the PAN port initialization

PRT2GS  &= ~( BIT0MASK );                   // auto detect

PRT2IC0  =   BIT0MASK;                      // Pan int input

#define PAN_HIGH    PRT2DM0 |=  (BIT0MASK );\
                    PRT2DM1 &= ~(BIT0MASK ); \
                    PRT2DM2 &= ~(BIT0MASK ); \
                    Port2Set(BIT0MASK)

#define PAN_LOW     PRT2DM0 |=  (BIT0MASK );\
                    PRT2DM1 &= ~(BIT0MASK ); \
                    PRT2DM2 &= ~(BIT0MASK ); \
                    Port2Clr(BIT0MASK)

#define PAN_HIZ     PRT2DM0 &= ~(BIT0MASK); \
                    PRT2DM1 |=  (BIT0MASK); \
                    PRT2DM2 &= ~(BIT0MASK)

So during main() call, and in ADC module function --> PAN_HIZ is called [ sir i'm trying to explain where are all this PAN detection

parameters are  passed, i'm attaching the application note of the MCU we are using so that you can suggest me on the problem.

https://www.element14.com/community/servlet/JiveServlet/previewBody/47858-102-6-273452/Cypress.Appli...

Thank & Regards,

Akash

0 Likes

Hello Sir,

When PAN is removed during induction unit is running then at that point we are getting

error mode[i.e., pan removed[ERROR E7] is displayed],But when initially PAN not there

I'm not getting the error. And also I have few doubts in the PWM generation section, and setting

voltage , current feedbacks, in the code it's defined as below

#define VOLTAGE_MAX         (BYTE)(219)        // 250v (220*115%=253])
#define VOLTAGE_MIN         (BYTE)(185)         // 185v (220*85%=187)
#define CURRENT_MAX         (BYTE)(250)         // 10A
#define CURRENT_CO          (BYTE)(50)
#define CURRENT_CO1         (BYTE)(50)

Can you please tell me how the value of 220 is taken as 219[ since after the conversion will get the decimal value

as 253,how the value 219 is taken, kindly suggest.

And in PWM generation what are the parameters considered to change the duty cycle, as I referred the datasheet of

PWM module , it's not clear that how to change the duty cycle for PWM.

Thanks & Regards,

Akash

0 Likes

Hello Akash,

Can you kindly attach the PSoC Designer project?

Best regards,

Sampath

0 Likes

Sir please find the attached link to download PSoC project .

https://we.tl/t-4FOEJW4jn8

Thanks & Regards,

Akash

0 Likes

Hello Akash,

There is an error in the code you have downloaded. Here is the correct line

#define VOLTAGE_MIN        (BYTE)(158)        // 185v (220*85%=187)

A byte value of 219 corresponds to 250V, and a byte value of 158 corresponds to 185V.

To see how the PWM is varied, I request you to go through Section "PI Close Loop Control Algorithm" on page 9 in the Application Note AN50475 - Induction Cooker Design with CapSense®

Kindly note that this Application Note is obsoleted. Hence I request you to not proceed with developing a new product based on this Application Note, or the PSoC1 family. Consider the newest PSoC4 family for developing new products.

Best regards,

Sampath