Close
0%
0%

Standing desk remote control

Presets & range for multiple desks

Similar projects worth following

The keypad that came with the desk is an angled membrane deal which is truly terrible.  This interface was fine, 8 hours a day in an office.  16 hours a day at home, it matters.  The membrane buttons don't want to stay pressed.  Any glitch entails a 1 second delay while the relays click off & on.  The desk is constantly switched between working, sitting, eating, & yoga pad heights.  It's become clear that 4 presets are essential.  Presets are a substitute for better buttons.

Uplift's cheapest keypad with tact buttons & presets is $40.  The OEM keypad is on alibaba for $25 in quantities of 100.

https://www.alibaba.com/product-detail/Jiecang-JCHT35J-LED-display-4-memory_60590462942.html

The lion kingdom acquired 4 desks to build out its standing desk empire & they all need upgrades.  Spending $160 to upgrade all 4 is unaffordable.  

The internet partially reverse engineered the protocol for these keypads.

https://embedded-elixir.com/post/2019-01-18-nerves-at-home-desk-controller/

https://github.com/eyadid/uplift-wifi/blob/master/ESP8266-Lua/init.lua

But as usual, there are missing pieces & lions are amazed guys with so few skills are able to afford $4 million starter homes in Wichita.  The preset commands remane unknown.  

Custom keypad ideas range from a single IR control with a dial selector for the desk, 5 presets, 1 set button, 2 direction buttons using high quality MHPS2283V buttons.  Making a physical control for every desk would entail 32 buttons & a lot more fabrication work.  There's a compromise between quality of the buttons & number of controls.  Any upgrade would involve keeping the stock membrane controls for local use.  The custom control would be for the presets.  The IR receivers would bolt onto the membrane keypads.  A TV remote with dome buttons probably wouldn't be good enough at sustained button presses.

