🧩 Component & sensor starter database
-
This category is our shared parts shelf: pinouts, wiring notes, and gotchas for components we all use. Copy this format for every new entry so the database stays searchable:
Part: name + common module variant
Supply: voltage range the module wants
Interface: I2C / SPI / UART / 1-Wire / analog / proprietary
ESP32 wiring: which pins, pull-ups needed, level shifting needed?
Gotcha: the thing that wastes everyone's afternoon
Datasheet: manufacturer linkSeeded entries (add yours below)
DHT22 (AM2302) — temp + humidity
Supply 3.3–5V · proprietary single-wire protocol · any GPIO, 10k pull-up to VCC on the data line.
Gotcha: max ~0.5 Hz sampling — poll it every 2 seconds minimum. Faster polling returns stale or checksum-failed reads, and the sensor's physics is minutes-scale anyway; don't chase transients with it.DS18B20 — temperature, 1-Wire
Supply 3.0–5.5V · 1-Wire bus (many sensors, one pin) · 4.7k pull-up to VCC on the data line, mandatory.
Gotcha: every sensor has a unique 64-bit address — scan the bus and hardcode addresses per unit. Parasite-power mode works but a dedicated VCC wire is far more reliable in the field.MPU6050 — accelerometer + gyro module
Supply 3.3V (most modules include a regulator; do NOT feed 5V into VCC if the module is 3.3V-logic) · I2C, address 0x68 (AD0 low) or 0x69 (AD0 high) · SDA/SCL with 4.7k pull-ups to 3.3V.
Gotcha: two of these on one bus need different AD0 levels. Raw readings need calibration offsets — sample at rest and subtract bias before trusting angles.HC-SR04 — ultrasonic distance
Supply 5V · trigger (input) + echo (output) GPIO · echo idles low and pulses 5V — divide it down (e.g. 1k/2k) before it reaches a 3.3V ESP32 pin.
Gotcha: minimum range ~2–3 cm, wide beam picks up nearby objects, and soft surfaces absorb the ping. Time out your pulse measurement or one missed echo hangs the loop.
Reply with new parts in the format above. Corrections welcome — a wrong entry here costs someone a board.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login