Close
0%
0%

Tetrinsic [gd0041]

A motorised, pressure sensitive and haptic-feedback slide encoder.

Public Chat
Similar projects worth following
To get the most bandwidth out of the 2 hands I've got, I'm designing a new "keyboard switch" for the input layout (gd0090) I hope I can use for the decades of typing to come.

Details

This project is intended for #Tetent [gd0090] and its subprojects.

History

Finding out about hall effect switches and their potential double-action feature, I started researching double-action switches. Small tactile switches (0.6N, 1.6N) do exist, but from pressing my camera's shutter button, their second actuation force is too high for all but buttons pressed with the thumb. Next, I discovered riskable's Void switches and how the design could allow for adjustable actuation force and doesn't need an electrical connection to the keyboard PCB. Magnets seemed to be quite cheaper than buying 0.8N and 0.5N tactile switches, and allows for LED backlighting because the components needed are smaller.

Ever since I started #Tetent Timespy [gd0136], I came to the realisation that the current solution (5 seperate buttons per finger row) I was trying to obtain was still flawed. As of Sep 14 2022, I've changed the design to centre around a mini BLDC motor connected to a GT2 belt that also acts as the keycap surface. This was inspired by various open source projects (namely the SmartKnob View) and will use the motor and force sensors to simulate different sliders and tactility, as well as make the weight and amount of actuation points software adjustable. The motor is also used to train, as my main questions when learning to type was "Where is the key? What finger do I use to press it?"

Example of a Similar Product 

