Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 220658

Forum Post: RE: TMS320F28379D: CMPSS + ECAP accuracy problem measuring frequency

$
0
0
Hi Frank, [quote userid="146390" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1083237/tms320f28379d-cmpss-ecap-accuracy-problem-measuring-frequency/4019024#4019024"]Sorry, that is not what I meant. I wanted you to add a schmitt trigger configuration to the CMPSS i.e connect a feedback resistor from the output i.e GPIO to the Input i.e CMPSS pin. The actual value of the feedback resistor will depend on how much noise is on the sine. You will need to play around with this but you can start with a value that gives you an effective hysteresis of 100mV and then proceed from there. Please be sure to disable the internal hysteresis and filter and also remove the RC so as not to conflate the different knobs. Let us know if this is not clear.[/quote] So we have only to add the feedback resistor (R2) between the output GPIO of the cmpss and the input pin of the cmpss or we have also to add the other common resistor (R1) of the schmitt trigger like this: We tried with a very large hysteresis and with a couple of resistors R1=220 Ohm and R2=1 kOhm just to try and we didn't have good results. Also we noticed that the sine wave (generated by the function generator) was disturbed (like in the figure): [quote userid="146390" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1083237/tms320f28379d-cmpss-ecap-accuracy-problem-measuring-frequency/4019024#4019024"]Can you capture an FFT of the sine? Make sure there is enough FFT gain so any potential spurs are visible. This should hopefully let us know if there is a specific frequency or specific sets of frequencies causing this which will help in your filter design.[/quote] We didi it and these are the results: - From 0 to 50 kHz, 5 kHz/div - From 0 to 1.25 kHz, 125 Hz/div - From 123.75 kHz to 136.25 kHz, 1.25 kHz/div It seems that we have the 50 Hz and the harmonics and the 130 kHz that can create problems. Is it right? [quote userid="146390" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1083237/tms320f28379d-cmpss-ecap-accuracy-problem-measuring-frequency/4019024#4019024"]P.S Rather than try to correct the issue at the sink, is there anything you can do at the source to make it produce a cleaner sine?[/quote] We actually take the grid sine and use a voltage divider and a TI AMC1200 to obtain a sine between 0 and 3 V.

Viewing all articles
Browse latest Browse all 220658

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>