mitxela.com forum
Welcome. Please log in or register.

Ideas for StyloCard update?
Zokhoi Posted: 16 Dec 2023, 07:25 PM
Avatar


Member
Posts: 2
Joined: 16-December 23
I saw on the Smallest USB-C MIDI Synth post that there was a mention of possible updates on the StyloCard, but 22 GPIO pins are needed for direct pin readout (2 for USB signals?). We can steal the keyboard matrix idea from the custom keyboard design community, where the keys are split into rows and columns (and add a bunch of diodes on the board). Then we split 20 keys into a 5x4 matrix, and reduce the number of required pins to 9 only. After adding 2 pins for USB, it would still fit into the number of GPIO pins a single CH32V003 offers.

Another idea is to update the StyloCard to use a non standard USB C receptacle with only the middle plate and no housing, similar to how something called Slimca does it.
https://www.kickstarter.com/projects/jerrylin/slimca-here-a-tracker-as-thin-as-a-credit-card/description
With this approach there is no need for double stacking the USB connector part.
Seems like the USB C specs say it's 0.7mm? So the entire PCB would have to be that thick.
https://www.usb.org/sites/default/files/USB%20Type-C%20Spec%20R2.0%20-%20August%202019_0.pdf, page 42

-------------
[top]
mit Posted: 17 Dec 2023, 12:43 PM
Avatar
yeah whatever

Admin
Posts: 566
Joined: 4-May 16
I have been through a number of redesigns, I'm sorry I never published any of it.

You can't matrix the stylophone keyboard as the stylus is only one contact. A matrix requires each switch to be between rows and columns. There are some clever tricks you can do but none of them are perfect, it's much easier to just use a microcontroller with enough pins.

The newer stylocard (still from a few years ago) had a mid-mount micro USB port which meant the total thickness was slightly less than the one in the video, and it was much easier to find micro usb cables than to find USB-A extension cables. If I was building a new one today, yes, that USB-C hack that slimca is doing looks perfect.

-------------
[top]
Zokhoi Posted: 24 Dec 2023, 07:51 PM
Avatar


Member
Posts: 2
Joined: 16-December 23
Right, key matrix couldn't work.

Another concept I saw from the custom keyboard design community is to use diodes in both directions, so for this situation the hardware side would be like this:
(User posted image)


And on software side, first power pins 1-10 individually and check pin 0, then power pin 0 and check pins 1-10. Doesn't make a very elegant solution in terms of the software checks but it does cut down the number of pins to 11+2, which is also within the number of available pins from one MCU.

Last edit by Zokhoi at 24 Dec 2023, 07:56 PM

-------------
[top]
mit Posted: 24 Dec 2023, 10:11 PM
Avatar
yeah whatever

Admin
Posts: 566
Joined: 4-May 16
While that would work, it's adding 20 diodes to the board which is, if you factor in assembly time, maybe more expensive than chucking another ch32v003 on there. Similar with the resistor network and the analog reading. I guess the diodes are at least all the same part, and might not be so susceptible to noise when the keyboard gets dirty.

There might be a clever circuit possible that doesn't need any extra components, I haven't thought too hard about it.

-------------
[top]

Sign in to post a reply.