geekhack

geekhack Marketplace => Interest Checks => Topic started by: Pylon on Fri, 26 November 2021, 16:39:30

Title: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Pylon on Fri, 26 November 2021, 16:39:30
Hi everyone -

This is more of a pre-IC, and at least several months away as I’m still working on other projects that I need to wrap up (such as my 120% keeb which has been in IC forever), but I’ve been thinking about this and would like some thoughts/input in terms of determining a direction to design things towards. The page will be updated as things progress.

Back in April I built a cheap force curve meter (https://github.com/bluepylons/Open-Switch-Curve-Meter) for MX switches, the design of which is open-source. Measurements are published here (https://github.com/bluepylons/Open-Switch-Curve-Meter/tree/main/Force%20curve%20measurements). This cost me about $200 to build, uses a cheap $11 load cell paired with a $0.50 load cell amplifier to measure force, and seems to generate usable force curves.

(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Pics/Prototype-1-vertical.jpg?raw=true)
(https://raw.githubusercontent.com/bluepylons/Open-Switch-Curve-Meter/main/Pics/Prototype-1.jpg)

Some example force curve measurements:
(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Force%20curve%20measurements/TTC-Watermelon-Milkshake.png?raw=true)
(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Force%20curve%20measurements/NK-Kailh-Box-Navy-Remeasured.png?raw=true)

There are also similar projects that other people have independently worked on, which use similarly inexpensive parts. For example, Ruddy of Geekboard.ru independently developed  a similar open-source force curve meter (https://github.com/geekboards/switch-force-tester) using similar components. There’s also someone in Japan working on a force curve meter. (https://twitter.com/Romly/status/1358983963377688579)

I was thinking of doing some design work on an inexpensive force curve meter that would be user-friendly enough to be available to the community should people want to own one.

The scope of this would involve:


I would like to make this all open-source.

There has been talk and some work on a website to display and compare force curves between various people with force curve meters (including me), though that is mostly separate from this project and a ways off.

Right now there’s a couple of different  routes to go down for the hardware design, with tradeoffs between price and performance. If you’re interested in this project, would you mind filling out this form? This would be very helpful in choosing a direction. Thanks!

> IC Form Here <  (https://docs.google.com/forms/d/e/1FAIpQLScbXmra2qvU_3adDWYihwtAbiZC8Bo4BuE68Xh9HPS7xEdSTA/viewform?usp=sf_link)




Title: Re: [IC] An Affordable Force Curve Meter for MX switches
Post by: Pylon on Fri, 26 November 2021, 16:51:26
Reserved
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: growler on Fri, 26 November 2021, 16:58:21
I can see myself chucking some money at this....

Sent from my SM-G980F using Tapatalk

Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: catamscott on Sat, 27 November 2021, 03:08:16
very very cool, making force curve meters more accessible would be great for the community  :thumb: very excited about this, even in a pre-ic state
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: plag on Sat, 27 November 2021, 16:46:23
this is awesome. im absolutely down for this. would love to see a (hopefully cheap and easy) modification to record alps curves as well
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: EB3K on Sat, 27 November 2021, 21:19:49
This is so cool! I've been dying to see force curves for some newer switches after haata stopped.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: stidal on Mon, 29 November 2021, 04:02:52
very neat. don't think it's something i would personally use, but making force curves more accessible for less common switches would be sick
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: holer on Mon, 29 November 2021, 07:06:59
Very cool project - I would likely pick one up!
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: ifohancroft on Wed, 15 December 2021, 16:19:51
I am definitely interested.
Filled the IC form.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Nonnegaard on Wed, 15 December 2021, 16:25:28
i honestly see a lot of fun coming out of this. if you can bring the price near the $150 mark you were talking about, I'm definitely in for one.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Reimu_64 on Wed, 15 December 2021, 17:18:56
This is really awesome! I've been interested in making my force curves after I learnt about Haata's take on it, but the price for the equipment is north of £300!
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Pylon on Sat, 25 December 2021, 16:08:27
Here are the survey responses so far - thank you everyone that filled out the response. With 99 responses, here are the results so far:


(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Gen%202%20Design/Survey%20results/1.png?raw=true)
Looks like most people would prefer a more accurate force curve meter (even if it requires very frequent calibration) over a less-accurate one that does not require calibration. In terms of the design, this means that the Honeywell force sensor (https://www.digikey.com/en/products/detail/honeywell-sensing-and-productivity-solutions/FMAMSDXX005WCSC3/12088234) I was looking at using is ruled out, and I'll be sticking with a load-cell (probably  this one (https://www.sparkfun.com/products/14728), the same one I use on my current force curve meter) and a load cell amplifier.

(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Gen%202%20Design/Survey%20results/2.png?raw=true)

On the measurement time, this is a lot more even of a split. This involves deciding between the $0.50 Avia HX711 chip  (https://cdn.sparkfun.com/assets/b/f/5/a/e/hx711F_EN.pdf), and the $30  Analog Devices AD7730  (https://www.analog.com/media/en/technical-documentation/data-sheets/AD7730_7730L.pdf). The HX711 can measure at 10Hz (~160 seconds to measure a switch) and 80Hz with very slightly reduced accuracy (~20 seconds to measure a switch). The AD7730 can measure up to 1200Hz (~1.4 seconds for a measurement). I ended up calculating the impact on accuracy of using the 80Hz mode on the HX711, and the additional noise only adds about 0.01g of error in theory, which is completely negligible. I also tested 80Hz mode last week on my current force curve meter, and it seems to work out ok. I feel a 20 second measurement time would probably be acceptable for most people. so I plan to design primarily around the HX711 on 80Hz mode.

I am considering accommodating both options by making the ADC PCB a separate module though, so people could use the faster AD7730 if they want.

(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Gen%202%20Design/Survey%20results/3.png?raw=true)
On the OS front, most people are using Windows, with some people on Linux and MacOS. I am primarily a Windows user, so most of the initial development will be done on my Windows computer, though I will see how I can make the workflow cross-compatible. A lot of the biggest unresolved questions on designing this is going to be on the software end, and I haven't started much work here. On one hand, a fairly manual workflow using Arduino and Libreoffice Calc would work just fine on all 3 OS's with virtually no work on my end. I would like to do a more user-friendly automated workflow though, and there's a bunch of questions on how to do this (it might involve either a Python script with a GUI to process the data, or possibly a packaged application). The latter will be  trickier to do cross platform (and I'm also not a software developer), but there's probably ways to do it with packaging Python scripts into an application.

(https://github.com/bluepylons/Open-Switch-Curve-Meter/blob/main/Gen%202%20Design/Survey%20results/4.png?raw=true)

These are survey results on price. I'm trying to design this to be as economical as possible, though there are still various design questions (e.g. - is making the MCU board and stepper motor driver replaceable modules instead of having it all soldered down on one PCB worth an extra $10?). Right now, I'm expecting the raw bill-of-materials cost to  come in around $110-$130 @ MOQ 50, but this will obviously be subject to change as things progress further in the design and I have more concrete figures. A lot of the final price will also depend on the margin the  vendor expects to take (I have not had serious discussions with any vendors yet).

I also took some time to do some design work the past couple of weeks (as my 120% keeb prototype assembly is somewhat delayed due to my arm injury). Files are posted on Github  here  (https://github.com/bluepylons/Open-Switch-Curve-Meter/tree/main/Gen%202%20early%20design%20work). I intend to keep the project fully open-source.

Here is how the mechanical CAD is looking right now (the CAD is multi-colored just to make designing it easier - they'll be laser-cut raw aluminum and stainless steel on the final one). To try to keep the cost down I'm trying to do the stand/frame entirely with laser-cut metal and 80/20-type extrusions, and trying to avoid any tapped holes or CNC work. The PCB (currently not modelled) would probably mount on the back of the 80/20 members (and possibly also on the bottom panel if I split up the PCB into modules).

[attachimg=1]
[attachimg=2]

I'm also doing some work on the PCB right now. The main questions right now with the PCB are:


After I finish the PCB design I intend to order the PCBs and test the electronics with my current force curve meter (which uses the same load cell and linear table), and start working on the software, which will probably take a couple of months. After that's done I'll order and test the stand, and possibly build some extra ones to send out to people  for testing and feedback.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: catamscott on Sat, 25 December 2021, 16:25:10
awesome update! I for one would also vote for a modular pcb for the same reasons you listed
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Thockologist on Sat, 01 January 2022, 21:06:56
The latter will be  trickier to do cross platform (and I'm also not a software developer), but there's probably ways to do it with packaging Python scripts into an application.

If it's written in Python it should work no matter what OS it's on aside from a couple of standard libraries not playing nice (iirc) and possible font differences. Pretty sure Tkinter is one of the more commonly used GUI libraries but I've not really delved into building UIs in Python. For testing you could just have it run from the command line and use the arguments of the file for whatever input you need to run it, this will still work if you pack it into an exe file for windows too. For outputting the graphs in Python Matplotlib would probably be the easiest way to go about it.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: lush_bunny on Sat, 01 January 2022, 23:45:54
GIB
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: befbef on Thu, 06 January 2022, 19:38:47
 :thumb: I will definitely buy this thing.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: derpturtle on Thu, 06 January 2022, 20:23:49
This is an awesome project. Keep up the good work!
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Pylon on Sat, 15 January 2022, 18:16:52
Thanks everyone!

Prototype PCBs have been designed and ordered. I ended up deciding to continue with the modular approach, using a Adafruit RP2040 microcontroller and a StepStick-style stepper motor driver (commonly found on 3D printers). End user will have to solder on a number of through-hole parts (connectors, ESD diodes, etc.)

(not all parts shown)
[attachimg=1]
[attachimg=2]

The files are open source  and available on Github. (https://github.com/bluepylons/Open-Switch-Curve-Meter/tree/main/Gen%202%20early%20design%20work)

I'll be working on the software over the next few months, and testing the PCB with my current force curve meter. I'll order the parts for the stand once I have the electricals and software working to some extent.  Come to think of it I should also come up with a name for this project.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: svenge on Wed, 19 January 2022, 23:43:42
Wow this is awesome.  I tried googling for a springrater a while back and they are crazy expensive.  This would really crack open the Frankenswitch / lube wars to the next level.  Hard to argue with a good force curve.  Count me in.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Frugivore on Tue, 15 February 2022, 09:54:44
Can't wait for this! The more diversification of high-quality testing in the community and the movement away from manufacturers being the only ones to have testing equipment the better.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: fractalsauce on Wed, 18 May 2022, 21:35:19
I just registered an account here to say that I'm most definitely interested in this! Already filled out the IC Form. Just started my journey into the custom keyboard hobby/rabbit hole about a month ago and this seems right up my alley and I'd love to test my own switches and frankenswitches  :D
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: jolly on Wed, 14 December 2022, 01:54:41
Interested! Found this after jury rigging my own "meter" to give me  activation distance and force, for some magnetic keys im building.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Its Salty on Wed, 14 December 2022, 17:44:27
this could be super interesting if you can ensure that there's little to no backlash in the system

don't want that effecting the sensor

will absolutely be keeping my eyes on this :thumb: :thumb:
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: _IanOfEarth on Mon, 23 October 2023, 11:24:49
Any movement on this in the last ~year, Pylon? Keen on making one.
Title: Re: [IC] An Affordable Force Curve Meter Kit for MX switches
Post by: Pylon on Fri, 19 January 2024, 11:46:55
Hi all! Unfortunately I have not been working on this for a while (or on force curves generally, as Theremingoat's been doing an excellent job generating force curve graphs nowadays), and with my other projects going on this probably won't be getting touched in the foreseeable future. The work-in-progress files are all up on Github (https://github.com/bluepylons/Open-Switch-Curve-Meter/tree/main/Gen%202%20Design), except for some redistribution-restricted 3D models, if anyone wants to take this on. I might have some time to at least update the documentation.