1 2 Previous Next 28 Replies Latest reply on Jan 21, 2015 1:33 PM by user_14586677

    PWM with Dedtime input

    shveta.patel
              Hii all, i Need ur help to implement my Task. I am working with PSoC5LP. I have to implement H-Bridge for MOSFET with deadtime input. pls check the attached file for deadtime inpuzt & Output. I know i Need clock & Counter but the Problem is i don't understand how can i connect it in design. pls help me for this. Regards Shveta   
        • 1. Re: PWM with Dedtime input
          ki.leung

          @Shveta

             
              Assume someone who doesn’t know about your project. Do you give enough information?   
             
              These are a few that you need to specify:   
             
               1.       What is the input? Does it from an analog input pin (most likely)? Or key in via keyboard? Or receive from serial interface?   
             
               2.       What is x? Is this the dead time?   
             
               3.       What is “output”? What are the units?   
             
               4.       What is the frequency of the pulse output? Is this a fix frequency or a fix period?   
             
               5.       Is the dead time linearly controlled by the input? I.e. if input is 0.6V what should be the dead time and the “output”?   
             
               6.       How fine you want the control of dead time to be? i.e., what is the resolution of the dead time?   
             
               7.       How fine you want the “output” to be?   
             
               8.       How fine is your input? In 0.1V steps, or 0.001V steps?   
             
               9.       What are the values of X and “output” when input is lower than 0.5V and higher then 3.25V?   
             
               10.   If you are controlling the dead time, you are also changing the duty cycle of the output pulse, is this you want?   
             
               11.   Do you want to indicate the value of input using some kind of display?   
          • 2. Re: PWM with Dedtime input
            user_14586677

            HL, many of the answers for you here - www.cypress.com/

            • 3. Re: PWM with Dedtime input
              ki.leung

              Shveta is starting a new thread as suggested, but still need the followings

                 

              1) Detailed specs

                 

              2) Drawing of overall application, by block or schematic, what you are driving externally

                 

              3) All relationships, eg. expected waveform vs V, described in math

                 

              4) Detailed timing diagram of desired waveforms

                 

              Besides that, some times it helps to review what we know/don't know to move forward

              • 4. Re: PWM with Dedtime input
                shveta.patel
                        @HL heree i try to answerur questions. 1. Analog input pin as Input. 2. Yes x is deadtime. 3. In PSoC PWM component Deadband 2-256 cycle & I have value from 2 to 24. But I don’t know the unit. 4. I have fixed freq. & for period I need 40ns step. 5. I have input from 0,5 to 3,25 & I need deadtime output from 4 to 24. So I just divide the possible input to the possible output. So if 0,6v the output will be either 4 or 5. 6. I use 16-bit ADC & 16-bit PWM. So I think deadtime resolution is also 16-bit..? 7. Don’t know. 8. 0,01v Steps 9. If input lower than 0,5v then deadtime = 4 & higher then 3,25v then deadtime = 24. 10. Yes, I want to change the Duty cycle as the deadtime changes. 11. Yes with LCD. The deadtime is totally new for me.So i m much more confuse. pls help me Regards Shveta   
                • 5. Re: PWM with Dedtime input
                  ki.leung
                       1.       Ok   
                     
                       2.       Ok   
                     
                       3.       What is your requirement in pS, nS or uS, don’t assume you use the PSoC PWM yet, once we know the requirement, we can convert back to the cycles of PWM.   
                     
                       4.       What is the frequency? If you have fix frequency, what is the 40nS for?   
                     
                       5.       Dead time of 4 to 24 pS, nS, uS or mS? If it is ok to have 4 or 5 when input is 0.6V then why you need to use 16bit ADC.   
                     
                       6.       What do you need? What is the requirement?   
                     
                       7.       This affects your design, you have to ask for this.   
                     
                       8.       See 5.   
                     
                       9.       Ok   
                     
                       10.   Ok.   
                     
                      11. OK   
                     
                      It would be better if you tell us the original requirement/specification!   
                     
                      After this, how about give us the drawing, blocks or schematic and external circuit. that you already designed.   
                     

                  Have you read any information about deadtime and what it is for and why it is needed? So you would understand more about your project.

                  • 6. Re: PWM with Dedtime input
                    shveta.patel
                            @HL I have to set Deadtime with 40nS. For frequency i have another Analog Input pin. I read abt deadtime. I know theoratically what is it, why Need it. But the Problem is what i Need to program it. Regards Shveta   
                    • 7. Re: PWM with Dedtime input
                      ki.leung

                      1, Do you mean that you have to set the deadtime in steps of 40ns? ie the dead time (in ns) would be 210, 250,,,  ?and no need to have dead time 220, 230...?

                         

                      2. Do you mean that the frequecy of the Pulse is control by another analog pin? If so what is the range of frequency/period of the output.?

                         

                      3. Do you have a flow chart or pseudo code to show what you have done or how you would write the program? No need to show the PSoC code yet and don't worry about the PSoC APIs yet.

                         

                      4. how is the external hardware/wiring?

                      • 8. Re: PWM with Dedtime input
                        shveta.patel
                                @HL Hello here ist the answers of your questions. 1. ya..I have to set deadtime in steps of 40ns. E.g..210..250... in ns. 2. ya..the range of frequency/period is Min 0,5v -- 250 kHz -- 4us Max 3,25v -- 80 kHz -- 12,5 us 3. pls check the attched document. In flowchart i don't do the "Compute Deadtime" 4. For external wiring i saw output PWM signals on oscilloscope through pin p0.0 p0.1   
                        • 9. Re: PWM with Dedtime input
                          user_1377889

                          Not quite easy as I understand: 40ns resolution are a frequency of 25MHz (1 / 40e-09). The clock frequency of a normal speed PSoC is 67MHz but should be set to 50 MHz, this will give the best resolution for 40ns steps.

                             

                          So a value of 10 clock cycles is 200ns, 12 clock cycles give 240ns and so on. When you can live with this error of 10 ns you are fine off.

                             

                           

                             

                          Bob

                          • 10. Re: PWM with Dedtime input
                            shveta.patel

                            @Bob

                               

                            thank u very much bob.

                               

                            But the Problem is how can i implement this in program ?

                               

                            Regards

                               

                            Shveta

                            • 11. Re: PWM with Dedtime input
                              ki.leung

                               As Bob says. What is the acceptable error of the dead time? ie Xns +-?ns or Xns +-%?

                                 

                              Also what is the relationship between the 2nd AD input to the output frequency? Is it a linear relationship to the input ? or the output is in steps, like that of the dead time? also what is the resolution required for the output frquency?

                                 

                              Don't jump to the implementation now. let's clarify the requirment first.

                              • 12. Re: PWM with Dedtime input
                                shveta.patel

                                @HL

                                   

                                Exceptable Error of the deadtime is Xns +-.
                                1st AD input to give PWM frequency & 2nd to give Deadtime.

                                   

                                Each n every inputed frequency i have to give all possible deadtime (from min to max).
                                So e.g frequency min. input = 0.5v  for 250kHz then from 2nd AD input i set deadtime (from min to max).

                                   

                                So i think it's output is in input. We take output value of frequency as input for deadtime. So the output is in Step of the deadtime.

                                   

                                Requiered resolution for output frequency is 16bit.

                                   

                                Regards

                                   

                                Shveta

                                • 13. Re: PWM with Dedtime input
                                  user_1377889

                                  Shveta, if it is easier for you to post in German language, I can translate for you.

                                     

                                  In the table you provided in your first post: What units is the item "Output"?

                                     

                                  Have there been any additional written instructions you have got?

                                     

                                  You did not answer the question regarding the required precision of delta x (whatever delta x is)

                                     

                                  What is delta x???? and what is x when there is a delta there should be at least two of those

                                     

                                  As you can see is the input in V not linear, there are some "jumps" in it. Since there are only a few entries the easiest solution will be to build two tables that contain the required two values for the PWM: Frequency and delta x. or whatever is needed.

                                     

                                  The index of the table will be calculated from your input voltage which seems to be in the range of 0.5 to 3.5 Volts. This would prohibit the usage of 3.3V as Vcc for the PSoC 5

                                     

                                  As you can see there are some thoughts required before starting to program the first statement.

                                     

                                   

                                     

                                  Bob

                                  • 14. Re: PWM with Dedtime input
                                    shveta.patel

                                    @Bob
                                    Sorry it was my mistake.

                                       

                                    Delta x is the value of one single PWM wave with x1=on time & x2 = off time.

                                       

                                    In table I wrote this value from the Oscilloscope.

                                       

                                    Regards

                                       

                                    Shveta

                                    1 2 Previous Next