-
433Mhz to IOT bridge
04/29/2023 at 07:12 • 0 commentsThe leading contender for replacing IR pivoted to a central bridge that received 433Mhz FM from the CC1101 & transmitted on Wifi to all the desks. The CC1101 definitely starts up fast enough. There are 4 ESP8266's which never found any use in 5 years because they're too slow. They only support wifi. They would have to bind with the router. Although they could become wifi on a raspberry pi's 2nd SDIO port, this was totally impractical. Wifi desk control is what the rest of the world would do.
The hardest part is the 433Mhz connection to the router. The router needs a bigger enclosure for all its radios. The existing weather station radio needs a 433Mhz input. It would merely translate the 433Mhz codes to legacy IR codes & forward them to the router. The router would forward the commands through UDP.
The trick with the ESP8266's is they only do 3.3V. The desks output 5V, so all the existing 16F1508's would have to stay as level translators. The ESP8266's would just output the legacy IR code at 3.3V & the 16F1508's would be unchanged. There could be a test to see if the desk pins handle 3.3V. Then the ESP8266's could go in through resistors. The 16f1508's are quite valuable.
New batch of boards begins for the 433Mhz conversion. 1 board was for a camera mount. 2 boards were for the desk control. It's getting common for the etching process to create swiss cheese. Not sure why this is. It might be the age of the photoresist.
Of mane focus was the new router board. Once again, the lion kingdom came a gutser for not having input capacitance for the voltage regulator even though these are all low power radios in receive mode. The LP2989 is a finicky beast.
Note the 12Mhz crystal was referenced to 3.3V instead of GND. This was a routing optimization unique to lions. The router board involved an obsolete MRF49XA for 900Mhz weather station data, a CC1101 for 433Mhz desk commands. A sane router would use single radio chip & have all the packets on 1 frequency, but these were the spare parts & simplest solutions.
The desk control blasts continuous RF like IR. The weather displays would lose packets & show -- when the desks were being commanded on 900Mhz. The climate recording would lose packets but the climate recording has so much unused data, it wouldn't matter. The desk packets could go at 10Hz with the transmitter off between packets, to give the weather data a fighting chance.
Arbitration would require a much higher bitrate & 2 way communication. The weather radios use 1 way 8192 baud in a failed experiment with minimizing power usage. To share the radio with the desks, they would need 100kbaud & ACKs. The desk control would need single button state change packets & ACKs if it was to share the weather frequency. There would be a lot of investment all the way around.
Helas, much debugging revealed the last 2 CC101's had no transmit functionality. They could receive from the Gu24 radio but not transmit. They transmitted some kind of noise but not data. Of the 6 original CC1101's, only 2 still worked & those were in the Gu24 controller. It's not clear why they all died. Historically, only 2 were ever used in RC cars. 2 flatlined in that role. The power amplifiers could burn out if the antenna impedance isn't matched.
-
Increasing Hiletgo range
04/23/2023 at 22:37 • 0 commentsSo 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.
-
Hiletgo test
04/22/2023 at 07:19 • 0 commentsSo these hiletgo 433Mhz's came in & were immediately busted. They reminded lions of the Ramsey FM10C FM transmitter kit. Reception depended on if they were in the right position, what part of the board was being held, a finicky trimpot, tongue angle. We were not doing that again. Together with the ethernet module which ended up unnecessary, that was $20 burned. Sadly, the lion kingdom's FM10C turned into a pile of rust by 1998 & was discarded.
After a bit more testing, it became clear that the receiver uses an AGC. The transmitter has to constantly change or the receiver will just show noise. Only in a few random cases will the receiver show some correlation with a DC signal. It probably works on 3.3V. It would be nice to oversample the receiver, but the micros aren't fast enough. Hi on the transmitter shows as high on the receiver. Low on the transmitter shows as low on the receiver.
-
RF dreams
02/22/2023 at 00:57 • 0 commentsHaving used the IR system for a while, an RF system would be decidedly better. The desks cover a lot more ground & it's a bigger pain to get in position to control each one than it is to control a single appliance. The mane task every day is putting them in sleeping position or awake position. That requires moving around the room to point at each one. Selecting desks with the dial has proved more convenient than pointing at each one. An RF system is expensive though. The Si4463 has been a well performing radio chip but it's expensive.
There is the age old won hung lo 433Mhz pack of 5.
https://www.amazon.com/HiLetgo-Wireless-Transmitter-Receiver-Raspberry/dp/B01DKC2EY4/
It has no modulation. It just sends a carrier.
At least the existing IR system has proven better than a fixed panel on each desk.
-
Wishlist
11/30/2022 at 18:56 • 0 commentsThere 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
11/20/2022 at 19:56 • 0 commentsIf 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
10/17/2022 at 19:26 • 0 commentsThe 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
10/10/2022 at 01:14 • 0 commentsIt 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
09/22/2022 at 05:18 • 0 commentsSo 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
09/21/2022 at 07:24 • 0 commentsSo 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.