Adjustable Active Low Pass Filter for PSoC

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

cross mob
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

I want to achieve an Adjustable active LPF in PSoC.

I found related material here.

Is it possible to configure this circuit with PSoC (4 / 5LP / 6)?

The required specifications are as follows:

- Vin : 1~3V

- Fin : 3~4kHz Sine wave

- Cutoff frequency : 1kHz

- Resolution that I want to adjust : 10~100Hz

Thanks,

Tetsuo

0 Likes
1 Solution

Tetsuo,

take a look at this MAXIM 5-th order switched cap filter ($1.63), adjustable 1Hz to 12kHz

MAX7427CUA+T

The clock-to corned frequency is 100:1, so to have e.g. 12kHz cut-off, you need to clock it at 1.2MHz. In combination with low-cost PSoC4 and DDS32 generator, the cutoff frequency can be controlled with <0.01Hz precision.

Re: Need a programmable frequency generator

DDS32 occupies 2 to 4 UDB Datapath blocks (16-bit  to 32-bit modes) and can be fitted into low-cost PSoC4200 micros. You can find the latest version of the DDS32 generator here:

Re: DDS24: 24-bit DDS arbitrary frequency generator component

/odissey1

DDS32_P4_basic.png

View solution in original post

0 Likes
18 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Tetsuo,

PSoC4, 5 and 6 don't have such flexibility of switched capacitor block as the PSoC1, and can't provide smooth gain adjustment utilized in the App Note for filter with variable Q-factor. The filter described in that AN is quite exotic. If you describe your project goals, maybe we can find some other solution using PSoC 4, 5 or 6.

/odissey1

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

BoTa-san,

Thank you for your comments.

If AN2030 is not considered, is there a way to do it?

Or, is there a way to configure an Adjustable Active LPF with a PSoC 4 / 5LP / 6 in the first place?

Thanks,

Tetsuo

0 Likes

Tetsuo,

As I mentioned, the filter described in the AN is quite exotic. All it does is changing Q-factor of the HPF. The filter cutoff frequency Fc remains the same. At high Q the filter becomes an oscillator. Do you really need that? Or you need standard high-pass filter with adjustable cutoff Fc? The later can be accomplished using PSoC5 or PSoC6 using DSP features (ADC-FILTER-DAC).

/odissey1

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

BoTa-san,

Thank you for your reply again. Also, I am sorry for the explanation that is difficult to understand.

First of all, I want to configure is LPF (not HPF). AN2030 is mentioned in HPF, but I thought it could be applied to LPF by changing the topology. (Swap R and C)

I want to configure a standard LPF with an adjustable cutoff. And, I want to change only the cutoff without changing the gain. Can I think that it can be configured with DSP features as well?

Thanks,

Tetsuo

0 Likes

Tetsuo,

Please take a look on this example DelSig-ADC - Filter - VDAC

DelSig_ADC - Filter - VDAC8 streaming demo using DMA

It gives a PSoC5 example of sampling input at 48kHz by ADC, then digitally filtering it using LPF FIR filter with fixed cutoff frequency of 5 kHz, and outputting the result using 8-bit VDAC. This will work on PSoC5 only.

The demo shows the drawbacks as well: the sampling frequency is rather low; the filter cutoff is fixed at 5 kHz; the output is only 8-bit. To change filter cutoff frequency, the filter coefficients must be re-uploaded, meaning that the array of 128 (int32) must be precalculated for each Fc and kept in the flash. When needed, the filter coefficients can be updated. I believe that calculating FIR coefficients on-the-fly inside PSoC5 is hard to impossible. So this can give some 10-20 predefined cutoff frequencies, but continuously changing Fc is not possible.

I don't know if such DSP filtering can be done in PSoC6. It does have M4 co-processor, but you need to find some DSP libraries to do filtering. PSoC6 has better 13-bit DAC, but only 12-bit ADC.

Finally, you may consider analog  solutions outside PSoC environment. For example using switched capacitor filters from Analog Devices or Maxim. Their cut-off frequency is simply controlled by the external clock frequency

Low Pass Filters | Analog Devices

You may also consider FPAA from Anadigm (which is also switched cap filter).

Anadigm FPAAs

/odissey1

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

Odissey-san,

Thank you for the example.

Isn't it possible to build a simple CR LPF Filter that uses only C, R, and an amplifier? If I could configure it, I thought I could change the cutoff frequency by making R and C variable.

I want to configure it low cost if possible.  Both device cost and design volume.

Thanks,

Tetsuo

0 Likes

Tetsuo,

What are the required specs:

1. input frequency range,

2. LPF cutoff frequency range (min-max),

3. input type (differential / single ended),

4. filter order / suppression ration (dB),

