6 Replies Latest reply on Jan 14, 2015 9:08 PM by user_14586677

    psoc creator filter example problem

    aayush.shah

       today i was trying to implemend the low pass filter example project given in psoc creator 3.1 on psoc 5 but i got undisered outputs. there was change in frequency as change in frequency of input if input was sine wave and output was also sine wave but when the input was sq wave and triangular wave the o/p wave forms were no where nwar the same. when i/p frequency was increased in pass band the attenuation was increased very steeply. i applied 1.7Vp-p sine wave input to psoc but when frequency was increased to around 400hz the voltage level droped to around 50mv p-p where as cutoff frequency was 6khz. plz tell me how to solve this. and i had one more dought do we have to give input to psoc as digital frequencies or analog frequencies plz reply asap 

        • 1. Re: psoc creator filter example problem
          user_14586677

          Consider posting your project, makes life easier to troubleshoot.

             

           

             

          “File”                                                             Creator

             

          “Create Workspace Bundle”

             

           

             

          Regards, Dana.

          • 2. Re: psoc creator filter example problem
            aayush.shah

             its the same example project of filter in psoc creator (lpf cut off freq 6khz)

            • 3. Re: psoc creator filter example problem
              user_14586677

              "change in frequency as change in frequency of input if input was sine wave and output was also

                 

              sine wave but when the input was sq wave and triangular wave the o/p wave forms were no where

                 

              nwar the same."

                 

               

                 

              If you have a LPF and you change the input signal but stay withing the LPF cutoff frequency then

                 

              the output sine tracks the input sign in frequency, shifted in time by group delay of filter. Because

                 

              the filter inband has a relatively flat frequency response the output signal from VDAC will

                 

              also not change in amplitude. as you approach the pole frequency(s) of the filter the output starts

                 

              dropping.

                 

               

                 

              If you LPF a square or triangle wave you will filter out some of its harmonics, thus the

                 

              waveform becomes a distorted square or tri wave.

                 

               

                 

              As your sine, or for that matter any other input, approaches the cutoff frequency of the

                 

              LPF you will see a decline in amplitude. Note this LPF is set up for a G = .5 = 6 db down

                 

              in the passband. So for starters if your in band input signal is 1 V pk-pk, it will be .5 V pk-pk

                 

              out of VDAC.

                 

               

                 

              Did your input sine drop in amplitude as you raised it to 400 Hz ?

                 

               

                 

              As shown in the example the input to the ADC is an analog signal. Its output is a digital

                 

              stream of sample values fed to DFB via DMA.

                 

               

                 

              Regards, Dana.

              • 4. Re: psoc creator filter example problem
                aayush.shah

                 yes as the frequecy increases the amplitude decreases drastically way before cutoff frequency

                   

                yes at 400hz the amplitude decreases to around 50mv pk-pk 

                • 5. Re: psoc creator filter example problem
                  user_14586677

                  Did your input sine drop in amplitude as you raised it to 400 Hz ?

                     

                   

                     

                  I should have been more clear, I was referring to your sine generator, is its

                     

                  output decreasing as you raise frequency of it ?

                     

                   

                     

                  Regards, Dana.

                  • 6. Re: psoc creator filter example problem
                    user_14586677

                    I modified the filter a little -

                       


                       

                    1) Set sampling rate up to 60 Khz

                       

                    2) Taps to a binary 64

                       

                    3) Added WaveDAC8 to gen test waveform

                       

                    4) Removed bias for A/D + in because WaveDAC8 itself is offset

                       


                       

                    I seem to get good results.

                       


                       

                    Regards, Dana.