What is on the board · 05 of 11

The pins left open

Six of the chip's twelve pads go nowhere. Four of those were left open on purpose, and each one quietly decides something: the address the board answers at, that it speaks I²C and not SPI, and that it has no interrupt pin for your board to wait on.

Open is not the same as forgotten

Leaving a pin unconnected is sometimes a mistake and sometimes the instruction. On this chip it is the instruction for all four that matter, because each has a resistor inside the chip, or needs none. Pick one:

The pins left open
Open pin
Pads
12
Wired
6
Address
0x19
SDO decides the address: pulled high inside the chip, so 0x19. The chip holds it high through a resistor of its own, so the last address bit is 1: 0011001, which is 0x19. Tie SDO to GND and the same chip answers at 0x18 instead, which is also where most LIS3DH code looks first.

SDO picks the address. The chip holds it high with its own pull-up, so left open it reads high, and the board answers at 0x19. Tied to ground it would be 0x18. The data sheet recommends leaving it open rather than grounding it, because grounding it wastes current through that pull-up.

CS picks the interface. The same chip can speak SPI, a four-wire bus, and CS low is how it is told to. It also has a pull-up inside, to its I/O supply, so open means high and high means I²C. That is why the board needs only two signal wires.

INT1 and INT2 are outputs. The chip can drive them when it notices a tap, a double tap, a fall, a change of orientation or new data ready. Nothing on the board listens, so leaving them open costs nothing except the ability to wake your board with them.

The other two, pins 4 and 11, are marked NC in the data sheet, and carry no signal at all.

What the address costs you

One address means one TK115 per I²C bus. A second one on the same two wires answers at the same 0x19, both drive the bus at once, and a scan reports one device where there are two.

It also means a library written for the chip this one resembles will look in the wrong place. That family's usual default is 0x18, and it checks a register called WHO_AM_I for a different value, so it gives up twice over. It wakes up asleep is about that register, and why the sketches here check it themselves.

When it does not work

A library looks for it at 0x18 and finds nothing.

0x18 is what the chip answers at when its SDO pad is tied to ground, and this board leaves SDO open, so it is 0x19. Most accelerometer libraries of this family default to 0x18. Pass 0x19 if the library lets you, or use the sketches in this book, which need no library.

Can I change the address to put two on one bus?

Not without soldering to a 2 mm package. SDO is a pad underneath the chip, not a jumper on the board, so every TK115 answers at 0x19. Two of them need two I²C buses, which an ESP32 or ESP32-S3 has.

Can it wake my board when it is knocked?

Not through a pin: INT1 and INT2 are not brought out. The chip's tap, free-fall and motion detectors still work, and their results sit in registers your sketch can read, but your board has to ask. It cannot sleep until the chip calls it.

Where this goes next

Four wires, a sketch with no library in it, and three numbers in g.

The first reading →

Edit this page — content/books/3-axis-accelerometer/the-pins-left-open.mdx

Community

Questions about this product

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

Ask a question ↗

3-Axis Accelerometer

Loading 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 →