Hello,
I want to measure the frequency of a signal like the one that I am showing in the picture. I tried to measure the voltage with an analog-to-digital converter (MCP 3008 https://www.adafruit.com/product/856 ) and then I calculated the frequency with a python function in my code. This method works really well for low frequencies, but for high frequencies, this method is not very good. I thought that counting the peaks and the time between them would be another option, but I don't know how to do this. I would appreciate it if you have ideas on how to measure the frequency of this signal.
Thanks for your help.
Measuring frequency in a voltage signal
- Attachments
-
- signal_v1.jpg (231.25 KiB) Viewed 1092 times
Re: Measuring frequency in a voltage signal
Maybe have a look at the Nyquist sampling theorem - sample at (at least) twice the expected frequency to get a good result?
- hitsware
- Posts: 268
- Joined: Sat Mar 26, 2016 10:12 pm
- Location: sacramento , california , usa
- Contact: Website
Re: Measuring frequency in a voltage signal
Is that your oscilloscope in the picture ?
If so , read frequency at the bottom right of the display .
If so , read frequency at the bottom right of the display .
http://www.hitswares.com/
Re: Measuring frequency in a voltage signal
Can't you condition the signal to produce a digital output suitable for the 3V3 GPIO? Then just read the pulses direct rather than via the slower ADC interface.
Re: Measuring frequency in a voltage signal
As per Joan’s suggestion, try a zero crossing detector.
http://www.ti.com/lit/an/snoa999/snoa999.pdf
http://www.ti.com/lit/an/snoa999/snoa999.pdf
You can make a real CPU in a FPGA, but you can’t make a real FPGA in a CPU.
Re: Measuring frequency in a voltage signal
This is only a wild Idea to count the peaks is
Use a Zener diode as a peak clipper, At this point
The Zener diode will conduct .When it conducts
Use a Opto Isolato to switch a signal to the
Pi input
Regards BoyOh
Use a Zener diode as a peak clipper, At this point
The Zener diode will conduct .When it conducts
Use a Opto Isolato to switch a signal to the
Pi input
Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong
Some Times Right Some Times Wrong
- hitsware
- Posts: 268
- Joined: Sat Mar 26, 2016 10:12 pm
- Location: sacramento , california , usa
- Contact: Website
Re: Measuring frequency in a voltage signal
Say you covert to pulses and connect to gpio pin .
What then to count ?
What then to count ?
http://www.hitswares.com/
Re: Measuring frequency in a voltage signal
I think a little understanding of Digital Electronics
Might be of help to you on how to use the Pi as
a counter.
Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong
Some Times Right Some Times Wrong
Re: Measuring frequency in a voltage signal
How high is high frequency?
Re: Measuring frequency in a voltage signal
Time applied to a repetitive action ( Frequency)
BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong
Some Times Right Some Times Wrong
Re: Measuring frequency in a voltage signal
I know what frequency means. I was asking jleonqui as they said their setup worked for low frequencies but didn't for high frequencies. If they're trying to sample a 1MHz signal then the MCP3008 which has a maximum sample rate of 200ksps isn't going to work.