Filtering with Psoc 5lp

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

cross mob
Anonymous
Not applicable

Hello everyone.

   

I am trying to implement a low pass filter using the Psoc 5lp. I have watched the video titled "How to create an analog filter with Psoc 5lp" and am having trouble getting the same results as the video. With a filter gain of 0.5 (linear), the output signal is not matching the input signal in the pass band of the filter. In fact, the output is almost nothing. Has anyone had any issues with filtering using the Psoc 5lp? Any suggestions or sample programs would also be beneficial. Thank You all for your time.

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

Welcome in the forum, Corya!

   

Can you please post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

   

I accidentally posted the file as a comment and not as a reply. Thank You

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Bob,

   

Attached is what you asked for. Any help is greatly appreciated!! Thank You!

   

 

   

-Cory

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

Although you are caring for positive input to the adc, the output of the filter will have negative values. You will need to add 128 to each of the samples from filter before sending them to VDAC.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks, Bob.

   

 

   

By being new to cypress and the psoc lp5, do you have any suggestion on how to do this? Adding this factor of 128 was not shown in the tutorial video.

   

 

   

Cory

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

Converting an int8 from with the range of -128..+127 into an uint8 range 0..255 is done by adding 128 to the int8.

   

Hence you cannot do that using DMA, you need to pick the value from the filter, add 128 and send to DAC. Would need an interrupt or checking for a filtered value ready.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello Cory and Bob!

   

I am trying to implement the example program on my PSoC 5LP(CY8C5888LTI-LP097) as well. I currently am just trying to verify the operation of the example program by applying a 1Vpp sine wave  with a 0.5V dc offset to the input. I am currently getting no signal on my oscilloscope from the output of the VDAC. I have uploaded the program I am currently running, which is essentially is just the example project.

   

Eventually I intend to use the filter for human voice range roughly 85-255Hz, but I just want to verify the operation of the example program first. Any help would be greatly appreciated!

   

-Kevin

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

Some scope pictures could help to see what's going on. I would suggest to increase the IMO frequency to 48MHz giving the interrupt handler some headroom.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello again Bob!

   

I have attached screenshots from the Oscilloscope to this message. The input signal is a 1Vpp sine wave with a 0.5 DC offset. The frequencies of the input screenshots are at 3kHz and 8kHz. Could you tell me where I would adjust the IMO frequency as well?

   

Just to be clear I am using the CY8CKIT-059 board with the CY8C5888LTI-LP097 chip. I just wanted to clarify that in case I may be using a wrong pin or that the board is incapable of performing this application.

   

Any help would be greatly appreciated! Thanks!

   

-Kevin

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

Do not use pin0_2. It is bypassed with a 1.0µF cap!

   

In view for assigning the pins, click on "Clocks" tab, then double click on IMO for settings

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks! I switched the output to pin0_5 and switched the IMO frequency up to 48MHz, but I am still unable to see anything on my output. Any other suggestions?

   

-Kevin

0 Likes
Anonymous
Not applicable

The issue has been located Bob. I used a friends board to test the program and it operated correctly. Thank you so much for all your help!

   

-Kevin

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

Awesome! I felt like at end of my wits 😉

   

 

   

Bob

0 Likes