j-a-g-r / esphome-capacitive-touch-panel

A DIY capacitive touch panel based on the mpr121 and esphome.
GNU General Public License v3.0
131 stars 10 forks source link

Failed to communicate with MPR121 #2

Open Robert-815 opened 2 years ago

Robert-815 commented 2 years ago

I have ordered all the parts to make the ESP8266 touch panel, including the custom PCBs from JLCPCB. Unfortunately, I am experiencing great difficulties getting the ESP8266 to recognize the MPR121. I receive the error Communication with MPR121 failed!. I have included all relevant information below:

Logs at the bottom

Components I have used:

Steps I have taken to troubleshoot so far:

I am perplexed by this issue and hope someone can help. Thank you for your time.

Logs:

[I][app:029]: Running through setup()...
[I][i2c.arduino:161]: Performing I2C bus recovery
[C][esp8266_pwm:017]: Setting up ESP8266 PWM Output...
[C][mpr121:011]: Setting up MPR121...
[E][component:112]: Component mpr121 was marked as failed.
[C][wifi:037]: Setting up WiFi...
[D][wifi:373]: Starting scan...
[D][wifi:388]: Found networks:
[I][wifi:431]: - 'MyWifiName' [redacted]▂▄▆█
[D][wifi:433]:     Channel: 3
[D][wifi:434]:     RSSI: -57 dB
[I][wifi:431]: - 'MyWifiName' [redacted]▂▄▆█
[D][wifi:433]:     Channel: 3
[D][wifi:434]:     RSSI: -67 dB
[I][wifi:431]: - 'MyWifiName' [redacted]▂▄▆█
[D][wifi:433]:     Channel: 1
[D][wifi:434]:     RSSI: -78 dB
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[D][wifi:436]: - [redacted] [redacted]▂▄▆█
[I][wifi:248]: WiFi Connecting to 'MyWifiName'...
[I][wifi:505]: WiFi Connected!
[C][wifi:353]:   Local MAC: [redacted]
[C][wifi:354]:   SSID: [redacted]
[C][wifi:355]:   IP Address: 192.168.1.43
[C][wifi:356]:   BSSID: [redacted]
[C][wifi:358]:   Hostname: 'touchpanel3'
[C][wifi:360]:   Signal strength: -67 dB ▂▄▆█
[C][wifi:364]:   Channel: 3
[C][wifi:365]:   Subnet: 255.255.255.0
[C][wifi:366]:   Gateway: 192.168.1.1
[C][wifi:367]:   DNS1: 192.168.1.1
[C][wifi:368]:   DNS2: 0.0.0.0
[D][wifi:514]: Disabling AP...
[C][ota:085]: Over-The-Air Updates:
[C][ota:086]:   Address: touchpanel3.local:8266
[C][api:025]: Setting up Home Assistant API server...
[I][app:062]: setup() finished successfully!
[I][app:102]: ESPHome version 2022.6.2 compiled on Jul 20 2022, 16:08:51
[I][app:104]: Project jagr.touch_panel version 0.1
[C][wifi:491]: WiFi:
[C][wifi:353]:   Local MAC: [redacted]
[C][wifi:354]:   SSID: [redacted]
[C][wifi:355]:   IP Address: 192.168.1.43
[C][wifi:356]:   BSSID: [redacted]
[C][wifi:358]:   Hostname: 'touchpanel3'
[C][wifi:360]:   Signal strength: -67 dB ▂▄▆█
[C][wifi:364]:   Channel: 3
[C][wifi:365]:   Subnet: 255.255.255.0
[C][wifi:366]:   Gateway: 192.168.1.1
[C][wifi:367]:   DNS1: 192.168.1.1
[C][wifi:368]:   DNS2: 0.0.0.0
[C][logger:275]: Logger:
[C][logger:276]:   Level: DEBUG
[C][logger:277]:   Log Baud Rate: 115200
[C][logger:278]:   Hardware UART: UART0
[C][i2c.arduino:038]: I2C Bus:
[C][i2c.arduino:039]:   SDA Pin: GPIO0
[C][i2c.arduino:040]:   SCL Pin: GPIO4
[C][i2c.arduino:041]:   Frequency: 50000 Hz
[C][i2c.arduino:044]:   Recovery: bus successfully recovered
[I][i2c.arduino:054]: Results from i2c bus scan:
[I][i2c.arduino:056]: Found no i2c devices!
[C][esp8266_pwm:022]: ESP8266 PWM:
[C][esp8266_pwm:023]:   Pin: GPIO14
[C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[C][mpr121:064]: MPR121:
[C][mpr121:065]:   Address: 0x5A
[E][mpr121:068]: Communication with MPR121 failed!
[C][rtttl:018]: Rtttl
[C][captive_portal:088]: Captive Portal:
[C][mdns:084]: mDNS:
[C][mdns:085]:   Hostname: touchpanel3
[C][ota:085]: Over-The-Air Updates:
[C][ota:086]:   Address: touchpanel3.local:8266
[W][ota:094]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[C][api:138]: API Server:
[C][api:139]:   Address: touchpanel3.local:6053
[C][api:143]:   Using noise encryption: NO
Robert-815 commented 2 years ago

@j-a-g-r Any thoughts on why this might be?

j-a-g-r commented 2 years ago

Hi,

sorry for responding so late! I think you need to switch the wires connected to D2 and D3 so that the pin marked SDA on the MPR121 is connected to D3 and the pin marked SCL is connected to D2.

Please let me know if this solved your Problems.