Author Topic: I designed a keyboard but I need help!  (Read 3156 times)

0 Members and 1 Guest are viewing this topic.

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
I designed a keyboard but I need help!
« on: October 14, 2023, 03:43:08 pm »
Hi guys I'm not electronic engineer but this is my hobby and I would like to build projects mostly from github.
Recently I designed a keyboard with kicad but there is an issue with LEDs.
Here is the schematic
Everyhig looks good the keys are working just fine but the lights are not correct, or some led's have different colors, I'm using SK6812mini-e LEDs
The MCU is R-pi pico, and the firmware is KMK Firmware
Do I need aditional component for LEDs? Like capacitors, controller, Resistors or somethig else ?
I saw a lot of other keyboards with the same design with less keys and LEDs without issue
Also Is added 104c for each led and a boost buck convertor from 5v to 5v and boost the current for feed the LEDs voltage but nothing happened
What is the problem?
Regards
« Last Edit: October 14, 2023, 04:03:49 pm by Pooya »
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1493
  • Country: ca
Re: I designed a keyboard but I need help!
« Reply #1 on: October 14, 2023, 04:07:55 pm »
I don't see any power supply decoupling capacitors on those "LEDs". Quote from Chinese datasheet:

Quote
In addition, in order to make the IC chip is more stable, even the capacitance between beads is essential back;

Then they show a schematic of each LED chip having a bypass capacitor across it's supply rail. So without any supply bypass capacitors in your circuit at all, some of them are probably glitching out.
On a PCB with well sized traces you may be able to get away with using fewer bypass capacitors, but you won't get away with using none at all.
« Last Edit: October 14, 2023, 04:15:15 pm by Kim Christensen »
 
The following users thanked this post: Doctorandus_P, Pooya

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3543
  • Country: nl
Re: I designed a keyboard but I need help!
« Reply #2 on: October 14, 2023, 04:09:55 pm »
Same here. Start with adding a bunch of decoupling capacitors, and a buffer capacitor.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11464
  • Country: us
    • Personal site
Re: I designed a keyboard but I need help!
« Reply #3 on: October 14, 2023, 04:12:45 pm »
OP mentioned that Cs were added.

What is the power source for the LEDs? This many LEDs would need a substantial power supply.

An easy test would be to set the number of LEDs to 1-10 in the code and pay attention to the colors of the first LEDs, ignoring the rest. This would confirm that at least source control signal timing is correct. Then go from there.

Ideally you would want to disconnect DIN from DOUT as well to reduce dynamic power consumption, but I would try without that first.
Alex
 
The following users thanked this post: Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #4 on: October 14, 2023, 05:21:27 pm »
the caps for each led were added but problem still there
 

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #5 on: October 14, 2023, 05:23:35 pm »
the power source is usb but between VCC and LEDs I added a boost buck converter, (5v to 5v) with or without that problem is there.
I set the LED numbers to 5 but 7 glowing up with wrong color
« Last Edit: October 14, 2023, 05:27:39 pm by Pooya »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11464
  • Country: us
    • Personal site
Re: I designed a keyboard but I need help!
« Reply #6 on: October 14, 2023, 05:27:05 pm »
84 LEDs at 12 mA per LED would consume 1 A. There is no booster that would make this not violate USB 500 mA limit.

So, depending on the design of the board, I would disconnect majority of the LED chain from the power supply and see if that improves things.
Alex
 
The following users thanked this post: Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #7 on: October 14, 2023, 05:28:29 pm »
I set the LED numbers to 5 but 7 glowing up with wrong color
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11464
  • Country: us
    • Personal site
Re: I designed a keyboard but I need help!
« Reply #8 on: October 14, 2023, 05:33:21 pm »
It would be hard to tell what may be wrong without a scope or at least a logic analyzer. Extra LEDs lighting up may indicate noise on the data lines, or just incorrect timing of the data.
Alex
 
