Author Topic: help with handwiring a small (non-matrix?) macropad  (Read 5149 times)

0 Members and 1 Guest are viewing this topic.

Offline Volny

  • Thread Starter
  • Posts: 235
help with handwiring a small (non-matrix?) macropad
« on: Sun, 08 August 2021, 23:33:30 »
EDIT: I don't need help any more. I got it working thanks to Leslieann and piit79. I've posted pics of my final result lower down in the thread.

________________________________________________


Hi. I've never handwired anything before, but want to try making a thin macropad strip with 8 keys and a rotary encoder - something like this (The leftmost key in the picture would be the rotary encoder):



I've ordered a Teensy 2.0 for it, and for the plate and housing I'm sawing off bits from the steel plate of an old broken Corsair keyboard.

I want this thing to be as compact as possible. So I want it very narrow, and I'm going to actually put the microcontroller underneath the keys, on a separate 'storey' (I want the width and length of the macropad to be small, but I don't mind how big the depth is - it's going to be attached 'floating' somewhere below my monitor, with the keys facing towards me). Space inside the housing will be tight, so I'm thinking that this might be a little easier to achieve with direct wiring instead of a matrix. I have a pack of insulated jumper wires of many different lengths, which should make the wiring process relatively straightforward. Since there are only 8 keys, I guess a matrix isn't actually needed, right? Though all the the guides I've found relate to matrix keyboards, so I'm a bit in the dark about how to go about it.

I have lots of questions, so I'll list them point form for clarity:

--Does doing it matrix-less sound like a sensible idea?
--If so, how do I wire it?
--Do I still behave as if it's a matrix, treating each left pin as a 'row' and each right pin as a 'column', as if it were a 64-key keyboard?
--Do I still need diodes?
--Does doing it matrix-less complicate the QMK firmware process? If so, how?

Thanks in advance.

EDIT: Actually, now that I write this, it occurs to me that a matrix-less build would probably involve more wires rather than less. In which case, what would be the most efficient (ie. compact) way to wire this?


« Last Edit: Wed, 18 August 2021, 08:20:35 by Volny »

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: help with handwiring a small (non-matrix?) macropad
« Reply #1 on: Mon, 09 August 2021, 01:14:39 »
The software differences are almost zero, a few extra digits to define I/O is really all it will change.
How do you wire it, each switch uses two I/O.

You don't need diodes if you wire each switch separate but it won't actually make the wiring or software any easier or better. You have one row, connect one wire to that then use diodes to jump switch to switch, then run wires up/down to the controller, it's only 9 connections to wire up, the diodes are handy because they are stiff and hold their position where wires flop around and if you cross them, you either need to redo the firmware or redo the wiring, the diode/mesh is simple and elegant and easy to trace and diagnose.

And yes, a matrix using less wires will occupy a LOT less space, wires take up a lot of room.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #2 on: Mon, 09 August 2021, 03:31:49 »
Just to correct the post above,

> How do you wire it, each switch uses two I/O.

Each switch only needs one I/O line, the other side of the switch is typically connected to the ground. However, to avoid "floating" pins (i.e., neither "high" nor "low" state), you should have pull-up resistors on the pins to VCC - the microcontroller might have them built in so you would just need to enable them in software.

All in all, I agree that it's simpler to just use a 1xN matrix - QMK is set up for it, so you just define the matrix pins and the layout, and the rest is already done for you. In a 1xN matrix, I don't think there's any point adding switch diodes, so you can even drop those.

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: help with handwiring a small (non-matrix?) macropad
« Reply #3 on: Mon, 09 August 2021, 04:07:29 »
Just to correct the post above,

> How do you wire it, each switch uses two I/O.

Each switch only needs one I/O line, the other side of the switch is typically connected to the ground.
You may be able to use a common ground rather than I/O but that's still pretty much just a matrix with a different start or end point and I'm not sure QMK supports that sort of configuration.

