Hello Lubin,
When I put an analog signal on the Ao port of the 30f4013 and I connect an oscilloscope on a low pass filter after the OC pins, everything is working correct. (the frequency on the output is exact the same as the input). See the model in the attachment.
At least, with a filter from the expolorer16 model. This filter is working very well.
But when I design a filter with the FDatool (I tried a lot of designs) the system is not working. (So far as I know I can’t design with the FDatool a filter in the way of a discrete transfer Fcn).
I use a very simple function generator (XR2206, home made) which I have connected to an anti-alias filter (made from opamps, 5poles, Low Pass). Cut off frequency of this filter: 600Hz= {(Fs = 1200)/2}
I have connected a Schmitt trigger (74HC14) to this analog filter. The output from this 74HC14 is connected with the Ao port of the 30f4013.
I have connected the OC1 pin of the 30f4013 with a low pass filter (5 poles) of 200Hz.
Xr2206 – Low Pass filter 600Hz – 74HC14 – 30f4013 – Low Pass filter 200Hz
As I mentioned in the beginning: when I connect the output from this last filter with an oscilloscope, the frequency is exact the same as the input form the analog function generator (XR2206). The discrete transfer Fcn filter is working very well. But any other filter designed with the FDatool is, till now, not working.
Casparus
problem with filter
problem with filter
- Attachments
-
- forumkerhueladc_filter_OC.mdl
- (26.52 KiB) Downloaded 805 times
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: problem with filter
Hi Casparus,
You are making weird system. It is not very clear why you are using an ADC. What about using an Input Capture block to measure the period of your input signal?
There may be a problem with the filters you design. You should post a model with a non working filter.
It may help you to do simulation with filters you just design, checking that they are doing the job. Simulink is a very powerful tool for such design.
You may also use an UART and looking at signals at different steps. Have a look on the video Mariano has done. At the end, it shows how using the UART interface with the graphical user interface: http://www.kerhuel.eu/download/dsPicScr ... ariano.mov
Regards
Lubin
You are making weird system. It is not very clear why you are using an ADC. What about using an Input Capture block to measure the period of your input signal?
There may be a problem with the filters you design. You should post a model with a non working filter.
It may help you to do simulation with filters you just design, checking that they are doing the job. Simulink is a very powerful tool for such design.
You may also use an UART and looking at signals at different steps. Have a look on the video Mariano has done. At the end, it shows how using the UART interface with the graphical user interface: http://www.kerhuel.eu/download/dsPicScr ... ariano.mov
Regards
Lubin
Re: problem with filter
Hello Lubin,
As you see, I have uploaded some working filters, designed in the FDATool, with their properties in the way I designed them in the FDATool.
I do not fully understand why I cannot use the ADC block.
Anyway, I am intend to study the possibilities of the Input Capture block and start to work with the UART interface with the graphical user interface.
This video tutorial of Mariano is really good and very clear. All compliments! This is what I really miss on the Internet: practical tutorials in combination with your blockset.
Casparus
As you see, I have uploaded some working filters, designed in the FDATool, with their properties in the way I designed them in the FDATool.
I do not fully understand why I cannot use the ADC block.
Anyway, I am intend to study the possibilities of the Input Capture block and start to work with the UART interface with the graphical user interface.
This video tutorial of Mariano is really good and very clear. All compliments! This is what I really miss on the Internet: practical tutorials in combination with your blockset.
Casparus
- Attachments
-
- properties BP filter.gif (21.86 KiB) Viewed 11372 times
-
- properties LP filter.gif (20.35 KiB) Viewed 11372 times
-
- simforumwithLPfilter.mdl
- working LP filter
- (28.64 KiB) Downloaded 826 times
-
- simforumwithBPfilter.mdl
- working BP filter
- (30.71 KiB) Downloaded 784 times
Re: problem with filter
Hello Lubin,
Please, I am looking for some models with the Input Capture block.
Casparus
Please, I am looking for some models with the Input Capture block.
Casparus
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: problem with filter
Hi Casparus, I will have a look on your filters soon.
Input Capture block is quite similar to the Output Compare block. Despite I am using this block a lot (mostly to capture PWM duty cycle from remote control receiver) Ijust realize that there is no example using this block.
You must configure inside the block the max periode or time-up/Time-down you are to measure. Then, the max value in ICxmax correspond to this time.
Please read the help page about this block. Feel free to complete the page or to ask me to complete for any missing information.
Lubin
Input Capture block is quite similar to the Output Compare block. Despite I am using this block a lot (mostly to capture PWM duty cycle from remote control receiver) Ijust realize that there is no example using this block.
You must configure inside the block the max periode or time-up/Time-down you are to measure. Then, the max value in ICxmax correspond to this time.
Please read the help page about this block. Feel free to complete the page or to ask me to complete for any missing information.
Lubin
Who is online
Users browsing this forum: No registered users and 58 guests