EN
CN

MEDICAL VENTILATOR +STONE TOUCH SCREEN +STM32

  

notes: Here we want to make a project for the medical ventilator +STONE touch screen +STM32. 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.

 

 

Brief

 

With the increasing shortage of medical ventilator, the medical 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.

 

medical ventilator +STONE touch screen +STM32

 

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.

 

 

medical ventilator +STONE touch screen 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.

 

medical ventilator +STONE touch screen +STM32

 

 

STONE screen 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.

 

 

medical ventilator +STONE touch screen +STM32

medical ventilator +STONE touch screen +STM32

 

The manual can be downloaded through the official website:

https://www.stoneitech.com/support/download

 

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.

 

 

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:

 

medical ventilator +STONE touch screen +STM32

 

medical ventilator +STONE touch screen +STM32

 

 

The drawings of key and serial port are as follows:

 

medical ventilator +STONE touch screen +STM32

 

 

 

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

 

 

STONE TOOL Development steps

 

There are roughly three steps:

① Use STONE Tool 2019 upper computer software design;

② realize the communication between MCU and serial screen;

③ audio file, picture file import.

 

 

Installation of STONE TOOLBox

 

STONE Tools 2019 and related USB serial port drivers can be downloaded from the official website: https://www.stoneitech.com/.

The software interface is as follows:

 

medical ventilator +STONE touch screen +STM32

 

 

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.

 

medical ventilator +STONE touch screen +STM32

 

medical ventilator +STONE touch screen +STM32

 

 

STONE Tool 2019 interface design

 

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

 

medical ventilator +STONE touch screen +STM32

 

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:

 

medical ventilator +STONE touch screen +STM32

 

Production of power on picture

 

medical ventilator +STONE touch screen +STM32

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

 

medical ventilator +STONE touch screen +STM32

 

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.

 

medical ventilator +STONE touch screen +STM32

 

Making language selection interface

 

medical ventilator +STONE touch screen +STM32

 

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:

 

medical ventilator +STONE touch screen +STM32

 

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:

 

medical ventilator +STONE touch screen +STM32

 

 

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.

 

medical ventilator +STONE touch screen +STM32

 

First, import the audio file.

 

medical ventilator +STONE touch screen +STM32

 

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

 

medical ventilator +STONE touch screen +STM32

 

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:

 

medical ventilator +STONE touch screen +STM32

 

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:

 

medical ventilator +STONE touch screen +STM32

 

 

The buttons and serial ports are used here, so the change code is as follows:

 

#include "led.h"

#include "delay.h"

#include "sys.h"

#include "key.h"

#include "usart.h"

#include "stdbool.h"

#include "stdlib.h"

#define CMD_LEN     9//21

//uint8_t wave_cmd[CMD_LEN] = {0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x01, 0x00, 0x01, 0x04, 0x01, 0x08, 0x01, 0x0C, 0x02, 0x00};

//uint8_t wave_cmd[CMD_LEN] = {0x00, 0x04};

uint8_t wave_cmd[CMD_LEN] = {0xA5, 0x5A, 0x06, 0x84, 0x01, 0x00, 0x05, 0x01, 0x05};

 

uint8_t data_buf_bat[]     = {0xA5, 0x5A, 0x05, 0x82, 0x00, 0x18, 0xAA, 0x66};

 

 

uint8_t clr_cmd[6] = {0xA5, 0x5A, 0x03, 0x80, 0xEB, 0x56};

 int main(void)

 {

u8 t=0, coutn= 0, wave_flag = 0, i, j;   

 

Please contact us if you need a complete procedure:

https://www.stoneitech.com/contact

We will reply to you within 24 hours.

 

 

Medical ventilator +STONE touch screen +STM32 project !!!