As for diodes, you;re right, they aren't necessary but they make it easier to wire, add nkey rollover and make it easier to troubleshoot when there is a problem and they're dirt cheap cheap. It just seems silly to go through all this entails and cheap out on the cheapest part of the entire project.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #4 on: Mon, 09 August 2021, 04:40:47 »
ok, so here's how I understand it so far. I'm sure it's still wrong, so feedback appreciated, thanks:


Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: help with handwiring a small (non-matrix?) macropad
« Reply #5 on: Mon, 09 August 2021, 06:30:55 »
I would separate the switches from the rotary.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #6 on: Mon, 09 August 2021, 06:33:40 »
You may be able to use a common ground rather than I/O but that's still pretty much just a matrix with a different start or end point and I'm not sure QMK supports that sort of configuration.

As for diodes, you;re right, they aren't necessary but they make it easier to wire, add nkey rollover and make it easier to troubleshoot when there is a problem and they're dirt cheap cheap. It just seems silly to go through all this entails and cheap out on the cheapest part of the entire project.

Well, it's a technicality, but I'd argue that when connecting the switches to common ground, it's no longer a matrix as all switches are connected independently to their dedicated I/O pins. This configuration should work with QMK out of the box, but the other pin of the switches would have to be connected to VCC. Such configuration would be almost the same as an Nx1 matrix where the column pin is replaced with VCC - there would be only one column to scan, so it could be connected to VCC permanently.

For the same reason, the diodes would really not be necessary - if there is only one column to scan, there cannot be any ghosting and N-key rollover will work without the diodes. I do agree they are dirt cheap, but why add components that will serve no purpose? :)

The QMK "How a Matrix Works" page explains it nicely: https://beta.docs.qmk.fm/developing-qmk/for-a-deeper-understanding/how_a_matrix_works

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #7 on: Mon, 09 August 2021, 06:35:02 »
I would separate the switches from the rotary.

Why, or better, separate how? :) It's not really connected to them in any way.

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #8 on: Mon, 09 August 2021, 06:41:21 »
ok, so here's how I understand it so far. I'm sure it's still wrong, so feedback appreciated, thanks:

Show Image


Please check my post about the matrix above. After reading the QMK How a Matrix Works page, I would suggest connecting the other side of the switches (including the switch in the encoder) to VCC instead of the ground, as that will allow you to configure it as a 9x1 matrix (9 logical "rows", 1 "column"). The column pin can be set to any free pin as it's not actually needed when there's only one "column" (it's replaced by VCC).

Hope that makes sense :) I suggest reading the How a Matrix Works page, it should take some magic out of the QMK operation ;)

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #9 on: Mon, 09 August 2021, 18:45:25 »
So I'll be using diodes, for their stiffness, because my preliminary experiments with floppy wires have been infuriating.

I've read the How A Matrix Works page, but it didn't tell me anything I didn't already know. Yet there's still a lot I don't know:

- I don't know how the encoder works. I assume that the double pin is for the push-click and works just like a key switch, but I don't understand how the triple pins work. They seem to share a common GND pin in the middle, and I don't know whether that has to actually go into the controller's GND pad, or into the communal "row", or something else. And I've no idea where the other two pins of the triple pins go.

-I don't know what difference, if any, there is between the pads on the Teensy that start with B, F, C etc. I think I read that D1 and D2 are used for leds, so I've avoided them in my diagram.

-I don't know what you mean by I would suggest connecting the other side of the switches (including the switch in the encoder) to VCC instead of the ground, since I haven't connected anything to either VCC or GND in my diagram. And I don't know what you mean by "the other side of the switches".

It would really help me if you could refer to my diagram and talk in relation to which color should go where. Write as if you're talking to a dummy, because you are ;)

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: help with handwiring a small (non-matrix?) macropad
« Reply #10 on: Mon, 09 August 2021, 22:52:08 »
Well, it's a technicality, but I'd argue that when connecting the switches to common ground, it's no longer a matrix as all switches are connected independently to their dedicated I/O pins.
You're comparing serial vs parallel.
Matrix is just multiple serial.

Change ground to any other pin, now duplicate it, that's a matrix. It being ground changes nothing other than the pin designation. The pin changes nothing really.


