Introduction: Medical Ventilator STONE Touch Screen STM32

2020 is an extraordinary year. At the beginning of this year, 2019-nCoV is raging on the land at home and abroad. As we all know, our domestic epidemic is basically low, although the rapid development and wide spread of the epidemic abroad have far exceeded people's expectations, such as the United States and other countries, which have a large number of new cases every day. The spread of overseas epidemics has also directly affected and increased the difficulty of our prevention and control. In the United States alone, there were 1011431 confirmed cases and 56729 deaths. The relatively heavy epidemic situation in foreign countries has also stimulated the blowout growth of domestic and overseas ventilator orders. On the one hand, it is related to the overall control of domestic epidemic situation and the continuous spread of foreign epidemic situation. On the other hand, it is also related to the comparative advantage of China's medical equipment industry. The novel coronavirus pneumonia epidemic has spread to more than 200 countries and regions, and more than 2 million 480 thousand confirmed cases worldwide. As a life-saving machine, the ventilator has also been snapped up by countries all over the world, and the production capacity is seriously insufficient. With the increasing shortage of ventilator, the ventilator made in China has become the "hard currency" in the international market.

Therefore, I also followed the trend and decided to use the TFT LCD screen on my hand as the ventilator display, which is quite suitable. This is a serial port screen. It is very convenient to develop with stone TFT LCD screen. The most important thing is that it is simple and easy to use. It can be done without too many complicated instructions. The advantage is that it can quickly develop projects and seize the market opportunities.

Step 1:

I use STM32 to simulate the respirator and stm32f103rct6 to develop it. This module supports serial port or other simple communication interface mode to communicate with TFT LCD screen, and can draw the wave chart in real time.

Project functions
Here we want to make a project for the medical equipment,ventilator. In this project, we can choose the language and function, and draw the respiratory waveform by the way of random number triggering. When the key is pressed, the MCU detects the pressing signal, and starts to transmit the waveform data to stvc101wt-01 TFT through the serial port The LCD screen uploads the data command, and then the screen will automatically analyze and display it on the screen by using the waveform control. The screen also has the adjustment function, and the voice broadcast function.

That is, the following functions: ① the serial port screen realizes the function of language selection; ② serial port screen realizes the function of sending touch command and switching pictures; ③ Single chip microcomputer realizes the function of data command upload; ④ The serial port screen realizes the real-time waveform display function. After the function is determined, select the module model: ① Stvc101wt-01 is adopted for screen end; ② stm32f103rct6 is adopted for single chip microcomputer; ③ voice broadcast module. Hardware introduction and principle Loudspeaker Because stone serial port screen has audio driver and reserved corresponding interface, the most common magnet speaker, commonly known as loudspeaker, can be used.

Loudspeaker is a kind of transducer which transforms electrical signal into acoustic signal. The performance of loudspeaker has a great influence on the sound quality. Loudspeakers are the weakest component in audio equipment, and for audio effect, they are the most important component. There are many kinds of loudspeakers, and the prices vary greatly. Audio electric energy through electromagnetic, piezoelectric or electrostatic effects, so that its paper basin or diaphragm vibration and resonance with the surrounding air (resonance) and produce sound.

Step 2:

STVC101WT-01

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.

Basic functions
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%. STVC101WT-01 module communicates with MCU through 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.

Step 3:

In addition to the data manual, there are user manuals, common development tools, drivers, some simple routinedemos, video tutorials, and some for testing projects.

STM32F103RCT6 EVB
Stm32f103rct6 development board provides many interfaces for customers to use.

Relevant parameters: 1. Arm 32 bit cortex Gamma -M3 CPU, up to 72mhz; 2. Up to 64KB SRAM space; 3. 64pin,256KB FLASH; 4. On board usb-ttl serial port, Download debugging communication three in one; 5. On board EEPROM, infrared, JTAG.

Evaluation board block and interface distribution Detailed description of evaluation board block The evaluation board blocks are distributed as follows:

Step 4:

STM32F103RCT6

• flexible GPIO design 32 bit MCU • maximum main frequency 72mhz • connectivity: can, I2C, IrDA, Lin, SPI, UART / USART, USB • FLASH:256KB • 400ksps, 12bit, 8-Channel auxadc • Voltage power supply (VCC / VDD): 2 V ~ 3.6 V Development steps There are roughly three steps: ① Use tool2019 upper computer software design; ② realize the communication between MCU and serial screen; ③ audio file, picture file import.

Installation of tool 2019 Tools 2019 and related USB serial port drivers can be downloaded from the official website

The software interface is as follows:

Step 5:

Installation of Keil

1. Link:https://pan.baidu.com/s/1smropvXeXKXw413W_-rvtw 2. Unzip after downloading 3. Open folder after unzipping 4. Double click the c51v900.exe file, and click next in the pop-up dialog box. All the way to next is OK.

Step 6:

Tool 2019 interface design

Use the installed tool 2019, click the new project in the upper left corner, and then click OK.

Step 7:

After that, a default project will be generated, with a blue background by default. Select it and right-click, then select remove to remove the background. Then right click picture file and click Add to add your own picture background, as follows:

Step 8:

Production of power on picture

Step 9:

First import the required pictures into the project, and then add the serial number of the corresponding pictures in the settings

Step 10:

Click OK, then we need to add a video control, set the jump interface after the boot image is finished, and make the following configuration.

Step 11:

Making language selection interface

Step 12:

Here you need to add a pop-up menu control, and set the button effect as picture 1, and then set picture 2 as the pop-up interface. Next:

Step 13:

Add button controls respectively, and change the key value to 1 and 2. The key value here is mainly used to display the selected language on the screen, and then continue to add a button control on interface 0:

Step 14:

Set the minimum and maximum values of variable icons, and configure the corresponding pictures to realize the menu selection function.

Adding audio files Here we need to make a key sound effect. First, we need to get an audio data. Here we have turned on the sound effect function of the ventilator.

Step 15:

First, import the audio file.

Step 16:

Then add a button operation control in the red box, and add picture jump and audio file 0.

Making of curve Because we need to display the heart rate waveform dynamically, we need to use the most important control, curve control. and we need ventilator settings

Step 17:

First, add a curve control, which covers the background grid, and then configure the y-axis center position and curve channel according to the grid pixel width. Here I choose channel 0.

Therefore, serial port instructions can be used as follows: 0xA5, 0x5A, 0x06, 0x84, 0x01, 0x00, 0x05, 0x01, 0x05 The erase instructions are as follows: 0xA5, 0x5A, 0x03, 0x80, 0xEB, 0x56

Development of stm32f103rct6
Open keil and import the project file, as shown below:

Step 18:

Here you need to configure the flash algorithm to use the download program. Click option to find the flash download. The change algorithm is as follows:

Step 19:

Attached:

Step 20:

Official Website of STONE: https://www.stoneitech.com/

Official Store of STONE: https://store.stoneitech.com/

Official Forum of STONE: https://forum.stoneitech.com/