Hi all,
Update:
I just read the information on the ADC documentation page:
To measure the VCC voltage, set
pin:
toVCC
and make sure nothing is connected to theA0
pin.
Looks like I’m not able to sense VCC and use A0. Something that is slightly problematic for my use case it would be beneficial to know the VCC.
New to the forum so hopefully I’m able to follow the correct format.
Little background of my project:
- Using a NodeMcu V3 LoLin board (ESP8266) powered at the 5v USB pin (or USB connector).
- 50k @ 25c NTC thermistor with 100k resistor.
Sensors:
sensor:
- platform: adc
pin: VCC
name: "VCC Voltage"
update_interval: 5s
- platform: ntc
sensor: resistance_sensor
calibration:
b_constant: 3950
reference_temperature: 25°C
reference_resistance: 50kOhm
name: NTC Temperature
- platform: resistance
id: resistance_sensor
sensor: source_sensor
reference_voltage: 1.0
configuration: DOWNSTREAM
resistor: 100kOhm
name: Resistance Sensor
- platform: adc
id: source_sensor
pin: A0
update_interval: 5s
The problem is when I enable the VCC Voltage sensor my NTC sensor stops working.
With VCC voltage sensor disabled it seem I get the correct measurement:
[15:26:57][D][adc:056]: 'source_sensor': Got voltage=0.30V
[15:26:57][D][resistance:037]: 'Resistance Sensor' - Resistance 37802.8Ω
[15:26:57][D][ntc:026]: 'NTC Temperature' - Temperature: 31.4°C
When I enable the VCC sensor this stops working:
[15:35:01][D][adc:056]: 'VCC Voltage': Got voltage=2.99V
[15:35:01][D][adc:056]: 'source_sensor': Got voltage=2.99V
[15:35:01][D][resistance:037]: 'Resistance Sensor' - Resistance -158193.8Ω
[15:35:01][D][ntc:026]: 'NTC Temperature' - Temperature: nan°C
I do not fully understand why this is happening.
Additionally I have to use reference_voltage: 1.0
to get a useful temperature reading, if I leave it empty (or set it to 3.3v) it’s completely wrong.
Thank you for reading!
TheDJVG