-I don't know what difference, if any, there is between the pads on the Teensy that start with B, F, C etc. I think I read that D1 and D2 are used for leds, so I've avoided them in my diagram.
There's really only a few dedicated pins besides the USB connection.
Basically all of the rest are I/O, a select few have higher functions such as PWM or the ability to power diodes, but they can all pretty much serve as common I/O.
 
So for doing a matrix the pins don't matter, it's when you want to use a or display or a secondary controller (ergo) that those pins matter.


- I don't know how the encoder works. I assume that the double pin is for the push-click and works just like a key switch, but I don't understand how the triple pins work. They seem to share a common GND pin in the middle, and I don't know whether that has to actually go into the controller's GND pad, or into the communal "row", or something else. And I've no idea where the other two pins of the triple pins go.
All grounds on Teensy are the same.
Stop trying to confuse GND with I/O, you will confuse us and yourself. GND is GND and nothing else. It's like a building, there are many doors, but only one exit. GND is an exit point, not just another door. I know this sounds like a technicality, but it's an important designation. While nothing you have said is necessarily wrong it's not good practice.

I'm not super versed on encoders but basically out A is one direction, out B is the other direction I.E. up/down, left/right, clockwise/counterclockwise you get the idea. The other side simply sends a signal when pressed. Technically, this is backwards, it's not sending, it's allowing it to pass through as it's going to ground. This is why you have to stop thinking of GND as I/O, I/O can send or receive (In/Out), GND is the absolute end of everything. GND can be an Out for I/O, but I/O is not a GND. I hope that makes sense.

While there's usually no harm in mixing them when things are right, when they are not right it means your troubleshooting and damage can spread further. Simple circuits are simple.


Just clip your blue wire at the rotary and run an alternate elsewhere for the blue switch wire, doesn't matter the sides or I/O pin, just make sure your diodes face the right way.
273973-0
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #11 on: Mon, 09 August 2021, 23:42:03 »
Thanks. So then I tell QMK that I have two rows (F0 and C7 pads)   and 11 columns (all other used pads). Is that correct?

As for GND, I'm just blindly parroting what I've seen on diagrams and spec sheets that I've googled. I don't actually know what GND is, why the Teensy has pads labelled GND, or why some diagrams refer to certain rotary encoder pins as GND. The little technical debate you two have had on the subject has only added to my confusion, lol. But it seems like I can safely ignore the topic of GND altogether for this macropad, which is perfectly fine with me!
« Last Edit: Mon, 09 August 2021, 23:54:09 by Volny »

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: help with handwiring a small (non-matrix?) macropad
« Reply #12 on: Tue, 10 August 2021, 00:53:44 »
The rotary rotary section of code is defined separately from the keyboard.
You have a 1 row keyboard and a rotary.


GND is ground or negative wire, all ground are tied together and go to the same place with nothing in between. It is a base level connection going straight to the power supply and bypasses the Teensy processor entirely. In this case the rotary acts as a valve. The Teensy offers it power, like a water line, the rotary holds it back like a faucet until you turn it, at which point a bit of water seeps through which the Teensy senses) and it flows down the drain into the ground (GND).
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #13 on: Tue, 10 August 2021, 01:10:31 »
Thanks. So then I tell QMK that I have two rows (F0 and C7 pads)   and 11 columns (all other used pads). Is that correct?

The encoder push button should be wired the same as the other switches - it's basically just another switch. You should connect the side that is now connected to GND to your "row" (light blue wire in the above picture); the other side is already connected to an I/O pin.

Then you will have one row (pin C7) and 9 columns (8 switches + rotary push button, each on its own pin).

As for GND, I'm just blindly parroting what I've seen on diagrams and spec sheets that I've googled. I don't actually know what GND is, why the Teensy has pads labelled GND, or why some diagrams refer to certain rotary encoder pins as GND.

