Close

Increasing Hiletgo range

A project log for Standing desk remote control

Control multiple desks over wifi

lion-mclionheadlion mclionhead 04/23/2023 at 22:370 Comments

So the range ended up being 3ft when sending the stock IR protocol through 433Mhz AM.  It's going to take some modulation changes to get enough range.

The IR protocol was 25ms high between codes.  Pulses are 200us high between bits, 200us low for a 0, 400us low for a 1.  The codes are 80 bits.  It averages 2000 bits/sec.  The 25ms delay was created by sampling the dial. 

The 80 bit IR code was too long to get through AM. 

For AM radio, the best solution ended up being resending 16 bit codes as fast as possible, at 2kbit/sec with no framing bits & straight RS232.  Smaller codes & higher bitrates create longer range.  Averaging or low pass filtering was useless.  There is a maximum bitrate imposed by bit banging.  The minimum bitrate is imposed by the AGC & happens at 100 bits/sec.

The codes are counted so a code received a certain number of times in a certain amount of time is counted as a button press.  The codes have to be high entropy to avoid getting washed out by the AGC.  Ideally, they have an equal number of 0 & 1.

Lowpass filtering & deglitching ended up being failures.  It was equivalent to sending more data at a higher bitrate.

Not having line of sight between the antennas degrades the signal.  Changing any voltages in response to a received code causes a feedback loop which causes reception to oscillate.  Changing any GPIO seems to foul the AGC.  The UART seems immune though.  Further problems with AM come from the motor brushes & the receiver moving.  The motors always knocked out the direction buttons.  Preset buttons had some immunity to the motors but weren't perfect.

There's some improvement to be had from a decoupling capacitor on Vcc, 1/4 wavelength monopole for the transmitter, full wavelength monopole for the receiver & using a longer cable to space the radio from the brain, but there's always a position in the room with a low enough signal strength to induce oscillation.  Some codes like preset buttons were more robust than others.

After much testing, 433Mhz AM was busted for this application.  The trick is getting an FM transmitter to start fast enough.  The CC1101 might be the only thing nowadays which could do the job.

There is a 1nF lowpass filter capacitor on the receiver. It can be replaced with up to 50nF. At 50nF, the bitrate is reduced to 500bits/sec. It's slightly more robust. Together with smarter codes, most of the oscillation goes away except oscillation caused by the motors.  The biggest problem is it increases the button latency.  In testing this method, it picked up false code matches so that was busted.  It needs more codes per second.

Another idea which might work is creating a single centrally located AM receiver which blasts IR throughout the room.  It would still be vulnerable to IR obstructions.

There was an idea to send the start code once, followed by a simpler code which was immune to the motors.  The problem is how long to send the start code.  Too long & there's going to be a gap after it starts the motors.  It could wait for the sustain code before starting the motors but there's going to be a 1/4 second delay.  Maybe it could retransmit  the start code but just detect part of it after the motors start.

Increasing voltage above 4.2 would entail a level converter, voltage regulator, & still only marginally increase range.  The CC1101 would definitely work.  It starts up fast enough, but it would entail redesigning every board, throwing in voltage regulators.  It could be fully tested in parallel without tearing apart the existing boards though.


The mane problems with IR are having to move around to command each desk & having to hold the transmitter to send a command.  The stock controllers just needed 1 finger.

Discussions