Go Down

Topic: Mpr121 capacitative keypad w/ logic level converter (Read 2067 times) previous topic - next topic


Hello, I've been trying to hook up a Mpr121 to my Arduino using a logic level converter and im having some problems. I'm quite new to this stuff so I apologize in advance. I can't seem to figure out which inputs I should send through the converter. If I'm using i2c, do I need to send the scl through the converter? Also I'm not sure how to deal with power and ground... do I use both the arduino's 5v and 3v3 outputs on both sides of the converter? And will they share the same ground? The code I'm using comes from this Bildr tutorial: http://bildr.org/?s=mpr121  , but my plan is to hook up other sensors to the system which is why I need to use the logic level converter... Thanks in advance, I've already fried 2 Mpr121's... 


I was under the impression that i2c didn't require a voltage level converter as it is the pull-ups that provide the high voltage, and the SDA/SCL pins only connect the line to ground when required. Just use the 3v3 supply for the pull-ups, which I think are included on the board?


Hey thanks for the reply, yeah it works when I'm using 3v3 but the problem is I want to connect other sensors at the same time that require 5v.


Check page 43 of this PDF (i2c spec).

Does that help with the problem?

Link courtesy of this page.


Yes and no... I don't really know how to read schematics, but from the look of it I will need to separate power sources with separate ground? Can I use both 3v3 and 5v power from the arduino at the same time?


Sep 17, 2011, 01:16 pm Last Edit: Sep 17, 2011, 01:22 pm by a.d Reason: 1
Always connect the grounds together, otherwise nothing will work properly.

To use this method, connect two appropriate MOSFETs (maybe a 2N7000?) in-line with the SDA and SCL lines, with their gate pins tied to 3v3. The source side should be towards the high voltage, the drain side to the 'high' 5v voltage.

As for using both 5v and 3v3 from the Arduino at the same time, yes you can, not a problem. A large breadboard which has the split power rails might be useful for this to help separate.

If you want to stick with the logic level converter, what's the part number?

Edit: If anyone can't be bothered to download the PDF, here is the circuit diagram. There is a textual description in the PDF which might be useful.


I see, thanks. This is the logic level converter http://www.sparkfun.com/products/8745

I was pretty sure I did everything you said with the converter but I could be wrong. I'll buy another Mpr121 and hope for the best. Thanks for the help.


From the looks of the schematicon the SparkFun site you should use the two TX lines for the level conversion, and ignore the RX lines. Connect the 3v3 to the LV side, and the 5v to the HV side.

If this doesn't work, then there's something else wrong with the setup or the code.

Go Up