4 Replies Latest reply on Dec 12, 2011 2:52 AM by udayanu_

    Filters in PSoC 5



      I read the datasheet of the filter component, and it says that I should use only one filter per design. What I am trying is to filter out the data from the 3 axis accelerometer on the FTK. I know taht I have to use a MUX and DelSig ADC. How can I use filter in this case for all 3 axis?





        • 1. Re: Filters in PSoC 5





          the filter available in psoc5 is a digital filter. so, you ought to use an adc in multiple sample mode to obtain the digital value which then has to be sent to the filter block using a dma.


          the digital filter by default shows up with two channels. this takes care of two of the axis. i am unaware of how you can filter the third axis of the accelerometer.

          • 2. Re: Filters in PSoC 5

            Hi David,


            Thank you for the reply. I am aware of this configuration, and I know that I will be missing an axis in this case. I was wonderinf if someone know a trick to "multiplex" the output of the ADC. Let say storing the data in a buffer, and then sending it to the filter on portions. I know that for the filter to do it's job it needs constant flow of data. But still.. if thare is a way (even implementing digital filter from other components or software one. I am already thinking in taking the analog signals out of the CPU , passing them through analog bandpass filters, and putting them back into the CPU. Unfortunately this will require additional 6 free I/Os of the board.


            The thing is that the accelerometer is very sensitive (which is good), and trying to get the velocity integrating the signal is causing biasing due to the high noise level. And if I want to use an accelerometer for movement detection, or speed detection, I can not rely on the raw data without decent filtering.


            Thank you everyone for looking at my post, any ideas are welcome.



            • 3. Re: Filters in PSoC 5

               hi Stoyan


              I suppose I'm not late. but what I was thinking is, we can actually design our own components in PSoC 5. So why dont you design a digital filter using UDB's for that purpose. Don't know if it that was of any help.

              • 4. Re: Filters in PSoC 5
                • There are multiple things that you can do to filter the output of the accelerometer.
                • First and simplest method is to put a capacitor at the output to perform analog filtering. Most of the accelerometer datasheet specifies the required capacitors to perform filtering based on some characterisation data that they have.
                • Second method: Firmware filter. Requires little more effort than just choosing components for filtering. Simplest thing to do for an accelerometer would be to averaging. Collect ceratin number of sample and average the same. Use the averaged data. Typically accelerometers have outputs datarate of about 1000 - 2000 hz. So you need to sample the data atleast 10 or 20 times of this speed in order to perform effective filtering. Instead of simple averaging, you can as well implement some FIR filters in the firmware if you can get the coefficients for the filter.
                • Third method: Using DFB. The DFB component has 2 channels, but these two channels can be used be used to filter more than 2 channels but it depends on the nature of the signal that needs to be filtered. Since accelerometer output is typically about 1600Hz(maximum), DFB channel can be used to filter all 3 axes of an accelerometer, since it runs at a very high speed.

                Firmware filter seems to be ideal in your case.