Keybow 2040 started restarting rapidly, got hot - and died!

I can’t figure out exactly how my Keybow 2040 came to die, any pointers would be much appreciated!

Here are a few photos of my hardware setup: https://photos.app.goo.gl/CJXWG4rYzxfecXbw6

I’m connecting to the pads on the left-hand-side of the Keybow 2040 board, and using them to drive I2C & I2S.

The hardware has been working well for days, and at the time the Keybow died, all the components were enclosed and isolated from physical contact - I wasn’t messing with the hardware, but instead updating the software - I was making changes more-or-less equivalent to this commit:

…ie I was cut-and-pasting a chunk of code from one python file to another. The Keybow began to repeatedly restart, approx 1 restart per second, for maybe 30 seconds. Then it died, and when I got the Keybow 2040 out to look at it, it was hot to the touch.

It’s no longer showing up as a USB device (so can’t be re-flashed) - it doesn’t show up with lsusb. When it’s plugged in, I get 5V on VBUS, and the expected 3.3V from the voltage regulator - SDA, SCL, and INT are all high at 3.3V, and TX, RX are low.

I was using CircuitPython 7.3.0. I thought that maybe repeatedly saving files might have led to corruption, and posted on the Adafruit discord channel to ask about this possibility, but Dan Halbert, core CircuitPython developer, thought this was unlikely, and suggested I post on the Pimoroni forum instead!

I don’t know what could cause this kind of behaviour- any pointers would be much appreciated.

What is the normal in use power source? Was there any way you might have been powering it from two different DC sources at the same time?

Welcome aboard, nice to see another, I can do this with that tinkerer. =)

Hi there, nice to meet you!

What is the normal in use power source?

When the project’s not being actively developed, the power source is a NanoWave 3 5000mAh USB-C & A Power Bank, attached to the Keybow 2040 USB-C port. At the time when the KeyBow died, I was updating the CircuitPython, and had the Keybow 2040 USB-C port attached to my Mac by USB-C cable (the nanowave powerbank was disconnected).

Was there any way you might have been powering it from two different DC sources at the same time?

No, I’m afraid not - I always power the entire project from the USB-C port on the Keybow 2040, so there can only be one power source at a time.

Ok, that rules that out. There is a max current limit on the 3.3V out pin of the RP 2040. If you exceed 300 ma bad things are likely to happen. I would have thought that failure would be during use though, not while editing files? Unless it was just sitting there with all the LED’s etc lit up?

Oh gosh, I think that’s a very good candidate for the reason. I wasn’t aware of the 300ma limit, but having read the Raspberry Pi Pico Datasheet : “3V3 is the main 3.3V supply to RP2040 and its I/O, generated by the on-board SMPS. This pin can be used to power external circuitry (maximum output current will depend on RP2040 load and VSYS voltage, it is recommended to keep the load on this pin less than 300mA).”

I think I did have the LEDs on. There are 16 White LED Backlight Module - 38.7mm x 11.9mm on my project, each with a data-sheet-specified forward current of 25mA. Actually, I was driving these through a Adafruit AW9523 GPIO Expander and LED Driver Breakout - STEMMA QT / Qwiic, with 2 LEDs being driven by each output pin of the AW9523 in constant-current mode. The datasheet of the AW9523 says the max current of LED drive is 37mA, and I think I had them full on, so the current draw from the LEDs alone would have been 8 * 37mA = 296mA.

As you can see from my schematic, the 3V3 is currently used to power these two things:

  • AW9523 LED Driver and LEDs - I’m not sure how much current the AW9523 itself needs, it claims a shutdown current of 0.1µA, so the total must have been still ~296mA ?
  • DS3231 RTC - this looks to draw about 200µA

Altogether it looks like I must draw ~300mA from the 3V3 pin when the LEDs are full on, though I haven’t connected an multimeter to actually check. It’s definitely pushing up against the limit you mentioned of the 3V3 pin…!

I’m wondering how to re-design to fix this. I’m not very au-fait with this, but the AW9523 datasheet seems to indicate it could be powered by the VBUS line at 5V. If I was to do this, do you think the I2C logic levels from the RP2040 GPIO pins still be ok to drive the AW9523 I2C interface? Overview | Adafruit AW9523 GPIO Expander and LED Driver | Adafruit Learning System seems to indicate the VIN should always be the same as the logic level of your project: “To power the expander breakout board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V” … but looking at the AW9523 datasheet, it says that the “High-level input voltage” for pins like SCL & SDA is just 1.4V - so the GPIO pins at 3.3V should surely be enough!?

Looking at your schematic, you can likely power the LED’s (anode) with 5V instead of 3.3V. And leave the LED controller powered by 3.3V. It’s just sinking the current / grounding the LED’s to turn them on. That’s assuming the LED,s are OK at 5V and the controller can handle the current. If not you may have to add some series resistors to each LED.

One thing I like about the Pimoroni Breakouts (Breakout Garden), is you can power them with 5V or 3.3v and the i2c / SPI logic level stays at 3V.

That sounds like a pretty good option, tho’ I’m not sure I could work out if the AW9523 is ok with sinking the current?

Another option is to just use less current on the LEDs! I was quite surprised to realise that the recommended max current on the LEDs has dropped from 25mA to 10mA (see Datasheet for LED Backlight is out-of-date - max current much lower?!). If I restrict myself to just 10mA per LED then the total draw would just be 160mA, which I guess is much lower than the 300mA limit on pin 3V3. I notice that the AW9523 also has an ISEL value in it’s Global Control Register that can be used to reduce the range of current emitted in constant-current mode (one of 25%, 50%, 75% or 100% of the 0-37mA range).

That sounds like a better safer option. Assuming you get the brightness your after.