Man, we all love to help, but... A one minute google search "what is GND" would tell you what it is. There's no magic - it's simply the negative pole of the circuit power supply (the positive is often denoted "VCC"). It's the pole with lowest potential in the circuit, if you wanted to measure some voltage in the circuit, you'd measure it against GND. GND is "0 V". As another example, if you had a power LED, it would be connected to VCC (+5 V or +3.3 V) via a current limiting resistor, and the other side to GND - the current would then flow from VCC, through the resistor/diode and into GND.

Also, you probably read the QMK Hand Wiring Guide, but if not, I recommend you read it. It will provide you with a lot of useful detail.

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #14 on: Tue, 10 August 2021, 01:56:15 »
The encoder push button should be wired the same as the other switches - it's basically just another switch. You should connect the side that is now connected to GND to your "row" (light blue wire in the above picture); the other side is already connected to an I/O pin.
Sorry, could you clarify what you mean here? Nothing is connected to GND on the Teensy, so are you referring to the two pins on the encoder that are labelled GND? If I understand you correctly, you're suggesting that they need to be connected to an I/O pin (I assume "pin" in this instance the same as a "pad"). But they already are connected to an I/O pad (F0)


Man, we all love to help, but... A one minute google search "what is GND" would tell you what it is. There's no magic - it's simply the negative pole of the circuit power supply (the positive is often denoted "VCC"). It's the pole with lowest potential in the circuit, if you wanted to measure some voltage in the circuit, you'd measure it against GND. GND is "0 V". As another example, if you had a power LED, it would be connected to VCC (+5 V or +3.3 V) via a current limiting resistor, and the other side to GND - the current would then flow from VCC, through the resistor/diode and into GND.

lol. I'm flattered that you thought I'd understand any of that. Though also a little annoyed that I'm being lectured as though I lazily demanded explanations about GND, when in fact I never asked anyone to explain GND to me. As I wrote earlier, it's clear that I can safely ignore the GND pin on the controller for this little project, so I plan to do exactly that. I know my learning style well enough to know that soaking up additional jargony background material that isn't directly relevant to the task at hand is not going to help me learn anything. Since these are new waters for me, any information that I can't tangibly use in this project is information that I won't grok or retain.

What has helped is the specific guidance I've received for how to go about wiring this up. I'll breadboard it up as per LeslieAnn's diagram and experiment with it from there, and let you know how I go. Again, thanks for all the help.
« Last Edit: Tue, 10 August 2021, 02:11:08 by Volny »

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #15 on: Tue, 10 August 2021, 03:34:51 »
Sorry, could you clarify what you mean here? Nothing is connected to GND on the Teensy, so are you referring to the two pins on the encoder that are labelled GND? If I understand you correctly, you're suggesting that they need to be connected to an I/O pin (I assume "pin" in this instance the same as a "pad"). But they already are connected to an I/O pad (F0)

The rotary encoder consist of two separate parts - the rotary part, which has 3 pins (labelled "GND", "out A", "out B" in your diagram), and a push button, which has 2 pins (labelled "Switch" and "GND"). What is probably confusing/misleading is that there two pins on the encoder labelled GND - however, they are two separate pins, they are NOT connected together internally and they serve a different purpose. Please read on.

The rotary part needs the "GND" pin connected to GND on the Teensy, and "out A" and "out B" to two separate I/O pins.

The push button part should be treated as just another switch - it works the same way. When you push down on the shaft of the encoder, the pins labelled "Switch" and "GND" are connected together (they are normally NOT connected).

Therefore, you should wire the push button part the same way as your normal switches - one of the contacts to a common "row" pin on the Teensy (same for all switches), and the other contact to individual "column" pins on the Teensy, one for each switch.

Normally, the switch pins going to the "row" pin should be connected there via a diode (part number 1N4148) to prevent ghosting. However, that is not necessary as there cannot physically be any ghosting when there's only one row. So it's safe to omit the diodes.

lol. I'm flattered that you thought I'd understand any of that. Though also a little annoyed that I'm being lectured as though I lazily demanded explanations about GND, when in fact I never asked anyone to explain GND to me. As I wrote earlier, it's clear that I can safely ignore the GND pin on the controller for this little project, so I plan to do exactly that. I know my learning style well enough to know that soaking up additional jargony background material that isn't directly relevant to the task at hand is not going to help me learn anything. Since these are new waters for me, any information that I can't tangibly use in this project is information that I won't grok or retain.

What has helped is the specific guidance I've received for how to go about wiring this up. I'll breadboard it up as per LeslieAnn's diagram and experiment with it from there, and let you know how I go. Again, thanks for all the help.

Man, that's not a great attitude in my opinion. GND is definitely relevant for your little macropad project, and if you don't understand what GND is (which I think I explained in very simple terms), you cannot expect to understand many other things.

Anyway, I wish you good luck with your project, I'm sure you'll get there eventually. I'll be unsubscribing from this topic now.

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #16 on: Tue, 10 August 2021, 07:04:25 »
Thanks for your concern, but this is not a hobby for me, but simply a means to an end. I need a thin macropad, that's it. I don't need to fully know how it works, just that it works. If I learn something along the way, which I will, then that's a nice fringe benefit for sure, but is largely irrelevant to my primary goal.

Your last post was very clearly written. I appreciate the time you took to help me. Thanks.

Offline piit79

  • Posts: 382
Re: help with handwiring a small (non-matrix?) macropad
« Reply #17 on: Tue, 10 August 2021, 07:15:30 »
Thanks for your concern, but this is not a hobby for me, but simply a means to an end. I need a thin macropad, that's it. I don't need to fully know how it works, just that it works. If I learn something along the way, which I will, then that's a nice fringe benefit for sure, but is largely irrelevant to my primary goal.