I found this video which shows how the slider would ideally perform, just that you can press down on it and it can be set to allow movement "infinitely" in either direction.

  • [M] PCB slowly being rerouted

    kelvinA11/10/2022 at 23:55 0 comments

    I've sunk 5hrs into the next PCB iteration. The challenge is, as usual, to have everything connect up. I'm also routing the ground pins now. Connecting the ADC to the microcontroller and angle sensor was straightforward, but its the MP6543 motor controller that has increased the compute time. I have also checked Digikey to see if there are any new alternatives in stock that wasn't a month ago, but there were none. I'm using the LDO that's conviniently on the MP6543 so it's not like I can switch to the now-in-stock TMC6300.

    I've decided to put solder pads for ribbon cables on the back side of the PCB to get more space on the front and ease assembly, and I think it was a good idea to go with.

    I've also recently seen the below image and even though this is the first Tetrinsic board design, I'd still like it to look nice for my inner peace of mind.

  • [M] 40mm Long

    kelvinA11/06/2022 at 22:01 0 comments

    After mining for a bunch of solutions on other projects, I'm back in this mineshaft. Now that I've got a redesigned Tetent Timespy, I know what changes I can make here that will improve both solutions. I've gone all Dynamic Island on the belt path by increasing the length from 35 to 40mm so that I can reduce the PCB height by 1mm whilst getting more PCB area that can be used for components. The belt length has also increased from using a 92mm to a more readily available 100mm belt.
    Sigh... now my entire PCB solution will have to be recalculated.

  • [M] Motor Pad

    kelvinA10/09/2022 at 21:54 0 comments

    It's not much but it's still honest work. I've also moved the capacitors closer to the MP6543 and I've tried to make the pads somewhat large because I suspect that I'd have to actually solder some small wire.
    I modelled the cable of the motor from the AliExpress images and I don't think it's going to be long enough to make it all the way over. Even if it was, it doesn't seem like the easiest of things to solder since there is insulation covering the top of the pins.

    Next thing to do is either make more pads for other connectors, double check the schematics to finally confirm if I'm using a 5 pin ribbon cable or something else or start learning how the M032 MCU is programmed. I could do the last option whilst waiting for the PCB and parts to arrive, so it's likely going to be one of the first two options.

  • [M] 1000 Pages

    kelvinA10/06/2022 at 18:36 1 comment

    [20:00]

    So I've continued processing changes for Tetrinsic and #Tetent [gd0090], but am trying to focus on Tetrinsic for now since it's what holding back progress. My main concerns have been written in this log.

    Today, I've been trying to figure out how the mcu is flashed. Apparenlty, it's via an "Nu-Link" device. I can only assume there's some kind of bootloader already on the chip so that it knows which pins are the ICE pins.

    Then I was wondering how I was going to set the device addresses for I2C. 

    The 5 pin ribbon cable looks like this right now. There's not really much space, so I've put the USB data lines on it too and plan to not have a connection for the cable that goes to the next Tetrinsic. This way, only one Tetrinsic in a chain will have a USB connection, and this one will be the master Tetrinsic. 

    For addressing, my plan was to have a way to detect the resistance value between the Sense (now called Address) line and some other line, but I don't think my idea would work when there's more than 1 Tetrinsic on the lines. 

    Instead, I've got another idea where 

    1. The end-Tetrinsic sends 3.3V down the Address line (via soldered pad on board)
    2. The Master Tetrinsic connects the line to ground (via soldered pad on board)
    3. If the voltage measured on the Address pin = 0, this is the Master Tetrinsic and it uses a software defined I2C address. All others will instead opt for a dummy address.
    4. The voltage measured on the Address pin will determine the delay before trying to connect to the Master Tetrinsic. The master Tetrinsic will give the slave Tetrinsic an address and will log that it was the n-th Tetrinsic in the chain.

    In my research, I heard that there was some SMBus thing that had a feature that actually sorted out the device addresses so that there aren't conflicts, but it seems that it's only a feature in the M032xG/I chips and the USCI found in the M032TD doesn't have that feature according to my skim reading.

    Oh, and me a few hours ago:

    • Man. There's got to be some more information, like on programming the mcu or even some more I2C knowledge...
    • Hm? What's a TRM? I didn't see this on the specific M032 documents page. It was just the Datasheet and nothing else.
    • Opens it

    • My face:

    Now I'm really wondering just how much scope this project is going to grow into! The good news though is that I guessed correctly on what pins the USCI uses for I2C. At least Me In The Recent Past got the additional content he desired when saying that the 288 page doc wasn't detailed enough.

    Anyway, I looked at the pins and the SPI pins take up some of the ADC pins, and I need an ADC pin for the Address signal.

    Conviniently enough, there is another set of SPI0_x pins on the other side of the chip, and I'm not using Pin11 (PA.3). Therefore, I've crammed in the traces at the bottom of the board. I haven't imported the new outline yet.
    I'm also going to use nReset since this is the first time I'm making a microcontroller board and I don't really want to risk adding any hurdles that could've been avoided.

    Since I had the space, I've added a 1u bypass capacitor.

    I've also made all the silkscreen text bigger, as I still have to keep in mind the actual scale of this board.

  • [M] PCB Rerouting

    kelvinA10/06/2022 at 02:26 0 comments

    Now that I knew I needed to make sure I had spaces for the vias under U1 (the microcontroller), I (eventually) deleted most of the traces and started rerouting a new solution. I've also used 0.2mm traces as default instead of 0.16 and it was still mostly routable. I've also tried to use 0.6mm vias where possible.

    I've removed the USB related resistors and added a recommended 0.1u capacitor for U1.

    I have also found a nice looking pad design for C0402s, used these recommended values for 0402 components and then made a similar one for 0603s. The silkscreen is much cleaner now. I should also note that I've made sure that the IC text is facing up for all components (which is the reason U2 is rotated 90 degrees).

    Next time, I need to start thinking about creating some FPC pads so that I know the limits before I finish routing the remaining MP6543 pins.

  • [M] Populated MCU

    kelvinA10/05/2022 at 00:02 0 comments

    I've spent another 2.5 hours in easyeda and the datasheet and I think I've got a pinout that will do what I want it to. I've used USCI1_CLK and USCI1_DAT0 as Clock and Data respectively, which is just an educated guess since the datasheet doesn't specify what pins are actually used for the I2C configuration. Additionally, the "ICE" pins are the chips debug pins, so it's probably a good idea to add those in.

    I've also started to rip 'n' tear out the traces I've made so that I could move the MCU up high enough to comfortably fit vias on the bottom side.

    This is the reason why Pin11 is NC. There's not enough space for a via. Additionally, Pin15 is not a BPWM (Basic PWM, but it seems like an enhanced version of "PWM" found on the M031 when quickly skimming over the datasheet) pin, so I couldn't use that for anything. Conviniently, I still have enough prins to connect everything I need.

    I still find it a bit suprising that, if I'm understanding the datasheet correctly, there isn't really all that much stuff I need to add an entire microcontroller to the circuit. I did a bit of looking, and the evaluation board for the 32K flash version looks pretty sparce:NuMicro M0 Evaluation Board - NuvotonIt really looks like the chip and 3 capacitors is all that's needed for most operations.

    I can't find any schematic though. However, I can see that the 2 USB data lines seem to be length matched.

    Still though, it's strange to think that a 288 page datasheet actually seems a bit lacking in detail.

  • [M] Starting the PCB

    kelvinA10/03/2022 at 13:12 0 comments

    [14:15]

    This is a 25x16mm PCB with 0603 capacitors. I haven't yet made the switch to 0402s yet

    I've already had to increase the size of the board to 25x16mm and reduce some passives to the micromanagement 0402 package, as well as shuffle the IC's around, just so that I could have any resemblance of fitting things into the space provided. At least the motor mount nuts are fully covered by the PCB now, so Tetrinsic should look a bit more aesthetically pleasing for those that enjoy seeing things like Apple's PCBA designs.

    Whilst increasing the amount of shared passives and seeing how many more the MCU wants, I found out that the M032 chip is the one with the USB controller. The M032TD2AE has the same amount of flash as the M031 I discovered last log and reduces the IO to 23 pins (from 27). It's 20p more expensive and Digikey has almost 2X the stock. Since this M032 could be more useful in any future electronics projects in the future (due to that internal USB controller), I'm going to use it.

    It would be really nice if I can flash the MCU through USB, but if not, I'm likely going to make the 27 ohm resistors (specified in the datasheet) external (since I don't have a lot of board space to go around).

    [16:15]

    Exciting. I've managed to cram in all the passives I know I need at the moment. Don't mind the silkscreen at the moment. I've also started connecting some pads together to see how close or far ICs need to be so that things are routable.

    The blue pads are the not-connected ones that I can delete if needed. I'm assuming that the magnetic sensor doesn't need the pad so I've already deleted it to make routing easier. I've also shrunk the M032 pad so that I can fit vias.

    [23:15

    This is the routing I've been able to get today. The next time I find time, I need to connect the other 4 PWM pins to the MCU and figure out what pin I can use for the I2C feature in the "Universal Serial Control Interface". Then I need to start making some external cable pads. 

    I'm also going to need to increase the height of the PCB to 16.5mm.

  • [T] Tetrinsic as master control

    kelvinA10/02/2022 at 02:34 0 comments

    I'm currently wondering if I could have one of the Tetrinsics as a "master" IC, instead of requiring a seperate microcontroller for use in #Tetent [gd0090]. The current IC of choice clocks in at a speedy 48Mhz, but the 16K of RAM is a bit of a concern. 

    New Chip

    I went to Digikey to see what other options are out there, and this chip is convinient:

    The M031TD2AE seems to be a 64KB version of the initial chip I found in the previous log. I then looked into the memory sizes of popular DIY keyboard microcontroller choices, and quite a few of them are 32KB, so 64KB should be large enough to upload a full input device firmware. 

    Another cool thing is that it seems that JLCPCB's SMT service has it in stock too. 

    For a 4x4 package, it sure comes with a lot of juicy features. The money saved from omitting the multiplexer has gone straight into a more ideal microcontroller chip, as my ex-VAT chip total is currently £133.

    I've also missed the deadline for the XIAO keyboard contest, so using their microcontrollers is no longer a soft requirement.

    I2C Device Addressing

    Yesterday, I determined that I was going to use I2C as the communication protocol between Tetrinsics. The only concern was how I was going to set the device addresses. 

    Right now, I'm hoping that I can have a "sense" line on the ribbon cable and detect the resistance between the I2C data line or something like that. If each Tetrinsic adds a set ohmic value to the resistance, firmware should be able to determine how far down the daisy chain it is. For example, if 5k resistors are used, 15k resistance detected between the data and sense lines would mean that the firmware gives the current Tetrinsic the 3rd valid device address.

    Further Delays

    Along with now having to learn about the large world of microcontrollers (at least enough to create a working schematic for it) I'm thinking of creating PCBs for Tetent and #Tetent Timespy [gd0136] to save on shipping costs. I'm also thinking of having 1 large Digikey order instead of 2 or 3 seperate ones.

  • [T] Using a microcontroller

    kelvinA09/30/2022 at 12:12 0 comments

    [14:00]

    So I'm watching VoidstarLabs' new keyboard build and hear about IO expanders and microcontrollers, and so I go onto digikey to take a look, since I've still got concerns about controlling the MP6543 through an expander. What do I find immediately? RP2040 chips that go up to 133MHz for 88p for a MOQ of 1!!

    The issue is that I don't have much board space at all, so the 7x7 package is too large. The current IO expander is a 4x4 package, so I set the relevant filters and found this:

    32 bit. 48Mhz. 16K flash. 2K RAM. Near half the cost of the IO expander:

    Squints

    No... no... that can't be right. I wouldn't have picked this if the stock quantity was this low... it... it should've been in the thousands or something!...

    Finds a snipaste on the 27th Sep when I first found the chip:

    Wha? There were 5K in stock 3 days ago? Wha... what happened??? So I would've had to recalculate either way????

    Well... I guess I'll start reading the 280-odd page datasheet then... and hope that 490 is enough to stay in stock without beign enought to get bought out by the local factory or something.

    Anyway, I was thinking that the microcontroller could do all the motor control and encoder processing and just ping back to the master every microsecond (1kHz) or so. Every time I think I'm close to having something, I find a new low in limbo (reference to the Limbo Dimension in the Minecraft Dimensional Doors mod).

    [16:30]

    I'm looking at the £2.54 EFM32PG22 and it could be an option for a microcontroller with built in 16 bit ADC, but the documentation is too sparce to get an idea of if it's a usable alternative to the £3.79 discrete ADC. The £2.95 MSP430I2020 also exists with 2x24b ADCs, but I can't seem to find the 3 or 4x24b options, nor have I determined if 16 IO pins are enough. It might be, but I'm once again still having troube understanding what its ADC can and can't do. 

    Those are the 2 options that cost less than ADC + M031 (£5.16). The M031 has a 12bit ADC, meaning I can remove the 2:1 switch chip.

    Also, I'm currently reading that strain guages have 10mV of full-scale deflection, so using 16x gain is likely unrealistic for getting usable signals.

  • [M] Direct ADC connection

    kelvinA09/28/2022 at 12:30 0 comments

    I was still worried that there were going to be ADC SPI issues with the idea I had last log, and realised that SPI shares all but the CS line. This means that I can cut out the Channel0/1 thing, increase the amount of address configurations to 16 and increase the ribbon cable to 5 lines.

    It should mean that the ADC's can use a faster, 8.192MHz channel and hopefully the ioData line isn't as congested. I just haven't checked if any of the 16 device address combinations are device addresses that are recommended against:

View all 24 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates