maxint-rd / TM16xx

Arduino TM16xx library for LED & KEY and LED Matrix modules based on TM1638, TM1637, TM1640 and similar chips. Simply use print() on 7-segment and use Adafruit GFX on matrix.
164 stars 34 forks source link

Another TM1652 device #41

Closed kymodoke closed 1 week ago

kymodoke commented 8 months ago

Hello, this is not an issue, but a message to report the usage of TM16xx library on a device.

The Xiaomi XIAO AI Smart Alarm Clock (product code: zimi.clock.myk01) features a nice 7-segments display with a TM1652 chip that drives it.

History:
I bought that alarm clock for 3€ on a flea market with the intention to hack/modify/replace the embedded linux sytem on its mainboard (ARM board). It has many fetaures I don't like: basically it's a black-box puppet computer controlled from mainland China's cloud with wifi, bluetooth gateway and microphone, AI assistant (like Google, Alexa) but that speaks chinese only, and it need a smartphone app to do anything else... I gave up the project to hack the mainboard, because no time nor brain slot available....

But the 7-segment display is really nice and I wanted to repurpose it. So I digged further this strange 1 pin controlled and found out the controller is TM1652, then a web search led me to this repository.

20231011_090610v2

Connections on the display are VDD - SDA - GND, connected on the mainboard to VCC - EN - GND. I measured working voltage to 4.6V.

So I reconnected the display to a tiny ESP32 board (Seeed Studio XIAO ESP32C3), and tested the display with "TM16xx_setSegments.ino" example. It does work, all segments are lighting up, except the middle colon.

20231012_102749v2

So now it's a repurposed as a simple NTP clock, without all the nasty stuff, and with a K.I.S.S. approach. It connects to wifi just at start up and then once a day to sync time to NTP, then switch the wifi off. Low luminosity between 21h and 8h. Perfect for my mother bedroom.

20231011_235605v2

Thanks for TM16xx and the addition of TM1652

maxint-rd commented 8 months ago

Excellent! Thank you for sharing this nicely illustrated experience. It's interesting to see the various devices in the wild that use a TM16xx chip. I get inspired by reading how people find room for improvement or reuse. Congratulations on your result!

If you find it interesting; amongst the other issues you can find some stories of like-minded people and their gadgets, such as the TM1680 based bluetooth speaker.

(For me K.I.S.S. is always the challenge. Often I overwhelm myself with a flow of would-be-nice yet not really essential features that keep me from completing things)

kymodoke commented 8 months ago

Yes I've already read some issues, prior to using the library, just to get an idea if the library would suit my needs ;)

K.I.S.S. is also a challenge for me... I have so many unfinished, on-hold projects. And sometimes I need to reduce expectations to the bare functionalities in order to get things done. To select the bare functionalities it helps to define first the use cases.
Here I could have implemented a light sensor (to automatically regulate led intensity), a button for something, an i2s audio amp to reuse the tiny speaker, a lithium battery (this esp32 module features a battery management IC), several sensors that report data through mqtt, etc... But the real need (use case) for my mother is just to get a simple clock that gets time ajusted automatically when she plugs it on the main power.

maxint-rd commented 1 week ago

Closed as no further action is expected. I've added your device to the list of real-world TM16xx devices. If you ever encounter another TM16xx deviice, I'd appreciate any info you can post. Thanks again for your contribution!