Engicoder wrote:Yes, there are many controllers. You might want to check out this thread:
You don't necessarily need USB 3.0 for the higher current limit. You could use two USB 2.0 connections or a device that supports the type C connector and version 2.0 of the USB Power Delivery spec. Both 3.0 and more so USB C will limit those who can use your keyboard.
pomk wrote:It seems that you are correct on this. I thought that the kinetis SDK would allow for a 'battery charging' device to be developed regardless of the MCU used, but it seems that that specific service is not allowed for MKL2X devices. The USB2.0 battery charging service would have allowed for 1,5A current negotiations from the host.
There are dedicated USB3.0 passthrough chips that will handle the power acquisition and pass the data lines to the MCU of your choice, maybe you should look for a suitable one from those, it would allow you to use any USB MCU without having to limit yourself to MCUs no one has built keyboards for yet.
edit: something like TUSB320 would work just fine I guess. It allows you to use a USB 2.0 MCU and handles the power negotiations on your behalf. You can then ask the current allowed from that chip and then power on/off back lighting regulators accordingly.
One could also look at the design files for whitefox or some other USB-C connected keyboard and check if the MCUs used would suffice and also allow for the power draw you require.
Findecanor wrote:OK. I saw on Geekhack that you just want to backlit 40 keys. What kind of LEDs have you found? They must fit inside or below (SMD) the switch you want to use.
Most full-spectrum (...) LEDs are RGB, not RGBW. Red, green and blue together makes white. That would be 40×3 = 120 LEDs.
LEDs are usually not powered all the time - instead they flicker really fast. Without flickering them, the LED light would be much too bright. It is by changing the frequency and/or period of the flickering that you would be able to adjust brightness.
On large keyboards you would flicker them by organizing them in a matrix of U columns and V rows and power only maybe one or a few columns at a time. That is also how you reduce power consumption to fit into 500 mA for USB 2.0.
A RGB LED would most likely have a common anode for all three colours, which means that they would all have to be on the same row. (Cathodes on columns, anodes on rows)
For more info, you could look at the Infinity keyboards with backlighting and how the Kiibohd firmware does it. I think there are also forks of TMK and/or QMK with backlighting.
I have also seen LED matrices driven in various ways by an Arduino, which are AVR microcontrollers: those could give you inspiration, but I would not recommend the Arduino software framework for applications with critical timing. Make sure to put the code that updates the LEDs into a timer interrupt routine.
There are also dedicated LED matrix driver chips available that could interface with the microcontroller through SPI or I²C.
BTW, you don't need USB Type C to get a reversible plug. These days there are cables with reversible Micro USB plugs available. I did not know about them myself until I saw some in a store the other day. Apparently they were first introduced through a crowdfunded venture in August 2015.
pomk wrote:I guess we will see as razer must eventually create a 100 W LED monster keyboard with 'turbo interrupts (tm)'.
Sigmoid wrote:I do wonder though btw, have any of you looked at the possibility of adding a built-in USB hub to a keyboard? I am a huge fan of the extra USB port for the pointing device on old Apple keyboards.