5. phase linearity requirement, etc?

/odissey1

0 Likes

Tetsuo,

take a look at this MAXIM 5-th order switched cap filter ($1.63), adjustable 1Hz to 12kHz

MAX7427CUA+T

The clock-to corned frequency is 100:1, so to have e.g. 12kHz cut-off, you need to clock it at 1.2MHz. In combination with low-cost PSoC4 and DDS32 generator, the cutoff frequency can be controlled with <0.01Hz precision.

Re: Need a programmable frequency generator

DDS32 occupies 2 to 4 UDB Datapath blocks (16-bit  to 32-bit modes) and can be fitted into low-cost PSoC4200 micros. You can find the latest version of the DDS32 generator here:

Re: DDS24: 24-bit DDS arbitrary frequency generator component

/odissey1

DDS32_P4_basic.png

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

Odissey-san,

The required spec are as follows:

Fin : DC~4kHz

Fc : 1~3kHz, adjust resolution : 10Hz (1.000kHz, 1.010kHz, 1.020kHz, ... , 2.980kHz, 2.990kHz, 3.000kHz)

Input type : single ended

I don't understand other parameters. Should I give Q-factor?

thanks,

Tetsuo

0 Likes

Tetsuo,

I think the above combination: MAX7427 + PSoC4 is ideal low-cost solution for your task. To have equidistant frequency intervals requires DDS (the clock divider or PWM won't work). So you would need some PSoC4200 series with at least 4 UDB blocks.

The DDS shall produce frequencies 100x of the Fc: 100kHz, 101kHz, 102kHz,...3.0MHz to control Fc.

The MAX7427 is an old chip, and only 5-th order, but it is low cost.

/odissey1

0 Likes

Tetsuo,

If microcontroller is not needed, the cheapest is to use SiLabs PLL

SI5351A-B-GTR ($.86 @ Digikey) as a  programmable clock source

/odissey1

0 Likes

Tetsuo,

The other suggestion to reduce the cost even further would be to use older Cypress chip PSoC 1. It has many switched capacitor blocks which can be configured for LPF. In large quantities it should be about $1-1.5. Unfortunately, I have no experience with PSoC 1, so it would be better to contact Cypress representative for assistance directly.

/odissey1

0 Likes

mf4cn-100, fourth order switched capacitor Batterworth, $0.40 (100+ pc)

0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

Oddisey-san,

I want to configure it with PSoC alone (single chip). Because I don't want to be affected by the EOL of other devices. I want to make a board as a LPF module with a single chip.

For the same reason, I don't want to use PSoC1 with new design.

However, MAXIM's solution is very attractive. I consider with this solution.

Thanks,

Tetsuo

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

Tetsuo-san

Nobody's spoken about another option:  Create your own switched capacitor block using the PSoC and multiple external caps.

Here's a schematic:

pastedImage_18.png

I've attached the TopDesign file.

With Pin_SCT_cntl, you can control which caps get grounded which determines the total capacitance which will change the corner frequency of the LPF.

This implementation takes 8 PSoC pins, 1 external resistor and 5 external caps.

Here is the table of computed corner frequencies for the Pin_SCT_cntl value selected.

pastedImage_1.png

I've attached the xls file as well.

If you need different corner frequencies, you can change the caps, the resistor or add additional caps and GND control outputs from the PSoC.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

LePo-san,

Thank you for you comments.

I think the resolution is coarse with this solution. A lot of C and R are required to realize adjust in 10Hz adjust units. Is it correct?

Thanks,

Tetsuo

0 Likes

Tetsuo-san,

You are correct.  I've changed my previous post and xls file to include a delta FC value.

You can add more switched caps and change cap values to somewhat improve the resolution.

I believe this decreasing resolution as you increase the Fc is a common issue with switch capacitors implementation.  I think this is still the case for the MAXIM7427.

The  issue is that the math is logarithmic for the decrease of the resolution vs. the increase of corner frequency.

I am not aware of any product that will allow you to gain +/- 10Hz resolution across the entire 1Hz to 3KHz operation range.

Usually, frequency factors are designed to the logarithmic decade.  The first decade is 1 to 9.9Hz.  The second is 10Hz to 999Hz. The third 1KHz to 99KHz, etc.

Because of the logarithmic characteristics, designs usually target a number of steps per decade.  For example, each decade would have 10 steps.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
TeMa_2997106
Level 6
Level 6
Distributor - TED (Japan)
10 likes received 10 solutions authored 250 replies posted

Len-san,

Thank you for your response again.

In this case, it is required fine precision.

Therefore, I consider an external solution such as a MAXIM device as suggested by Oddisey-san.

Thanks,

Tetsuo

0 Likes