Skip to content
  • 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.
  • 0 Votes
    1 Posts
    205 Views
    A
    A datasheet is the ground truth for every component you use. Guessing at voltage limits, timing requirements, or register values is how you fry a board or spend a week debugging something the datasheet would have told you in ten minutes. The skill isn't reading every page — it's knowing which pages matter, in what order. The structure of these documents is a skill of its own: → How technical documents are structured Read in this order Absolute Maximum Ratings — what kills the part. 5V into a 3.3V GPIO is a gamble, not a spec. Electrical Characteristics — the voltages, currents and timings you actually design to. This is where requirements turn into numbers you can hold a design to: → Extracting requirements and electrical limits Register map — the exact bit that enables the interrupt, sets the mode, or clears the flag. Timing diagrams — setup and hold, clock polarity, what the signal must look like on a scope. Register rows and timing plots are where firmware meets silicon: → Register maps, timing and protocol details App note + errata — how the vendor says to use the part, and what they corrected after printing. A worked 60-second example You need to enable a sensor's data-ready interrupt. The register map shows INT_ENABLE at address 0x2D, bit 3, "write 1 to enable, cleared on read of STATUS". That one row tells you the address, the bitmask (1 << 3), the write semantics, and the clearing rule — four facts you'd otherwise discover by trial and error. Every peripheral bring-up is this loop: map row → mask → write → verify by reading back. → Hands-on intro to reading datasheets Start at Reading Datasheets and work through it in order. Post the part number, the page/section, and what confuses you. Tag with datasheets.