# Cypress Developer CommunityTM

## filter design psoc3

Summary: 14 Replies, Latest post by danaaknight on 21 Jul 2012 05:39 AM PDT
User
26 posts

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.

Cypress Employee
15 posts

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

User
2 posts

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()
{
for(;;)
{
AMux_1_Start( ); /* Reset all channels */
AMux_1_Select(0); /* Connect channel 1 */
br1+=1;
if (br1==65535)

{
result = suma1/65535 ;
konecen = sqrt(result);
}
AMux_1_Select(1); /* Connect channel 2 */
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 !!

User
2 posts

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

Thanks.

Cypress Employee
569 posts

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

User
4 posts

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.

Cypress Employee
569 posts

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.

User
4 posts

Thank you.

User
137 posts

hi to all

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

User
9263 posts

What do you need?

Bob

User
75 posts

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?