ESP32-S3 bases/The PinPulse shield/16. The lights never touch your bus
The PinPulse shield · 16 of 22

The lights never touch your bus

An LED on every pin sounds like a load on every bus. It is not: the LED hangs off an inverter, the inverter's input is all your wire ever meets, and on I²C or SPI that is a few millivolts and a few nanoseconds. Here is the arithmetic.

The worry, and why it is a fair one

An LED needs current and a signal wire has none to spare. Hang an LED on SDA the ordinary way and the bus slows, or stops, because the line is now a lamp.

The shield does not hang the LED on the wire. It hangs the LED on a chip. Every GPIO goes to the input of one inverter in a 74HC04, and the LED sits on that inverter's output, fed from the 3.3 volt rail. So the question is no longer "can the bus carry a lamp". It is "what does one inverter input do to a line", and TI's datasheet answers it: at most 10 pF and 1 µA.

What the lights add to a bus line
I²C at 400 kHz
Bus
Pull-up on the bus
Shield adds
40 ns
Allowed rise
300 ns
Room on this bus
75 pF
The shield uses 13 % of the allowed rise time, and 4.7 mV of the high level. Its 1 µA of leakage across 4.7 kΩ is that many millivolts off 3.3 V, which no receiver can tell from 3.3 V. The bus has room for about 75 pF in total; the lights are 10 of them.

Pick a bus and a pull-up. The branch at the bottom of the drawing is everything the shield puts on the wire; the dotted LED beyond it takes its current from somewhere else.

I²C, the line that can be upset

Nothing drives an I²C line HIGH. A pull-up resistor lets it rise, and it rises at the speed the resistor can charge the line's capacitance. That is why I²C is the bus that cares about a load: every picofarad is charged through the pull-up.

The bus specification (NXP UM10204) sets the budget. Rising from 30 % to 70 % of the supply may take 1000 ns at 100 kHz and 300 ns at 400 kHz, and the whole bus may carry 400 pF. The charge time is 0.85 × R × C, so 10 pF behind a 4.7 kΩ pull-up adds about 40 ns: 13 % of the fast-mode budget, 4 % of the standard one. Behind 2.2 kΩ it is 19 ns.

The leakage is smaller still. 1 µA across 4.7 kΩ is under 5 mV off a 3.3 V line, which a receiver cannot tell from 3.3 V.

One pairing in the figure is not comfortable: 10 kΩ at 400 kHz. There the shield takes more than a quarter of the budget, but the same sum says the whole bus has room for only about 35 pF with that pull-up. Two wires and a sensor use that up on their own. A 400 kHz bus wants 4.7 kΩ or less with or without this board.

SPI, the line that cannot be pulled down

SPI has no pull-up to fight. The clock, MOSI and chip select are driven by the chip in both directions, high and low, and the leakage of one input is lost in the current a driver can supply. What the pin sees is 10 pF, which is the same kind of load as the input of the device at the far end of the wire.

So the shield does not change what clock speed a wire can carry. A long jumper at 40 MHz fails because of the wire, with or without lights.

What the lights do show you

The LED reads the level at the pin through the inverter, so it can only tell you what the pin is doing, never change it:

  • I²C idles with both lamps lit, and each dips while the bus is talking.
  • An SPI clock glows at a steady half-light while it runs, because the eye averages millions of flashes a second. Dark during a transfer is the fault.
  • Serial flickers on its transmit line; GPIO 43 is lit while idle.

It is an activity light, not a logic analyser. A bus that is working looks busy; whether the bytes are right is for a sketch to say.

What this does not fix

The shield adds no pull-ups. An I²C line with none never rises: it floats, and nothing on this board changes that. The Arduino core's default I²C pins are GPIO 8 (SDA) and 9 (SCL), the two marked # on the shield; the SPI defaults are 10 to 13, marked ^.

When it does not work

My I²C scan finds nothing with the shield on

The lights are not the cause. Check the address, the wiring, and that the bus has pull-up resistors: the shield has none of its own (its bill of materials is 36 LEDs, the 36 resistors that go with them, six inverters, twelve capacitors and the display socket, and nothing else). Most breakout boards carry pull-ups; a bare chip does not. To rule the shield out, lift the Gold board out and wire the sensor to its own header.

The LED on SDA or SCL stays lit when the bus is idle

Correct. I²C idles HIGH, a HIGH pin lights its LED, and the lamp dips only while the bus is talking. A steady light on both lines means both are being held up, which is what a healthy bus looks like.

The LED on an SPI clock looks half-bright, never blinking

The clock is switching millions of times a second and the eye averages it. The LED is showing activity, not data, and nothing is wrong. A clock that is dark during a transfer is the failure; one that glows is working.

Can I switch the LEDs off to be sure?

There is no jumper or switch for them on the board, because they cost the pin so little that one was not drawn. To test without them, lift the Gold board out of the shield, wire the sensor to its own header and compare.

Where this goes next

What stands between a pin and its light, and what it costs.

How a pin lights its LED →

Edit this page — content/books/esp32s3-base/the-lights-never-touch-your-bus.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

This page covers several products. Choose yours to see the right discussions.

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum →