Drum Hat doesn't detect hits on Pi Zero, but works fine on older Pi


#1

I have a Drum Hat hooked up to a Pi Zero through a black hat hack3r and ribbon cable. I resolved my previous issue of being unable to detect the drum hat on I2C; the device is now detected and the LEDs turn on and cycle correctly in the test program.

However, pressing the pads does not result in a hit being recorded in the program, and so the hit-handler / release-handler methods never print anything. There is no error message, just a lack of anything being registered. I attached the hat before turning anything on, so messing with the calibration of the cap touch sensors isn’t an issue.

When I use the same exact code but move the hat onto a Raspberry Pi 2, everything works fine. This would make me think it’s an issue of physical connections since the same software works elsewhere, but the fact that the pi zero detects i2c and can control the lights implies proper physical connection… so I am thoroughly confused!

I checked that the hat has both 5v and 3.3v power (it does) and that there is continuity between every pin of the header and the corresponding pin on the hat (yup, everything’s soldered well), but I don’t know what to check for the other pins it uses - should I check for a voltage or current through any of them? How can I figure out what the pi zero is missing that the other pi has?

My problem seems to be the same one as this unresolved question from March.

If you have any ideas or troubleshooting tips please let me know! Thank you!


I2C device not detected on pi
#2

http://pinout.xyz has info on what pins are in use. A photo of the soldering on the zero & black HAT hacker would also be great to be doubly sure there aren’t any errors there. The ‘other hat’ in your picture - what is it? Are there any conflicts in pin uses with the pins listed on pinout.xyz? That would seem an obvious source of problems to me -since an input pin on one board may be used as an output on the other, and nasty things could potentially happen quite easily if you’re not careful which pins are in use on each. Lastly, do the LEDs on the drum HAT light up when you touch the pads? Or is it just a dead no response?


#3

The other hat is Adafruit PWM Servo hat. The only overlaps besides I2C are ground (physical pins 30, 34, 39), which I assumed would not be an issue but maybe I’m wrong? The LEDs do not light up on the drum hat. I will attach some pictures of the soldering when I get a chance.


#4

As far as I understand electronics, connecting both hats to the same ground pin should be fine, since you’re completing two separate electrical circuits. Though if that is an issue I believe the Pi has multiple ground pins, so you could connect the grounds of each hat to a separate pin (although that could get messy.)

Disclaimer: I haven’t any idea what I’m doing in the field of electronics. Shed loads of discretion is advised.


#5

Are you sure the Drum HAT isn’t on backwards? I’m having a hard time fathoming whether it’s on the right way…

Actually, having stared at it a while it seems to be hooked up right…


#6

@RaspberryPicardBox can you elaborate by what it means to “connect the grounds of each hat to a separate pin”?

@major_tomm It’s on correctly, I tested with a multimeter that the pins are actually connected to the right spot.


#7

Here are the pictures of the soldering!

The first photo is connection of servo hat header (blue) and the ribbon that connects the black hat hack3r to the drum hat (black). The second photo is the bottom of the black hat hack3r: the header pictured on top is connected to the Pi zero, and the one on the bottom is connected to the servo hat. The third photo shows the top side of the header that is on the Pi zero. (To take this photo I pulled the servo hat out of the female header that is soldered to the black hat hack3r). Two pins are missing on the header in photo 3 (39 and 25, both ground), hence the red and black wires in photo 1 that just connect those pins to another ground to ensure the hats have all the ground pins they need. A multimeter confirms that all three of those ground pins (39, 25, and 34) are connected. The fourth picture shows the angles of the first three pictures for clarity.

The reason for the yellow and blue wires in picture 1 is that those are the pins the drum hat needs, and I was trying to debug by pulling those pins out to a breadboard. I’ll remove them once I get everything working.




#8

Drum HAT requires Physical Pin 39 as its one and only ground pin. Presumably there’s something wrong there. Perhaps it passes a continuity check but has a high level of resistance?

You should double-check your grounding.


#9

yes, as far as I can see, phys 39 is not soldered on the Pi itself?


#10

All the grounds seem to be connected on the black hat hack3r, so it turns out I don’t even need the red and black wires in the picture and there is still continuity between pin 39 on the Pi and on the drum hat.

The resistance of this is 0.4 ohms. Is that too much?


#11

Also, what could I do to lower the resistance?


#12

The first thing I would do is reflow the solder joints. On lots of them, it seems that the solder hasn’t flowed all the way around the pin so there are places without solder - perhaps use a hotter iron, as this can sometimes happen if the iron is too cold.

You’re aiming for lots of little shiny volcano shapes, that go all the way 'round each pin. Like this:

0.4Ohms isn’t a lot of resistance, so I wouldn’t think that would cause an issue. But redoing the soldering will definitely allow that potential issue to be eliminated, and may well lower the resistance.

If you just poke the top of the pin and the bottom of the pin with a meter there will be continuity - but that doesn’t mean there’s continuity between the HAT and the Pi necessarily, as your probe would make contact with the pin and not the pad on the PCB.


#13

Whilst the Pi has multiple ground pins they are all in fact connected on the PCB, and probably on most HATs (if the PCB design is good).

Grounds should always be connected except in a very few cases - and often not connecting them can cause stuff to break. For example, if you had a string of Neopixel LEDs you wanted to power from a separate power supply but wanted to control them from an Arduino or a Raspberry Pi or a micro:bit, they often won’t work if you don’t connect the grounds between them.

Learn something new every day :)


#14

Why dankeschon,
I’m fine with software, but electronics is a little over me.
Thank you for the insight!