MPR121 Multiple breakout boards

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: MPR121 Multiple breakout boards

Post by adafruit_support_mike »

Your wiring looks right in the diagram, aside from the missing address connections.

Post a photo showing your hardware and connections for two boards, one with no connection to the ADDR pin and the other connected for any alternate address. If you get an error during upload, please also post that. 800x600 images usually work best.

User avatar
mrkofee
 
Posts: 3
Joined: Thu Mar 23, 2017 6:39 am

Re: MPR121 Multiple breakout boards

Post by mrkofee »

Hi,

trying to pick up on this thread, as I need to wire up four MPR121 sensors.
I am trying to use them on a Raspberry Pi 3 Model B.

Wiring up one sensor is not an issue and I can see it in i2cdetect with it's default address of 0x5A.
As soon as I hook up another MPR121 detecting anything over i2c fails due to address conflict.

Now I try to change the i2c address by connecting the ADDR pin to +3V, SCA or SCL.
None works tough. +3V makes the raspberrie's protection kick in and shuts it down.
Connecting to SCA creates timeouts in i2cdetect and SCL makes it look like:
i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77

Any hints?

Thanks in advance!

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: MPR121 Multiple breakout boards

Post by adafruit_support_mike »

That kind of output usually means the SDA pin is shorted low.

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

User avatar
mrkofee
 
Posts: 3
Joined: Thu Mar 23, 2017 6:39 am

Re: MPR121 Multiple breakout boards

Post by mrkofee »

Hi,

your hint was great. It turned out I got some cloned china version, which by default has it's ADDR pin hardwired to GND.

I fixed that. And everything is working well.

Thank you!

User avatar
ecc3
 
Posts: 1
Joined: Sun Apr 22, 2018 9:47 pm

Re: MPR121 Multiple breakout boards

Post by ecc3 »

[quote="adafruit_support_mike"]You could also use a function to test each pin for each sensor:

Code: Select all

def checkCap ( sensor, number ):
	touch = sensor.touched()
	
	if ( touch ) :
		for i in range( 12 ):
			if ( touch & ( 1 << i ) ) :
				print "sensor", number, "pin", i

checkCap( cap1, 1 )
checkCap( cap2, 2 )
checkCap( cap3, 3 )
checkCap( cap4, 4 )
[/quote

Hi mike, could you be more specific as to how to implement this in the MPR121 example code? I have 3 breakouts and want to get a serial message when each pin is touched.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”