ESPHome components
Notes on using ESPHome and cheap, readily available electronic components.
Overview
Most of this is already documented by ESPHome, these are my own notes that also cover some frustrations and pitfalls -- as well as a reference guide for myself (and whoever else).
Components
GPIO
: Using GPIO pins for fun and profit.
Sensors
ADC
: Analog-to-digital- Potentiometer: Using
ADC
to read a Potentiometer.
- Potentiometer: Using
BME280
: Barometric pressure + temperature + humidityBMI160
: Accelerometer and GyroscopePIR
: Generic PIR motion sensorLD2410
: mmWave radar presence sensorSGP30
: CO₂ and (Total) Volatile Organic Compound SensorSGP41
: Volatile Organic Compound and NOx sensorPN532
: RFID/NFC readerRCWL-0516
: Doppler radarRG-9
: Rain gaugeVL53L0X
: Time of Flight optical distance sensor
Displays
HD44780
: LCD displayMAX7219
: LED matrixPCD8544
: Nokia 5110/3310 displaySSD1306
/SH1106
: OLED display
HD44780 LCD display
I have some unusual model "2004A-V1.3". Based on the Arduino forum thread and
the linked AliExpress page, this is probably an LCD module called SPLC780D
that has an onboard I2C adapter/interface called AIP31066
. Found a GitHub
repo enjoyneering/LiquidCrystal_I2C
with detailed info.
- Arduino forum: Funky 20x4 LCD with interesting circuitry
- Very similar: 20x4 LCD white on blue
Lights
LED
: Control LEDs, hardware PWM (pulse-width-modulation) with ESP32ledc
.
Other
References
Pin schema - ESPHome: Pin configuration and definitions, enabling pull-up/pull-down resistors.
Build a cheap air quality sensor - pieterbrinkman.com: Sends data to Luftdaten, good project box ideas.
How to detect mains voltage with a microcontroller?, primer on Optocouplers with microcontrollers.
Optocoupler to detect mains electricity on/off - Home Assistant forum. Uses ESPHome, 230V mains.
The HomeDing Library: Sensors and Actors, Displays, Elements (implementations), Recipes.
Powering sensors - Alex Mekkering: Using GPIO pins as 3V3
or GND
.
HausnerR/esphome-door-lock
- GitHub: door lock based on Wemos D1 mini and RC522 RFID module.