Virtual Reality CPR and AED Training
by Natan_Maarten in Circuits > Wearables
157 Views, 4 Favorites, 0 Comments
Virtual Reality CPR and AED Training




Sudden cardiac arrest is one of the leading causes of mortality worldwide. Chest compressions play a crucial role in maintaining myocardial perfusion and effectively extend the time window for successful defibrillation [1]. Prompt and effective cardiopulmonary resuscitation (CPR), in combination with the use of an automated external defibrillator (AED), significantly improves survival rates. The probability of successful defibrillation decreases by approximately 7 to 10% with each passing minute, underscoring the urgency of immediate intervention. To address this, AEDs were developed for use in public settings, allowing bystanders to provide early defibrillation [2, 3]. Nonetheless, one of the persistent challenges in ensuring timely and effective CPR is the insufficient knowledge and skills among members of the general public, particularly younger individuals [4]. Training should not be confined to healthcare professionals. Rather, the general population must also be equipped with the basic skills to administer life-saving interventions while awaiting emergency medical services. Therefore, distinct training tools are required for both groups [5]. Over recent decades, emerging technologies have increasingly found their place in the healthcare domain, aiming to enhance clinical outcomes and improve training efficacy. In particular, the integration of augmented reality (AR), mixed reality (MR), and virtual reality (VR) into medical training has gained attention from researchers and developers in the context of CPR and AED instruction [6, 7]. VR provides users with a fully immersive digital environment. Through the integration of advanced hardware and software, this form of XR creates experiences where virtual objects are perceived as real, resulting in a highly unique and engaging experience [8]. This is typically achieved using a head-mounted display (HMD), which immerses the user in an environment that blends real and virtual elements.
Compared to traditional learning approaches, immersive technologies such as VR offer more realistic training experiences. According to Dede [9], the immersive nature of such platforms may contribute to enhanced learning outcomes. VR is particularly well-suited for medical applications, given its capacity for more natural and intuitive user interaction. For instance, in 2016, Philips developed a CPR and AED training system that employed real-time tracking of hand movements and AED electrode placement, offering visual feedback on a monitor [10].
While immersive VR applications have demonstrated effectiveness in increasing knowledge of CPR and AED protocols, their impact on the improvement of chest compression techniques and correct AED pad placement remains inconclusive [11]. Many VR applications still lack the ability to quantitatively assess chest compression quality, a critical component of effective CPR. Furthermore, the incorporation of real-time feedback, particularly haptic feedback, remains an essential area for development [5].
Because of the many possibilities with this new technology, this project introduces a VR training system designed for the Meta Quest 3s. By providing a fully immersed virtual cardiac arrest situation and enhancing the experience with custom-built haptic wristbands, the system offers an engaging and highly responsive CPR and AED training environment. Participants are guided through a timed emergency scenario, using natural hand movements and tracked controllers to practise chest compressions and defibrillator pad placement. Vibrational cues from the wristbands provide tactile guidance, reinforcing accuracy and realism.
The main contributions of this solution are that it is not location-bound, does not require an instructor, and, through the use of this technology, the realism of a training situation can be greatly enhanced, particularly with the haptic wristbands. Therefore, the solution targets a broad audience, from students to members of the public, and aims to complement, rather than replace, traditional CPR instruction.
An attached link provides a one-minute video with a summary of the project.
Supplies
- Arduino Micro microcontroller
- Arduino Micro USB Cable
- DRV2605L driver (2x)
- Multiplexer TCA9548A
- Drake Haptic Actuators (2x)
- Circuit board
- Jumper wires
- Wristbands
- Meta Quest 3s
- Unity (version 6000.0.47f1)
- Arduino IDE
- Laptop/Desktop
- Copper wires
Methods
The following sections provide an overview of the development of a CPR and AED training system utilising VR and integrated haptic feedback. The objective was to create a simulator in which the user performs CPR during the first phase, followed by the application of an AED in the second phase, all while being in a VR experience, supported by haptic feedback. This approach aims to enhance the learning curve by offering a more immersive and responsive training experience.
Hardware and Electronics








The hardware consisted of two main components: the HMD, specifically the Meta Quest 3s, and a dedicated haptic feedback system. The Meta Quest 3S is a video see-through HMD developed by Meta, designed for use in VR and MR environments. The device is versatile and widely used across various domains, including gaming, entertainment, sports, and application development. The headset typically comes with two Touch Plus controllers, which enable users to interact more naturally within the virtual environment. The choice of the Meta Quest 3s was driven by their user-friendliness and wide availability, making it a suitable and practical option for the development of this training simulator [12].
The second part of the hardware was the haptic feedback system. In this application, vibrational haptic feedback was chosen as a response to the actions taken by the user. The actuators that regulated these vibrations were Drake haptic motors. These motors are integrated into wristbands for the left and right hands. To integrate and control the vibration in terms of intensity and frequency within the simulator, an electrical system was built containing two motor drives, a multiplexer and an Arduino Micro microcontroller. This microcontroller was selected to connect and program the haptic signals, as it contains 20 digital input and output pins, of which 7 are for pulse-width modulation outputs and 12 are analogue inputs. This microcontroller formed the bridge between the application and the vibration actuation. To enhance the performance of the actuators, two DRV2605L low-voltage haptic drivers were used. It features a haptic-effect library and a closed-loop actuator control system, designed to deliver high-quality tactile feedback. To communicate between the microcontroller and the driver, an I2C protocol was used. It employs a serial clock pin (SCL) and a serial data pin (SDA). With this protocol, the controller can manage different sensors, actuators, or drivers by sending one single bit over the data line each time the serial clock line goes from low to high.
The attached electronic schematic illustrates the electronic schematic for this specific application. The main controller used is the Arduino Micro, which supplies power to the setup via a connection to a PC using a micro-USB cable. The multiplexer employed is the TCA9548A, which was connected to two drivers, the DRV2685L. All components must be connected to the 5V power line and ground. The multiplexer’s address can be modified by altering the connections of ports A0, A1, and A2. In this instance, all three ports were connected to the ground, resulting in an address of 0x70. The attached table outlines the various options available for configuring this address. To enable I2C communication with other devices, the SDA port (2) and SCL port (3) of the Arduino were connected to the corresponding SDA and SCL ports of the multiplexer. The SDA and SCL ports of the drivers were then connected to two separate channels on the multiplexer: in the figure, channels 1 and 2 are selected. Lastly, the INT ports of both drivers were connected to facilitate Pulse Width Modulation (PWM) via port 13 of the Arduino controller. The two haptic motors were attached to the positive and negative output ports of the drivers using long cables to ensure the user could move freely.
To effectively use this haptic feedback system in the scene, it was integrated into a wearable backpack where the circuit board with the components was. From there, a wire was connected to the PC and two wires to the haptic wristbands.
Software


Unity was used as the virtual development environment to create the application and deploy it to the HMD. It is a game engine and real-time development platform designed for both 2D and 3D applications. One of the main advantages of Unity is its flexibility, as the engine can be combined with various tools that assist developers in creating interactive content across different platforms. In addition, Unity can be used to develop XR applications. To facilitate XR application development, there are different packages available which help to develop applications for Meta devices [13].
Next, to control the vibrational feedback the Arduino IDE software was used. It is an open-source software used to create programs and upload theme to the Arduino microcontroller. It forms the bridge between the Unity application and the microcontroller [14].
Application Development





