Rezo
Well-known member
I am building a power meter for audio on a Teensy 4.x and I would like to measure AC volts on an analog pin, AC amperes on an analog pin, but I would also like to measure the frequency of each sample, as well as the phase/time difference between them (for power factor calculation)
Sampling range is 10Hz-20Khz. I was thinking of running the ADC using a timer at around 400Khz to get a decent amount of samples at the upper range of the spectrum.
But what do I do for calculating frequency? I though of using FreqMeasureMulti but it's recommended for 0.1-1000Hz only and uses the pin as a PWM input(?)
Any other suggestions on how I could achieve the voltage sampling as well as calculating frequency? (It does not need to be accurate to a decimal point)
Sampling range is 10Hz-20Khz. I was thinking of running the ADC using a timer at around 400Khz to get a decent amount of samples at the upper range of the spectrum.
But what do I do for calculating frequency? I though of using FreqMeasureMulti but it's recommended for 0.1-1000Hz only and uses the pin as a PWM input(?)
Any other suggestions on how I could achieve the voltage sampling as well as calculating frequency? (It does not need to be accurate to a decimal point)