Close

RF bugs

A project log for Standing desk remote control

Control multiple desks over wifi

lion-mclionheadlion mclionhead 05/26/2023 at 01:020 Comments

Didn't take long for the RF system to go downhill.  Flexing of the enclosure causes the dial to hit the wrong desk.  The preset bug workaround rarely works anymore.  The low packet rate makes it impossible to manually move 1/2".

More stringers on the front panel reduced the flexing.  The hall effect screws should point towards the panel to save space.

The mane problem is the LP2989 is extremely slow to ramp up. 

As it dials through the 4 desks, the ADC reports a very slow voltage ramp for the 1st few seconds as VDD slowly rises to 3.3.  The original design had the brain power on the transmitter since it transmitted directly to each desk.  With the router as the only receiver, the analog translation can all go on the router which allows finer tuning of the values.

The biggest problem is the vagaries of radio reception make precise manual control hard.  The baud rate was stepped up to 4khz & the packet rate was stepped up to 33Hz but it drops a lot more packets.  Instant on & low latency are a difficult problem.

The leading idea is a longer debounce for preset buttons & a shorter debounce for direction buttons.  Lowered the packet rate to 20Hz to avoid flogging the network.  1 artifact of relaying everything through wifi is sometimes a packet arrives seconds after you release the button.  It's definitely not ideal.  Each desk would ideally receive 433Mhz directly.

There could be a unique ID for each button press on the transmitter.  The algorithm would be if it times out & gets pressed again, but the ID is unchanged & it's a preset button, don't press it a 2nd time.  The set button has a long press mode for locking the panel.  Lions have never used the panel lock feature so that could be neglected.  The preset buttons would have the single press workaround while the direction buttons would continue to drop out.

Of course, it would be a lot easier if the 8266 didn't have to use the TCP/IP standard.  It would cost $25 to get rid of wifi & just directly transmit to a CC1101 in each desk.  This would be the ultimate fix.

In the meantime, the button press ID solved enough of the problems to make a vijeo.  Verified the problem with the height bug is the desk stopping before it ever reports the MIN & MAX height.  The firmware has no way of knowing it has reached the limit, so it never presses the button again.  Reception quality & latency remane the last problems, but are relatively more bearable than having to point an IR LED.

Discussions