Once all the software and hardware have been selected and established, they can be combined into a dedicated application.
The application developed in this project consisted of two phases: one for CPR training and one for AED training. The aim was for users to complete both phases while fully immersed in a VR environment, supported by haptic feedback, with a focus on both performance and timing. Vibrational cues were implemented to help optimise the user’s accuracy and efficiency.
The virtual environment used in the simulation was a car park with an ambulance, although the setting can be customised. The central element of the scene was a virtual dummy representing a person lying on the ground, serving as the target for the training. Additional UI elements were included to support the user during the simulation.
To structure the game flow, several scripts were developed to manage the sequence of events. At the heart of the system is the GameManager script, which controls the progression through the different phases. When the user presses the start button, the GameManager initiates the first phase and starts the timer. It then automatically transitions between phases until the simulation is complete, at which point the timer stops. In this application, the GameManager oversees two phases: the CPR phase and the AED phase.
For the CPR training, the required conditions were defined in a dedicated C# script (Phase1 Script) in Unity [15]. This script continuously monitored user input, and when all criteria were met, it registered a successful CPR attempt. The conditions were:
- Hands centred on the chest: This was enabled by placing a collision box at the centre of the chest of the virtual person in Unity. The app detected whether the hands were inside the box or not.
- At least 5 cm deep: By measuring the depth each time a compression was performed and comparing the position of the hands to a stationary point at the surface of the chest, the script could determine whether it was a valid compression.
- Rate of 100 to 120 bpm: The script sent a signal to the Arduino to transmit pulses at a frequency corresponding to the correct CPR rate. In this way, the user was guided, and the script tracked whether compressions were performed neither too quickly nor too slowly in comparison to each other.
- 30 compressions at a time: This was implemented by a counter in the script that recorded valid CPR compressions.
As a follow-up to the CPR training, AED usage was also included. For the second part of the simulation, a dedicated script (Phase2 Script) was developed to track the conditions for the correct AED application. This time, the focus was on the correct placement of the AED pads, which were represented by the controllers. On the virtual body, two points were created in the Unity environment corresponding to the correct pad positions. The script constantly computed the Euclidean distance between the left and right controller and these target points. To provide guidance, code was written to initiate a pulse sequence, where the timing between successive pulses decreased as the controllers approached the correct positions. The necessary pulses and frequencies were sent to the Arduino microcontroller in real-time. Once the controllers were in position, the script registered this, stopped the vibrations and enabled the user to activate the AED.
Results


