Comments (4)
Hello Mike, interesting concept! I believe it should be possible to program the esp32 to emulate a TM1651, but unfortunately the TM16xx library is not implemented to do that. All it does is sending commands and data according the chip specific protocol and where possible it also reads button state.
You intend to do the reverse: receive commands and data and send the state of virtual buttons upon request. After receiving a command you want to interpret the data and act accordingly. To implement such feature you first need to make a state machine that detects activity on the DIO and CLK lines to receive the commands and data. Based on the received command it would change state to perform the requested action.
One of my ongoing side projects is to make an ATtiny13A as I2C slave to form an adressable bridge to other chips such as TM16xx chips. Due to limited features I resorted to bitbanging the I2C protocol, without interrupts. One of the challenges is to keep up with received data while performing appropriate actions.
Since the ESP32 is much more powerful (higher speed, more cores, more RAM, etc.) you might be succesful in using existing interfaces such as SPI or using interrupts. Perhaps you can use my library to to research the protocol and to send controlled data to test the ESP receiving that data. I strongly recommend you to also use a logical analyser to further examine the communication.
Hopefully these thoughts were helpful. Although I find your project interesting, unfortunately I don't have the means to provide support. Wish you all the best!
from tm16xx.
If I had to start somewhere, is there a protocol or a keyword I can search for to find if someone else has made a similar project?
I'm completely oblivious to the ins and outs of the binary protocols. Is SPI similar to TM16xx? Is I2C (I'm thinking not because it's adressable, right?) ?
Will the TM16xx send data unprompted, or will it only respond to commands? I'm also kinda baffled that (seemingly) noone has made a project like this before.. It must've happened that someone was on the same side as me of some device that communicated using this :P
from tm16xx.
Hello Mike, I'm not aware of anyone having done such a project yet. Most projects I've encountered involved using premade or homemade modules, using bare chips or reusing the display part of a used device. If you search for TM1651, you'll most likely find those kinds of projects, if any. Perhaps adding "simulate" or "emulate" as keywords will yield different results, but I don't expect many people having done such project.
In your case I would first complete the tracing, to confirm that the button is indeed connected to the K1 line of the TM1651 and to find out the connections of the buzzer. The button might also be connected directly to the MCU of your heater-panel, in which case simulating the TM1651 is limited to reading the displayed value. Unless you control the panel MCU, your ESP can only follow it's actions. Simulating button presses could be one way of controlling it, but it requires fine orchestration.
Perhaps you want to post pictures of your panel PCB here? You may find this TM1680 issue regarding display modules interesting reading too.
With regards to the TM1651 protocol: For full protocol information you need to read the datasheet. Titan Micro uses different protocols for specific chips. The protocol mostly depends on the number of interface wires. The two wire interfaces for the chips that support buttons have CLK and DIO lines. The TM1651 seems similar to TM1650 which is supported by my library. The protocol lacks addressing, so it looks more like SPI than I2C, but it does use a single line for data (like I2C). When using my logical analyser I set it to SPI and tweak the settings.
As far as I know, the TM16xx chips don't send unprompted data; they only respond to commands. The first byte is the command, which is followed by one or more data bytes. The chips I know don't have interrupt pins, so button state needs to be polled. In your case it's the panel MCU that sends unprompted data and when trying to take over the control that may give you both challenges and opportunities. Good luck with that...
from tm16xx.
It's a few months later and now someone did exactly that! In issue #45 you can find a good example of a TM1628 based dehumidifier made smart using an ESP32 emulating the TM1628 to read displayed values and to trigger the button switches remotely. It's a very nicely executed project which even includes a component to integrate with ESPhome.
from tm16xx.
Related Issues (20)
- TM16xx without leading zeros issue
- Redefine Pins HOT 1
- Redback 7-segment led and button module with TM1652 HOT 4
- Add pinMode() to sendData() and getButtons() HOT 1
- Example for TM1640 with common anode 8x8 bicolor led matrix? HOT 17
- TM1650 Arduino library for 2 x 7 led display HOT 7
- regarding interfacing of tm1640 HOT 12
- Problem while using this library with ESP32 HOT 3
- Hello Any help on TM1621 HOT 2
- how we can use 4 segment with dot HOT 1
- Another TM1652 device HOT 2
- Halt when useing RP2040 with TM1652 HOT 2
- TM16xxDisplay.cpp bug HOT 1
- Request: Flip 8x8 matrix HOT 18
- Monitoring TM1628 HOT 6
- How do you control the TM1638 discrete LEDS? HOT 2
- Button numbering question for TM1638 LED&KEY module (8 LEDS, 8 digits, 8 Buttons)? HOT 2
- Support for TM1618? HOT 14
- Problems with TM1618 HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tm16xx.