Author Topic: I call It the Mothership  (Read 9576 times)

0 Members and 1 Guest are viewing this topic.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
I call It the Mothership
« on: Thu, 09 May 2019, 06:17:44 »
218952-0

218954-1

218956-2

Since my main project is becoming more and more complicated, I’ve worked the last two days on a side project to test some things out and learn more about PCB design.
I am currently typing on a xd75 with a three row numpad in the middle but I would like to have a full numpad. I quiet like having the extra space between my hands and I like hitting return with my right thumb. The trend to eve smaller Keyboards is not for me and I need extra space for my s anyways. :D

Apart from the 18 by 5 key matrix one important feature will be an optical rotary encoder. I don’t like the sliding contact style encoders normally used in keyboards. They feel scratchy and don’t have a long lifespan. I think it is going to be this one:
https://www.mouser.de/ProductDetail/Bourns/EM14R1D-M20-L032S?qs=CrTVAl0CcnKeGe%252Br8S9yNQ==
218958-3

The back lighting of the fn keys to the left is independent from the other keys so that they can be used as layer indicators.

The steel plates are rimless and the spacers connecting the plates run through mounting holes in the PCB. This should minimize flex.

Right now, I am almost done with the PCB design but I still have to figure out how to make the HWB pin on the 32U4 usable. I don’t want to use a 4 times more expensive chip just because I am short one pin. :D
« Last Edit: Thu, 09 May 2019, 06:26:38 by Blitzschnitzel »

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #1 on: Sat, 10 August 2019, 13:32:05 »
I am quite proud of the trace routing. :D The key matrix is actually square to save pins. So, I had to layout carefully.
224137-0

Offline ErgoMacros

  • Posts: 293
  • Location: SF Bay Area
Re: I call It the Mothership
« Reply #2 on: Sat, 10 August 2019, 15:26:20 »
Hi,
I found this statement re: using the HWB pin, here. It may help:
  https://www.eevblog.com/forum/microcontrollers/atmega32u4-bootloaders-hwb-pin-usb-programming/

Quote
... it's usually best to leave this pin with just a pull up resistor so you can make use of it later. I tend to try to dual use the pin by connecting a front panel push button to it. This way if the button is held down during power up the bootloader runs, otherwise it's just a regular push button during normal operation

So, just use HWB as the encoder push switch?

PS: I'm no expert at this.
Today's quote: '...but then the customer successfully broke that.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #3 on: Mon, 12 August 2019, 17:40:36 »
THX for the help!  ;)
The switch in the encoder is already part of the key matrix, so I can't save a pin there.
Right now this is my solution:
224244-0

What I am not sure about is if having a single pull up resistor on row 2 messes things up. But I think I need it to not accidentally get into bootloader mode. Would I need to put a pull up resistor on all key rows now? Or would I have to configure something differently in QMK?
« Last Edit: Tue, 13 August 2019, 00:18:42 by Blitzschnitzel »

Offline ErgoMacros

  • Posts: 293
  • Location: SF Bay Area
Re: I call It the Mothership
« Reply #4 on: Wed, 14 August 2019, 00:28:09 »
Looks (to me) like what you have should work. Remembering, I'm no EE.

You could also throw some $0.35 shift registers at the problem:
   https://www.mouser.com/Semiconductors/Logic-ICs/Counter-Shift-Registers/_/N-55d4h?Keyword=hc164&FS=True&Ns=Pricing|0

I think QMK supports this mode.

Description here:
   http://www.openmusiclabs.com/learning/digital/input-scanning-matrix/shift-out-mux/index.html
« Last Edit: Wed, 14 August 2019, 00:31:46 by ErgoMacros »
Today's quote: '...but then the customer successfully broke that.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #5 on: Wed, 14 August 2019, 13:23:12 »
Thank you very much. Starting your suggestion I found an even simpler solution closely related to shift registers: Decade counters. They just have one input pin and they count up the output pins in binary.
Right now, I don't know what I should do with the two extra pins I would gain. So, if someone comes around and says my solution from before will definitely work, then I'll go with that. How sure in % are you it will work? ;D Otherwise I'll use the decade counter and come up with two more features for the board. ;D
« Last Edit: Thu, 15 August 2019, 01:41:38 by Blitzschnitzel »

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #6 on: Sat, 17 August 2019, 12:15:21 »
I've found a great solution. I'll take out the fn1 switch and replace it with a small 7 segment display. I'll use a display driver and a binary counter IC. Then Ill get rid of the separate backlight LEDs for the layer keys. This way I don't have to mess with the HWB pin, I'll even have one pin to spare and there will be a cool digital layer display. Just need to make sure I don't blow past the 500mA current limit.
« Last Edit: Sat, 17 August 2019, 12:36:22 by Blitzschnitzel »

Offline ErgoMacros

  • Posts: 293
  • Location: SF Bay Area
Re: I call It the Mothership
« Reply #7 on: Sat, 17 August 2019, 13:25:28 »
Quote
How sure in % are you it will work?

I've done very little electronics of any kind. Some book learning, and a lot of youtubes. From what I understand
it seems like it should work, but I wouldn't risk a board design as large and complex as yours on my word.
I'd either breadboard it or do a small test PCB to confirm.

Another discussion possible solution based on an ATTiny85 use of reset as GPOI. Found in this youtube:
    https://www.youtube.com/watch?v=yAT_TdD6nL0

But it sounds like you have 2 other, better solutions available to you.

All the best. I'm watching the "mothership" project with interest.
Today's quote: '...but then the customer successfully broke that.

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #8 on: Sat, 17 August 2019, 20:47:18 »
Does someone have one of these USB amp-meters? It would be super helpful to know how much current a 32U4 board draws with LEDs turned off. Maybe also testing if fast typing makes a difference. With 81 white backlight LEDs, a white seven segment LED and 330Ohm resistors I get to about 440mA. So, I am getting pretty close to the 500mA current limit of USB 2.0. I've already ordered an USB amp-meter from Aliexpress but that might take a few weeks. :D

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #9 on: Wed, 28 August 2019, 15:03:31 »
So, Ive decided to go with the IS31FL3731 chip and completely redesigned the PCB. The MCU is a bit cramped now but I have no more pin shortage and the 7-segment display is now just part of the LED matrix. As long as the display is the same colour as the backlight this shouldnt be a problem. Although not needed for a keyboard, this design would probably achieve high speed USB2 on a two-layer PCB.

225312-0

225314-1

If someone should find a blatant error in my schematic a quick heads up would be much appreciated. ;)
« Last Edit: Wed, 28 August 2019, 17:16:26 by Blitzschnitzel »

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #10 on: Sat, 07 September 2019, 14:27:35 »
225894-0

225896-1

I am contemplating what to do with the switch side silk screen.

Offline Nightcrawler

  • Posts: 411
Re: I call It the Mothership
« Reply #11 on: Sat, 07 September 2019, 19:23:24 »
(Attachment Link)

(Attachment Link)

I am contemplating what to do with the switch side silk screen.

The bottom option is trippy as hell.

Offline _rubik

  • Posts: 617
  • Location: 192.168.x.x
  • Typing on: Mech27, Greetech Blacks, GMK Jamon
Re: I call It the Mothership
« Reply #12 on: Sat, 07 September 2019, 19:43:53 »
(Attachment Link)

(Attachment Link)

I am contemplating what to do with the switch side silk screen.

I love that you're making this PCB a work of art. You've clearly put so much effort into it; why shouldn't it be the center of attention. Very intrigued to see the finished product -- keep it up!

Offline Blitzschnitzel

  • Thread Starter
  • Posts: 73
Re: I call It the Mothership
« Reply #13 on: Mon, 09 September 2019, 07:00:51 »
Thanks. Its called a reaction diffusion algorithm. Im not actually drawing these by hand.^^
I have played around a bit with different parameters and I think it is going to be one of these two:

226083-0

226085-1

Which one do you like better?

Offline ErgoMacros

  • Posts: 293
  • Location: SF Bay Area
Re: I call It the Mothership
« Reply #14 on: Mon, 09 September 2019, 11:56:58 »
I like the top one best. Less busy.
Today's quote: '...but then the customer successfully broke that.

Offline popcap

  • Posts: 13
  • Location: Toronto, ON
Re: I call It the Mothership
« Reply #15 on: Mon, 09 September 2019, 18:59:42 »
Yeah the top one seems to be less dense and is more appealing to the eye. Would love to see this on the final PCB.

Online yui

  • Posts: 102
  • Location: 127.0.0.1 (in azerty)
Re: I call It the Mothership
« Reply #16 on: Tue, 10 September 2019, 03:17:01 »
I do agree, number one seems more appealing to me
vi vi vi - the roman number of the beast (Plan9 fortune)