Pages: [1]   Go Down
Author Topic: low pass filter is needed?  (Read 766 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. i want a working code for lowpass filter (butterworth)..or anyother one..just i need a working code..pls help me
Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 254
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try this:
http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

dear i used this site to genrate the filter ..but how to program the arduino mega 2560 to perform this filter

Code:
Summary
You specified the following parameters:
filtertype  =  Butterworth 
passtype  =  Lowpass 
ripple  =   
order  =  1 
samplerate  =  30 
corner1  =  10 
corner2  =   
adzero  =   
logmin  =   

Results
Command line: /www/usr/fisher/helpers/mkfilter -Bu -Lp -o 1 -a 3.3333333333e-01 0.0000000000e+00
raw alpha1    =   0.3333333333
raw alpha2    =   0.3333333333
warped alpha1 =   0.5513288954
warped alpha2 =   0.5513288954
gain at dc    :   mag = 1.577350269e+00   phase =   0.0000000000 pi
gain at centre:   mag = 1.115355072e+00   phase =  -0.2500000000 pi
gain at hf    :   mag = 0.000000000e+00

S-plane zeros:

S-plane poles:
-3.4641016151 + j   0.0000000000

Z-plane zeros:
-1.0000000000 + j   0.0000000000

Z-plane poles:
-0.2679491924 + j   0.0000000000

Recurrence relation:
y[n] = (  1 * x[n- 1])
     + (  1 * x[n- 0])

     + ( -0.2679491924 * y[n- 1])



Ansi ``C'' Code
/www/usr/fisher/helpers/gencode: input format error (6)


Error!
Command failed (return code 256)

« Last Edit: April 17, 2013, 01:45:50 pm by dany151 » Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 254
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's annoying, for some reason it is having trouble generating the c code, I've used it before and I didn't have these problems, I'll see if I can find anything else

EDIT: You could try this: https://github.com/vinniefalco/DSPFilters but it might eat up most of your program memory on the Arduino. If you are applying a low pass filter just to smooth your data, you could try a moving average.
« Last Edit: April 17, 2013, 04:19:36 pm by tobyb121 » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34726
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. i want a working code for lowpass filter (butterworth)..or anyother one..just i need a working code..pls help me
There are an infinite number of low pass filters. You need to be more specific aboute what you want. Cutt off frequency, order and Q at the very least.
And do not just demand things we are not your servants.
Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 254
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is quite a simple and reasonably well explained example:
http://baumdevblog.blogspot.co.uk/2010/11/butterworth-lowpass-filter-coefficients.html
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you dear tobyb121
--------------------
Quote
There are an infinite number of low pass filters. You need to be more specific aboute what you want. Cutt off frequency, order and Q at the very least.
And do not just demand things we are not your servants 

did you read this before you post?
Quote
Summary
You specified the following parameters:
filtertype  =  Butterworth 
passtype  =  Lowpass 
ripple  =   
order  =  1 
samplerate  =  30 
corner1  =  10 
corner2  =   
adzero  =   
logmin  =   

Results
Command line: /www/usr/fisher/helpers/mkfilter -Bu -Lp -o 1 -a 3.3333333333e-01 0.0000000000e+00
raw alpha1    =   0.3333333333
raw alpha2    =   0.3333333333
warped alpha1 =   0.5513288954
warped alpha2 =   0.5513288954
gain at dc    :   mag = 1.577350269e+00   phase =   0.0000000000 pi
gain at centre:   mag = 1.115355072e+00   phase =  -0.2500000000 pi
gain at hf    :   mag = 0.000000000e+00

S-plane zeros:

S-plane poles:
    -3.4641016151 + j   0.0000000000

Z-plane zeros:
    -1.0000000000 + j   0.0000000000

Z-plane poles:
    -0.2679491924 + j   0.0000000000

Recurrence relation:
y[n] = (  1 * x[n- 1])
     + (  1 * x[n- 0])

     + ( -0.2679491924 * y[n- 1])



Ansi ``C'' Code
/www/usr/fisher/helpers/gencode: input format error (6)


Error!
Command failed (return code 256)
Logged

Pages: [1]   Go Up
Jump to: