Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

oldndumb
Posts: 21
Joined: Tue May 02, 2023 4:18 pm

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

Postby oldndumb » Thu Feb 29, 2024 12:09 pm

@johann75
And I politely disagree with you. Esp32 is not 'completely' inaccurate or useless.

Now why don't you start by explaining what you would like to achieve and why it doesn't work for you? I've already told you that I don't work with the arduino framework, so I dont have a 'sketch'.
If you are looking for examples, I'd advise you to take a look at the esp-idf repository on github. It's got a whole bunch of them. Arduino does too I am sure. And then there is plenty on all kinds of fora to find. I've already tried to explain what I use it for. But you keep asking for more. What is it that you want to do?

oldndumb
Posts: 21
Joined: Tue May 02, 2023 4:18 pm

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

Postby oldndumb » Thu Feb 29, 2024 12:14 pm

Here is a link with examples. I'm using pretty much what is advised there.
Using version 4.4.4 myself:
https://docs.espressif.com/projects/esp ... s/adc.html

johann75
Posts: 6
Joined: Tue Feb 20, 2024 12:21 pm

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

Postby johann75 » Fri Mar 08, 2024 7:16 am

uint32_t reading = adc1_get_raw(ADC1_CHANNEL_5);
uint32_t voltage = esp_adc_cal_raw_to_voltage(reading, adc_chars);
Yes, I am using the above, but it is still inaccurate. It brings me only slightly close to what I am actually reading with a voltmeter. My job aim is to get as closed as possible to the actual.

oldndumb
Posts: 21
Joined: Tue May 02, 2023 4:18 pm

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

Postby oldndumb » Fri Mar 08, 2024 11:04 am

johann75 wrote:
Fri Mar 08, 2024 7:16 am
uint32_t reading = adc1_get_raw(ADC1_CHANNEL_5);
uint32_t voltage = esp_adc_cal_raw_to_voltage(reading, adc_chars);
Yes, I am using the above, but it is still inaccurate. It brings me only slightly close to what I am actually reading with a voltmeter. My job aim is to get as closed as possible to the actual.
You don't say how inaccurate. It would help so mutch if you just become clearer man. Why spend 10 messages if you can say it all in one? For sure you can improve by taking the average of 10-15 readings. Seems you have thought of the other ways to improve already. So I don't get the problem. It's going to be slightly off. But not completely unusable. If you don't come up with an exact usecase and problem I'm not going to spend more time replying. Sorry.

Who is online

Users browsing this forum: Baidu [Spider] and 84 guests