Is it possible to concurrently measure 3 frequencies using only timer1? I was able to measure then in series with a multiplexer but it takes too long and I really need them to be measured all at once.
I am using arduino uno and the other two timers are already being used for other things.
I do know that could go for more expensive platform with more timers and use one timer for each frequency but I am on a tight budget,,,
Timers work well to measure frequency only if (1) a single frequency is present and (2) the wave shape is well formed, as in pure sine or square.
To measure 3 frequencies simultaneously, you need to do analog sampling and analysis with FFT, FHT or autocorrelation techniques.
If the frequencies don't change and are not fast, perhaps 10KHz or less with signal crossing above 3V to less than 1.5V then it wouldn't be too hard using micros() to time them. Accuracy will improve the longer you sample.
I would do it by connecting all 3 lines to one port and poll the port continuously. With non-blocking code it's possible to do that and process the reads at over 50KHz.
You could apply your 3 frequencies to 3 different pins and use pulseIN() to measure the period of each input sequentially. It isn't quite concurrent, but may be quick enough..
Allan
Do NOT connect your 3 Frequency Inputs to ONE pin (as mentioned above)
You will never find out which signal source is responsible for a high/low or low/high change.
Using PulseIn() with 3 different pins might work at low frequencies.
There is a lower and upper frequency limit for this solution.
If you do not have a signal generator, use a NE555 chip (less than half a dollar) to generate your own signals for testing.