This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28335: F28335

Part Number: TMS320F28335

Hie,

I want to generate stepped sinusoidal waveform in which the number of steps will determines the number of switches to be turned on. I will generate sinusoidal reference using harmonic oscillator and based on the number of steps (N), it should able to generate stepped sinusoidal wave form that many levels (N) . Can I use timer interrupt to sample the sinusoidal to get the mentioned waveform to calculate no of switches to be turned on?.  How to generate and use the stepped sinusoidal to determine number switches to be turned on?. 

Below I showed with positive shifted sinusoidal input reference for generating 2,4,8 stepped wave forms. It can be done by multiplying unit sinusoidal with levels and rounding. (V*/Vdc = No of levels(N)).

                                                                               

Thanks,

  • Hi,

    I am writing to let you know that a C2000 team member has been assigned to answer to this post.

    Thanks
    Vasudha
  • Yedida,
    is you question how to setup the ADC to sample an signal at set intervals? This is eaisly done by using a PWM to trigger an SOC for the ADC. You can also use a timer if you desired, but most users prefer the PWM SOC method.

    Regards,
    Cody
  • Dear Cody,

    Its not about adc. I have to generate such waveform internally from dsp and not taking from external and sampling.

    Thanks,
  • Yedida,

            I am afraid that I don't understand your questions, could you restate them?

    Yedida Rudrasimha said:
    Can I use timer interrupt to sample the sinusoidal to get the mentioned waveform to calculate no of switches to be turned on?

    Yedida Rudrasimha said:
    How to generate and use the stepped sinusoidal to determine number switches to be turned on?

    If you wish to drive a series of gates/ switches with a regular or predictable period I recommend that you use our ePWM module. I also believe it is possible to use a single PWM with varing duty and an output filter to generate smooth sinusoidal outputs.

    Regards,

    Cody

  • Dear Cody,

    I want to calculate number of switches to be turned on from that reference generated based on N (Number of levels). Once I got number of switches to be turned on, I have to perform sorting based on that in DSP.

    How many switches to be turned on will get from reference sampled sine waveform that will be given as input to sorting to assign which switches to be turned on.

    So I no need to generate waveform but somehow I have to calculate number of switches to be turned on, that depends on sampled sine wave with given N. I am not giving that to any switch directly before that i have to perform sorting operation.

    Can you please tell me how to get that number to perform sorting in dsp before giving to switch drivers?


    Thanks,
  • Yedida,

    Alright, I'm going to make a number of assumptions and do my best to answer your questions.

    It seems like you are trying to sample a sine wave of potentially varying amplitude and would like determine how many switches you need to turn on or off to produce a scaled signal.

    Your sampled sine wave will need to have a voltage level above 0V and no greater than 3.3V. That range will be represented by N number of potential switches. So take 3.3 and divide it by N and then round up or down depending on what is best for your system.

    A fun experiment may be to try and get higher than 1 digit of resolution by toggling on and off the next highest switch. For example if you calculated you need 5.3 switches then use all 5 normally and briefly toggle the 6th with a duty of around 30%. I have no idea what this would do for higher harmonic noise,longevity of the switching circuitry, or power consumption but it seems like a cool experiment.

    Regards,
    Cody 

  • Dear Cody,

    I will try and let you know.

    Thanks
  • Dear Cody,

    Generated that reference using round function and same validated or to see, used epwm + low pass filter as dac to see generated waveform. I hope based on the reference values got from round function, can set how many switches to be turned on I think.

    Thanks,