The following users thanked this post: Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #9 on: October 14, 2023, 05:39:00 pm »
I fixed thaaaaat Lets gooooooooooooooooooooooooooooooo,,,,,,,,,,,,,,,,,,,, I added a 10uf cap for the first LED
Thats it
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11464
  • Country: us
    • Personal site
Re: I designed a keyboard but I need help!
« Reply #10 on: October 14, 2023, 05:40:37 pm »
It is highly likely that the whole design is still going to be unstable.

At least get the USB current meter and measure the current consumption.
Alex
 
The following users thanked this post: SiliconWizard, Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #11 on: October 14, 2023, 05:42:49 pm »
I fixed that brother the problem was from the first cap, then I increase that to 10uf, thank you so much
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11464
  • Country: us
    • Personal site
Re: I designed a keyboard but I need help!
« Reply #12 on: October 14, 2023, 05:44:44 pm »
If a random 10 uF capacitor "solves" the problem, the design is still marginal. If it works for you, it is fine. But there is a good chance that it may stop working with a different USB host, for example.

And if you are going to draw 1A from the USB port for a long time, there is areal chance to cause damage to the motherboard.
Alex
 
The following users thanked this post: Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #13 on: October 14, 2023, 05:48:25 pm »
No I checked different design from others, And I found a 10uf on power decoupling, also I attached the usb to other source it works with no issue.
https://geekhack.org/index.php?topic=116183.0
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11464
  • Country: us
    • Personal site
Re: I designed a keyboard but I need help!
« Reply #14 on: October 14, 2023, 05:55:20 pm »
From the EE point of view, this design process is really bad. But keyboard community does this kind of stuff all the time, so it is fine, I guess.
Alex
 
The following users thanked this post: Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #15 on: October 14, 2023, 05:56:47 pm »
We are mostly NOT electronic engineer, this is my hobby. I'm IT engineer.
 

Offline mk_

  • Regular Contributor
  • *
  • Posts: 233
  • Country: at
Re: I designed a keyboard but I need help!
« Reply #16 on: October 14, 2023, 06:19:52 pm »
We are mostly NOT electronic engineer, this is my hobby. I'm IT engineer.

Without reliable hardware your IT-stuff is?

exactly:

Non existent.

so.. be friendly to yourself and listen carefully to the guys who know how hardare like this should be done so that IT-people can work with.



 
The following users thanked this post: Pooya

Offline wraper

  • Supporter
  • ****
  • Posts: 17253
  • Country: lv
Re: I designed a keyboard but I need help!
« Reply #17 on: October 14, 2023, 06:19:58 pm »
I strongly suggest adding pull-up resistors to columns so current through pressed key is at least 1mA. Commercial keyboards and mice often don't have them too for some stupid reason. However after some time (months to a few years) key chattering appears because wetting current from internal MCU pull-up is not enough to ensure reliable contact in switches.
« Last Edit: October 14, 2023, 06:21:46 pm by wraper »
 
The following users thanked this post: SiliconWizard, Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #18 on: October 14, 2023, 06:24:41 pm »
How can I add that? can you show me by a schematic please ?
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17253
  • Country: lv
Re: I designed a keyboard but I need help!
« Reply #19 on: October 14, 2023, 06:29:49 pm »
Resistor from each column to +3.3V. 1k to 2.4k resistors should be about fine (lower resistance gives higher current).
 
The following users thanked this post: Pooya

Offline PooyaTopic starter

  • Contributor
  • Posts: 21
  • Country: de
Re: I designed a keyboard but I need help!
« Reply #20 on: October 14, 2023, 06:34:48 pm »
Tnx, I will add for the next pcb order
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1493
  • Country: ca
Re: I designed a keyboard but I need help!
« Reply #21 on: October 14, 2023, 07:07:46 pm »
You could lower the keyboard power consumption by putting an upper limit of 0x7F for each of the RGB values in your PY code. (or whatever keeps the total current under 0.5A)
You probably don't want 1A worth of LED light shining in your face anyways. ;)
« Last Edit: October 14, 2023, 07:17:34 pm by Kim Christensen »
 
The following users thanked this post: Pooya


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf