Ask
27
@sensor_sarp ·

A cheap sensor module from a marketplace does nothing — what is the debugging order?

I bought an inexpensive sensor module, wired it according to a tutorial, loaded example code from the library everyone recommends, and it returns nothing. No error, just no readings.

I have re-checked the wiring against the diagram three times and it looks right.

Rather than swapping parts randomly, what is the sensible order to test things? I have a multimeter and not much else.

4 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @firmware_fikri · 2d ago

    One thing worth doing before any of that, because it eliminates the largest single variable: prove the board itself works.

    Upload something that blinks a light. If that fails, you have a toolchain, driver or board problem and the sensor is irrelevant. If it works, the board and the upload path are fine and you can concentrate on the module.

    It sounds too basic to bother with and it is the step that most often reveals the real problem, particularly on a fresh setup where nothing has ever worked yet.

    21
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @sensor_sarp · 2d ago

    Work from power outward, because everything above it is meaningless if power is wrong.

    1. Measure the supply at the module's own pins. Not at the board's output — at the module, with the meter. Cheap jumper wires and breadboards fail constantly and a wire that looks connected often is not.

    2. Check the voltage the module wants. This is the single biggest cause with marketplace modules. Many want 3.3 V and will be damaged or simply not respond at 5 V, and plenty of tutorials were written for a different board. Check the module's markings and your board's pin voltage.

    3. Check the logic levels match. A 3.3 V module and a 5 V board need level shifting on the signal lines. Sometimes it works anyway, sometimes it does not, and sometimes it works until it does not.

    4. Confirm the bus finds it. For anything on a shared bus there is a scanner sketch that lists the addresses it can see. If your module does not appear, stop debugging the library — you have a wiring or power problem.

    That scanner step is the one that saves the most time. It splits the problem cleanly in two.

    30
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @sensor_sarp · 3d ago

    Once the module answers on the bus, the remaining causes are software and counterfeits.

    The library expects different pins. Example code hard-codes the pins the author used. On a different board those pins may not exist, may not do that function, or may be used for something else. Check your board's pin mapping rather than the tutorial's.

    The chip is not what the listing said. Marketplace modules are frequently built around a clone or a relabelled part with different behaviour. Symptoms are initialising fine and returning nonsense, or working intermittently. If a module behaves oddly and everything else checks out, buying one from a different seller is a legitimate diagnostic step rather than giving up.

    A missing pull-up or an unconnected enable pin. Some modules need a pin held high or low that the tutorial's board did on its own.

    The module is dead. These are cheap and a proportion arrive faulty. This is why buying two of anything cheap is sensible — a second unit turns a week of doubt into a five-minute test.

    27
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @audio_azra · 14h ago

    Practical note on the wiring, since you have checked it three times: check it against the module's own silkscreen, not against the tutorial's diagram.

    Modules with the same chip are sold with different pin orders by different manufacturers, and the picture in a tutorial is of the author's version. Reading the labels on your actual board catches this instantly, and it is a common cause of a correct-looking wiring that is wrong.

    15
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report