Thanks Gustavo.jgustavoam wrote: ↑Tue Feb 14, 2023 8:45 pmHi 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.
Best Frequency Meter ever made with ESP32 - awesome!
Re: Best Frequency Meter ever made with ESP32 - awesome!
Re: Best Frequency Meter ever made with ESP32 - awesome!
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.
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!
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
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
-
- Posts: 1
- Joined: Sat Oct 07, 2023 7:43 pm
Re: Best Frequency Meter ever made with ESP32 - awesome!
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!!
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!
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
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!
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.
- 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 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
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
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Can we get duty cycle as well as frequency count?
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
Thank you in Advance
- 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 Tuku,
To measure the Duty cycle, it will require many changes to the code. I am currently unavailable to help you. Sorry.
To measure the Duty cycle, it will require many changes to the code. I am currently unavailable to help you. Sorry.
Retired IBM Brasil
Electronic hobbyist since 1976.
Electronic hobbyist since 1976.
Re: Best Frequency Meter ever made with ESP32 - awesome!
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
Who is online
Users browsing this forum: No registered users and 33 guests