# Capacitive touch hat not working always

**URL:** https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245
**Category:** Support
**Created:** [April 16, 2016, 10:24pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245 "2016-04-16T22:24:24Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://forums.pimoroni.com/u/arjun)
#### Post date: [April 16, 2016, 10:24pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/1 "2016-04-16T22:24:24Z")

</div>

Hi,

I purchased one of these ([https://shop.pimoroni.com/products/adafruit-capacitive-touch-hat-for-raspberry-pi-mini-kit-mpr121](https://shop.pimoroni.com/products/adafruit-capacitive-touch-hat-for-raspberry-pi-mini-kit-mpr121)) and connected it to my Raspberry Pi 3 Model B. The hat fits physically and that’s great. However, my RasPi does not always detect it always. If I push it down here and pull it up there it works but most doesn’t. My project needs compactness (hence I bought the hat) and I don’t want to solder the hat onto the Pi permanently.

What’s the solution? I actually intend to buy another one if this can work always. I have another RasPi of the same model.

Thanks

---

<div class="post-metadata">

### Author: ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)
#### Post date: [April 18, 2016, 1:37pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/2 "2016-04-18T13:37:16Z")

</div>

Ahoy!

Have you soldered the supplied 40 pin header to the Capacitive Touch HAT? If you just slip the HAT down over the pins on the Pi, the connection would be absolutely terrible at best. It’s literally square pegs into round holes!

I’m guessing the header would defeat your compactness aims?

---

<div class="post-metadata">

### Author: ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://forums.pimoroni.com/u/arjun)
#### Post date: [April 25, 2016, 7:06pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/3 "2016-04-25T19:06:00Z")

</div>

Hi,

Sorry for the late response but I didn’t know I had to manually check for replies. Probably some setting!

Anyway, I bribed a friend to solder the 40 pin header to the Capacitive Touch HAT and it still doesn’t work. He has done a fantastic job and I have enabled the I2C and everything. The header fits perfectly.

Since I did get it working sometime, I know there’s nothing wrong with the Raspberry as such.

I don’t know if the picture is clear but the red indicator LED on the hat glows, when I attach it.

Could the header be faulty? I really hope I can get this to work, since I actually need 2 of these for my project.

Though on the positive side, the compactness issue is solved. After soldering the header and attaching it to the pi, the system is compact enough for my needs.

Please help!

 ![](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/7/74efbebf1c2bd79e364947ccf268c23eba7fb8c2.jpg)

---

<div class="post-metadata">

### Author: ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)
#### Post date: [April 27, 2016, 5:34pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/4 "2016-04-27T17:34:07Z")

</div>

Could you describe the issue in more details? at the moment it’s not clear to me what tests or practical application you are attempting and I suspect it’s something obvious that would be difficult to identify short of being in the room with you.

---

<div class="post-metadata">

### Author: ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://forums.pimoroni.com/u/arjun)
#### Post date: [May 4, 2016, 6:19am UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/5 "2016-05-04T06:19:52Z")

</div>

Hi Rogue,

Good point. My idea is to make a touch sensitive lamp. So I detect a touch from the user and turn on an LED in response.

I have one of these attached to my RasPi  
[https://www.blinkstick.com/products/blinkstick-square](https://www.blinkstick.com/products/blinkstick-square)

So, I would detect different touches (since there are 12 points to touch) and make the LEDs glow in 12 different patterns.

So I purchased the touch hat, got it soldered and fixed it onto my RasPi 3. When I run the i2c detect command on the pi, I see the matrix but everything is empty. I hope this makes the issue clearer.

---

<div class="post-metadata">

### Author: ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)
#### Post date: [May 4, 2016, 12:17pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/6 "2016-05-04T12:17:47Z")

</div>

How have you enabled i2c, using raspi-config (recommended) or with manual config changes? If the later, do you remember what you changed?

Other than that, you originally stated you got it working sometimes, was that strictly using i2cdetect or have you gone further than that and attempt to detect a signal from an input?

---

<div class="post-metadata">

### Author: ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://forums.pimoroni.com/u/arjun)
#### Post date: [May 4, 2016, 1:15pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/7 "2016-05-04T13:15:28Z")

</div>

Hi Rogue,

I enabled it using raspi-config.

When I got it to work sometimes, I could actually detect individually the 12 touch inputs using adafruit’s example python program.

---

<div class="post-metadata">

### Author: ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)
#### Post date: [May 4, 2016, 2:45pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/8 "2016-05-04T14:45:53Z")

</div>

and this no longer works?

… don’t take this with a high level authority but while i2cdetect is _expected_ to find all the devices on the i2c bus, I think it can depend on a number of factors whether a response is received or not.

I guess what I’m getting at is that regardless of the output it is worth probing via your program and see if the device respond.

If you have another Pi available (I believe you have?) then it is also worth popping the same SD card in it, and try there. This would allow you to assess, however unlikely, whether there might be a hardware issue with the Pi GPIO.

---

<div class="post-metadata">

### Author: ![arjun](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@arjun](https://forums.pimoroni.com/u/arjun)
#### Post date: [May 6, 2016, 5:38am UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/9 "2016-05-06T05:38:45Z")

</div>

Correct, it doesn’t work. I also did try running Adafruit’s program to detect touch and that fails too.

While I was waiting for this, I went ahead and ordered 2 of these

> **[Explorer HAT Pro - Prototyping Board for Raspberry Pi Projects - Pimoroni](https://shop.pimoroni.com/products/explorer-hat)**
>
> Explorer HAT Pro adds a lot of useful tools to your Raspberry Pi.

And they work perfectly! So there’s nothing wrong with my RasPi or the pins.

So it appears the capacitive touch hat is faulty or broken, right? Is there any other possibility?

---

<div class="post-metadata">

### Author: ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)
#### Post date: [May 6, 2016, 7:41pm UTC](https://forums.pimoroni.com/t/capacitive-touch-hat-not-working-always/2245/10 "2016-05-06T19:41:34Z")

</div>

That seems like a strong possibility. Please send [support@pimoroni.com](mailto:support@pimoroni.com) an email and they’ll sort out a replacement.
