Is a viable idea use two Arduinos instead of a Teensy for KB firmware?

User avatar
PlacaFromHell

13 Dec 2018, 06:52

Well guys, I have two Wyse keyboards with fucked up controllers and at least two projects running. For diverse reasons is very hard to me get a Teensy 2.0++ (I already got one but still need at least three more). But for my luck I have a trusted Arduino dealer. Isn't the same if I build the things like an electronically split keyboard but in a single case? Obviously, will be smarter do it with my custom keyboards instead of taking apart the PCB of the Wyse ones (in which this practice only could be viable cutting a bunch of traces or handwiring them).
What do you think?

User avatar
vvp

13 Dec 2018, 09:07

If you have a programmer to replace the bootloader then it does not really matter whether you have arduino or teensy.

The only reason why teensy is interesting is its bootloader (invoked only after reset button press) and the size of the bootloader (only 512 bytes).

Anakey

13 Dec 2018, 10:05

when you say split keyboard in a single case, do you mean having 2 separate independent controllers each with their own usb ports or having one as a master and the other a s a slave? If the first option it will not be a problem as the os would just see 2 separate keyboards so the only thing would be correctly setting up the keymap, however making that out of a normal full size would mean manually wiring up the broken traces. Also as boards will not have normal nice rows and columns you would probably have to end up wiring most switches manually anyway at which point it would probably be cheaper and easier to hand wire the board to your liking and you can put diodes in at the same time rather then use the pcb the came with the boards

Findecanor

13 Dec 2018, 12:35

I take it that the problem is that the keyboard matrix has more lines than the Pro Micro has I/O pins.

If I were you I would see if I could replace the column lines (strobes) with one or more "shift register" ICs. Then the columns would need only three I/O pins no matter how many they are, leaving 15 I/O pins for sensing rows: typically one line to shift in a digital one to select the first column, a second line to "latch" the column and a third for signalling an advance to the next column. If there are more columns than output pins on the shift register (usually only 8), you could connect them in series and they should work the same as a larger shift register. Read more: http://www.openmusiclabs.com/learning/d ... index.html
(There are more examples of multiplexing listed on the site but be aware that some require diodes)

If you would use two controllers then you would have to cut matrix traces on the PCB to divide it into two distinct matrices that don't share any lines.
Last edited by Findecanor on 13 Dec 2018, 12:42, edited 1 time in total.

User avatar
Quartz64

13 Dec 2018, 12:35

That depends on how many IO pins you need. Teensy 2.0++ has a huge amount of IO pins (38 IIRC). If you will be happy with 25 — buy chinese Arduino Micro (not Pro Micro). If you don't mind switching from AVR to ARM — there is cheap ($1.6) STM32-base "blue pill" board which has 28 usable pins, but it require some additiona work (replacing 1 resistor, flashing bootloader and setting up QMK/TMK+ChibiOS toolchain). And there are good old IO expanders. For example, MCP23017 can give you 16 pins over 2-wire i2c.

User avatar
PlacaFromHell

13 Dec 2018, 21:29

vvp wrote: If you have a programmer to replace the bootloader then it does not really matter whether you have arduino or teensy.

The only reason why teensy is interesting is its bootloader (invoked only after reset button press) and the size of the bootloader (only 512 bytes).
Shouldn't be a big problem
Anakey wrote: when you say split keyboard in a single case, do you mean having 2 separate independent controllers each with their own usb ports or having one as a master and the other a s a slave?
You understood perfectly, two independent keyboards in one. Would be interesting to take advantage and put diodes in at least one Wyse.
Findecanor wrote: I take it that the problem is that the keyboard matrix has more lines than the Pro Micro has I/O pins.

If I were you I would see if I could replace the column lines (strobes) with one or more "shift register" ICs. Then the columns would need only three I/O pins no matter how many they are, leaving 15 I/O pins for sensing rows: typically one line to shift in a digital one to select the first column, a second line to "latch" the column and a third for signalling an advance to the next column. If there are more columns than output pins on the shift register (usually only 8), you could connect them in series and they should work the same as a larger shift register. Read more: http://www.openmusiclabs.com/learning/d ... index.html
(There are more examples of multiplexing listed on the site but be aware that some require diodes)

If you would use two controllers then you would have to cut matrix traces on the PCB to divide it into two distinct matrices that don't share any lines.
I didn't knew about that way of multiplexing. I was thinking in something like that as the final solution:

Image

That giant column switcher can be simulated by the PIC I think (if it has the necessary pins like in this case).
Quartz64 wrote: That depends on how many IO pins you need. Teensy 2.0++ has a huge amount of IO pins (38 IIRC). If you will be happy with 25 — buy chinese Arduino Micro (not Pro Micro). If you don't mind switching from AVR to ARM — there is cheap ($1.6) STM32-base "blue pill" board which has 28 usable pins, but it require some additiona work (replacing 1 resistor, flashing bootloader and setting up QMK/TMK+ChibiOS toolchain). And there are good old IO expanders. For example, MCP23017 can give you 16 pins over 2-wire i2c.
Could be, but the problem isn't the money itself. If I want a Teensy or another less common microcontroller, I need to get it from Ebay. I waited like 6 months for the one I have and about a year for my xWhatsit. The last one I saw in a local store was like fucking 3000 AR$, when I can get a Pro Micro for something like 140 AR$. Every Pro Micro is less than a Big Mac, but a Teensy is a bunch of fucking 18 Big Macs.
Living in the third world requeires desesperate tricks like this one :lol:

User avatar
Laser
emacs -nw

13 Dec 2018, 22:30

The Deltasplit75 uses 2 Pro Micros, maybe you can take inspiration from that project (its firmware is now integrated into the official QMK).

Post Reply

Return to “Workshop”