The lion kingdom could burn $40 on an uplift keypad to reverse engineer & use in just 1 desk.  Presets can also be simulated by reading the status bits.  There must be a better way of selecting the desk than a dial, possibly an orientation sensor or a laser.

  • Wishlist

    lion mclionhead11/30/2022 at 18:56 0 comments

    There would be a benefit to having global voice controlled presets or maybe a clapper.  All the desks & the air vent would go to predefined positions for voice commands like "general quarters" & "lights out".  There really are just those 2 commands.  Even better is if the lights & the fan were controlled by the same command, in which case it's complete home automation including furniture.  It would be easiest to do with an apartment wide IR blaster.  

    The paw controller could be doing a whole lot better, in itself.  There should be some tests with omnidirectional LEDs & more power.

    The paw controller is so directional, the thought has occurred of getting rid of the dial & just having  universal codes.  In practical use, it always has to be pointed at the right desk.  The 1st priority might be making it omnidirectional.  If it can't be made omnidirectional, it should abandon the dial.  Making it omnidirectional seems unlikely.

  • Power failure bug

    lion mclionhead11/20/2022 at 19:56 0 comments

    If the power goes out while it's tracking a preset, it loses its encoder state.  It doesn't lose its encoder state if the power goes out while it's not moving.  It must then be lowered all the way in the standard reset procedure.   It's not a problem if nothing is under it, but if something is under it, you get to swap boxes or spend a day reorganizing.  

    There is a way to swap boxes with another desk which can go all the way down.

    1st, lower the donor desk to the bottom height.  2nd move the donor box to the dead desk.  Raise the dead desk as high as possible until it stops.  It won't move anymore.  Return the donor box to the donor desk.  Perform the reset procedure.  Then raise the donor desk as high as possible until it stops.  Move the donor box back to the dead desk & move to the desired height.  Install the dead box in the donor desk.  Perform the reset procedure on the dead box.  

    It's unfortunate that the reset procedure requires lowering them all the way instead of raising them all the way.  There is but 1 desk with a donor box & which can go all the way down.  Plugging a desk into a light switch is a bad idea.

  • Boost converter blues

    lion mclionhead10/17/2022 at 19:26 0 comments

    The MIC2251 based boost converter died pretty quickly on NiMH, so on to another one.  With amazon shipping now taking 2 weeks, is it still economical to buy a pack of 5 breakout boards for $10 just to get 1 you need?  There are boost converters based on the ME2108 which convert .9V to 5V.  

    https://www.amazon.com/gp/product/B07L76KLRY/ref=ox_sc_act_title_1?smid=A1IU4FC9F8Y7P1&psc=1

    This is not to be confused with the ADP2108A which is a buck converter.  There is an annoying trend of Chinese companies copying part numbers of western parts for different functions.

    There are better boost converters for making 5V from .6V.

    https://www.mouser.com/ProductDetail/Nisshinbo/RP401N501C-TR-FE?qs=ilL34mSzaLh3V8pLMUWh%252BQ%3D%3D

    Another solution is whacking in a 3rd battery & running it on 3.3-4.5V.  There's no single AAA holder & no easy way to run to Radio Shack to get one.  There are scenarios where the metal parts are extracted from a $1.25 store flashlight & repurposed in a printed holder.  That would entail printing a new enclosure, repositioning the magnets & hall effect sensor, increasing the resistors.

    The cheapest solution is whacking in a lipo & running it on 3.3-4.2V like everything else.  These applications tend to be single use, but lions have tons of unused lipos.  The lipo goes down to 3.3, puffs, & is thrown away.

    In went a puffed one dating back to 2015.  It has every intention of never being replaced & outlasting the remote control.

  • Receiver Enclosure

    lion mclionhead10/10/2022 at 01:14 0 comments

    It took a long time to figure out how to mount the IR receiver, support the ethernet cable & do it without farsteners.  The IR receiver has to be completely in front.  With the new IR sensor mounting, it was finally possible to hold down a preset while clicking through the desk selector to blast all of them.

    This design was a failure.


    Double sided tape is terrible, but the best way to mount them.  Only 3M brand works.

    Along with this process, the rest of the receivers got upgraded to the latest firmware.  Now that they're hot glued, any future programming will require soldering a flexible programming header.

    After using this for a while, a hard mounted button panel for each desk would be a whole lot easier, but not if it has tact buttons.  They would all need MHPS2283V buttons, which aren't going to happen.

  • Height bug workaround bug

    lion mclionhead09/22/2022 at 05:18 0 comments

    So if the maximum or minimum height presets are set to anything besides maximum & minimum height & they're pressed while at maximum or minimum height, the workaround bug interrupts the movement.  The real problem is that it's basing the workaround on preset 1 & 4 being bottom & top.

    It needs to wait for a boundary height after all presets.  If it hits a boundary height, it needs to wait 1 second.  If it leaves the boundary height, go back to waiting for a boundary height.  If it stays at the boundary height, press the up button if it's the top height & the down button if it's the bottom height.

    The only use case was a desk which had room to hit a boundary but all its presets were used for other heights.  No such case exists in the current apartment except during testing.

  • IR sensor blues

    lion mclionhead09/21/2022 at 07:24 0 comments

    So the TSOP3238 seems to have a washout filter in addition to bandpass filtering.  Go out of range & it no longer generates any pulses until you either stop transmitting for a while or go right in next to it.  It's as if the ambient level is constantly recalculated based on all the rejected pulses.  The problem manifests itself as unrecoverable losses of signal when using it at long range or when the sensor is partially obstructed.  There's no way to stand in the middle of the room, sending all the desks the same code by just turning the dial & aiming the control.

    Normal users already know they have to stop transmitting & press the button again on standard remote controls which only send the code once.  This makes the washout filter a non issue.  For a control which always rebroadcasts the code & is expected to resume a connection on its own, the washout filter is problematic.

    The obvious solution is to constantly power cycle the IR sensor when it's not receiving anything, like a thermal camera.  This would wipe out all the benefits that the washout filter is giving.  Maybe a slower bit rate would make it more immune to rejected pulses.  There could be a more omnidirectional transmitter.  It's not a showstopper.  The mane idea is to not waste any time chasing a firmware bug.

    The other problem is the optical sensors getting bumped into & bent.  The receivers need an enclosure or the optical parts at minimum need a support.

  • Momentary button grief

    lion mclionhead09/17/2022 at 23:35 0 comments

    The dial seems at the point of diminishing returns.  The momentary buttons rub against the standoffs & the top panel.  It's never going to be perfect because the layers cross the path of motion.

    The clunkiness, clickiness & heft of this remote control reminds lions of Jack Godell's remote control in The China Syndrome.  It only appeared for a few frames & was meant to convey how affluent the nuclear power industry was, at the expense of safety.

    He only clicked it once & it sounded like an explosion.  A remote control was a serious luxury in 1979.  They plucked reeds in those days.  The sound of the reed triggered a mechanical resonator in the TV.  

    2 TV's were shown in Godell's condo, both 1972 models.  The days of 41 year old Jane Fonda on the airwaves are over, but lions remember.  The days of women over 40 on anything are over.

  • Bottom preset bug

    lion mclionhead09/17/2022 at 08:17 0 comments

    So the preset bug affecting maximum height also showed itself on some desks affecting minimum height.  The same workaround is needed for minimum height on 2 desks.  If a user sets the max & min height presets to middle height, the bugfix won't do anything.

    Then tests showed the hall effect sensors are ratiometric down to 2.8V.  Then, the min & max output starts clipping in greater amounts from the rails as the battery voltage drops while the center voltage stays ratiometric.  The transmitter would now be powered by an ancient mic2251 boost converter that generates a constant 3.66V all the way from 2.2V in.   Not bad for a boost converter rated for 2.5V input.  In the age of recycled parts, standard 3.3V & 5V are gone.  

    The days of cleaning flux are over unless the circuit is seriously affected.

    That didn't make any difference in the middle 2 positions, but gave the top & bottom more separation.  More importantly, it won't die when the batteries aren't fully charged.  Not bad for a sensor rated for 4.5V.  Mechanical play continues to be the mane problem.  An old fashioned pot would be subject to shaft play & noise from dirt.  Multimeter selectors use gold traces, which would be expensive to manufacture.  The dial has proven to be a fast, convenient way of selecting desks.

    Many placements of the board on the bare frame have been tried.  The mane problem is exposing the IR receiver.

    The full down bug is intermittent at best.  If the lion kingdom didn't reverse engineer the preset signals & develop a custom controller, the world would never have worked around the top & bottom preset bugs.

  • The preset bug

    lion mclionhead09/16/2022 at 19:05 0 comments

    The full height bug & the dial were the 2 mane issues.  The solution was to remember the last button pressed.  If it was a preset, it waits a while to detect a confirmation of a saved preset.  If confirmation of a saved preset is detected, it gives up.  If it detects a height packet, it waits for the height to equal full height.  If it doesn't get full height in a certain time, it gives up.  If it gets it, it waits a while after the full height packet, then it presses the up arrow for a while.  Any button press exits the height workaround.  The key need is framing the status packets.  There is a 14ms gap between packets.

    The maximum height being reported by the preset or up arrow is 0x01e8.  Pressing up doesn't change it even though it moves up slightly.  The receiver does a >= comparison to detect maximum height.  It might change if the desk is reset, in which case a better firmware updater is required.  Maximum height on the piano can't be the full height of the desk or it'll rip out the raspberry pi's, so that never received the upgrade.

    Noted during the many testing runs, strange sounds in the desk motors seemed to go away on their own.  Maybe stuff was thrown around during the move.

    The dial got many printouts with various magnet spacings.  The key need is to maximize the dynamic range of the sensed flux.  The sensor has to be the lowest possible gain or enough distance from the magnets to not saturate.  The magnets have to be as close together as possible so there isn't a dead band in the middle.  

    The mane problem is the sensor running on 3V even though it was rated for 4.5-5V.  When powered by 2 AA's, the sensor went from .5 to 2.5V.  It's not likely to last long on 2 AA's.  The magnets had to be 110 degrees apart so the sensor wouldn't cover the center of the magnets & get saturated.

    The halfway points between the center voltages weren't the best division points.  The halfway point between the bottom of the higher voltage & the top of the lower voltage was the best division point.  It took fidgeting with the control to find out  the full voltage ranges due to mechanical vagaries.  The bottom 2 voltages were real close together because the sensor was clipping at some lower flux than the top voltage.  Managed to get the desk selection reliable enough to live with.

    New front panel with button standoffs didn't make any obvious difference in the button panel stiffness.

    There was a slight change in the detents to make them click more assertively.  The sides of the notches had to get steeper.  Better hall effect sensors would be on the next shopping list, but generally it's at a point of diminishing returns.  A boost converter + voltage divider or a digital hall effect sensor might work.  The analog ones are all 4V.

    Because the protocol is based on a repeating code instead of a single code followed by repeat tokens, you can wave the transmitter at it to simulate button tapping or you can hold down a button until it gets within range instead of constantly tapping.  Combined with the clicky buttons, it's the way IR would be if nothing had to make money.

    The mane problem is it requires the IR receiver to be fast enough to handle a very high baud rate by IR standards.  There are IRDA standards for higher baud rates, but they might require more expensive receivers or shorter range.

  • Final assembly

    lion mclionhead09/15/2022 at 06:14 0 comments

    The IR receivers marked TSOP3238 achieved 2kbit/sec using PWM, but other receivers scavenged from toys & VCR's  showed much lower bandwidth.  They have some highly variable bandpass filters.  It's unfortunate that a part number is  TSOP.  

    To save electricity, the spare pins on every button were soldered to battery ground so pressing any button connects the battery ground to the circuit ground as well as the button's GPIO to ground.  It's a lot more soldering, but interrupt on change historically sucked amps.

    The top mounted dial encoder was revealed & the problems began.

    The hall effect sensor encoder proved devilish hard to get working consistently.  It's highly dependent on positioning of the magnets & sensor.  That might be the cause of the code parsing appearing to have a bug.  The magnets might have to be smaller, but smaller magnets are a 1 week snail mail away.  The easiest way to win is to copy the dimensions of a known good hall effect encoder.

    The best solution was moving the sensor closer to the magnets & having it slightly off of the fiducial.

    Full left generates 208, 1/3 right generates 250, 2/3 right generates 109, full right generates 50.  Maybe the magnets have to be over 90 degrees apart where the sensor is.  The sensor could be crossing over the magnets twice when it hits the ends.  The most finicky position is 2/3 right.  That desk takes some doing to command but is rarely commanded.

    The decision was made to let the button board flop around instead of hot gluing it down.  Maybe there could be standoffs from the top panel pressing down on it.  The mane idea is none of the buttons get stuck down.  A piece of foam lies on the battery to keep it from flopping around.  It's as big & clunky as something from the space age, but that's the price of big tactile controls.

    It took many single layer supports to create the screw holes & the inset edge of the dial.  It's surprising how Ben Heck doesn't use single layer supports.

    The dial is created by sandwiching the top panel between 2 parts.

    In true recycling tradition, some receivers require swapping PGC & PGD while others don't, based on availability of 4 pin headers.  These 16F1508's represent the last of the 8 bit PICs from the lion kingdom's Skulpt AIM's.  A 5V GND connector was required for programming, since the original firmware was causing the desk to move on its own.  The 16F1508 is 1 of the better 16F's.  It does 20Mhz all the way down to 2.5V & does 16Mhz on its internal oscillator.  The mane gremlins are the need to stop the 16 bit timer to write to the 16 bit time register & the need to poll TRMT instead of TXIF to write to the serial port.

    The lion kingdom's once inexhaustible bag of 120R resistors is nearly gone.  That bag of resistors came from Fry's during a late night commute.  They never had exact powers of 10.

    The board etching had the worst case of air bubbles in a while.  The board has to be taken out & rinsed.  Merely kicking it around won't pop the bubbles.

    The original idea was to keep the stock buttons attached but disconnected for storage, but the space under the desk is used for clamping.  A simple packing tape job was whacked on to see how well it works.

    The trickiest position was the instrument since it doesn't have a panel.  It's the hardest to get IR to.  It might be necessary to break out the IR sensor on this one.

    Now there are 4 unused button panels.  Most of the cost of these is for how they look.

    There is the part about having to search for the remote control instead of always having buttons nearby, but this amount of time should be less than the amount of time spent holding down the arrow buttons.

    The bug causing the full up preset to stop 1/2" from the top will probably...

    Read more »

View all 14 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