Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoded your height readings #2

Open
scottt732 opened this issue Mar 24, 2022 · 3 comments
Open

Decoded your height readings #2

scottt732 opened this issue Mar 24, 2022 · 3 comments

Comments

@scottt732
Copy link

Thanks for this! I may have a lead on a formula related to the height readings on your Uplift Desk controller. I basically computed the slope and y-intercept between the lowest and highest observations using only the first component of the response (the 20 in 20, 5). This got me to height=(0.5795454545*response[0])+13.70909091.

This left me with a little bit of an error, but the second component of the response was correlated with it. I ran the same basic line fitting on the error rate to come up with this formula:

height=(0.5795454545*(response[0]+(0.001746724891*response[1]-0.008733624454))+13.70909091)

This gets me the following results:

response[0] response[1] observed height computed height difference
20 5 25.3 25.3 0.0
20 8 25.3 25.3 0.0
20 11 25.3 25.3 0.0
20 54 25.3 25.3 0.0
25 62 28.3 28.3 0.0
25 67 28.3 28.3 0.0
25 82 28.3 28.3 0.0
37 36 35.1 35.2 0.1
41 234 37.8 37.7 -0.1
42 14 37.9 38.1 0.2
45 153 39.9 39.9 0.0
45 156 39.9 39.9 0.0
45 168 40.0 40.0 0.0
50 7 42.4 42.7 0.3
50 188 42.8 42.9 0.1
50 231 42.9 42.9 0.0
51 8 43.0 43.3 0.3
51 27 43.1 43.3 0.2
51 104 43.2 43.4 0.2
64 161 50.8 51.0 0.2
64 162 50.8 51.0 0.2

Scratchpad

@gabe565
Copy link
Owner

gabe565 commented Jun 28, 2022

Oops, I just now noticed this issue. Sorry for the delay!

I really appreciate the work you did on this. I wonder if calibration values factor into that formula or if it would be the same for everyone. It's been years now, but I recall being instructed to move the desk all the way to the bottom, then all the way to the top when I first set it up. I'll have to see if I can locate the instruction booklet.
If you have an Uplift Desk, do you remember anything like this?

@scottt732
Copy link
Author

I do have an Uplift desk and I do remember going through the up->down->up routine, too. If these variables end up varying, it might be possible to have a calibration service that drops the desk to lowest, raises to highest, and tries to compute the variables in that formula. I don't know if it could be totally hands off though or if you'd need to ask like "set the desk to 32.5in and press ok" to collect the values at a few known points.

@gabe565
Copy link
Owner

gabe565 commented Jun 29, 2022

That's a good point!

The firmware could run through a process like this:

  • Lower the desk until it stops
  • Set a preset (fortunately, presets are the only place where these height readings are used)
  • Read back the preset and keep the value
  • Raise the desk until it stops
  • Set the same preset
  • Read back the preset again
  • Write the values to flash or report them to the user, depending on if flash writes are enabled

Then we should have the values of the lowest and highest and can calculate in-between states. I can't remember if the desk controller sends a value when it has a lower and upper limit. Would have to figure out how to handle that, but otherwise, I think this would work! I will play with it and see if I can get it running reliably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants