Hi Friends! Hope you're well today. I welcome you on board. In this post today, I'll walk you through the application of a massage chair STONE 10.1 inch STVC101WT-01 TFT LCD
with ESP32.Let's get started.
Massage chair with modern mechanical technology to reproduce the traditional Chinese medicine meridian massage is an important daily health care equipment. The function of the massage chair is to integrate meridian massage of traditional Chinese medicine with modern high-tech means to help users enjoy a comfortable massage, reduce fatigue, and achieve the effect of health care and physical fitness. With the development of single-chip microcomputer intelligent control, a massage chair with a large screen control application is also added.What we need to do here is such an application, select different modes through STONE TFT LCD
screen, realize the control of MCU through serial port communication, and then realize the speed and rotation time control of stepping motor by controlling the level of specific IO, to realize the massage function of head and back. The system uses a STONE TFT LCD serial port screen, which can be used to do touch display function. It is very convenient to develop. Only through the serial port can the MCU be controlled.It is used in the massage chair, which can easily realize the setting of a massage function and the adjustment of massage strength, to achieve the effect of self-cultivation and reduce fatigue.
Here we do is a home massage chair application, will STONE TFT After the LCD serial screen is powered on, a start interface will appear. After a short stay, it will jump to a specific interface. This interface is used to set our current time. When setting, a keyboard will pop up.After setting, click OK to enter the massage mode selection interface. Here, I have set three modes: head massage, back massage, and comprehensive mode. In the mode, the massage intensity can be set, the high, middle and low gears can be set, and the corresponding LED light will be used for intensity indication; the massage times can also be set, after reaching the set number, it will automatically stop; in the comprehensive mode, the head and back will be massaged at the same time, and it can be turned off when it is not needed. These actions are through the STONE TFT LCD serial port screen to achieve command transmission.
The communication functions are as follows:
- ① The serial port screen of STONE TFT LCD realizes the function of button switching interface;
- ② The serial port screen of STONE TFT LCD realizes the function of an automatic jump when starting up;
- ③ The serial port screen of STONE TFT LCD realizes time setting;
- ④ The serial port screen of STONE TFT LCD realizes data variable distribution;
- ⑤ STONE TFT LCD serial port screen realizes serial command communication.
- ⑥ STONE TFT LCD serial port screen realizes the function of menu bar selection;
Modules required for the project:
- ① STONE TFT LCD；
- ② Arduino ESP32；
- ③ Stepper motor drive and module;
- ④ LED array module;
Hardware introduction and principle
- 10.1 inch 1024x600 industrial grade TFT panel and 4-wire resistance touch screen;
- brightness is 300cd / m2, LED backlight;
- RGB color is 65K;
- visual area is 222.7mm * 125.3mm;
- visual angle is 70 / 70 / 50 / 60;
- working life is 20000 hours. 32-bit cortex-m4 200Hz CPU;
- CPLD epm240 TFT-LCD controller;
- 128MB (or 1GB) flash memory;
- USB port (U disk) download;
- toolbox software for GUI design, simple and powerful hex instructions.
- Touch screen control / display image / display text / display curve / read and write data / play video and audio. It is suitable for various industries.
- UART interface is RS232 / RS485 / TTL;
- voltage is 6v-35v;
- power consumption is 3.0w;
- working temperature is - 20 ℃ / + 70 ℃;
- air humidity is 60 ℃ 90%.
TFT display module communicates with MCU through a serial port, which needs to be used in this project. We only need to add the designed UI picture through the upper computer through the menu bar options to buttons, text boxes, background pictures, and page logic, then generate the configuration file, and finally download it to the display screen to run.
In addition to the data manual, there are user manuals, common development tools, drivers, some simple routine demos, video tutorials, and some for testing projects.
LED array module
This is a galloping lamp display module with 8 LEDs on board. The external voltage is 3-5.5vdc, and the corresponding LED can be lighted at a low level.
It is especially suitable for the IO test of a single chip microcomputer to realize indicator control.
- Working voltage: 3 - 5.5VDC
- Working current: 24Ma (maximum)
- Effective level: low level
- Number of LEDs: 8
- Display color: red (D1 / D2 / D3 / D4 / D5 / D6 / D7 / D8)
- It is very suitable for MCU experiment and DIY
Esp32 is a single-chip scheme integrated with 2.4 GHz WiFi and Bluetooth dual-mode. It adopts TSMC's ultra-low power consumption 40 nm technology, with ultra-high RF performance, stability, versatility, and reliability, as well as ultra-low power consumption, which meets different power consumption requirements and is suitable for various application scenarios. At present, the product models of esp32 series include esp32-d0wd-v3, esp32-d0wdq6-v3, esp32-d0wd, esp32-d0wdq6, esp32-d2wd, esp32-s0wd and esp32-u4wdh. Esp32-d0wd-v3, esp32-d0wdq6-v3 and esp32-u4wdh are chip models based on Eco v3.
- 802.11 b/g/n
- 802.11 n (2.4 GHz) up to 150 Mbps
- wireless multimedia (WMM)
- frame aggregation (TX / RX A-MPDU, Rx A-MSDU)
- immediate block ACK
- beacon automatic monitoring (hardware TSF)
- 4x virtual Wi-Fi interface
- Bluetooth v4.2 complete standard, including traditional Bluetooth (BR / EDR) and low power Bluetooth (BLE)
- supports standard class-1, class-2, and class-3 without external power amplifier
- enhanced power control
Output power up to +12 dBm
- nzif receiver has – 94 DBM ble reception sensitivity
- adaptive frequency hopping (AFH)
- standard HCI based on SDIO / SPI / UART interface
- high-speed UART HCI up to 4 Mbps
Support for Bluetooth 4.2 br / EDR and ble dual-mode controller
- synchronous connection-oriented/extended synchronous connection-oriented (SCO / ESCO)
- CVSD and SBC audio codec algorithms
- piconet and scatternet
- multi-device connection with traditional Bluetooth and low power Bluetooth
- support simultaneous broadcast and scanning
ULN2003 Stepper Motor
ULN2003 is a Darlington
display with high voltage and high current. It consists of seven Silicon NPN Darlington
tubes. Each pair of Darlington of ULN2003 is connected in series with a 2.7K base resistor. Under 5V working voltage, it can be directly connected with the TTL and CMOS circuit, which can directly process the data that needs a standard logic buffer. Here we use the DIP-16 package, 4-phase 5-wire 5V stepping motor.
Structure and Application
Download IDETo complete the code development of esp32, Arduino is used to developing and compiling. First, you need to install the environment and enter the Arduino official website:https://www.arduino.cc/en/Main/Software
, and download the version for your platform.