Best Frequency Meter ever made with ESP32 - awesome!
- jgustavoam
- Posts: 165
- Joined: Thu Feb 01, 2018 2:43 pm
- Location: Belo Horizonte , Brazil
- Contact:
Re: Best Frequency Meter ever made with ESP32 - awesome!
Ahmet,
Unfortunately it is not possible to help you. You have made too many changes which could be the cause of the program malfunctioning!
You cannot change GPIO pins arbitrarily. There are rules that are in the documentation.
https://www.espressif.com/sites/default ... ual_en.pdf
Unfortunately it is not possible to help you. You have made too many changes which could be the cause of the program malfunctioning!
You cannot change GPIO pins arbitrarily. There are rules that are in the documentation.
https://www.espressif.com/sites/default ... ual_en.pdf
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Re: Best Frequency Meter ever made with ESP32 - awesome!
thanks for the answer. I tested it without making any changes to the program. frequency line transitions on the monitor at 1 second intervals.
Re: Best Frequency Meter ever made with ESP32 - awesome!
Dear jgustavoam, unfortunately there is something wrong again. I am currently working with your original code. If you don't help, I will have to stay in front of the computer until the morning and sleep during the day.
uint32_t sample_time = 1000;
uint32_t osc_freq = 50;
When I set it to, on the monitor;
Frequency: It is seen as 0 Hz.
In the same way,
uint32_t sample_time = 10000; (ten thousand microseconds)
uint32_t osc_freq = 50;
When I set it to, on the monitor;
Frequency: It is seen as 0 Hz.
In the same way,
uint32_t sample_time = 100000; (one hundred thousand microseconds)
uint32_t osc_freq = 50;
When I set it to, on the monitor;
Frequency: It is seen as 5 Hz.
as a result, it only measures normal frequency when set to 1s(1000000). My aim is to be able to measure this frequency in 100ms or less times on the LCD screen and monitor.
Could you please help to fix this situation.
uint32_t sample_time = 1000;
uint32_t osc_freq = 50;
When I set it to, on the monitor;
Frequency: It is seen as 0 Hz.
In the same way,
uint32_t sample_time = 10000; (ten thousand microseconds)
uint32_t osc_freq = 50;
When I set it to, on the monitor;
Frequency: It is seen as 0 Hz.
In the same way,
uint32_t sample_time = 100000; (one hundred thousand microseconds)
uint32_t osc_freq = 50;
When I set it to, on the monitor;
Frequency: It is seen as 5 Hz.
as a result, it only measures normal frequency when set to 1s(1000000). My aim is to be able to measure this frequency in 100ms or less times on the LCD screen and monitor.
Could you please help to fix this situation.
Re: Best Frequency Meter ever made with ESP32 - awesome!
Thanks Gustavo, have solved this problem according to your suggestions.
- jgustavoam
- Posts: 165
- Joined: Thu Feb 01, 2018 2:43 pm
- Location: Belo Horizonte , Brazil
- Contact:
Re: Best Frequency Meter ever made with ESP32 - awesome!
Ahmet58,
If you did the assembly like the tutorial and used the original code, everything should work perfectly.
If you've done all that and you still have a problem, let me know.
But it looks like you already solved your problem. I'm glad for that.
If you did the assembly like the tutorial and used the original code, everything should work perfectly.
If you've done all that and you still have a problem, let me know.
But it looks like you already solved your problem. I'm glad for that.
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Re: Best Frequency Meter ever made with ESP32 - awesome!
Yes, I solved the problem. I was really happy too. As you mentioned in your previous comments, there can be erroneous counts when the sampling time is set to low values. In my test, the count of frequencies less than 50hz below 100000 microseconds is wrong. I can accurately count the frequency values I want with 100 milliseconds. Problem solved. It was a really nice project. I hope you will announce new ones soon.
Re: Best Frequency Meter ever made with ESP32 - awesome!
hi, our prototype built show a littel difference, the default 12543Hz showing 12539Hz.
20MHZ is showing 20,000,156 HZ, it saying offset 156Hz
then half each step and offest does the same, till 10KHz
only an old 20MHZ CRT scope was used to counter check some spots, it is ok, but would like to understand more about this offset issue either the hardware variation or software issue related.
thanks.
20MHZ is showing 20,000,156 HZ, it saying offset 156Hz
then half each step and offest does the same, till 10KHz
only an old 20MHZ CRT scope was used to counter check some spots, it is ok, but would like to understand more about this offset issue either the hardware variation or software issue related.
thanks.
- jgustavoam
- Posts: 165
- Joined: Thu Feb 01, 2018 2:43 pm
- Location: Belo Horizonte , Brazil
- Contact:
Re: Best Frequency Meter ever made with ESP32 - awesome!
Hi xialaba,
As I mentioned in the tutorial, the frequency measurement can be calibrated with another frequency meter for calibration!
You can calibrate, changing the variable:
uint32_t sample_time = 1000000;
Regards
Gustavo Murta
As I mentioned in the tutorial, the frequency measurement can be calibrated with another frequency meter for calibration!
You can calibrate, changing the variable:
uint32_t sample_time = 1000000;
Regards
Gustavo Murta
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Re: Best Frequency Meter ever made with ESP32 - awesome!
Thanks Gustavo, I read your blog and trying to understand more about the Pulse Counter and oscillator. the mentioned offset that was GPIO33 and GPIO34 shorted via 1k resistor and then readout, it was feeding osc to the frequency counter. because no other good enough frequency counter to be used to calibrate this gadget, I did not understand whether oscillator no good or frequency counter over counting by varying sample_time.jgustavoam wrote: ↑Fri Feb 10, 2023 1:12 pmHi xialaba,
As I mentioned in the tutorial, the frequency measurement can be calibrated with another frequency meter for calibration!
You can calibrate, changing the variable:
uint32_t sample_time = 1000000;
Regards
Gustavo Murta
Code: Select all
//uint32_t sample_time = 1000000;
uint32_t sample_time = 1000000+319; // (12539-12543)/12543 *1000000 = 318.90
so this get me to further confusing about how the osc and the frequency counter related to each other, on this single chip.
- jgustavoam
- Posts: 165
- Joined: Thu Feb 01, 2018 2:43 pm
- Location: Belo Horizonte , Brazil
- Contact:
Re: Best Frequency Meter ever made with ESP32 - awesome!
Hi Xiaolab,
If you don't have another frequency counter or oscilloscope frequency meter, you won't be able to calibrate because you won't have a reference measurement.
The ESP32 oscillator has some limitations in the resolution of the generated signal adjustment. So you can't rely on that signal alone.
When you have a reference measurement for the calibration, the fit is empirical. Increase or decrease the variable value until you get a measurement closer to the reference value.
If you don't have another frequency counter or oscilloscope frequency meter, you won't be able to calibrate because you won't have a reference measurement.
The ESP32 oscillator has some limitations in the resolution of the generated signal adjustment. So you can't rely on that signal alone.
When you have a reference measurement for the calibration, the fit is empirical. Increase or decrease the variable value until you get a measurement closer to the reference value.
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Who is online
Users browsing this forum: Bing [Bot] and 38 guests