INTRODUCTION
Hello everyone,
My name's Luis, I live in Alicante, Spain, and I am starting a new project using teensy 3.1. I have been some days reading and collecting interesting info at this forum, so useful. Just wanted to write here what I am trying to do, maybe somebody has done it before or can give me some advice.
MY PROJECT
I have 2 leds in different rooms that flash at different frequencies (rigth now 45 and 50Hz, but could be changed).
I have a receiver led connected directly to my teensy's ADC. (rigth now I measure this signal at 200Hz).
My goal is to be able to detect if I am close to one led or the other, looking for this frequencies (45 and 50Hz) in the ADC signal.
I have tried with an oscilloscope first instead of the adc and looks good, I can easily see the modulated signal from both leds (not both at the same time, maybe in the future).
Of course, this signal has lots of noise, variable amplitude, etc. Depending on how I move the receiver led, how close it is, ligth from other sources, etc.
HELP
Any advise on how should I process this signal to check if any of those frequencies is present?
MORE DETAILS
My approach rigth now: I read the ADC at 200Hz and store it in a buffer. Every half a second (I have 100 measures) I process that signal and want to know if there is any noticeable component at the frequency I am looking for. Haven't tried this last step yet.
My options: First of all I wanted to try a fast fourier transform FFT. Found the one implemented in Audio library and the one in adafruits webpage (https://learn.adafruit.com/fft-fun-with-fourier-transforms/overview-1) and some others. They all look complex, cpu consuming... Maybe it is easier in my case that I have so little measures to analyze and such low frequencies?? I am a bit lost here...
My other option is to implement a matched filter or goertzel filter (https://netwerkt.wordpress.com/2011/08/25/goertzel-filter/) but I realised I will have to do it twice as I want to distinguish 2 frequencies...
How would you do it? Is there a easier way? Am I missing something?
Thank you very much for your help.
Hello everyone,
My name's Luis, I live in Alicante, Spain, and I am starting a new project using teensy 3.1. I have been some days reading and collecting interesting info at this forum, so useful. Just wanted to write here what I am trying to do, maybe somebody has done it before or can give me some advice.
MY PROJECT
I have 2 leds in different rooms that flash at different frequencies (rigth now 45 and 50Hz, but could be changed).
I have a receiver led connected directly to my teensy's ADC. (rigth now I measure this signal at 200Hz).
My goal is to be able to detect if I am close to one led or the other, looking for this frequencies (45 and 50Hz) in the ADC signal.
I have tried with an oscilloscope first instead of the adc and looks good, I can easily see the modulated signal from both leds (not both at the same time, maybe in the future).
Of course, this signal has lots of noise, variable amplitude, etc. Depending on how I move the receiver led, how close it is, ligth from other sources, etc.
HELP
Any advise on how should I process this signal to check if any of those frequencies is present?
MORE DETAILS
My approach rigth now: I read the ADC at 200Hz and store it in a buffer. Every half a second (I have 100 measures) I process that signal and want to know if there is any noticeable component at the frequency I am looking for. Haven't tried this last step yet.
My options: First of all I wanted to try a fast fourier transform FFT. Found the one implemented in Audio library and the one in adafruits webpage (https://learn.adafruit.com/fft-fun-with-fourier-transforms/overview-1) and some others. They all look complex, cpu consuming... Maybe it is easier in my case that I have so little measures to analyze and such low frequencies?? I am a bit lost here...
My other option is to implement a matched filter or goertzel filter (https://netwerkt.wordpress.com/2011/08/25/goertzel-filter/) but I realised I will have to do it twice as I want to distinguish 2 frequencies...
How would you do it? Is there a easier way? Am I missing something?
Thank you very much for your help.
Last edited: