Open thoracic surgical implantation of cardiac pacemakers in rats

Genetic engineering and implantable bioelectronics have transformed investigations of cardiovascular physiology and disease. However, the two approaches have been difficult to combine in the same species: genetic engineering is applied primarily in rodents, and implantable devices generally require larger animal models. We recently developed several miniature cardiac bioelectronic devices suitable for mice and rats to enable the advantages of molecular tools and implantable devices to be combined. Successful implementation of these device-enabled studies requires microsurgery approaches that reliably interface bioelectronics to the beating heart with minimal disruption to native physiology. Here we describe how to perform an open thoracic surgical technique for epicardial implantation of wireless cardiac pacemakers in adult rats that has lower mortality than transvenous implantation approaches. In addition, we provide the methodology for a full biocompatibility assessment of the physiological response to the implanted device. The surgical implantation procedure takes ~40 min for operators experienced in microsurgery to complete, and six to eight surgeries can be completed in 1 d. Implanted pacemakers provide programmed electrical stimulation for over 1 month. This protocol has broad applications to harness implantable bioelectronics to enable fully conscious in vivo studies of cardiovascular physiology in transgenic rodent disease models. This protocol describes how to perform an open thoracic surgery for epicardial implantation of wireless cardiac bioelectronic devices in adult rats and the methodology for a full biocompatibility assessment of the physiological response to the implanted device.


Introduction
Small-animal models such as rats or mice remain indispensable in cardiac physiology and heart disease pathogenesis research. Whereas large mammals such as dogs, pigs, sheep or goats are preferred for their anatomical and electrophysiological similarity to humans, rodents provide the benefit of easy genetic engineering to study the genetic basis of cardiac diseases. Numerous rodent models of heart failure, diabetes, myocardial infarction, and other cardiovascular and metabolic diseases have advanced our understanding of the underlying mechanisms [1][2][3][4] . Studies of the underlying mechanisms of arrhythmia and heart failure require implantable devices for programmed electrical stimulation, but the generation of the required pacing models for such studies are generally restricted to largeanimal models because the existing pacing hardware is optimized for human anatomies that are more similarly sized to larger animals. Thus, cardiac electrophysiology studies in transgenic rodent models have been limited to ex vivo isolated heart preparations or anesthetized in vivo configurations that have inherent limitations. Ex vivo preparations isolate the heart from systemic physiological systems, which removes important connections between the heart and other organ systems, such as the nervous system 5 . Anesthetized in vivo studies investigate arrhythmia dynamics using transesophageal 6 or open chest 7 electrical stimulation, which do not fully reflect the true activity during normal behavior when the subject is conscious. Fully conscious in vivo studies have been performed by some groups, but the equipment for these studies required using tethered devices for stimulating and monitoring the heart, which may inadvertently affect the animal's behavior [8][9][10][11] .
To address this technical limitation, we have developed a toolkit of miniature bioelectronics that can be fully implanted into rodents for tether-free, fully conscious stimulation 12,13 . The devices can deliver stimulation and sensing to animals without disrupting their natural behavior. These implanted devices enable long-term, in vivo studies in the rodents for genetic and molecular investigation of cardiac electrical remodeling. Importantly, our approach allows implantable device technologies that monitor and stimulate cardiac electrical activity to be combined with genetic engineering to investigate molecular mechanisms underlying heart rhythm disorders. These implanted devices also allow for the study of rapid pacing-induced cardiac electrophysiological remodeling and heart failure. In addition, they enable study of pacemaker-induced changes, such as ion channel remodeling and transcriptional changes in cell signaling pathways. Moreover, this surgical technique can be applied in both optical and optogenetic studies, such as experiments monitoring autofluorescent NADH to study metabolism 14 or employing optogenetic modulation of the autonomic nervous system of the heart 15 .
Here, we present a surgical procedure to implant wireless, battery-free, miniature cardiac devices via open thoracotomy as a platform for high-throughput, long-term cardiac electrophysiological studies (Fig. 1a). We have used this technique to implant devices for atrial, ventricular and biventricular pacing in rats 12,13,16,17 . The animals fully recover from surgery with minimal impact on cardiovascular function and general health. We have implemented a full systemic assessment of animal health using histology, weight and behavioral monitoring, echocardiography, and biomarkers of myocardial damage. The surgical technique takes an experienced surgeon~40 min to complete (Extended Data Fig. 1) and provides secure device implantation to the epicardium so that devices can successfully pace and capture heart rhythms for up to 32 d. This surgical approach can be combined with other cardiac disease models, such as surgically induced models-for example, transverse aortic constriction for pressure overload-induced cardiac hypertrophy 18 or left anterior descending coronary artery ligation for myocardial infarction 19 -and pharmacologically induced or transgenic models that do not require cardiac surgery, such as drug injection for cardiotoxicity 20 or genetic modification 21 . The low mortality rate of the surgery itself ( Supplementary Fig. 1) indicates that this protocol is ready to routinely complement further disease model studies in the field.  Fig. 1 | Overview of surgical implantation of wireless battery-free miniature pacemakers in rodents. a, Open thoracic implantation approach allows for full implantation of miniature, battery-free devices (pacemakers) for cardiac rate and rhythm therapy. b, Various wireless miniature pacemakers can be implanted using this technique: optical and electrical pacemakers (left), bioresorbable pacemakers (center) and biventricular pacemakers (right). Each device is composed of three primary components: the receiver, the electrode pad, and the serpentine connector. Scale bars, 5 mm.

Development of the protocol
Our group has developed and tested a range of bioelectronics that stimulate and monitor cardiac electrophysiology 12,13,16,[22][23][24] . For instance, in an early development attempt, we tested a miniature implantable pacemaker using an external jugular approach in mice 25 . In this approach, we inserted the pacemaker lead through the jugular vessel and into the right ventricle of the heart. However, the mortality rate of this approach was high, with mice surviving for a maximum of 11 d postimplantation. To reduce surgical complexity and improve the mortality rate, we switched to the open thoracic epicardial implantation method. As a result of this change, the mortality rate improved-10% mortality with 66.7% of mice surviving to 20 d postimplantation-in addition to the pacemaker providing reliable cardiac capture for 20 d. As a final development of the protocol, we implemented the epicardial technique in rats, which resulted in the mortality rate trending toward 0% for an experienced operator ( Supplementary Fig. 1). The larger anatomy of rats expanded the range of dimensions and geometries available for the implantable bioelectronics while retaining the benefits of the low-cost high-throughput mouse models. In addition to testing implantable cardiac devices, we have also developed a novel hydrogel adhesive that acts as an interface between tissue and bioelectronics so that pacemakers can influence heart activity while avoiding mechanical disruption of the myocardium from suturing during surgical implantation 16 .

Applications of the method
We primarily employ this technique to implant wireless battery-free miniature pacemakers that have a single electrode. These pacemakers will be commercially available from NeuroLux Inc., and each pacemaker consists of three main parts: the power receiver coil that generates the energy required to power the pacemaker, the electrode pad that interfaces with the heart, and the stretchable connector that joins the two (Fig. 1b). In addition to the single electrode modality, this technique can also be used to implant devices with different configurations, such as a biventricular pacemaker (Extended Data Fig. 2). In this case, one electrode is attached to each of the right and left ventricles, respectively.
Alternatively, this technique can be used to secure electronics with conductive tissue adhesives, such as a UV-cured hydrogel adhesive (Extended Data Fig. 3) that we recently developed 16 . An important advantage of using this bioadhesive is that devices are attached without penetrating the myocardium, which maintains the native tissue structure of the heart. Thus, the studied changes in the heart are more likely to be specifically related to the disease model and less likely to derive from mild injuries that may be induced by the implantation technique.

Comparisons with other methods
Previously, we attempted to implant our miniature pacemakers transvenously, which is the standard clinical configuration. In the transvenous surgical method we developed, we exposed and isolated the jugular vein before making a small incision in the jugular vessel that allowed the pacemaker lead to be inserted through the jugular vessel and placed into the right ventricle. We then added a small drop of sterile tissue glue at the incision site on the jugular vessel to secure the electrode in place. However, only 4 out of 16 mice who had pacemaker implants survived to 11 d when we used this approach 25 . In comparison, with an experienced operator, the mortality rate with the open thoracic epicardial implantation method reaches 0% ( Supplementary Fig. 1). In our studies, this epicardial approach has been robust in both ensuring low mortality rates for animals undergoing surgery and for enabling device functionality 12,13,16 . Other groups have also successfully employed a similar open thoracic epicardial implantation approach in mice to uncover the effect of dyssynchrony on the heart using a pacemaker-enabled rapid pacing strategy 10,26 . However, the devices they implant are different, so it is difficult to directly compare the mortality rates with our method. Bilchick et al. 26 implant a wireless pacemaker with a distal screw lead, and Stahlberg et al. 10 attach a tethered pacemaker with percutaneous leads.

Limitations
In our experience, older animals (>10 months) have a more difficult postoperative recovery, so it is better to select young adult rats (1-4 months) to undergo this procedure. However, older animals may be used if a larger anatomy is required. For example, we required an older male rat when testing a skin-interfaced device because the device needed to maintain contact with the skin across a large surface area to record a high-quality electrocardiogram (ECG) signal 17 .
In addition, devices that are too large might increase the risk of mortality. Care must be taken to design small devices that are lightweight in proportion to the size of the animal being operated on. For example, our initial mouse battery-powered pacemaker was too bulky and contributed to the high mortality rates during implantation 25 . Lightweight devices integrate into the animal's native physiology more optimally, so bioelectronics should be designed with limited weight.

Experimental design
Most importantly, researchers should consider the 3Rs principle of experimental work with laboratory animals to make every effort to replace animal testing with alternative methods, reduce the number of animals, and refine testing methods to reduce animal pain and discomfort. First, researchers should consider if alternative methods such as computational modeling or cell culture could address the scientific question of interest without the use of animals. Second, researchers should determine the minimum number of necessary animals for the investigation and should use one animal for as many different assays as possible. For example, data collection for echocardiography, histology, serology and electrophysiology characterization can be performed using a single animal that has undergone pacemaker implantation. Last, to reduce animal discomfort, researchers should work closely with animal research facility staff to provide proper care for animals undergoing surgery. We suggest that surgeries occur in the first 3 d of the work week so that both researchers and animal research facility support staff are available during the recovery period to monitor animals and respond to their needs. In addition, proper follow-up doses of analgesics should be administered in at least the first 48 h following surgery, with additional doses administered if necessary. Moreover, euthanasia should be considered with the consultation of animal research facility staff if animals present extended signs of discomfort.
Sex is primarily considered if animal size, weight and/or sex differences matter for the question being investigated in the study. For example, we required young adult female rats for small-animal computed tomography (CT) scans because the young adult male rats would grow to be too large to fit into the CT imager over the 2 months of the study. Any strain of mouse or rat can be operated on, and the rodent should be selected according to experimental needs. We consistently used Sprague-Dawley rats throughout our studies to reduce biological variability. For housing, animals may need to be housed separately in the first few days after surgery so that they do not remove each other's stitches or external devices. Specifically, male animals should never be housed together as they may fight postsurgery as well.
Implanting devices into transgenic models does not present any additional challenges for the device implantation. Researchers can create their transgenic models using their own protocols. Once the desired genetic background is achieved, that transgenic animal with the target genotype can be operated on for device implantation with no limitations. For disease models created by surgical intervention (transaortic constriction or myocardial infarction), the pacemaker would be implanted simultaneously with the surgical manipulation required to establish the disease model. We have not investigated animal survival if the surgical intervention for the disease model and the device implantation must be separate operations.
Control and sham control animals should be added in as experimentally necessary to account for the effect of other physiological effects other than the one being tested. In our studies, control animals are defined as naïve rats, while sham controls undergo the full surgery but have no device implanted.
Our open thoracic epicardial implantation method is standard for every pacemaker implantation, but it can be altered depending on experimental needs. For example, a different chamber of the heart can be the target site of device attachment. If the right atrium or right ventricle is desired, make an incision from the right aspect of the chest. If the left atrium or left ventricle is desired, make an incision from the left aspect. If a device requires multiple sites of attachment to maintain good contact between electrodes and the myocardium, keeping the number of attachment points low to minimize damage to native myocardium is recommended.
For our biocompatibility studies, we implement a full set of assays that assesses the maintenance of normal anatomy and physiology of the heart. We use Masson's trichrome staining to assess the fibrotic response of the tissue near the site of device attachment. Weight monitoring every 2-3 d enables assessment of overall health, and behavioral monitoring assesses that the animals are recovering well from the surgery. Enzyme-linked immunosorbent assays (ELISAs) reveal levels of cardiac troponin I (cTnI), creatine kinase myocardial band (CK-MB), and brain natriuretic peptide-45 (BNP-45), which are biomarkers of myocardial infarction and heart failure. Echocardiography assesses the mechanical functionality of the heart using measurements such as ejection fraction and stroke volume. Certain assays can be selected or eliminated from the full set of experiments listed above depending on the research question being examined.

Expertise needed to implement the protocol
Operators should have fundamental surgical skills, including proficiency in instrument handling, suturing, knot tying and tissue dissection, as well as be familiar with rat thoracic and cardiac anatomy. In addition, they should understand the basic principles of surgical sterility and rat airway management. Successful implantation also strongly depends on operator experience level. The operators involved in our studies 12,13,16,[22][23][24] were all surgical residents who had at least 2 years of experience in general surgery. With additional training in airway management, surgical sterility and fundamental surgical skills, operators experienced in small-animal survival surgery and microsurgery also achieved success with this procedure. Operators with increased levels of surgical experience will quickly master this technique and achieve low mortality rates.
Surgeries are a team effort. Operators will require assistance with preoperative tasks (retrieval of animals from an animal facility, setup of surgical area and sterilization of equipment) and postoperative responsibilities (returning of animals to the animal facility, follow-up analgesic injections, postsurgery blood draws and recovery observation). An investigation that requires only a few surgeries is possible with one operator and one assistant. Larger-scale investigations will require bigger teams that can include surgeons, surgery assistants, attending veterinarians, device engineers and other investigators. Operators and/or assistants should have experience in the interpretation of ECG signals.

Animals
We have successfully performed the open thoracic implantation of cardiac devices in Sprague-Dawley and Long Evans rats. Other strains of rats can also be used. ! CAUTION All animal experiments must conform to institutional and government guidelines. The protocol performed here was approved by The George Washington University Institutional Animal Care and Use Committee (protocols A364 and A367).
c CRITICAL It is important to avoid using older animals because younger animals recover faster postoperatively. We recommend using rats weighing~200 g. If equipment that performs longterm measurements of rats over time has a limited stage size, we recommend using female rats since the anatomical size of the animal will stay relatively stable over time. For example, we imaged rats using CT over the course of 7 weeks. Seven weeks of growth for a male rat would not have been anatomically compatible for the imaging stage, so we selected female rats for these measurements.

Reagent setup
Isoflurane (1-3% (vol/vol) with oxygen (100%), 2 mL/min) Store bottles of isoflurane at room temperature (15-30°C) in a cool well-ventilated area away from direct sunlight. Ensure that bottles are tightly closed during storage. Under proper conditions, isoflurane can be stored for up to 5 years. Add isoflurane to small-animal anesthesia system vaporizer as needed before each case.
Buprenorphine (0.3 mg/mL) Prepare aliquots of buprenorphine with one animal dose per syringe. For each dose, use 0.05 mg per 1 kg body weight. Dilute in a 1:2 ratio with sterile saline (0.09% (wt/vol)) and administer by subcutaneous injection. Buprenorphine aliquots can be prepared in advance and stored at room temperature (20-25°C) away from light in a secure location in accordance with institutional drug regulation protocols.

Equipment setup
Preoperative preparations Sterilize implantable devices before implantation by gas sterilization with ethylene oxide or by applying a 30 min ultraviolet light in a biosafety cabinet. Clean work surfaces before and after surgeries using an alcohol-based cleaning agent. Autoclave all surgical instruments before use. Purchase all disposable equipment that come in contact with the surgical site in sterilized packages. Prepare an aseptic operating field by covering the operating area with a sterile drape (Fig. 2). Set up the rodent anesthesia machine and the anesthetic scavenging machine.
Batch surgeries for multiple surgeries in 1 d Usually, multiple animals will undergo surgery in 1 d. As it is difficult to autoclave instruments between every case, keep instruments in an aseptic field between cases performed on the same day.
For quick dry heat sterilization between cases, a glass bead sterilizer should be placed near the aseptic operating field so that the operator can reach the equipment. Operators should insert instrument tips into the heating chamber for 15 s for sterilization. Disposable equipment, including sterile drapes, cotton swabs, gauze and suture, should be replenished for each case. shadowing that may obscure visualization during surgery, use at least two sources of adjustable lighting to illuminate the operating field. 2 For convenience of transferring the animal once sedated, set the induction chamber next to the intubation station (Fig. 2a). For intubation, use a stand with an adjustable head positioning (Fig. 2b). c CRITICAL STEP An anterior neck cutdown will be necessary for intubation if there are three failed blind orotracheal intubation attempts, so prepare a base plate with adjustable retractors that attach magnetically for visualization of the airway. 3 For ventilation, place the ventilator directly in front of the surgical workspace. 4 Prepare sterile packages of drapes, cotton tips and gauze. 5 Set up the sterile instrument area on the dominant-hand side of the surgeon's workspace (Fig. 2c). 6 Set the ventilator to 80 breaths per minute using pressure-controlled ventilation with a peak inspiratory pressure limit of 14 cmH 2 O. 7 Provide additional heat using an overhead heating lamp. c CRITICAL STEP The Guide for the Care and Use of Laboratory Animals recommends using a recirculated heating pad under the animal during surgery to prevent hypothermia. However, because the metal in the recirculated heating pad interferes with the inductive power transfer for the wireless cardiac bioelectronic devices, use an overhead heating source or exothermal pads instead. 8 Weigh animals and record weights. Prepare dosages of buprenorphine (0.01-0.05 mg/kg) with a 1:2 dilution of saline according to the respective animal's weight.

Procedure
Induction of anesthesia • Timing 5 min 9 Induce general anesthesia using inhaled isoflurane vapors by placing the animal in an induction chamber with 3-4% (vol/vol) of isoflurane and an oxygen flow of 2 mL/min for several minutes until the rat becomes unconscious. Confirm loss of consciousness by gentle toe pinch. If movement is observed, wait until a deeper plane of anesthesia is achieved before confirming loss of consciousness again. ! CAUTION If breathing becomes infrequent (<70 breaths per minute) or irregular or if there is an increased abdominal effort, reduce the isoflurane dosage level by 0.5%.

Blind orotracheal intubation • Timing 5 min
10 After loss of consciousness has been confirmed, change the path of the vaporized isoflurane airflow to the intubation stand. Then, place the rat on the intubation stand. Gently retract the rat's tongue with forceps to put the airway on slight tension to visualize the vocal chords. Blindly pass the 16gauge cannula, supported by a blunt curved stylet, through the vocal cords and into the trachea. The operator should feel the tactile feedback of the stylet running against the tracheal rings to confirm that the endotracheal tube is in the trachea. Remove the stylet while holding the endotracheal tube in place. Confirm the proper placement of the endotracheal tube by checking the presence of condensation on a dental mirror (Fig. 3a). c CRITICAL STEP If at least three intubation attempts are unsuccessful, use an anterior neck cutdown to directly visualize the trachea. First, place the rat on the metal base plate with the snout in the nose cone to continue to provide general anesthesia. Shave down the fur at the anterior neck and scrub with 4% chlorhexidine gluconate solution to disinfect. In a sterile manner, make a superior/inferior incision through the skin at the anterior neck. Dissect through subsequent muscle layers until the trachea can be visualized. Gently retract the sternohyoid and sternomastoid muscles with magnetic base retractors. Take care to not injure the carotid arteries that run lateral to the trachea. Now with the trachea visible for visual feedback, perform intubation with same technique as blind orotracheal intubation. ? TROUBLESHOOTING 11 Transfer the rat to the surgical workspace and connect the cannula to the ventilator (Fig. 3b).
c CRITICAL STEP For rats, set the ventilator to 80 breaths per minute using pressure-controlled ventilation with a peak inspiratory pressure limit of 14 cmH 2 O.
Preparation for surgery • Timing 2 min c CRITICAL A video of atrial pacemaker implantation can be found at https://www.youtube.com/wa tch?v=jo77J-F9WWM and a video of ventricular pacemaker implantation can be found at https://www. youtube.com/watch?v=dnz3ih0dmPU.
c CRITICAL Throughout endotracheal intubation, the ventilator controls the delivery of the inhaled isoflurane. 12 For ventricular implantation or left atrial implantation, place the animal in the right lateral decubitus position for left thoracotomy. For right atrial implantation, place the animal in the left lateral decubitus position for right thoracotomy. 13 Place small air-activated warmers in contact with the animal to provide a source of heat. c CRITICAL STEP The pacemakers are powered by wireless inductive power transfer. Any sheet of metal, such as a heating pad with a metal coil, within the power transfer area will impede proper power transfer. Therefore, use chemical means of heat to maintain the animal's body heat, such as air-activated warmers. 14 Retract forelimbs and hindlimbs and secure them anteriorly with tape (Fig. 3c). 15 Administer a subcutaneous injection of buprenorphine (0.01-0.05 mg/kg) with a 1:2 dilution of saline for preoperative analgesia. 16 Using clippers, shave a 4 × 4 cm area over the left/right chest between the left/right axilla and the abdomen. 17 Disinfect the shaved region with 4% chlorhexidine gluconate solution. Use a cotton swab to scrub the area.  Confirm placement of the endotracheal tube by condensation on the dental mirror. b, The endotracheal tube of the intubated rat is connected by the catheter to the ventilator at 80 breaths per minute on pressure control with a peak inspiratory pressure limit of 14 cmH 2 O to maintain anesthesia. c, Position the intubated rat on the surgical table covered with an absorbent pad. Shave and disinfect the chest area to the left of the sternum (shown in dotted gray outline). Place the ECG electrodes in the Lead II position to record ECGs and monitor heart rate throughout the procedure. Use a miniature spotlight to provide lighting into the thoracic cavity. Scale bar, 5 cm.
18 Place subdermal ECG needle electrodes in the Lead II configuration (left arm: ground; right arm: negative electrode; right leg: positive electrode). c CRITICAL STEP Recording an ECG throughout the duration of the surgery enables monitoring of the animal's health status and confirmation of capture during pacing threshold testing where the lowest voltage setting that can drive the heart rhythm is identified. 19 Lower the isoflurane vapors to 2% (vol/vol) during the surgery.
! CAUTION To prevent cardiotoxicity, use the minimum level of isoflurane that maintains a deep plane of anesthesia, which is especially important during longer procedures (>1 h).
Thoracotomy and cardiac exposure • Timing 5 min 20 Using sterile technique, don surgical gloves. 21 Cut an opening in a sterile drape approximately the size of the shaved area of the animal's chest. Place the drape over the animal to expose the surgical field. 22 The ideal point of chest entry is in the fourth intercostal space for ventricular implantations and the third intercostal space for atrial implantations~5-10 mm lateral to the sternum (Figs. 4a and 5a). Palpate for the area of maximum pulsation of the heart. For atrial or ventricular implantations, the incision point for entry is usually two or three intercostal spaces below the maximum pulsation point, respectively. 23 Make a curvilinear incision with surgical scissors over the chest~2 cm below the left axilla (Figs. 4b  and 5b). Carry the dissection through the skin and the muscle layer until the ribs and intercostal muscle are directly visualized. During dissection, stop any bleeding encountered by applying direct pressure over the area with either sterile cotton swabs or forceps. Alternatively, use electrocautery for hemostasis during subcutaneous dissection.
? TROUBLESHOOTING 24 To enter the chest, gently dissect the intercostal muscle with Metzenbaum scissors while grasping and retracting the rib above with forceps to lift the chest wall away from the lung (Figs. 4c and 5c).
As the intercostal muscle is dissected away into a thin layer, visualize the sliding lung and the pleural space. ! CAUTION Take care to not injure the lung upon entry with the Metzenbaum scissors by slowly and carefully making small incisions through the tissue. c CRITICAL STEP Dissect the intercostal muscle along the superior aspect of the ribs to minimize bleeding because the neurovascular bundles run along the inferior surfaces of the ribs. ? TROUBLESHOOTING 25 Upon entry into the pleural space, carefully extend the incision through the intercostal muscle with Metzenbaum scissors to create a 2-3 cm opening along the desired intercostal space. ! CAUTION Take care not to encroach onto the sternum so that the left and right internal thoracic arteries and veins are not injured. To avoid harming any other structures during this entry, gently push the lungs away, and point the tips of the Metzenbaum scissors up and away from the chest cavity.
? TROUBLESHOOTING 26 Place a small-animal rib spreader to retract the intercostal space open (Figs. 4d and 5d). Push the lungs down using a microspatula to avoid injury to the lung. 27 Gently retract the left lung posteriorly and secure it in place with a cotton swab so that the target implantation area of the heart is positioned in view. ? TROUBLESHOOTING 28 Gently open the pericardium and clear it away from the surface using forceps and cotton swabs. If more optimal positioning of the heart is required for device implantation, the heart can be gently maneuvered with cotton swabs or gauze.
Pacemaker placement • Timing 10 min 29 Along the ventral aspect of the thoracotomy incision, use blunt dissection to create a subcutaneous pocket to house the pacemaker's receiver (Fig. 5e). 30 Place the receiver of the pacemaker into the subcutaneous pocket so that the electrode pads are near the target implantation area and the thin stretchable connector that connects the electrode pads to the receiver intersects the intercostal space. c CRITICAL STEP When selecting the location for suture attachment, consider anatomical landmarks of the heart to avoid iatrogenic injury of the coronary arteries that may result in myocardial infarction or excessive blood loss. 31 Secure the device to the atrium or ventricle using a small caliber, nonabsorbable monofilament 6-0 polypropylene suture. Thread the suture through the electrode pad and throw a shallow stitch through the epicardium (Figs. 4e,f and 5f) at the target site of implantation. Then, pass the suture through the same electrode again. Tie down the suture.  Fig. 4 | Pacemaker implantation technique for attachment to ventricles. a, Palpate for the fourth intercostal space, which is usually two to three intercostal spaces below the most maximum pulsation from the heart. b, Using scissors, make a 4 cm curvilinear skin incision along the curvature of the ribs over the fourth intercostal space (pictured) and then dissect through the chest wall muscle. c, Using Metzenbaum scissors, carefully enter the pleural space while taking care not to injure the lung (pictured) and then extend the incision through the intercostal space anterior and posteriorly. d, Place a rib-spreader retractor to hold the rib space open. e, Gently hold the lung away from the heart with a cotton swab Secure the cotton swab in place with hemostats. Clear the pericardium from the heart with a cotton swab. Using a 6-0 suture, place sutures through the epicardium to secure the electrode pad of the pacemaker. f, Create a subcutaneous pocket using scissors. Secure the receiver of the pacemaker in the subcutaneous pocket. Remove the retractor to make sure there is no tension or excess length of the electrode. Inset shows schematic illustration of suture technique for attachment of the electrode pad to the heart (see e). g, Close the intercostal space with simple intermittent absorbable 4-0 sutures so that the serpentine electrode intersects the intercostal space and the receiver coil rests in a subcutaneous pocket. h, Close the muscle and skin incisions with running nonabsorbable 4-0 suture. Scale bars, 2 mm. c CRITICAL STEP Before placing any sutures, ensure that the side of the electrode interfacing with the heart is the conductive region of the device. ! CAUTION For atrial implantation, take extra care in ensuring that the pacemaker receiver is properly tucked in the subcutaneous pocket with the electrode positioned directly where it will be interfaced to the heart. As the atrial tissue is very thin and has a small surface area, extra care must be taken to not damage the tissue. ? TROUBLESHOOTING | Pacemaker implantation technique for attachment to right atrium. a, Palpate for the third intercostal space, which is usually two intercostal spaces below the point of maximum impulse from the heart. b, Using scissors, make a 3-4 cm curvilinear skin incision along the curvature of the ribs over the third intercostal space (pictured) and then dissect through the chest wall muscle. c, Using Metzenbaum scissors, carefully enter the pleural space while taking care not to injure the lung, and then extend the incision through the intercostal space anterior and posteriorly. d, Hold the lung away from the heart with a cotton swab. Secure the cotton swab in place with hemostats. Clear the pericardium from the heart using a cotton swab. e, Create a subcutaneous pocket with blunt dissection using Metzenbaum scissors while taking care to stay in the subcutaneous plane right under the dermis and avoid violating the peritoneum. Place the pacemaker receiver in the subcutaneous pocket. f, Using a 6-0 suture, place sutures through the right atrium to secure the pacemaker via the electrode pad. g, Close the intercostal space by placing a simple-interrupted 4-0 absorbable suture across the inferior and superior ribs while protecting the organs underneath with a metal spatula. The device electrode intersects the intercostal space. h, Close the intercostal space so that it is airtight. i, Close the muscle and skin incisions with running 4-0 nonabsorbable suture. Scale bars, 2 mm. 32 Repeat the same suturing steps for the adjacent electrode. 33 Briefly turn on the pacemaker with the power transfer system (NeuroLux) to visualize capture of the heart in the ECG to ensure successful contact at the tissue-electrode interface. ! CAUTION Pacing equipment is generally not sterile. Be sure to maintain a sterile field during this short test for capture of the heart in the ECG. ! CAUTION Perform more extensive threshold testing at the end of the operation after closure of the chest to minimize the amount of time during which the animal is anesthetized. c CRITICAL STEP Assuming that preoperative bench testing has confirmed the normal pacing functionality of the pacemaker, three possible pacing scenarios at this step indicate the fixation status of the pacemaker: (1) no pacing signal, (2) pacing stimulus is present but no capture and (3) capture. Assess the ECG signal to confirm whether there is pacing/capture. If there is no pacing (scenario 1), then contact between the active electrode area and the heart is lost. If there is pacing but no capture (scenario 2), then there is insufficient contact between the heart and the active electrode area. If the pacing is capturing the heart rhythm (scenario 3), then the electrode is well secured to the heart. Make adjustments to device placement and contact accordingly. ? TROUBLESHOOTING 38 Periodically pinch the toe gently until the rat retracts its foot, then extubate the animal and place it on a nose cone with 100% oxygen flow.
? TROUBLESHOOTING 39 When the animal regains sternal recumbency, return it to a clean home cage with food and water.
Monitor the animal for an additional 1-2 h in the home cage. Provide additional warmth with a heat lamp, heating pad or air-activated warmers.

