Is there a plugin or method to read the internal Vcc voltage using esp easy?
I currently have a few battery powered sensors and i monitor the voltage using readvdd33 so i can change the batteries when the get too low.
Read internal Vcc voltage
Moderators: grovkillen, Stuntteam, TD-er
Re: Read internal Vcc voltage
Well i had a go at writing a plugin to do this.
All seemed well at first.
But the readvdd33() instruction would cause a re-boot and interfered with the wifi connection (well documented problem)
But if the ESP is set to deep sleep it works great because the esp is re-booting over and over.
Also i could not get the value to be accepted by thingspeak because they were two different Tasks it was sending field1 and field2 in rapid succession as separate instructions,and thingspeak will only accept updates every 15 secs approx.
So i think it is ignoring the field2 update.
The only way i can see to get round this is too write a plugin for DS18b20 + Vdd Voltage (Not separate plugins)
All seemed well at first.
But the readvdd33() instruction would cause a re-boot and interfered with the wifi connection (well documented problem)
But if the ESP is set to deep sleep it works great because the esp is re-booting over and over.
Also i could not get the value to be accepted by thingspeak because they were two different Tasks it was sending field1 and field2 in rapid succession as separate instructions,and thingspeak will only accept updates every 15 secs approx.
So i think it is ignoring the field2 update.
The only way i can see to get round this is too write a plugin for DS18b20 + Vdd Voltage (Not separate plugins)
Re: Read internal Vcc voltage
You can use getVcc() instead of readvdd33, it is working, no more resets 
example

example
Code: Select all
//at the beginning of sketch
ADC_MODE(ADC_VCC); //vcc read
...
//in loop
float vdd = ESP.getVcc() / 1000.0;
Re: Read internal Vcc voltage
I would be interested in getting this plugin and I think, not only me, so you may publish it on github, so it can be merged with core, if it is stable.
Michal 'Kotek', greetings from Poland. Zapraszam na mój blog o automatyce domowej po polsku: http://www.ukotka.com.
Re: Read internal Vcc voltage
So far I know you can use some command to read the internal Vcc of the ESP but when you do that you cannot connect ANYTHING to the external ADC pin. So then why not use Analog Input in ESPEasy for reading the ADC. Ofcourse the ADC has a range upto about 1.1V so you have to use a divider to measure 3.3V. On the NodeMCU boards there is already a divider, 2 resistors, 220k to the ADC input and 100k from the ADC pin to ground. So it is easy to measure Vcc with ESPEasy, you only have to adjust the 'Formula Analog' in this way: %value%/333. This 333 need some calibration, then the value is given in volts in 3 digits.
About the resets when using the readvdd33() instruction, i believe this is solved in the Arduino ESPLibrary v2.0.0.
About the resets when using the readvdd33() instruction, i believe this is solved in the Arduino ESPLibrary v2.0.0.
Who is online
Users browsing this forum: No registered users and 11 guests