filter design psoc3

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

cross mob
JECA_264511
Level 3
Level 3
10 replies posted 5 replies posted First question asked

 have a good day.

   

could anyone help me please, i would like to design a low pass filter, but  i dont know how  should implement this in psoc creator,

   

the imput and output pins  i cant find.

   

 

   

thanks.

0 Likes
14 Replies
AnuM_41
Employee
Employee
10 replies posted 5 replies posted Welcome!

Note that PsoC 3 has a digital filter. We move in data to the staging register(input) and read the output from the holding register(output) of Digital filter block(DFB) using CPU/DMA. Refer the following example project for details:

   

http://www.cypress.com/?rID=40169

0 Likes
Anonymous
Not applicable

 Hi to everyone! I would use some help about one assigment, and I'll be grateful if you could help me. The assigment is on two input signal, I need to calculate the  efective value and I need to let the signal who has bigger effective value on the gate. My solution on this problem is the following:

   
    I squere and add every sample and I do that for some particular number of sample, in my case that number is 65535. After that the sum which is equal to the sum of the sgures I devide it with 65535, and then I find a root on that rusult. In that way I get the effective value. After that i compere the two effective value and I let to the gate the bigger one.   
   
    my code is:   
   
        
   
    
      #include <device.h>    
    
      #include <math.h>    
    
      double  result = 0;    
    
      double  konecen = 0;    
    
      double  konecen1 = 0;    
    
      int32 suma1=0;    
    
      int32 suma2=0;    
    
      double  result1 = 0;    
    
      int32 br1=0;    
    
      int32 br2=0;    
    
      void main()    
    
      {    
    
      ADC_DelSig_1_Start(); /* Initialize ADC */    
    
          for(;;)    
    
          {    
    
              AMux_1_Start( ); /* Reset all channels */    
    
      AMux_1_Select(0); /* Connect channel 1 */    
    
      ADC_DelSig_1_StartConvert();    
    
      ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT);    
    
      ADC_DelSig_1_StopConvert();    
    
      suma1+=ADC_DelSig_1_GetResult16() * ADC_DelSig_1_GetResult16();    
    
      br1+=1;      
    
              if (br1==65535)    
    
           
    
      {    
    
      result = suma1/65535 ;    
    
      konecen = sqrt(result);    
    
          
    
              }    
    
      AMux_1_Select(1); /* Connect channel 2 */    
    
      ADC_DelSig_1_StartConvert();    
    
      ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT);    
    
      suma2+=ADC_DelSig_1_GetResult16() * ADC_DelSig_1_GetResult16();    
    
      br2+=1;    
    
      if (br2==65535)    
    
           
    
      {    
    
      result1 = suma2/65535 ;    
    
      konecen1 = sqrt(result1);    
    
          
    
              }    
    
       if( br1==65535 && br2==65535)    
    
       {    
    
         br1=0;    
    
      br2=0;    
    
      suma1=0;    
    
      suma2=0;    
    
            if(konecen > konecen1)    
    
         {     
    
      AMux_2_Start( );    
    
      AMux_2_Select(0);    
    
      }    
    
             else    
    
              {    
    
         AMux_2_Select(1);    
    
      }     
    
      break;    
    
      }    
    
          
    
        }     
    
      }    
   
   
        
   
    
     Do you think this will work? Has anyone have a sugestion how I can advance the code? Then how can I make a conversion from a binary record on finaly and finaly1 into decimal becouse I will need to show it on the screen so I need the easiest way to do that? That should look like this:            
    
      Input signal1 effective value=number        
    
      Input signal2 effective value=number       
    
      output=signal1 or signal 2 it depends how is bigger    
    
      Is it better if I calculate the sum of the root with the interapt routine form adc?    
    
      Do you have any other ideas about how I can solve this problem? Thanks to everybody !!    
    
          
   
   
        
0 Likes
Anonymous
Not applicable

 Could anyone help me I have to design a low pass analogue filter?

   

Thanks.

0 Likes
Anonymous
Not applicable

Hi Gigo,

   

Yes it is possible to implement the algorithm, the way you have explained. Please tell us a little more about the nature of the signals being compared.

   
        
  • At what rate are these signals coming in and what rate is it being sampled. What is the resolution of the ADC that you have set. 
  •     
  • Also, after the RMS value calculation, do you want the RMS value to be put out , or do you want the 65k samples accumulated to be put out. Please clarify on this
  •     
  • To display the values out, you can either use USB or UART. For USB you might have to create your own GUI. 
  •     
  • A simple of way displaying on the PC is to use UART and Hyperterminal. After all comparisons are made, you can put out the data on UART and view it on an Hyperterminal.
  •    
   

-Udayan

0 Likes
Anonymous
Not applicable

Hello,

   

I'd like to implement three bandpass filters with the CY8CKIT-001 PSOC DEVELOPMENT Kit. I read some information about PSoc filters into the forum and I read the AN2099 application note too, but I'm still not sure that they can be implemented and how would can I do it.

   

The filter's characteristics are:

   

Filter1:  Fs=105Hz  Fi=45Hz   B=60Hz   Fr=68,7Hz  Q=1,14
Filter2:  Fs=145Hz  Fi=65Hz   B=80Hz   Fr=97Hz    Q=1,21
Filter3:  Fs=8Hz    Fi=0,5Hz  B=7,5Hz  Fr=2Hz     Q=0,26

   

If it is really possible to implement these kind of filters, what would be the best method, using DBF blocks, SC/CT o FIR filters?.

   

Best regards,

   

Antonio M.

0 Likes
Anonymous
Not applicable

In PSoC3, filters can be implemented using the DFB component that is available with PSoC Creator. Please see the following thread, http://www.cypress.com/?app=forum&id=2232&rID=41747. It is not possible to implement these filters in SC/CT blocks, like in the case of PSoC1. 

0 Likes
Anonymous
Not applicable

I'll see the thread.

   

Thank you.

0 Likes
Anonymous
Not applicable

 hi to all

   

can any body help me in Digital filtering for blood pressure monitor with psoc 3

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

What do you need?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

You may want to be more descriptive in what you need so that others can see what it is you need help with.

   

For example: What does the digital filter need to do? Have you already made one and it doesn't work, or are you looking for a place to start?

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The choice to use an Analog or Switch Capacitor or Digital has a number of design

   

characteristics from each.

   

 

   

Simplest filters are 2 pole single stage MFB filters, Sallen Key for low sensitivity. Also exhibit

   

low noise. Dependent on external RC components. Not tunable easily.

   

 

   

SCT, SCF filters are good for minimizing externals, but a little more noisy. A little more

   

capability to tune. But not continuous as caps and ratio of capacitors finite.

   

 

   

Digital, you have finite length word effects from A/D thru MAC to D/A. Much more accurate

   

if the word length supports it.

   

 

   

There are many good texts on this topic with technology comparisons.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

my thanks for replying to question and to be more in to question is an FIR Band Pass filter with DFB so that it passes 0.3 hz to 10 hz  signal for measuring blood pressure 

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

First you have to decide what filter response you want, passband ripple, and

   

stopband performance you are seeking, eg. how much out of passband rejection

   

you want. Generally this is a direct result of filter order and finite machine length

   

word size and taps.

   

 

   

Here is a cascade of Hilbert and LP to effect a basic BP to your partial specs.

   

Using Blackman window, each 64 taps.

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

If you want more exacting approximations try these design programs,

   

and transform to digital -

   

 

   

http://www.aade.com/

   

 

   

http://www1.icsi.berkeley.edu/~storn/fiwiz.html

   

 

   

Regards, Dana.

0 Likes