? TROUBLESHOOTING
Postoperative blood draw • Timing 15 min per animal c CRITICAL The following steps describe how to collect blood and serum samples by performing a tailvein blood draw to assess serology and biomarkers of myocardial infarction and heart failure. c CRITICAL For myocardial infarction assessment, draw blood 3-6 h after surgery. For heart failure, draw blood 3 weeks after surgery. For serology assessment, draw blood every 2 weeks after surgery. 40 Prepare a heating pad and a nose cone for maintenance of a light plane of anesthesia. Drape an absorbent pad over the heating pad. 41 Induce general anesthesia using inhaled isoflurane vapors by placing the animal in an induction chamber with 2-3% (vol/vol) of isoflurane and an oxygen flow of 2 mL/min for several minutes until the rat becomes unconscious. 42 Move the rat onto the surface of the heating pad with its nose placed in the nose cone. Confirm that the rat is unconscious using a toe pinch. 43 To dilate blood vessels, place the tail of the rat into a container of warm water for 1 min. Dry the tail and wipe down with 70% ethanol. 44 Identify the lateral tail vein. Insert a 25-gauge sterile needle (or smaller) into the vein~two-thirds of the way down the tail. If additional vein entry is needed, proceed up the tail proximally. 45 Gently pull the syringe to draw out a sufficient volume of blood.
! CAUTION A rat's approximate total blood volume is 62 mL/kg. The maximum volume of blood drawn in one instance depends on the frequency of collection: 3% blood volume for every 3 d, 7.5% blood volume for every week, or 15% blood volume for every 2 weeks. 46 Once enough blood has been collected, remove the needle and apply gauze using slight pressure to ensure the bleeding has stopped. 47 Transfer the blood from the syringe into serum separator tubes. 48 Return the animal to its cage and monitor until recovery. Take care to ensure that any excessive bleeding is controlled. 49 For serum samples, spin the collected blood at 2,400g for 10 min at 4°C. j PAUSE POINT If necessary, store serum samples at 4°C overnight or freeze at −20°C for longerterm storage. 50 To assess for myocardial infarction, perform an ELISA of the serum samples for cTnI and/or CK-MB biomarkers using commercially available kits. To assess for heart failure, perform an ELISA of the serum samples for BNP-45 biomarkers with commercially available kits.
Recovery and postoperative monitoring • Timing 2+ d 51 Monitor the animal two times per day until recovery is complete. Continue with subcutaneous analgesic doses of buprenorphine (0.05 mg/kg) with a 1:2 dilution of saline every 12 h in the 48 h postoperative period. c CRITICAL STEP If the rats show any signs of distress-such as continued labored respiration more than 1 h after surgery or perioral or perinasal porphyrin discharge-continue to administer subcutaneous analgesic doses of buprenorphine (0.05 mg/kg) with a 1:12 dilution of saline every 12 h past the 48-h postoperative period. If animals present extended signs of discomfort, consider euthanization with the consultation of animal research facility staff. 52 Grade the behavior of each animal on the following scales for behavior and reactivity to handling.
Functional testing of pacemaker stimulation • Timing 30+ d 54 Induce general anesthesia using inhaled isoflurane vapors by placing the animal in an induction chamber with 2-3% of isoflurane and 2 mL/min oxygen for several minutes until the rat becomes unconscious. 55 Attach subdermal ECG needle electrodes to the animal in the Lead II configuration (left arm: ground electrode; right arm: negative electrode; right leg: positive electrode). 56 Wirelessly power the pacemaker. Observe the ECG signal trace and identify whether the pacemaker is capturing the heart rhythm. If there is no capture, increase the power. If there is capture, lower the power to the minimum threshold for capture. ? TROUBLESHOOTING 57 Once capture or device failure is confirmed, remove the ECG electrodes from the animal and gently return the animal to its home cage.
Echocardiography • Timing 15 min per animal, every 2 weeks for >8 weeks 58 Induce general anesthesia using inhaled isoflurane vapors by placing the animal in an induction chamber with 2-3% (vol/vol) of isoflurane and an oxygen flow of 2 mL/min for several minutes until the rat becomes unconscious. 59 Confirm loss of consciousness by gentle toe pinch. 60 Transfer the animal to the imaging stage. Affix the paws to the respective ECG electrodes on the imaging stage with tape to monitor the heart rate throughout recording. c CRITICAL STEP Maintain the heart rate between 300 and 350 bpm by adjusting the level of isoflurane vapors. Too much variance in heart rates between animals can affect the comparison between parameters. 61 Using clippers, shave the chest hair to the left of the sternum. Apply a hair removal gel using a cotton swab to further remove chest hair from the shaved area. c CRITICAL STEP Hairs on the chest may distort the ultrasound signal with noise. Ensure that as much of the chest hair in the area of interest as possible is removed. 62 Apply ultrasound gel to the probe. 63 Perform M-mode echocardiography of the left ventricle. Place the probe with the gel in parallel to the sternum so the gel is in direct contact with the skin in the shaved chest area. c CRITICAL STEP Over time, the skin may absorb some of the ultrasound gel. To ensure the highest quality signal, reapply ultrasound gel if there is not a sufficient layer of gel between the skin and the probe. ! CAUTION Wireless power transfer systems should not be applied to power the pacemaker during echocardiography measurements. The electromagnetic induction generated by the power transfer system distorts the functionality of the ultrasound imager. Otherwise, there is minimal distortion to the M-mode echocardiography image of the heart implanted with a pacemaker since the device is very shallowly attached to the heart. 64 Analyze the data using software to generate echocardiographic parameters, such as ejection fraction, stroke volume, fractional shortening, cardiac output, diastolic volume, diastolic diameter, systolic volume and systolic diameter.
Tissue collection • Timing 30 min per animal 65 Deeply anesthetize the animal using inhaled isoflurane vapors by placing the animal in an induction chamber with 5% (vol/vol) of isoflurane at 2 mL/min oxygen flow for several minutes until the rat becomes unconscious. 66 Confirm adequate anesthesia by toe pinch. 67 Make an incision just below the sternum and enter the thoracic cavity through the diaphragm. 68 Harvest the heart by gripping the lungs and cutting at the base of the heart to achieve euthanasia by exsanguination. 69 Cannulate the excised heart via the aorta. 70 To fix the heart end-diastole, retrograde perfuse University of Wisconsin cardioplegic solution followed by perfusion of neutral buffered formalin (10% (vol/vol)) at a maximum of 5 ml/min to avoid tissue damage. 71 Store the hearts in neutral buffered formalin (10%) in at a volume at least 5× the tissue volume for 24 h at room temperature (20-22°C). Then, switch the storage solution to 70% ethanol and store at 4°C. For the average rat heart, we suggest fixation and storage in at least 15 mL of solution. j PAUSE POINT Fixed tissues can be stored at 4°C in 70% ethanol for several months before paraffin embedding for histology.

