Skip to content

Latest commit

 

History

History
65 lines (51 loc) · 3.3 KB

MPR121.md

File metadata and controls

65 lines (51 loc) · 3.3 KB

MPR121 capacitive touch sensor

??? failure "This feature is not included in precompiled binaries"

When [compiling your build](Compile-your-build) add the following to `user_config_override.h`:
```arduino
#ifndef USE_MPR121
#define USE_MPR121      // [I2cDriver23] Enable MPR121 controller (I2C addresses 0x5A, 0x5B, 0x5C and 0x5D) in input mode for touch buttons (+1k3 code)
#endif
```
  • 12-button or touch pad I2C controller
  • Driver supports up to 4x MPR121 controllers (= 48 buttons per ESP8266)
  • Electrodes can be covered with adhesive paper and adhesive plastic foil for labeling and symbols
  • Break-out and touch button PCBs ~ 2€ at AliExpress
  • Break-out PCB ~ $8 at Adafruit

Technical Data from the manufacturer

Wiring breakout boards

Breakout ESP
VCC/VIN +3.3VDC
GND GND
SCL GPIO I2 SCL
SDA GPIO I2 SDA
IRQ NC

I2C address selection

Connect the ADD(R) pin/pad to one of the following pins/pads:

Address ADD(R)
0x5A NC
0x5B +3.3VDC
0x5C GPIO I2 SDA
0x5D GPIO I2 SCL

Tasmota SettingsCompile Tasmota with #define USE_MPR121 added in user_config_override.h

The driver will detect the I2C addresses of the MPR121s automatically. The MPR121 chip (or breakout board) must be connected to the ESP8266 and the I2C GPIO pins must be configured:

I<sup>2</sup>C GPIO configuration

Generally available types of breakout boards

Adafruit 12-Key Capacitive Touch Sensor Breakout - MPR121 Touchpad front Touchpad back Break-out front Breakout back