(Couldn't resist checking for responses ;) OK, that explains it :) I see that in that case you might not have the time or the will to gain in-depth understanding of how keyboards work.

Your last post was very clearly written. I appreciate the time you took to help me. Thanks.

And I appreciate that you didn't take offence despite my slightly harsh tone, and that you took the time to acknowledge you found my post helpful.

I hope you get your macropad working quickly!

Offline Leslieann

  • * Elevated Elder
  • Posts: 4518
Re: help with handwiring a small (non-matrix?) macropad
« Reply #18 on: Tue, 10 August 2021, 20:44:50 »
Unless you're copying someone else's project wire by wire and they included flashable firmware you may as well stop now then. 

Wiring is the easiest part of this, firmware is a whole other level.
You're going to have to configure it all by hand, then compile the firmware then flash it, which is far more in depth than a bit of matrix wiring.
Novelkeys NK65AE w/62g Zilents/39g springs
More
62g Zilents/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 magnetic cable, pic
| Filco MJ2 L.E. Vortex Case, Jailhouse Blues, heavily customized
More
Vortex case squared up/blasted finish removed/custom feet/paint/winkey blockoff plate, HID Liberator, stainless steel universal plate, 3d printed adapters, Type C, Netdot Gen10 magnetic cable, foam sound dampened, HK Gaming Thick PBT caps (o-ringed), Cherry Jailhouse Blues w/lubed/clipped Cherry light springs, 40g actuation
| GMMK TKL
More
w/ Kailh Purple Pros/lubed/Novelkeys 39g springs, HK Gaming Thick PBT caps, Netdot Gen10 Magnetic cable
| PF65 3d printed 65% w/LCD and hot swap
More
Box Jades, Interchangeable trim, mini lcd, QMK, underglow, HK Gaming Thick PBT caps, O-rings, Netdot Gen10 magnetic cable, in progress link
| Magicforce 68
More
MF68 pcb, Outemu Blues, in progress
| YMDK75 Jail Housed Gateron Blues
More
J-spacers, YMDK Thick PBT, O-rings, SIP sockets
| KBT Race S L.E.
More
Ergo Clears, custom WASD caps
| Das Pro
More
Costar model with browns
| GH60
More
Cherry Blacks, custom 3d printed case
| Logitech Illumininated | IBM Model M (x2)
Definitive Omron Guide. | 3d printed Keyboard FAQ/Discussion

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #19 on: Thu, 12 August 2021, 01:42:15 »
Yes, I know  :( I've set up the QMK build environment and had a look around, while I wait for my Teensy to arrive in the mail. It appears to be a breathtakingly hideous process. I found the config files of another macropad with rotary encoder and I think I can manage to adapt it. But don't be surprised if I come crying back here  :D

@piit79: no sweat  :thumb:
« Last Edit: Thu, 12 August 2021, 04:20:34 by Volny »

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #20 on: Mon, 16 August 2021, 09:23:02 »
Well, I built it today and it works. I found the firmware process surprisingly easy. A hopelessly convoluted and archaic process to be sure, but relatively easy with almost no troubleshooting required. The firmware I wrote basically worked on first try. I almost couldn't believe it, lol.

The most challenging part was actually the aesthetics. It looks horrible, and like it's going to fall apart if I breathe on it. But now that I know I can do it I might order a properly measured case for it to replace my slapdash MacGuyver effort.

Thanks for your help, you two!
« Last Edit: Mon, 16 August 2021, 19:59:26 by Volny »

Offline Volny

  • Thread Starter
  • Posts: 235
Re: help with handwiring a small (non-matrix?) macropad
« Reply #21 on: Wed, 18 August 2021, 08:19:06 »
So like I said my first attempt was messy and out of control. It worked, but was delicate, rickety and hard to mount (the encoder quickly broke while I was handling the macropad too roughly - I fixed it with solder and decided to attach it to my Preonic instead).



I've had another go, and I'm very pleased with the result. I'm not particularly DIY-savvy, so this turned out pretty well for me. The design has changed - the encoder has gone, and I've settled on just 6 keys now. Plus a 'secret' key at the back for the reset, which I think is quite nifty.



I ordered a generic "instrument enclosure" case. This came with a slide out black panel which was (almost) just the right thickness for a plate, so I dremelled slots into it for the keys and wired them to the teensy. It was a little too thick for the switches to click in, but once I sanded it down a little they snapped in nicely. I glued them in anyway just to be sure they'll stay.



The case is very large for just a 6-key keypad, but because of the way I position it, most of the bulk is hidden. Meanwhile the inside spaciousness let me lay things out much neater than before and with much less stress.



I decided to use a real MX switch and keycap for the Teensy's little reset button. To do this, I sliced off the bottom of a switch to let the stem leg come all of the way out (if you try this yourself, you'll discover that, bizarrely, this takes on a vaguely obscene dimension - as if a very tiny aroused cat was trapped inside) and mounted it inside the case just next to the teensy. I placed a hard plastic box behind the teensy to help brace it against the press, and used adhesive neoprene layers to position everything into place.



I then dremelled a cutout on the side of the case, and any time I need to reflash the firmware, I can press a nice big keycap to do so (recessed, to prevent unwanted presses).



Here's the macropad (on the left) in my setup:



The keycaps are mostly placeholders - I'm ordering custom ones from PMK to match their functions. The keys represent my most commonly used programs, and let me quickly switch between them (hence why I wanted a thin strip that could squeeze just above my keyboards, for quick reach). The keys perform slightly different actions depending on context. If the program is not yet loaded, then the key will load it. If it is already loaded, then the key will bring it into the foreground (without starting a new instance) . If it's already in the foreground, then the key will jump to the next instance of it (if one exists). I did this using Autohotkey. The macropad keys themselves are all just mapped to F18 with various modifier combinations. Here's the AHK code for Chrome, for example:


Code: [Select]
{ ;;; ⸻⸻⸻⸻  CHROME
GroupAdd, chromeWindows, ahk_exe chrome.exe ; Add only relevant windows to this group.

+^F18::
{
if WinActive("ahk_exe chrome.exe")
{
GroupActivate, chromeWindows, r  ; go to next instance
}
if WinExist("ahk_exe chrome.exe")
{
WinActivate ; Use the window found by WinExist.
return
}
if not WinExist("ahk_exe chrome.exe")
{
run "C:\Program Files\Google\Chrome\Application\chrome.exe"
return
}
return
}
} ;;;  end chrome