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!
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?
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.
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.
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.
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?
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?
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.
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.