ESP32 inconsistent readings on GPIO D33/D32
Posted: Mon Jan 27, 2020 8:35 pm
Hi Experts,
I cannot get this right, so thought about asking for help here...
I have an ESP32 DOIT dev board with D32, D33 used in input mode as follows:
On D32 I have a temp sensor (D18B20).
On D33 I use a voltage divider (1MOhm, 1.32MOhm) to allow me to read the voltage on a source of ~5.6V.
The following lines of code read the temp:
OneWire oneWire(D32);
DallasTemperature sensors(&OneWire);
sensors.begin()
sensors.requestTemperatures();
sensors.getTempCByIndex(0);
Now, if I comment out these lines, looking at the osciloscope I see a small variation on the input voltage read by D33 during ESP32 operation: ~208mV
If I add the lines, I have ~580mV and it takes 180ms to complete the temp reading. This is reducing battery time quite a lot.
Wondering if anyone had experience with this temp sensor and libraries. Am I missing anything on my circuit ? Any suggestions to reduce the battery consumption ?
Thanks in advance!!!
I cannot get this right, so thought about asking for help here...
I have an ESP32 DOIT dev board with D32, D33 used in input mode as follows:
On D32 I have a temp sensor (D18B20).
On D33 I use a voltage divider (1MOhm, 1.32MOhm) to allow me to read the voltage on a source of ~5.6V.
The following lines of code read the temp:
OneWire oneWire(D32);
DallasTemperature sensors(&OneWire);
sensors.begin()
sensors.requestTemperatures();
sensors.getTempCByIndex(0);
Now, if I comment out these lines, looking at the osciloscope I see a small variation on the input voltage read by D33 during ESP32 operation: ~208mV
If I add the lines, I have ~580mV and it takes 180ms to complete the temp reading. This is reducing battery time quite a lot.
Wondering if anyone had experience with this temp sensor and libraries. Am I missing anything on my circuit ? Any suggestions to reduce the battery consumption ?
Thanks in advance!!!