Cheap Sensor Changes Personality

If you want to add humidity and temperature sensors to your home automation sensor, you can — like [Maker’s Fun Duck] did — buy some generic ones for about a buck. For a dollar, you get a little square LCD with sensors and a button. You even get the battery. Can you reprogram the firmware to bend it to your will? As [Duck] shows in the video below, you can.

The device advertises some custom BLE services, but [Duck] didn’t want to use the vendor’s phone app, so he cracked the case open. Inside was a microcontroller with Bluetooth, an LCD driver, a sensor IC, and very little else.

The processor is an ARM Cortex M0, a PHY6222 with very low power consumption. The LCD is a very cheap panel with no drivers onboard. All the drive electronics are on the PCB. The sensor is a CHT8305C which uses I2C.

Luckily, the PHY6222 has a publically available SDK with English documentation. The PCB has two sets of UART pads and it is possible to flash the chip via one of the UARTs.

Eventually, [Duck] put a custom firmware on the box, but we were intrigued by the idea that for a buck you could get a little low-power ARM module with an LCD and a sensor. It seems like you could do more with this, although we are sure the LCD is not very general purpose, surely this little box could act as a panel meter, a countdown timer, or lots of other things with some custom firmware.

These are, of course, knock offs of the slightly more expensive Xiaomi sensors, and those are flashable, too. We aren’t sure how accurate either sensor is, but humidity measurement is a complex topic.

23 thoughts on “Cheap Sensor Changes Personality

      1. It’s hidden because they didn’t use the GH fork functionality (which allows the upstream to find forks easily among other things). And the point of having their own repo seems to be the YT link, no actual contributions to the code.

    1. What’s fun duck’s contribution to the original work?

      The github repository has merely an amendment in the readme and an (additional?) picture.

      I agree with [the one] that it would be nice if HaD included the link to the original work and acknowledged who had done it instead of who has (just) produced a video from the instructions given in the original repo.

      1. Spreadsheet (often)= Database. Spreadsheet programmers learned early on that was what many users were using it for, and so optimized the code so its DB performance wouldn’t completely suck. For small datasets, spreadsheets make fine databases. It also makes it easy to have calculated fields.

  1. I have a number of THB1s running with the Victor/pvvx firmware. Just brilliant; The BTHome protocol is easliy parsed, no BLE bonding necessary. An ESP32 running MicroPython can handle them without problems.

    1. Hmm, looking at the various PHY6222 datasheet revisions found online, it looks like the guys at PhyPlus are able to rewrite history… literally, like they removed any reference to 802.15.4 and ZigBee even from the revision history of the document 🤣 I guess they were caught
      Yet they keep advertising ZigBee compatibility in marketing material, but can we expect better from chinese companies?
      On the other hand, the chip has some impressive low power figures and the radio is 2.4GHz anyways, so something could still be done.

  2. This looks similar to the tuya humidity temperature sensor.

    The tuya smart life sensor has some hysteresis so it’s not as accurate but I wonder if the hysteresis can get reduced using reprogramming..I doubt it as I believe it’s inherent in the sensor but it’d be great if it could be accounted for programmatically

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.