Skip to content
  • 0 Votes
    1 Posts
    104 Views
    A
    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 link Seeded 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.
  • 0 Votes
    1 Posts
    206 Views
    A
    Nobody can debug wiring from "I connected everything correctly but it doesn't work." Show this instead: A clear top-down photo โ€” every wire visible, good light, no spaghetti hiding the pins. A sketch of the circuit โ€” hand-drawn is fine: which pin goes where, where power enters, where ground returns. Part numbers and supply specs โ€” exact sensor module, what powers it (USB? 5V adapter? battery?), and what the rail measures under load. The symptom with numbers โ€” "reads 0", "reads 4095 constantly", "resets when the motor starts", plus what you already tried. The gotchas that solve most posts here No common ground. Two boards or a board + external supply without shared GND gives garbage or nothing. Tie grounds together, always. 5V into a 3.3V pin. A 5V sensor output (looking at you, HC-SR04 echo) into an ESP32 GPIO will damage it. Divide down or level-shift first. Missing pull-ups. I2C needs them (4.7k to 3.3V is the standard starting point); floating inputs read noise. Motors and relays on the logic supply. They droop and spike the rail โ€” the MCU browns out and resets exactly when the motor starts. Separate supply (shared GND), bulk capacitance at the driver, and a flyback diode across relay coils and brushed motors. GPIO pins can't drive loads. A pin signals; it doesn't power. Relays, motors, and long LED strips switch through a transistor or MOSFET with its own supply โ€” never straight off the pin. Decouple like you mean it. A capacitor close to every IC's supply pins eats the high-frequency noise that causes "random" glitches. Post the photo, the sketch, and the measured numbers. Tag with hardware, wiring or sensors.