Arduino UNO+STONE HMI+Medical Ventilator

Brief

Now I need to use Arduino Uno and STONE HMI to do a medical ventilator project.

STONE HMI serial port screen, which is very suitable for the display screen of the ventilator.  In addition, I need a single-chip microcomputer to process the commands issued by the STONE HMI screen and upload some waveform data in real-time.  Here, I chose a more general and easier to use MCU, Arduino UNO single-chip microcomputer, which is widely used and supports many libraries.

The following will describe the detailed process of the development of the Arduino Uno STONE HMI Medical Ventilators project

The renderings are as follows:

Medical-VentilatorSTONE-LCDArduino-UNO

In this project, you can control the Arduino UNO development board by using the STONE HMI serial port screen and carry out data command interaction through serial port communication. The Arduino Uno development board can upload a series of waveform data and display it on the serial port screen. This project is very helpful for making the ventilator display screen.

ARDUINO UNO STONE HMI Medical ventilator Project Overview

The ventilator project I do here will have a startup animation effect after power on, then enter a startup initial solution interface, and display the word “open”. Click it to have a voice effect, prompt to open the ventilator, and jump to the page selection interface, where there will be an animation effect, which is an animation to show the human breath, and there are two options The first is the oscillogram monitoring chart of respiration. The second is the oxygen and respiratory rate monitoring chart. How to display so many oscillograms at the same time is a problem. After clicking enter, STONE HMI will issue a specific command to control MCU to start to upload the waveform data.

The functions are as follows:

realize button setting;
Realize voice function;
realize page switching;
realize real-time waveform transmission.

Modules required for the project:

STONE TFT LCD
Arduino Uno module;
voice play module.

Project block diagram:

Medical-VentilatorSTONE-LCDArduino-UNO

Hardware introduction and principle

Loudspeaker

Because STONE HMI has an audio driver and reserved corresponding interface, it can use the most common magnet speaker, commonly known as a loudspeaker. The loudspeaker is a kind of transducer which transforms the electrical signal into an acoustic signal. The performance of the 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-VentilatorSTONE-LCDArduino-UNO

STONE STVC101WT-01

10.1 inch 1024×600 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;
STONE toolbox software for GUI design, simple and powerful hex instructions.

STONE HMI 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 LCD 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.

Arduino UNO

Parameter

Model Arduino Uno
Microcontroller atmega328p
Working voltage 5 V
Input voltage (recommended) 7-12 V
Input voltage (limit) 6-20 V
Digital I / O pin 14
PWM channel 6
Analog input channel (ADC) 6
DC output per I / O 20 mA
3.3V port output capacity 50 mA
Flash 32 KB (0.5 KB for bootstrapper)
SRAM 2 KB
EEPROM 1 KB
Clock speed 16 MHz
Onboard LED pin 13
Length 68.6 mm
Width 53.4 mm
Weight 25 g

Medical-VentilatorSTONE-LCDArduino-UNO

Medical-VentilatorSTONE-LCDArduino-UNO

Development steps

Arduino UNO

Download IDE Link: https://www.arduino.cc/en/Main/Software

Medical-VentilatorSTONE-LCDArduino-UNO

Here, because my computer is win10, I choose the first one and click in

Medical-VentilatorSTONE-LCDArduino-UNO

Select just download

Install Arduino

After downloading, double-click to install it. It should be noted that Arduino ide depends on the Java development environment and requires a PC to install Java JDK and configure variables. If double-click startup fails, the PC may not have JDK support.

Code

Medical-VentilatorSTONE-LCDArduino-UNO

Here you need to set the command to identify the serial port screen, and:

Enterbreathwave is a button command sent from the recognition screen to enter the breathing interface

Breatbacktobg is the button command sent from the recognition screen to exit the breathing interface

Enterhearto2wave is the button command to enter the oxygen interface sent from the identification screen

Hearto2backtobg is the button command sent from the recognition screen to exit the oxygen interface

Start wave is the initial waveform data sent to the screen.

Cleanwave is used to clear the waveform data sent to the screen.

Then click the tick to compile. After the compilation is completed, click the second arrow icon to download the code into the development board.

Medical-VentilatorSTONE-LCDArduino-UNO

STONE TOOLbox(GUI Design software)

Add picture

Use the installed STONE toolbox, click the new project in the upper left corner, and then click OK.

Medical-VentilatorSTONE-LCDArduino-UNO

After that, a default project will be generated with a blue background 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-VentilatorSTONE-LCDArduino-UNO

Set picture function

Firstly, set the boot image, tool – > screen configuration, as follows

Medical-VentilatorSTONE-LCDArduino-UNO

Then you need to add a video control to automatically jump after the power-on page stops.

Medical-VentilatorSTONE-LCDArduino-UNO

Here, it is set to jump to page 0 when the power-on page stops, and the number of repetitions is 0, indicating no repetitions.

The setting of a selection interface

Medical-VentilatorSTONE-LCDArduino-UNO

Here, the first button icon is set. The button effect adopts page 6, and switches to page 3. At the same time, the 0x0001 value is sent to Arduino Uno MCU to trigger data generation. The setting of the second key is similar, but the key-value command is different.

Animation effect settings

Medical-VentilatorSTONE-LCDArduino-UNO

Here we add the 1_breath.ico icon made in advance, and set the animation stop value and start value, as well as the stop picture as 1 and the start picture as 4, and set it to not display the background. This is not enough. If you need the animation to move automatically, you need to make the following settings:

Medical-VentilatorSTONE-LCDArduino-UNO

Add audio file

After power on at the beginning, when clicking open. to realize the voice prompt function, you need to add an audio file, where the audio file number is 0.

Medical-Ventilator+STONE-LCD+Arduino-UNO(19)

Real-time Curve

Here I have made two waveforms. In order to realize the separate control, I have adopted two data channels, namely channel 1 and channel 2. It is better to set the Y_Central and YD_Central values and colors. And the command is as follows:

uint8_t StartBreathWave[7] = {0xA5, 0x5A, 0x04, 0x84, 0x01, 0x01, 0xFF};

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

uint8_t StartHeartO2Wave[9] = {0xA5, 0x5A, 0x06, 0x84, 0x06, 0x00, 0xFF, 0x00, 0x22};

uint8_t CleanHeartO2Wave[6] = {0xA5, 0x5A, 0x03, 0x80, 0xEB, 0x55};

This completes the setting, and then compiles, downloads, and upgrades to the U disk.

Connection

Code

Appendix

Medical-Ventilator+STONE-LCD+Arduino-UNO

Medical-Ventilator+STONE-LCD+Arduino-UNO

Medical-Ventilator+STONE-LCD+Arduino-UNO

Medical-Ventilator+STONE-LCD+Arduino-UNO

Related posts:

STONE STVC070WT-01 HMI Screen+Arduino+Musical Metronome
Raspberry PI Pico and STONE Display Dazzling Light Control System
Bluetooth communication DEMO: NRF51822 UART communicate with STONE HMI display
The Structure and Display Principle of High Brightness LCD
Raspberry Pi GUI using STONE HMI Touch Screen Display Module
Self-service Device Application in Pandemic
Application case of TFT LCD Module in Medical Industry
The Benefits of Looking for Chinese TFT LCD manufacturers
Smart TFT LCD Display for Machienry
Ultrasonic module test with STONE LCD module

Arduino UNO+STONE HMI+Medical Ventilator

By hmimcu