We're currently working to build a computer vision based displacement sensing method for the DEX. Since our machine (or, many machines manufactured by novices / in the public domain) are liable to flex (indeed, nothing is infinitely stiff!), the thought is to measure local displacements of the sample, at the sample, rather than measuring open-loop through the machine's structure.
I've decided to roll a standalone controller for DEX. I've made a little ad-hoc breadboard circuit to connect one stepper driver, one load cell amp, to an Adafruit Feather M4 - an arduino variant.
So, this should just be a short project - I mostly have the codes I need to run the thing in cuttlefish implementations, here will just be wrapping those up in a standalone system. I can also experiment with 'no handcuffs' programming models, not having to manage this all through various homebrew dataflow environments.
So, first task is getting the embedded code up to competency. Compexity will live in JS, so the embedded just needs to do two things:
-`step <int32 steps>`
- accelstepper's this count, replies when complete
- microsteps are baked in: calculate transmission ratio as well?
-`read <uint32 averaging samples>`
- does read, replies with int32 (or whatever width is HX711) back, simple
Then, steps / mm land, zeroing, etc, will live in JS. As will load cell calibration, and plotting, etc. I can bottle each of those low level commands in JS promises, making 'running' the machine big async codes. This should be easy-ish, let's see.