Custom LED modes that draw too much power can cause the right side of the keyboard to temporarily stop working

So… this has happened a few times now where its not just a random one off.

Anyone else have half their M01 just disconnect? when you switch led?

So I was changing the color of my LEDs and all of a sudden the right half of my M01 goes dark and keys don’t register, left half is still lit and keys register when I press them but right side is non responsive.

Two fixes:

First fix I try is hitting the LED again and changing to the next color which (I guess resets the M01) then gets the M01 working again.

Second fix, sometimes though, cycling through colors doesn’t work, so I have to unplug and reconnect the M01 and things start working again.

Anyone else have this issue?

When you say “unplug and reconnect” are you talking about the USB cable between the keyboard and the computer, or the RJ45 cable that connects the two halves?

apologies… I unplug the usb to pc cable, not the rj45, M01 left to M01 right halves. I will do some more testing and report back.

1 Like

I have not seen that happen, but can imagine how it might. It sounds like an I2C bus disconnect, which would be a software issue, rather than a hardware one.

Next time it happens, rather than toggling the LED mode, try tapping ‘numlock’ to see if the numpad lights up.

Are you using the short cable or the long cable? Or your own cable?

Are you using the stock firmware or custom firmware? If you’re using custom firmware, I’d love to know if you can reproduce it with the stock build.

Does it only happen when you’re changing LED modes?

I’ll do some testing tomorrow, bedtime; I don’t have the energy Jesse does (don’t know how you do it). But real quick.

Short rj45, stock.

Customize firmware, I’ve defined some new colors, turned off all LED effects except for solidcolor. I’ll see if I can reproduce and try the numlock to see if numpad lights up.

On a different note - it happened just a few moments ago, but this time, the lights went out but the keys register. So there are 3 conditions post LED press.

  1. all is well, color changes, left and right halves register key presses
  2. only right half goes dark, key presses do not register, try hitting LED, and it may or may not bring right M01 to life, if it doesn’t then, unplug the usb and reconnect, this method has worked every time.
  3. only right half goes dark, but key presses do register, hitting LED to cycle changes to next color (right M01 lights back up), and keys still register.

oops. Forgot this one. No, but with a qualifier. It has happened only once where I did not hit the LED, I was reading the news and all of a sudden the right half goes dark, key presses still work so I just cycled LED and switched to the next color, everything works again.

All other occurrences have been during/after a LED cycle. I think this has occurred 7-8 times total? 1, without hands and 6-7 with LED cycle.

Hope this helps. I’ll try some more stuff tomorrow.

Abject terror that we shipped something broken. Remarkably bracing.

this one is good :slight_smile:

This sounds like an i2c disconnect. Next time you see this, just for kicks, try to disconnect/reconnect the RJ45 instead of the USB.

This sure sounds like ‘didn’t send full led update’ and is probably a minor bug

1 Like

Understood. I’d love to know if you can reproduce it with https://raw.githubusercontent.com/keyboardio/Model01-Firmware-Builds/master/v1.13-MP1-BUILD/atmega32u4_firmware.hex

While I’m happy to help debug no matter what, understanding if it shows up with the default firmware will help narrow it down.

I must admit, this feels a lot like vintage Star Trek (you know, original kirk, spock, mccoy). Trying new things, testing out new code (firmware), discovering bugs and telling people about them. Pioneering days. (or Oregon Trail, but I honestly don’t wanna die of dysentery)

2 Likes

Sure, but I’ll need help or a walk through, or some docs on what to do. I’m here to help however I can (tomorrow though, haha).

1 Like

in the morning, remind me what OS you’re on :slight_smile:

1 Like

On a win 10 box. Let’s see if I can get it to break today.

numlock will light up the right half of the board, and turning off numlock will “relight” the board, but after a few seconds it goes dark again.

I tried a few profiles and am not sure but this happens only when I use this:

static kaleidoscope::LEDSolidColor solidCyan(0, 255, 255);
static kaleidoscope::LEDSolidColor solidBlue255(0, 0, 255);
static kaleidoscope::LEDSolidColor solidGray(128, 128, 128);
static kaleidoscope::LEDSolidColor solidSilver(192, 192, 192);
static kaleidoscope::LEDSolidColor solidTeal(0, 128, 128);
static kaleidoscope::LEDSolidColor solidNavajoWhite(255, 222, 173);
static kaleidoscope::LEDSolidColor solidPurple(128, 0, 128);
static kaleidoscope::LEDSolidColor solidDarkEarth(92, 73, 57);
static kaleidoscope::LEDSolidColor solidFDE(135, 115, 72);
static kaleidoscope::LEDSolidColor solidWheat(242, 222, 179);
static kaleidoscope::LEDSolidColor solidAzure(240, 255, 255);
static kaleidoscope::LEDSolidColor solidSlateGray(112, 128, 144);
static kaleidoscope::LEDSolidColor solidSaddleBrown(139, 69, 19);

    // These static effects turn your keyboard's LEDs a variety of colors
    // &solidRed, &solidOrange, &solidYellow, &solidGreen, &solidBlue, &solidIndigo, &solidViolet, &solidAqua, &solidBlue255, &solidGray, &solidSilver, &solidTeal,
    // &solidTeal, &solidRed, &solidGray, &solidGreen, &solidBlue,  &solidCyan, 
    &solidNavajoWhite, &solidFDE, &solidCyan, &solidSlateGray, &solidIndigo, &solidDarkEarth,
    // &solidWheat, &solidAzure, &solidSlateGray,
    // &solidCyan, &solidIndigo, &solidDarkEarth, &solidRed, &solidGreen, &solidSaddleBrown,

I’m going to try a few other color schemes. I have not tried the rj45 reconnect because my M01 is tented and unplugging the usb is less hassle than removing the slider bar.

define this, then turn it on.

static kaleidoscope::LEDSolidColor solidNavajoWhite(255, 222, 173);

wait a few minutes, usually less than 2-3 min and half your M01 will go dark. I can still type on both sides though, LED lit, and not lit side.

so, some more testing.

I defined solidWhite(255, 255, 255) and put it in this order:

    &solidWhite, &solidFDE, &solidCyan, &solidNavajoWhite, &solidIndigo, &solidSlateGray, &solidWheat, &solidDarkEarth,

Its weird, because solidWhite doesn’t cause the right have to go dark when its on, but when I cycle to FDE, only half the board is lit (left half LEDs are on, right half are off). However, when I cycle to NavajoWhite, after a minute, the right half goes dark.

Oh. we may have our answer. You’re drawing more power than the board can supply. at 255,255,255, the leds could draw 4 amps. which is beyond what our current limited allows. more detail when i’m writing not writing from a phone.

1 Like

That makes sense. solidWhite draws too much power, and NavajoWhite is right at that boundary.

Yup. (This is part of why I asked about whether it worked ok with the default firmware :slight_smile:

If you’re up for it, could you open a pair of github issues against kaleidoscope:

  1. Kaleidoscope Hardware API should have some way of calculating LED current overdraw proactively
  2. We should document how to manually calculate whether your custom LED modes draw too much power.

We do actually have hardware (essentially, a circuit breaker) that can detect current overdraw, but we don’t yet have any way to do something like force the LEDs to draw less power.

The reason that this situation causes the right half of your keyboard to stop working sometimes is that the microcontroller on the right hand is being powered from the same lines as the right hand LEDs. If they suck too much power, it browns out. We have all the bits to be able to reset it in software (or prevent the LEDs from ever being that greedy), but don’t have code yet.

If someone is excited to work on this, I’m happy to point you in the right direction, but it’s lower on the corporate priority list than straight-up bugs in the built-in firmware :confused:

5 Likes

Its not a big deal to me, there are 16,777,215 (16,777,216 total) other colors I could use. I would open up issues in Git if I knew how, so apologies, someone else will have to, once I see how its done, I’ll give it a try. I’m not in source control enough to be well versed in it.

On a different note, I notice brightness controls are only available with rainbow and rainbowwave. If there were a way to keep the color but just dim it, that might work as well.