The Control Center of the System
Using the Arduino Mega as our microcontroller and PCB with our connections, we are able to take the pressure reading of the users lungs to automatically signal the motor drivers to move the motor the correct distance to fill the patients lung to their unique lung capacity and repeat the compressions over and over again while simulanteously displaying the pressure and messages to the user onto the LCD screen
LCD SCREEN
The LCD is what displays multiple different commands and messages necessary for the user when operating the systems from a welcome message to a warning message and instructions for emergencies.
Welcome Message
When starting up the system, the LCD code always begins with a welcome message to the operator. This way, you know that the system has been turned on.
Current Pressure
The display then shows the current pressure of the user in a loop with a refresh rate of about 3.5 seconds.
Warning Signal
When the current pressure delivered from the compressions does not match the max pressure set during the initial start-up, a warning signal will flash to grab the operator’s attention.
Emergency Instructions
Right after the warning message, the operator is instructed to press the emergency stop to stop all system operations by cutting off the current to the whole system.
Main Code
The main code contains all the functions working simultaneously. This is where the primary function containing the relationship between the pressure sensor, the motor, and the LCD display comes in. This works because there is an initial setup for the maximum pressure the patient can withstand and the distance the motor has to move to deliver the correct amount of air. Once set, the motor is set to give the maximum pressure. If it is not doing so, a warning message is sent to the operator to stop the system for the option to recalibrate again.
Main Components for our codes functions include
- Pressure Sensor
- Stepper Motor
- Limit Switch
Main functions include
- displayPressure()
- welcomeMessage(), warningMessage(), emergencyStop()
- motor()