1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

[ADC] Support measuring VCC on Raspberry Pico (W) (#5335)

* [ADC] Support measuring VCC on Raspberry Pico (W)

Added support for measuring VCC on Raspberry Pico (W) with ADC.
GPIO pin is provided as `VCC`, same as with ESP8266. VSYS is the voltage
being actually processed, and might have an offset from actual power
supply voltage (e.g. USB on VBUS) due to voltage drop on
Schottky diode between VSYS and VBUS on Rasberry Pico. The offset has
experimentally been found to be ~0.25V on Pico W and ~0.1 on Pico,
presumably due to different power consumption.

Example usage:

	sensor:
	  - platform: adc
	    pin: VCC
	    name: "VSYS"

* + Added tests for VCC measuring on `rpipicow` board
This commit is contained in:
Ilia Sotnikov
2023-09-09 12:00:45 +03:00
committed by GitHub
parent ccc30116ba
commit 7bb67ae94b
3 changed files with 45 additions and 4 deletions

View File

@@ -62,3 +62,6 @@ switch:
sensor:
- platform: internal_temperature
name: Internal Temperature
- platform: adc
pin: VCC
name: VSYS