Histology (3+ d)
72 Embed heart samples in paraffin and section into cross-sections 27 . 73 Process samples with Masson's trichrome staining 27 . 74 For Masson's trichrome staining, quantify the volume fraction of myocardium, collagen and interstitial space near the site of device attachment using our custom MATLAB software, which can be found on Github: https://github.com/optocardiography/massonstrichromequa ntification

Troubleshooting
Troubleshooting advice can be found in Table 1. Ensure that the positioning of the rat is optimized and that the neck is adequately extended. If the neck is flexed, this position will create a curved trajectory for the endotracheal tube, which makes it more difficult to pass into the trachea. If the positioning has been optimized but intubation is still unsuccessful, an anterior neck cutdown to visualize the trachea can be performed Inadvertent intubation of the esophagus Point the tip of the intubation stylet slightly upward as the stylet is passed behind the tongue to create a 90°angle between the stylet and the plane of the vocal cord/tracheal opening. To help estimate the location of the airway, shine a bright light onto the neck of the rat on the intubation stand and look down the rat's throat to illuminate the vocal cord opening Insufficient sedation for intubation Animal was not exposed to a long enough duration of isoflurane vapors in the induction chamber, the oxygen flow rate of the anesthesia machine was not high enough or the path of the airflow is not set to the intubation stand Check that isoflurane supply level is sufficient and that the oxygen flow rate is at 2 L/min. Verify that the path of the airflow is set to the intubation stand