After the complete application was developed using the dedicated hardware and software, the complete application and project flow are highlighted in this section.
Preparation:
First, the user is placed in an environment with sufficient space. For this application, a surface area of approximately 3 m² is required. Once the location is chosen, the user is equipped with the haptic feedback system. They are asked to wear a dedicated backpack containing the Arduino microcontrollers and the electrical circuit. The haptic wristbands are then fitted by the operator. The user is given the HMD and asked to wear it. The operator starts the application, and the user is placed in the virtual environment with the dummy object positioned in front of them. They can move freely within this environment. To initiate the game, the user presses the start button.
Phase 1 - CPR
In the first phase, the user is required to perform CPR. As this phase begins, a log message appears, and vibrational pulses are delivered at a frequency matching the correct CPR rhythm. The message reads:
"This person needs CPR! Start by overlapping your hands and pressing down in the centre of the chest about 6 cm deep, following the rhythm of the haptic feedback. Watch the counter."
The user's task is to perform 30 compressions of approximately 6 cm in depth at the correct location on the chest. A visual counter is displayed, and each time the user applies pressure with the correct tempo, depth, and placement, the counter increases. This must be completed 30 times to proceed.
Phase 2 - AED
Once the CPR training is complete, the AED training begins. The Meta Quest 3S controllers, used to mimic AED paddles, are positioned in the room. At the start of this phase, a new message is displayed:
"Oh no, he’s not going to make it, defibrillation is required! Grab both paddles and follow the haptic feedback. The closer you get to the correct placement, the shorter the intervals between the pulses. Pulses stop once in position."
As the user reads the message, vibrations begin to appear on both hands while holding the controllers. The pulse frequency increases as each hand approaches the correct position, stopping completely once the target location is reached, indicating correct placement. The user is then instructed to place the controllers as quickly as possible on the designated spots on the dummy. Once correctly positioned, the user delivers a shock by pressing both index finger buttons simultaneously, ending the timer and the simulation.
The game then concludes, and a final message appears:
"Well done, he is back! You needed (time displayed) seconds."
Discussion
The goal of this project was to develop a VR-based CPR and AED training simulator, with an emphasis on user-friendliness and accessibility for the general public. After development, the application was tested with friends and family. A key observation was that, while the concept proved effective, the system remains in a prototype stage. In particular, the robustness of the hardware requires improvement, which may serve as inspiration for further development. In contrast, the software performed reliably throughout the testing process.
Participants reported that the application successfully guided them through the complete simulation and provided a well-balanced experience between challenge and usability. The inclusion of a counter was especially well received, as it offered a clear and motivating goal.
This project distinguishes itself from other studies by incorporating haptic feedback for real-time guidance, rather than solely evaluating performance. This enhances the learning curve through active assistance. Furthermore, the inclusion of a timer introduces a competitive element, enabling the setting of benchmarks, an aspect often missing in comparable applications [16, 17]. Future improvements could focus on increasing the realism of the virtual environment. While the core functionality was achieved, the visual and auditory realism was intentionally limited to reduce system load due to time constraints. Subsequent versions could benefit from enhanced immersion through features such as spoken instructions or ambient soundscapes delivered by virtual characters. Additionally, improving the durability and robustness of the hardware will be crucial for broader, long-term usability and more rigorous testing.
Troubleshooting:
During the development of this project, several technical challenges were encountered. Below is a summary of the most notable issues and their solutions:
- Motor overheating when idle:
During coding, it was observed that the haptic motors became warm even when not actively vibrating, due to continuous current flow. This is especially problematic as the motors are in direct contact with the user's skin. To resolve this, a function was implemented to set the driver into standby mode when no vibrations were required. Each time a vibration was triggered, the driver exited standby, and it was reactivated immediately afterwards.
- Fragile motor wiring:
The Drake haptic motors used in the project have extremely delicate wires that can easily break under movement, an issue in a dynamic training application. To mitigate this, screw terminals were used to bridge the connection between the fragile motor wires and more robust wires connected to the Arduino Micro. These connections were reinforced using heat-shrink tubing for added durability. The screw terminal itself was fixed inside the haptic glove to prevent any relative movement between the terminal and the motor, further enhancing reliability.
Conclusion
This project demonstrates the successful development of a VR-based CPR and AED training simulator that integrates real-time haptic feedback through custom-built wristbands. The system offers an immersive, instructor-free training experience that is not location-bound, making it highly accessible to a broad audience. By simulating a timed cardiac arrest scenario and providing tactile guidance during both CPR compressions and AED pad placement, the application enhances user engagement and supports skill acquisition. The combination of Unity, Arduino hardware, and haptic feedback creates a responsive environment where users receive immediate, intuitive cues that reinforce the correct technique. While not intended to replace conventional CPR instruction, this tool serves as a valuable complement, particularly for public education and first responder training. Future improvements could focus on expanding quantitative assessment capabilities and exploring adaptive feedback to further personalise the training experience.
Bibliography
[1] T. Eftestøl, L. Wik, K. Sunde, and P. A. Steen, "Effects of cardiopulmonary resuscitation on predictors of ventricular fibrillation defibrillation success during out-of-hospital cardiac arrest," (in eng), Circulation, vol. 110, no. 1, pp. 10-5, Jul 6 2004, doi: 10.1161/01.Cir.0000133323.15565.75.
[2] M. P. Larsen, M. S. Eisenberg, R. O. Cummins, and A. P. Hallstrom, "Predicting survival from out-of-hospital cardiac arrest: a graphic model," (in eng), Ann Emerg Med, vol. 22, no. 11, pp. 1652-8, Nov 1993, doi: 10.1016/s0196-0644(05)81302-2.
[3] T. D. Rea and R. L. Page, "Community approaches to improve resuscitation after out-of-hospital sudden cardiac arrest," (in eng), Circulation, vol. 121, no. 9, pp. 1134-40, Mar 9 2010, doi: 10.1161/circulationaha.109.899799.
[4] C. Abelairas-Gomez, "Cardiopulmonary resuscitation knowledge of future teachers: Should be taught basic life support during the educational system?," Resuscitation, vol. 85, p. S72, 2014, doi: 10.1016/j.resuscitation.2014.03.181.
[5] S. Ricci, A. Calandrino, G. Borgonovo, M. Chirico, and M. Casadio, "Viewpoint: Virtual and Augmented Reality in Basic and Advanced Life Support Training," (in eng), JMIR Serious Games, vol. 10, no. 1, p. e28595, Mar 23 2022, doi: 10.2196/28595.
[6] V. Caro, B. Carter, S. Dagli, M. Schissler, and J. Millunchick, "Can Virtual Reality Enhance Learning: A Case Study in Materials Science," in 2018 IEEE Frontiers in Education Conference (FIE), 3-6 Oct. 2018 2018, pp. 1-4, doi: 10.1109/FIE.2018.8659267.
[7] M. Rebol, A. Steinmaurer, F. Gamillscheg, K. Pietroszek, C. Gütl, C. Ranniger et al., "CPR Emergency Assistance Through Mixed Reality Communication," in Augmented Intelligence and Intelligent Tutoring Systems, Cham, C. Frasson, P. Mylonas, and C. Troussas, Eds., 2023// 2023: Springer Nature Switzerland, pp. 415-429.
[8] T.-Y. Tsai, Y. Onuma, A. Złahoda-Huzior, S. Kageyama, D. Dudek, Q. Wang et al., "Merging virtual and physical experiences: extended realities in cardiovascular medicine," European Heart Journal, vol. 44, no. 35, pp. 3311-3322, 2023-09-14 2023, doi: 10.1093/eurheartj/ehad352.
[9] C. Dede, "Immersive interfaces for engagement and learning," (in eng), Science, vol. 323, no. 5910, pp. 66-9, Jan 2 2009, doi: 10.1126/science.1167311.
[10] T. Djajadiningrat, P. Lui, P.-Y. Chao, and C. Richard, Virtual Trainer: A Low Cost AR Simulation of a Sudden Cardiac Arrest Emergency. 2016, pp. 607-618.
[11] O. Almousa, J. Prates, N. Yeslam, D. Mac Gregor, J. Zhang, V. Phan et al., "Virtual Reality Simulation Technology for Cardiopulmonary Resuscitation Training: An Innovative Hybrid System With Haptic Feedback," Simulation & Gaming, vol. 50, no. 1, pp. 6-22, 2019, doi: 10.1177/1046878118820905.
[12] "Meta Quest 3s." https://www.meta.com/be/quest/quest-3s/?srsltid=AfmBOoqMbUCKA-tAQGnQjrPtVw3la_MSi8v4rKK-BKD1HzF-WkpWjoYB (accessed 26/05/2026, 2025).
[13] "Unity." https://unity.com/ (accessed 26/05/2025, 2025).
[14] "Arduino IDE." https://www.arduino.cc/en/software/ (accessed 26/05/2025, 2025).
[15] "How to Perform CPR - Adult CPR Steps." https://www.redcross.org/take-a-class/cpr/performing-cpr/cpr-steps?srsltid=AfmBOopEMKIeGFl9sT16y9_rqSt10Ds8FkDgZtvu7pkc_-0oNbT4h5-J (accessed 24/05/2025, 2025).
[16] F. Semeraro, G. Ristagno, G. Giulini, T. Gnudi, J. S. Kayal, A. Monesi et al., "Virtual reality cardiopulmonary resuscitation (CPR): Comparison with a standard CPR training mannequin," (in eng), Resuscitation, vol. 135, pp. 234-235, Feb 2019, doi: 10.1016/j.resuscitation.2018.12.016.
[17] N. Vaughan, N. John, and N. Rees, "CPR Virtual Reality Training Simulator for Schools," in 2019 International Conference on Cyberworlds (CW), 2-4 Oct. 2019 2019, pp. 25-28, doi: 10.1109/CW.2019.00013.