Page 6 of 9

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Sat Feb 18, 2023 2:57 am
by xiaolaba
jgustavoam wrote:
Tue Feb 14, 2023 8:45 pm
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.
Thanks Gustavo.

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Thu Apr 06, 2023 5:05 am
by heinzv
Hi, very good code, thanks a lot.
I have the same question as it was asked around 3 times but I have not found an answer/response to that questions: I also need to measure two frequencies at the same time. Is it possible to use two input pins or what need to be doubled or is it possible at all? A code snipped for a second counter would be very nice.

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Thu Sep 28, 2023 6:28 pm
by PeterEH
Dear jgustavoam

I have programmed an DOIT ESP32 with your Frequency Counter program everything works well I can get the Frequency readout on the Serial Console. and change Frequency as well.
I just have a problem with the attached serial LCD. I have changed the address in your program to 0x27, however I dont get anything on the display. I have downloaded a simple program to the ESP32 and here does the LCD work well. The wiring hasn't been changed, so I need a push in the right direction in order to get it to work.
Are there anything I shall be aware of regarding the IDE configuration?

Thank you in advance and best regards

Peter

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Sat Oct 07, 2023 7:48 pm
by Anas DAGGAG
Hello!! Thanks a lot for this project, it's awesome ! "Best Frequency Meter ever made with ESP32" Indeed!!

However if we want to change the sampling time, "sample_time", something is missing in the equation of the frequency.

Indeed the correct equation is :
"
frequency = ((pulses + (multPulses * overflow)) / 2.0)* 1e6/sample_time ; // Calculation of frequency
"

And of course for a sample_time of 1s, 1e6/sample_time equal one.

Thanks again!!

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Wed Oct 11, 2023 7:28 pm
by PeterEH
Dear Gustava,

Problem solved. In the code was #define LCD_I2C_OFF and it should have been #define LCD_I2C_ON. Everything is working now after the change.

All the best

Peter

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Wed May 01, 2024 6:30 am
by sairam59
PeterEH wrote:
Wed Oct 11, 2023 7:28 pm
Dear Gustava,

Problem solved. In the code was #define LCD_I2C_OFF and it should have been #define LCD_I2C_ON. Everything is working now after the change.

All the best

Peter
even with the LCD_I2C_ON I am not getting the display. I get only squares. But with other software lcd is working with the same connection.

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Wed May 01, 2024 1:29 pm
by jgustavoam
Hi Sairam,

I recommend checking these items
1) Your display is LCD 16 char x 2 lines + I2C PCF8574?
2) Check the I2c Interface lines:
#define I2C_SDA 21 // LCD I2C SDA - GPIO_21
#define I2C_SCL 22 // LCD I2C SCL - GPIO_22
3) Which PCF8574 module are you using? What is the I2C address?
LiquidCrystal_PCF8574 lcd(0x3F);
4) Run the tests with I2C scanner:
viewtopic.php?t=4742

Can we get duty cycle as well as frequency count?

Posted: Wed May 01, 2024 5:04 pm
by t_tuku
Hi you have created a best frequency meter ever in the internet. My requirements are, apart from getting frequency, I need to get duty cycle from the given code. But I can't figured out from where I can got this. Please help me to get the DUTY CYCLE as well.

Thank you in Advance

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Thu May 02, 2024 1:00 am
by jgustavoam
Hi Tuku,
To measure the Duty cycle, it will require many changes to the code. I am currently unavailable to help you. Sorry.

Re: Best Frequency Meter ever made with ESP32 - awesome!

Posted: Thu May 02, 2024 2:47 am
by t_tuku
I am waiting for ur availability. I need it urgently. BTW I can wait some days . Otherwise can you pls tell where to search for in the code.. I will try my best