23, 24
Bleeding Incision is too close to capillaries Disposable cautery pens are the instrument of choice in stopping bleeding and should be used liberally when gaining entry to the chest. If cauterizers are not available, application of direct pressure with cotton swabs can also stop bleeding 24 Injury to the lung Operator inadvertently incised the edge of the lung in the process of opening the chest wall, entrapped the lung with the rib retractor or damaged the lung with aggressive use of cotton swabs while retracting the lung or clearing the epicardial membrane Minor lung injuries typically heal spontaneously without any additional intervention. If there is a noticeable air leak from a lung injury, attempts to seal the leak can be made by placing a small piece of blood clot or membranous tissue, such as the discarded pericardium, over the area. In the case that an air leak is visible (bubbling from the injury) or audible, most attempts to seal the leak will not be successful. If the leak persists and the rat develops a pneumothorax-visible increasing air accumulation under the skin-after the chest has been closed, the rat should be killed. In our experience, placing a chest tube in an attempt to evacuate the pneumothorax does not improve respiratory status or survival 24 Atelectasis (lung collapses and turns from light pink to red) Gentle handling of the lungs by the operator It is normal and expected that the lung will collapse (atelectasis) and turn from light pink to red after gentle handling. Operators should not be alarmed 25 Injury to the internal mammary artery Thoracotomy incision traverses too close to the midline Quickly press the cotton swab firmly against the chest wall or clamp down on the bleeding vessel with the hemostats for several minutes to stop the bleeding 27 Difficulty viewing target implantation area on heart Poor exposure Extend the incision posteriorly toward the shoulder or expand the rib retractor more fully. If the desired segment of the heart is not in full view with the standard methods and limited exposure makes it technically difficult to implant the device, enter another rib space above or below the current level. Take care to not fracture

Anticipated results
Recent innovations in materials science and bioelectronics have led to the development of a new generation of miniature organ conformal bioelectronic devices 28 . Previously, cardiac device validation and device-enabled cardiac physiology studies were performed in large animals, such as dogs 29 , pigs 30 and goats 31 . However, large-animal models present issues with high costs, low throughput, greater ethical concerns and the inability to edit the genome. In contrast, rodents offer a versatility in genetic engineering that is critically important in studies of the basic mechanisms of numerous diseases well beyond the cardiovascular field. The procedure presented herein enables fully conscious in vivo rodent studies of arrhythmia, heart failure and pacemaker-induced structural and functional remodeling. In the following sections, we describe and present illustrative results obtained after processing a cohort of rats through the entire protocol.

Devices become well-incorporated into the tissue in a biocompatible manner
The composition of the transmural myocardium did not significantly change when rats were implanted with devices for 3 weeks, but there was a significant increase in fibrosis after 6 weeks of implantation (P < 0.05) (Fig. 6a,b). This increase in fibrosis is expected when any kind of device made of a foreign material is implanted into an organ. Importantly, there were no changes in the myocardial volume fraction of the cardiac tissue, which demonstrates that the procedure and the device do not impair the cell composition of the tissue that is critical to cardiac function.

Surgery does not impose systemic effects or impair animals' regular behavior
The rats had an initial average loss of 6% body mass in the first 3 d after surgery, but all animals regained their preoperative weight by postoperative day 6, which was followed by steady weight gain in the following weeks (Fig. 6c). Scoring of the animals' behavior and reactivity to handling in the 10 d following surgery showed that there was moderate impairment of the animals' mobility and reactivity to handling in the first 48 h following surgery. However, after postoperative day 2, the animals recovered to their preoperative behavior ( Supplementary Fig. 3). Overall, these systemic changes were expected after undergoing a major surgical procedure. The rapid recovery of the animals to normal weight and behavior postoperation demonstrates that the procedure does not cause impairment of regular behavior.

Implantation procedure does not induce significant injury to the heart
If cardiac ischemia is induced, cTnI and CK-MB levels are expected to peak 3-6 h following surgery. If heart failure is induced, levels of BNP 45 are expected to rise in the weeks following surgery 32 . The ELISA results demonstrated that BNP 45 levels were not significantly different before and after either atrial or ventricular implantation surgery (Fig. 6d,e and Supplementary Fig. 4). In addition, a separate ELISA revealed that cTnI levels were higher than the clinical threshold for myocardial ischemia (0.04 ng/mL), which is expected since the cardiac tissue is being handled and punctured during surgery. Last, using another ELISA showed that CK-MB levels are not statistically significantly different among control, sham and animals implanted with pacemakers ( Supplementary Fig. 5). Therefore, the procedure does not cause significant injury to the cardiac tissue.

Pacemaker implantation does not compromise cardiac mechanical function
A healthy ejection fraction (EF) range for rats is 50-70% (ref. 33 ), and an EF lower than 50% indicates impairment of mechanical cardiac output. Using this protocol, no significant changes were detected in any echocardiographic parameters when comparing timepoints before and after surgery, including EF (Fig. 6f), stroke volume (Fig. 6g), end diastolic volume and diameter, fractional shortening, end systolic volume and diameter, or cardiac output ( Supplementary Fig. 6). Therefore, the echocardiography results show that the normal mechanical function of the heart is not compromised.  Friedman test, P, 0.3673. Post-hoc Dunn's multiple comparison test, α = 0.05. In b-g, values are reported as mean ± standard deviation. In b, n = 3 biologically independent animals per group. In d,e, n = 4 or 6 biologically independent animals per group. In c, n = 6-12 biologically independent animals per day. In f,g, n = 4-5 biologically independent animals for each experimental group.
Reliable interfacing between pacemaker and heart enables long-term capture of the heart Atrial activation was achieved by devices that were attached to the right atrium, which was confirmed by pacing peaks at the P wave of recorded ECG signals (Fig. 7a). Ventricular pacing was accomplished by devices that were sutured to the ventricles, as evident from widened and higher amplitude QRS complexes during capture compared with during sinus rhythm (Fig. 7b). Cardiac pacing in freely moving, conscious animals was successfully performed, as demonstrated in ECGs by a conversion of sinus rhythm to a paced rhythm while animals were freely roaming within their cages (Fig. 7c). Implanted devices reported here pace for up to 32 d (Fig. 7d), which is enabled by firm and reliable contact between the device and myocardium (Fig. 7e). Therefore, implantation can be achieved with this technique for a variety of pacing configurations to allow for diverse anatomical sites (atrial versus ventricular pacing), different animal behaviors (freely moving, fully conscious animals) and a range of pacing timelines (acute and chronic).

Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.  Fig. 7 | Long-term in vivo pacing following pacemaker implantation. As is standard in clinical pacemaking, we wirelessly powered the implanted pacemakers while recording an ECG to determine from the ECG signal pattern if the heart rhythm could be captured by the pacemaker. a, ECGs recorded from animals with pacemaker electrodes attached to the right atrium the day following surgery show pacing spikes at the P wave that drives increased heart rhythm. b, ECGs recorded from animals with pacemaker electrodes attached to the ventricle the day following surgery demonstrate paced QRS complexes that drive the increased heart rhythm. c, Live stimulation setup where stimulation was delivered via wireless inductive power transfer system and ECGs were recorded using LabChart software. ECGs recorded from nonanesthetized animals immediately following surgery show conversion from sinus rhythm to a paced rhythm when electrical stimuli were delivered by the pacemaker. d, ECG traces show conversion from the normal sinus rhythm to paced beats for up to 32 d following surgery when electrical stimuli were delivered by the implanted pacemaker. e, Explantation of a pacemaker 1 week after surgery shows that the device was well incorporated into the body at the subcutaneous and intercostal space. In addition, electrode pads were still well secured to the heart. Red arrows indicate when an electrical stimulus was applied to the heart via the electrodes. The strength of the electrical stimulus was adjusted for each animal as the minimum electrical energy required to see a capturing paced rhythm on the ECG. Scale bars, 2 mm.

Data availability
The raw data that support the results in Fig. 6b-g, Extended Data Fig. 1 and Supplementary Figs. 1-6 can be found in Supplementary Information.

Code availability
Our custom MATLAB software for quantification of our Masson's trichrome histology images can be downloaded for free at Github: https://github.com/optocardiography/massonstrichromequantifica tion.
Extended Data Fig. 2 | Open thoracic implantation technique for biventricular pacemaker implantation. a, Electrodes of biventricular pacemaker positioned onto ventricle of Langendorff-perfused mouse heart. Scale bar, 5 mm. b, Electrodes of the biventricular pacemaker sutured onto left and right ventricles during implantation surgery. Scale bar, 5 mm. c, Anterior and d, cross-sectional CT visualization of the biventricular pacemaker placed within a rat's anatomy.
Extended Data Fig. 3 | Implantation of miniature battery-free wireless pacemakers using hydrogel adhesive. a, This technique allows for pacemakers to be attached with adhesives. Following opening of the chest, the pacemaker is affixed to the epicardial surface of the ventricles with a soft injectable bioadhesive. UV light is used to illuminate the bioadhesive to cure and secure the electrode pad in place. Scale bar, 5 mm. b, ECG traces of animals implanted with pacemakers were recorded daily postoperation. Pacemakers were able to capture and drive the heart rhythm for up to 8 d postsurgery.