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.

TMS320F28035: sine wave input measurement

Part Number: TMS320F28035

Hi,

I have C2000 experimental kits with TMS320F28035 to start evaluating my product. I am new in power design and software.
I want to calculate the AC input voltage RMS & frequency range is from 40-65HZ.
The sampled input signal to ADC is a sine wave from 0 -3V connected with B1.

I want to implement:
1. Input sine wave for zero crossing detection and frequency calculation.
2. Detect another sine wave which is from a feedback loop from the output for load balancing.
3. generate sine wave PWM based on frequency calculate from step 1 sine wave and RMS voltage from sine wave from step 2 to set amplitude for load balancing.

Previously I implemented this by using solar micro inverter example.

I am getting RMS value but having an issue with detecting the frequency of step 1 input sine wave.
I have used PLL on input sine wave and calculate sine wave from the following equations :
                     input Freq=(long)(spll2.fo)>>3;
as above I am getting fluctuation in sine wave frequency.

Does anyone have a suggestion how can I get an accurate frequency of input sine wave?

if any have suggestions for another example in that I can achieve my requirement please suggest.

If you need more information let me know.

thanks in advance.

BR,
Jignesh Patel                     

  • jignesh,

    You will need filtering, real-world signals are noisy and oscillating when sensed due to inherent noise in the system.

    You can average this frequency to get a more stable reading. One module available for averaging is EMAVG block you will find used in the micro inv code as well.

    You will need to trade speed vs accuracy.

    -Manish
  • Thanks Manish,

    Issue is in calculation of frequency in PLL. I have try to give square wave and smooth sine wave, same issue i am getting.
    1. Is there any other methode/sample calculate to frequency ?

    Thanks,
    Jignesh Patel
  • Hi Manish,

    Can you please help to find example or way to calculate frequency?

    BR,
    Jignesh Patel
  • Jignesh,

    Not sure what your expectation is for the reply,

    To measure reliably the AC frequency, you will need SPLL and filter the output of the SPLL as I mentioned above. This is a method that I know and have used and have provided your information on in the previous post.

    Also please note we are only able to address device level issues and issues with solutions "as marketed" type of issues through e2e.

    The question you are asking does not fall in those buckets.

    However, just for advice, one other method can be generating a zero crossing pulse and feeding that to eCAP, and measuring the time in between. I cannot provide more details in the scope of what i can do through the forums, as it will then amount to working on your project.