Close

[R] Sourcing chips

A project log for Tetrinsic [gd0041]

A motorised fader that is continuous, pressure sensitive, haptic and water resistant.

kelvinakelvinA 09/21/2022 at 11:531 Comment
Yikes. This took 8 hours to curate. At least now I know I'm creating a switch that's likely to be >£15 per each. Considering that many ergo keyboards, the Twiddler3 and the Charachorder all cost north of £150, this isn't too terrible. Behind the monitor, the input method is probably the second most important part of a computer system.

It started with looking for a TMC6300 alternative.

Since I need a proof of concept ASAP and didn't want to have to spin up a custom board just to try things out, I was hoping that there was something in a larger package that I could use. Long story short, there is not. Options like the STSPIN233 (a newer version of the STSPIN230 that has 3 sense resistors instead of 1) and the MP6543 seen in the parts list above all use the QFN package. I didn't find the MP6543 until much later though, and I'll get back to it. When I started sourcing, the STSPIN23x chips were the only ones I could find on AliExpress. Thus, I was like "well since the package is 3x3mm, maybe a bunch of the other chips I need are similar in size and I could fit all the circuitry on the same PCB.".

Next was the serial in -> parallel out.

This was straightforward. It's the 74HC595. It has a serial out so I can daisy-chain them. The microcontroller board I'm planning to use only has 11 pins, and even if it had more, I don't want to do what I did 2 years ago for the #T^2 Tiles [gd0095] where I'm searching up and down AliExpress for a microcontroller with the required amount of pins. This chip increases the amount of digital out pins without needing to increase the physical amount of pins.

I also looked at 16 bit registers but QFN ones cost much more than 2x8 bit.

After that, the ADC.

Seems that nothing comes close to the cost:features of the HX711 (and smaller HX710), but "aw, they don't have my size.". The bigger concern was the sample rate. The 710 only does 40Hz and the 711 does 80Hz. This is probably fine for a weight scale, but probably not for an input device on the fight against QWERTY. 

I did some searching, found a 16 bit chip, read this article that recommended 24 bit and found went for the 24 bit version of the chip that costs 50p extra each IIRC. The chip is called MCP356RT-E.

Now, the magnetic angle encoder.

This is the only one that has to be small, since it's going to be at the end of the pulley gear and there's really not a lot of Z height. Testimonials from scottbez1 and others that typed Reddit comments made me aware that the AS5600 was probably going to give me issues anyway.

Issue is that the cheapest QFN I could find was the AS5050A, which was a >£6 chip. Yeah, now that I've got a rested pair of eyes I can see an encoder chip right next to the AAT101 I decided on, but even so, it's not as ideal.

This is what the AAT101 looks like inside:

Now, I was looking at that and thinking "hmm didn't quite a few 24 bit ADCs come with more than 1 channel?"

So I got a more expensive, 3 channel ADC.

It's the ADS131M03. Now I can use all channels of this chip instead of 1 out of 2 on the other one, and I get 24 bits of absolute encoding inststead of 10 bits for the 6-quid-something chip or 12 bits for the MA782GGU. That's also 1 less seperate sensor I need a connection to the serial IO for. It just costs £1 more.

Then deciding on the STSPIN233 or the MP6543.

The MP6543 is cheaper than the STSPIN233 which is cheaper than the MP6543A. For hours, I couldn't understand what the PWM in the 6543 was for; was it just a signal in like the 233, or was the PWM telling the chip how to configure the bridges (eg: low pwm = low bridge...).

I eventually looked at the SmartKnob code, which lead me to the SimpleFOC docs, where I saw 3PWM and 6PWM. It seems that they're just 2 different ways of controlling BLDC motors, and 6PWM has likely been chosen in the SmartKnob View PCB because the TMC6300 is cheaper than both of the options I'm evaluating. From this, it sounded a lot like the 233 and 6543 worked the same and that they were 3PWM controllers. This also reduces the amount of parallel-out pins needed by 3.

Benefits of SPIN233

Benefits of MP6543

I calculated the standby of 4 6543s on the #Tetent Timespy [gd0136] and I got 27.78K hours from the 5Ah battery. In a year, there's 8.76K hours. Thus, it sounds like I'd get more tangible benefits out of the 6543 than the 233.

Lastly, the parallel in -> serial out chip.

This is the opposite of the 595. It've chosen the 74HC165BQ.

Conclusion

I was expecting the motor chip to be the most expensive one out of them all, but that wasn't the case. Speaking of case, I want to design the back side of the PCB to be aesthetically pleasing since it's very likely going to be a 1.6mm PCB that sticks out and requires a cutout in the case body. At least it'll be a nice opportunity to put "Tetrinsic" in the bottom left for branding consistency.

My experience written in this log today is also the reason why I'm focused on #Tetent [gd0090]. The input device should make all this website research faster and more enjoyable, as well as everything else I need to do on #Teti [gd0022]... like virtually every single project I have. My ToDo list plummets into the ground when I exclude anything that I could do (or do faster) on a PC or PDA (a.k.a. smartphone).

Oh, and there were only a fraction of available products on DigiKey to choose from after removing the OOS and bulkbuy options. I do wonder how much cheaper things could've been, but I'm not some company that needs to pump out thousands of these so I shouldn't really be trying to chase an ever-lower price. It's still much cheaper than a spacemouse sensor assembly, though I like to see if flexures could be used.

Discussions

kelvinA wrote 09/22/2022 at 16:04 point

Currently, Tetrinsic costs £19/each with an order quantity of 11 (10 + spare). That's another project to add to the "it costs 2x what I hoped it would" list. It doesn't help that cheaper chip options are out of stock, but the price doesn't include passives, FFC cables or the PCB. 

It kinda balances out since one only needs 4 Tetrinsics and 3 chords/second for <=127wpm, which is 2x the speed I can do on QWERTY. Such a "keyboard" would likely cost around £100 which is not great but not terrible since it can be a mousepointer and macropad too. A 12-button macro mouse is looking like >=£40 these days. Back in my day (4 years ago), they were <=£30 and I can't get custom dedents for fine movement.

  Are you sure? yes | no