Moderator: igrr
Vdd: 4.09
Vdd: 4.09
Vdd: 4.09
This is directly from the ftdi power supply which is 3.3 V. So thats .8 of a volt high at least(EDIT turned out to be 4.76V Yikes 3 chips all powered with this have not blown up and work well?))
Nothing connected using gr0b's program
VCC:4094
Battery:4694
(he added 600 to it
So I don't think you have it fellas . maybe you could fudge it by reducing the output by 800 , .8 of a volt but what makes you think this is a valid reading of the running voltage?
tytower wrote:Nothing connected using torntrousers program above
Vdd: 4.09
Vdd: 4.09
Vdd: 4.09
This is directly from the ftdi power supply which is 3.3 V. So thats .8 of a volt high at least
Nothing connected using gr0b's program
VCC:4094
Battery:4694
(he added 600 to it
So I don't think you have it fellas . maybe you could fudge it by reducing the output by 800 , .8 of a volt but what makes you think this is a valid reading of the running voltage?
The testing i've done with a multimeter connected while running readvdd33 have it accurate to about a tenth of a volt. Thats been on several different types of ESP. The readvdd33 value seems like it can only go as high as 4094 though, so running with a voltage higher than that will still just return 4.09 volts. Maybe you need to check your ftdi output voltage?
Added a couple of diodes and some resistors on the RX and TX lines and all good
Shows 3655 now and that agrees with multimeter
Changed the code a bit to put decimal points in
//used samples from http://www.esp8266.com/viewtopic.php?f=33&t=2485
//Use a silicone diode to drop the voltage from the Lithium battery to within a safe range for the ESP module (should be between 2.5-3.6v)
//readvdd33() does not return correct values if anything is connect to the ADC pin
extern "C" {
uint16 readvdd33(void);
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println();
}
void loop() {
float value=readvdd33();
Serial.print("Vcc:");
Serial.println(value/1000);
Serial.print("Battery:");
Serial.println(value/1000 + 1.2); //drop from 2diodes back to give us an idea of the battery voltage
Serial.println();
delay(5000);
}