Article | Open | Published:

# Autonomous robotic searching and assembly of two-dimensional crystals to build van der Waals superlattices

## Abstract

Van der Waals heterostructures are comprised of stacked atomically thin two-dimensional crystals and serve as novel materials providing unprecedented properties. However, the random natures in positions and shapes of exfoliated two-dimensional crystals have required the repetitive manual tasks of optical microscopy-based searching and mechanical transferring, thereby severely limiting the complexity of heterostructures. To solve the problem, here we develop a robotic system that searches exfoliated two-dimensional crystals and assembles them into superlattices inside the glovebox. The system can autonomously detect 400 monolayer graphene flakes per hour with a small error rate (<7%) and stack four cycles of the designated two-dimensional crystals per hour with few minutes of human intervention for each stack cycle. The system enabled fabrication of the superlattice consisting of 29 alternating layers of the graphene and the hexagonal boron nitride. This capacity provides a scalable approach for prototyping a variety of van der Waals superlattices.

## Introduction

The family of exfoliatable and functional two-dimensional (2D) crystals1,2,3,4 is rapidly growing, exhibiting various electronic properties such as ferromagnets5,6, semiconductors7, superconductors8, and topological insulators9. Recent advancements of 2D crystal research were enabled by key technological breakthroughs, including mechanical exfoliation and the assembly of van der Waals (vdW) heterostructures1,2,3. The precise interface controllability and wide choice of materials with various electronic properties enable vdW heterostructures to have high technological potentials that cannot be achieved by conventional semiconductor heterostructures10,11,12. Subsequently, technological improvements in visualization13,14,15,16 and mechanical transfer17,18,19,20 techniques have been implemented to meet the demands for various vdW heterostructures for fundamental scientific and device application research10. However, the basic manufacturing processes have relied on the manual operation of the experimental apparatus. In principle, the expected time needed to fabricate a vdW heterostructure consisting of N layers scales as (A + B)N × (1 − p)N, because the time needed for finding atomically thin 2D flake scales as AN, that for stacking the 2D crystals as BN, and the expected number of trials for successful fabrication is $$E\left[ {p,N} \right] = {\sum }_{k = 1}^\infty k(1 - \left( {1 - p} \right)^N)^{k - 1}\left( {1 - p} \right)^N = \left( {1 - p} \right)^{ - N}$$, where p is the probability of failure per transfer. When we estimate A = 20 min, B = 20 min, and p = 6%, which can be an optimistic value even for a well-trained researcher, the time required to complete N = 29 vdW heterostructure counts up to ~120 h of successive process. Performing such repetitive manual tasks is practically impossible.

Furthermore, the recent emergence of oxygen-sensitive functional 2D crystals, such as black phosphorous21,22, niobium diselenide23, and chromium triiodide5, into the building block family of vdW heterostructures requires that the fabrication environment change from ambient conditions to the inert atmosphere enclosed in the glovebox. The reduced operability of the experimental apparatus in the glovebox enclosure further increases A, B, and p, thus limiting the complexity of vdW heterostructures within the feasible manufacturing steps. The most complicated vdW heterostructure reported to date is composed of 13 alternating layers of MoS2, graphene, and hBN24, which was attained after the days of manual operation11. Research on vdW heterostructures is currently at the crux of the increasing demand for higher complexity and the reduced fabrication feasibility. Obviously, a technological breakthrough is needed to solve the problem.

In the fields of biology, pharmacology, and chemistry, robotics and computer-vision technologies are now replacing manual experimental procedures, such as pipetting, specimen handling25, and optical microscopy26, thereby bolstering the scientific discovery potentials27. A key time has thus arrived for leveraging automation in the vdW heterostructure fabrication. Without automation, progress in vdW heterostructure research will stall, and the so-called dreamscape of designer materials comprised of vdW superlattices11 will remain unrealized. Moreover, researchers will be encumbered by the endless tasks required for vdW heterostructure fabrication. To date, some technological components for automation have been proposed, such as image analysis algorithm for segmenting graphene flakes on SiO2/Si28, and layer by layer stacking techniques of CVD-grown 2D crystals29. However, the automated robotic fabrication of vdW heterostructures has yet been realized, which is presumably because of the high technological hurdles for integrating vdW heterostructure fabrication, computer vision, and robotic technologies.

Here, to solve the problem we report on the development of an autonomous robotic system for the assembly of vdW heterostructures, which we refer to as a 2D materials manufacturing system (2DMMS). The system was assembled in the glovebox enclosure with inert gas atmosphere. The system can autonomously detect 400 monolayer graphene flakes per hour with a small error rate (<7%) and stack four cycles of the designated two-dimensional crystals per hour with less than few minutes of human intervention for each cycle. The system enabled fabrication of the superlattice consisting of 29 alternating layers of the graphene and the hexagonal boron nitride. This capacity provides a scalable approach for prototyping a variety of van der Waals superlattices.

## Results

### The system architectures and functionalities

Computer-assisted design (CAD) schematics of the proposed 2DMMS system are shown in Fig. 1a, and their photographs are presented in Fig. 1c–e. The functionalities of the system are schematically presented in Fig. 1b. First, the automated high-speed optical microscope with motorized XY scanning stage scans the surfaces of SiO2/Si chips, the optical microscope images are analyzed by computer-vision algorithm, and discerns whether targeted 2D crystals are present in the image or not (Supplementary Movie 1). When 2D crystals are detected, their positions and shape parameters are recorded in a database (Supplementary Movie 2), resulting in an immense catalog of available crystals. By choosing the crystals from the catalog using customized CAD software, the combination, relative positions, and crystallographic orientations of the 2D crystals are designed. Finally, the design is transferred to the stamping apparatus, and robots directed by the computer-vision algorithm assemble the vdW heterostructures layer by layer onto a polymer stamp through the vdW force (Supplementary Movies 35).

### Fabrication of van der Waals superlattices

To demonstrate the fabrication of vdW superlattice structure using 2DMMS, we performed the following procedure. First, we exfoliated graphite and hBN crystals on centimeter-sized SiO2/Si chips. SiO2/Si chips2,3 were loaded to the enclosure, tiled on the chiptrays and then scanned by the optical microscope. By searching 36 (11) SiO2/Si chips, we could detect 4600 (2000) graphene (hBN) flakes, whose positions and shape parameters are recorded in a database. Then, we choose the building block graphite and hBN flakes as shown in the left panels of Fig. 2a. The order, relative positions, and crystallographic orientations are designed simultaneously on the computer screen. The SiO2/Si chips were annealed in the Ar/H2 atmosphere at 600 °C for 3 h in the quartz furnace built inside the secondary glovebox connected to the main glovebox. Then we set the chiptrays to the stamping apparatus and ignited the assembly process. The robotic arm equipped with non-contact chuck transferred the SiO2/Si chip to the motorized XYZ stage (Supplementary Movie 3). The stage was heated to 80 °C. The optical microscope and the glass plate with polymer stamp was set over the SiO2/Si chips by the motorized linear stage. At this stage, the optical microscope is usually located away from the targeted 2D crystal flake. The optical microscope image was analyzed by the computer-vision algorithm, and XYZ stage was automatically navigated to align the targeted 2D crystals (Supplementary Movie 5). The SiO2/Si chip was lifted, and the targeted 2D crystal was contacted to the 2D crystal on the polymer stamp. The targeted 2D crystal adhered each other through the vdW force. The SiO2/Si chip was lowered, thereby picking up the targeted 2D crystal. The SiO2/Si chip was unloaded to the Si chip tray by the robot arm. The procedures between SiO2/Si chip loading and unloading were repeated until the designated vdW superlattice was formed.

The completed vdW superlattice was dropped onto SiO2/Si chip (the procedure is described in the Methods section). Finally, we obtained the vdW superlattice as shown in Fig. 2b. The right panels in Fig. 2a show the line-edges of G and hBN flakes extracted during the assembly process. The overlaid images (Fig. 2c) enable clarification of the positions of G and hBN flakes. The total machine operation time was less than 32 h, and the total human involvement for operation was less than 6 h (the breakdowns of the tasks are summarized in Supplementary Tables 1 and 2).

In addition, the system produced various vdW superlattices: trilayer graphene (Fig. 3a), a graphene/hBN Moiré superlattice (Fig. 3b), an hBN tunnel device (Fig. 3c), monolayer tungsten disulfide contacted by graphene (Fig. 3d), and twisted monolayer–bilayer graphene (Fig. 3e). The devices exhibited the highest transport and optical properties19,30,31,32,33,34 (Supplementary Notes 14), and (Supplementary Figures 1215), which demonstrated that the proposed system provides a practical approach for fabricating vdW superlattices11.

### The points of developments

To realize the above functionalities, two key developments were achieved: first, the automated microscopy, and second, the stamping apparatus, both of which were autonomously conducted by computer-vision algorithms. The basic requirements in the automated microscopy were detecting atomically thin 2D crystals with a sufficiently small false detection rate, and the recording capability of the shapes and position parameters to comprise the searchable catalog. The basic requirement in the stamping apparatus was the automated addressing capability of the designated 2D crystals to the stamp. The use of metal alignment marks must be avoided for the SiO2/Si substrates on which the starting 2D crystals were exfoliated because it contaminates surface and restricts the thermal cleaning capability35. On the other hand, the fabricated vdW heterostructure should be transferred onto the SiO2/Si with metal alignment marks for further processing.

We fulfilled the requirements by implementing the following innovations: first, the image processing pipeline to distinguish 2D crystals that are robust to the contaminating material that forms in the exfoliation processes. Second, the global positioning system of the exfoliated 2D crystals without use of pre-patterned alignment masks. And third, the integrated information system that runs these algorithms on our developed robotic system.

### Image processing pipeline to distinguish 2D crystals

In Fig. 4a, we present the developed image processing pipeline to distinguish 2D crystals. The figure additionally shows the optical microscope image of monolayer graphene on SiO2 (Fig. 4b) and the outputs of the algorithms (Fig. 4c–h). The pipeline was composed of the double-filtering process based on the color contrast and the information entropy. This was necessary because the simple application of the previously reported algorithm28 to the microscope images resulted in a small percentage of true detection (<50%), which was derived mainly from the contaminating materials of colors similar to those of atomically thin 2D crystals (Supplementary Note 5 and Supplementary Figure 16).

First, the image processing pipeline was split into the color and entropy thresholding (Fig. 4a). In color thresholding, we apply the function to the acquired image IH,S,V(x, y) as $${ f_{{\mathrm{thresh}}}\left( {x,y} \right) = \left\{ {\begin{array}{*{20}{l}} {1,} \hfill & {C^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}} - D^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}}{\mathrm{/}}2 \le I^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}}\left( {x,y} \right)}\hfill \\ \hfill & {- I_{{\mathrm{BG}}}^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}} \left( {x,y} \right) \le C^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}} + D^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}}{\mathrm{/}}2} \hfill \\ {0,} \hfill & {{\mathrm{otherwise}}} \hfill \end{array},} \right.}$$ where $$I_{{\mathrm{BG}}}^{{\mathrm{H}},{\mathrm{S}},{\mathrm{V}}}\left( {x,y} \right)$$ is the background image of SiO2/Si without 2D crystals (recorded manually before starting the automated search), and CH,S,V and DH,S,V are the parameters (Supplementary Table 3) adjusted by the procedure described in the Methods section. This procedure extracts the region of atomically thin 2D crystals (Fig. 4g). However, the regions other than targeted crystals—corrugated crystals and scotch tape residues—remain in the segmented image (white arrows in Fig. 4g). Then, we apply entropy thresholding. To depict the effects, Fig. 3i shows the local information entropy H calculated with a mask size of 9 × 9 (pixels)2 from the image in Fig. 3c. The line cuts of Fig. 3i at Y = 200, 400, and 600 pixels are shown in Fig. 4j. As indicated by the black arrows in Fig. 3i, j, the regions of contamination, as described above, have a larger H than those of exfoliated 2D crystal flakes.

Therefore, to eliminate the regions with a large H, we assembled the pipeline using the following procedure. First, edge detection was applied to a grayscale image (Figs. 4c, d). The morphology operations were then applied to fill the regions surrounded by the edges (Fig. 4e). We then calculated the entropy $$H = - \Sigma _{i = 0}^{255}P_i{\mathrm{log}}_2P_i$$ of the grayscale image for each region, where P i is the gray value histogram of the pixels which belong to the region. By selecting regions with smaller entropy than the threshold value H ≤ UEntropy, the regions with contaminating objects were eliminated (Fig. 4f, Supplementary Notes 5 and 6) and (Supplementary Tables 4–6). Finally, by taking the intersection between the color-threshold and entropy-threshold regions (Fig. 4h), we could extract the region containing targeted 2D crystals from the optical microscope image. When any regions existed with areas larger than threshold Larea ≤ S(n), the pipeline discerned that 2D crystal flakes were present in the acquired image.

### Results and performance metrics of automated searching system

After equipping the automated microscope system with the presented pipeline, we conducted automated searching for graphene and MoS2. The performance metrics are presented in Fig. 4p. The system analyzed 12,000 images per hour and identified more than 400 monolayer graphene flakes per hour, with a sufficiently low false detection rate of <7%, while distinguishing the layer numbers. To demonstrate the proposed algorithm’s capability of detecting 2D crystals, in Fig. 4k–o we show the representative outputs of its detection (bottom rows) applied to monolayer graphene (Fig. 4k, l), monolayer MoS2 (Fig. 4m), a few layers of WS2 (Fig. 4n), and five-layer hBN (Fig. 4o). Note that the regions of the targeted 2D crystals are successfully partitioned, while the contaminating objects are removed. Thus, the system is also applicable for finding MoS2 flakes (Fig. 4p).

Owing to the above feature, we could collect big data, including the size distribution of exfoliated crystals, as presented in Fig. 4q, r. The acquired information (optical microscope images, positions of the XY stage and objective lens, and shape features) were recorded in the database. Finally, the system captured the optical microscope images of the detected 2D crystals with objective lenses of various magnifications (×20, ×10, and ×5), which were later utilized to locate 2D crystals in the stamping process.

### CAD of van der Waals superlattices

When the automated searching process is completed, the database comprises a large list of exfoliated 2D crystals on SiO2/Si, which is sortable by the arbitrary extracted features, such as the area, rectangularity, anisotropy, and compactness36. Therefore, one can select the favorable 2D crystals from the catalog of 2D crystals. By stacking the previewed 2D crystals (Fig. 5c) on each other (Fig. 5b, d), the vdW superlattice is designed. In this step, the order, relative angles, and positions of the 2D crystals are designed, which is assisted by dynamic edge extraction (Fig. 5d) and the edge angle fittings (Fig. 5e, and Supplementary Figure 19). The vdW superlattices presented in Fig. 2b and Fig. 3 were designed in this way.

### Assembly of van der Waals superlattices

After completing the vdW superlattice design, the component 2D crystals were assembled by the automated stamping system using a polymer stamp on a glass slide (Fig. 6a). At this stage, the essential problem we had to solve was to establish a reliable alignment method of the targeted 2D crystals. In general, after loading the SiO2/Si chip to the stamping apparatus, the optical microscope is usually positioned away from the targeted 2D flake. In the manual operation, locating small-sized 2D crystals (typically 10 × 10 μm2) in large SiO2/Si chips (typically 10 × 10 mm2) is a remarkably challenging task. In particular, in the case when SiO2/Si chips are rotated from the original angle, which often becomes the case for aligning the crystallographic angles of 2D crystals, the diminished cognitive ability of the operators results in exponentially increased times needed for the alignment.

Without implementing an automated alignment, the fabrication of superlattice structures (Fig. 2b) is not feasible. Based on this background, we developed the global positioning system of 2D crystals on SiO2/Si substrates. The key idea was utilization of the shapes of the randomly distributed 2D crystals as a unique fingerprint pattern identifying the current position of the optical microscope. Accordingly, we leveraged the weak point of the mechanical exfoliation process—randomness—as an advantage in the positioning.

The alignment procedure is schematically presented in Fig. 7a–c. First, we capture the optical microscope image at the present position and extract the edges of the 2D crystals. The extracted edge patterns are matched with those stored in the database (Fig. 7a). Since the template images are recorded with their position information $$\left( {x_{{\mathrm{temp}}}^i,y_{{\mathrm{temp}}}^{\mathit{i}}} \right)$$, we can calculate the offset from the current position to the targeted 2D flake $$\left( {x_{{\mathrm{target}}}^i,y_{{\mathrm{target}}}^{\mathit{i}}} \right)$$ from the results of matching (I, and θ) (Fig. 7b). The representative results of matching are presented in (Fig. 7d–e).

After completing the above process, we move the optical microscope to the targeted 2D crystal flake within a lateral error of ~300 μm. This procedure enables rapid addressing of targeted 2D crystals within 1 min (Supplementary Movies 4 and 5). When the automated alignment process is completed (Fig. 7c), the targeted 2D crystal is brought to the center of the optical microscope within a lateral error of 10 µm (Fig. 7f–i, Supplementary Figure 20, and Supplementary Figure 21). The human operator is requested to confirm the alignment position before the process proceeds further. If it is needed, the operator can manually override the alignment and perform fine tuning using the alignment assistance tools presented on the computer screen (described in the Methods section). Then, the 2D crystal is lifted by applying a polymer stamp (Fig. 7j, k). This process is repeated by changing SiO2/Si chips (Supplementary Movie 3). To avoid manually handling the centimeter-sized SiO2/Si chips in the glovebox, SiO2/Si chips are changed with a programmed robotic arm equipped with a Bernoulli-type floating chuck with N2 gas flow, which prevents mechanical distortion of the 2D crystal SiO2/Si chip (Supplementary Movie 3).

## Discussion

The fabrications of the vdW superlattice structures presented in Figs. 2 and  3 was achieved by implementing the above technologies. Here, we would like to discuss the current limitations of the setup as well as the outlook for the future improvements. These can be split into three technological groups: the stamping process, the alignment, and the human intervention. First, in the stamping process, the formation of blisters between 2D crystals are not fully avoided (Supplementary Note 4). To solve the problem, the improvements in the stamping process, such as the hot pick-up method37, needs to be implemented. Second, the final alignment accuracy gained after using the alignment assistance tool becomes less than ±1° and ±1 μm, respectively (Fig. 7). However, to achieve this accuracy, manual alignment process is needed (Supplementary Notes 811). This process needs to be automated in the future developments of the image detection algorithm and error handling schemes. Third, for the human intervention, the exfoliation and final transfer was performed manually outside the glovebox. To automate these procedures, robotic systems for exfoliation, wafer cleaning, and Si chip tray transfer between the components, etc. will be needed. The recent rapid developments in the machine learning and computer-vision algorithms might help realizing these technologies.

In summary, we developed the autonomous robotic system for searching 2D crystals and assembling them into vdW heterostructures. Because this system is contained in a glovebox, the system can handle oxygen- and humidity-sensitive 2D crystals, such as black phosphorous21,22 and niobium diselenide23. In addition, the system is in principle applicable to the assembly of heterostructures from CVD-grown 2D crystals (Supplementary Note 12). The wider material design freedom enabled by our system offers unprecedented opportunities for exploring the full potential of vdW heterostructures. By this development, we can reduce the human intervention involved in the vdW heterostructure fabrication by orders. We believe that this work free up researchers from repetitive tasks and letting them to focus on more intellectually creative tasks. Therefore, this is a fundamental step forward to realizing the dreamscape of artificial materials by vdW heterostructures. With respect to the materials aspect of vdW heterostructures, the digital nature of the materials properties of 2D crystals and the wide choice of combinations for vdW heterostructures have good compatibility with the information-processing algorithms of machine learning and Bayesian statics38, which will open new trajectories of combinatorial materials research on vdW superlattices.

## Methods

### Hardware and software design

Because no manufacturer provides the proposed system in its entirety, we were required to integrate (Supplementary Figure 1) a large number of hardware components (Supplementary Figure 2) and develop the software system (Supplementary Figure 3). The hardware units involved in this system are connected to a Linux workstation via conventional communication interfaces (USB, RS-232C, camera link, and Ethernet).

Our customized software system was written in C++ and Python. The source code is publically available under an open source license at the code repository (https://github.com/tdmms/tdmms). The researchers interested in this work can download the source code from the GitHub and they can compile the code on their own computers. In addition, the researchers can join the software development using the social interfaces of the code repository.

The software runs with the aid of software frameworks from the Robotic Operating System39, which provides a flexible inter-node messaging framework, enabling modular-based software assembly, which supports our system’s robustness against changes in algorithms, hardware components, and conflicts between human and computer commands. The graphical user interface (GUI) was constructed using the QT4.0 GUI toolkit. The GUI was carefully designed to minimize human intervention so that the searching, design, and assembly of 2D crystals are executed with only a few clicks. Image processing algorithms were built on the HALCON framework (MVTec Software GmbH) and Open CV.

### Connectivity of the hardware components

In order to provide the information on the hardware connectivity, we present in Supplementary Figure 2 the connectivity diagram between the hardware components utilized in the system. This schematic describes the complete logical connection between the hardware components. By replicating the hardware connection and installing the software, the other researchers can reproduce the functionalities presented in this paper. However, at the same time, we must admit that providing the full and concrete description of the hardware system is virtually impossible because the system includes many hand-crafted parts. Therefore, we would like to ask the researchers who are interested in replication of this system to contact the author directly.

### Automated searching system (2DMMS-Finder)

Supplementary Figure 4A shows the CAD schematics of our automated optical microscope system. The system is composed of a high-speed XY scanning stage, automated focusing system, and CMOS camera. The system can capture optical microscope images of SiO2/Si chips every 80 ms, while moving in the XY stage. Supplementary Figure 4B schematizes the system’s operational flow diagram. First, the entire region of an SiO2/Si chip tray is scanned with an objective lens of the smallest magnification (×5), and our image processing algorithm extracts the positions of SiO2/Si chips, as detailed in the following section.

Second, the system records alignment images, which are later utilized to restore the positions of the 2D crystals in the stamping apparatus. Third, the objective lens is switched to a higher magnification (×50), and optical microscope images are captured while incrementally moving the SiO2/Si chips. At each step, our image processing algorithm analyzes the optical microscope images and determines the presence of the targeted 2D crystals. When a 2D crystal is detected, the detected region is moved to the center of the optical microscope.

The program then checks whether there are duplicate data in the relational database according to the position of the XY stage. If no duplicate data are found, the information (optical microscope images, positions of the XY stage and objective lens, and shape features) are recorded in the database. By this process, we avoid generating duplicate records of the same 2D crystal. Finally, the optical microscope images of detected 2D crystals are recorded with objective lenses of various magnifications (×20, ×10, and ×5). The information is later utilized to locate 2D crystals in the 2DMMS-Stamper.

### Method of tuning the thresholding parameters in 2DMMS-Finder

In Supplementary Figure 5A, a representative optical microscope image of monolayer and bilayer graphene on SiO2/Si is shown. The values of the hue-saturation-value channels of Supplementary Figure 5A are shown in Supplementary Figure 5B–D, respectively, and the line cuts of each channel are shown in Supplementary Figure 5E–G, respectively. From this plot, the parameters utilized in Supplementary Figure 5 for extracting monolayer graphene and bilayer graphene are selected as (CH, DH; CS, DS;CV, DV) = (0, 10; −8, 8; −10, 4) and (0, 10;−14, 8; −19, 4), respectively (Supplementary Table 3).

### Automated extraction algorithm for the positions of SiO2/Si chips in 2DMMS-Finder

Supplementary Figure 6A shows schematics for the image processing algorithm used to extract the number and positions of SiO2/Si chips. The XY stage is incrementally moved, and the images are acquired. The acquired images are then converted to grayscale images as Igray(x,y) = 0.299IR(x,y) + 0.587IG(x,y) + 0.114IB(x,y), where IR, IG, and IB are the intensities of the red, green, and blue channels, respectively. The acquired images are then tiled into a single image (Supplementary Figure 6B), and a threshold is applied: $$f\left( {x,y} \right) = \left\{ {\begin{array}{*{20}{c}} {1,50 \le I\left( {x,y} \right)} \\ {0,\, \mathrm {otherwise}} \end{array}} \right.$$(Supplementary Figure 6C). Morphology operations (opening/closing) are applied to f(x,y) to eliminate the irrelevant particles, and the number of remaining regions is considered to be the number of SiO2/Si chips. Rectangles are then fitted to each region (Supplementary Figure 6D), and regions surrounded by four vertex points of a rectangle are defined as the regions to be searched.

### Automated assembly system (2DMMS-Stamper)

Supplementary Figure 7A shows CAD schematics of our automated stamping system. The operational flow chart and schematics of the stamping system in operation are presented in Supplementary Figure 7B and Supplementary Figure 7C–F, respectively. First, the optical microscope and glass slide holder are positioned away from the stamping stage (Supplementary Figure 7C). The robot transfers the SiO2/Si from the chip tray to the stamping stage (Supplementary Figure 7). The robot returns to the original position (Supplementary Figure 7E), and the optical microscope and glass slide holder slide over the Si chip (Supplementary Figure 7F).

### Database structure

To manage the data generated by the automated searching system, we developed a relational database system on MySQL, the structure of which is schematized in Supplementary Figure 8. We assigned a unique identification number to each Si chip and chip tray, referred to as a “Chip ID” and “Chip tray-ID,” respectively. The positions of the Si chips in the chiptrays were recorded in the field “Position-in-chip tray.” Each time a search began, a new entity was added to the table ('search action). When the targeted 2D crystals were found, the entities were added to the table ('images of flakes). The entities comprise a position of the XY stage (x and y) and the status of the optical microscope ('optical microscope parameters). In addition, certain experimental parameters (type of Si wafer, crystal characteristics, and the name of the operator who executed the mechanical exfoliation) were simultaneously stored in the database (in 'Exfoliation, 'Operator, 'Parameters', and 'Materials' fields). These tables were accessed through the standard SQL queries, thus enabling unified management of the information generated during the fabrication process.

### Fabrication procedure of polymer stamp on optical microscope slide

A thermoplastic methacrylate copolymer (Elvacite 2552C, Lucite International) powder was dissolved in anisole with a volume ratio of 1:1. A small droplet of the Elvacite/anisole solution was placed on the optical microscope slide using a toothpick. The optical microscope slide was baked on a hotplate at 130 °C for 5 min to evaporate the anisole solvent.

### Transfer process of vdW heterostructures onto SiO2/Si

To complement the information on the device fabrication, we added the pictorial flow diagram on the overall process of the device fabrication, especially focusing on how we handled the polymer stamp in Supplementary Figure 9.

When the alignment was complete, the polymer stamp was pressed onto the 2D flake (Supplementary Figure 9D). During the stamping, the sample stage was heated to 80 ℃. The force acting between the polymer stamp and the Si chips was monitored by a load cell unit. Maintaining the contact force below the predetermined threshold value of f= 300 mN avoided fracturing the 2D crystals. After a duration of 20 s to promote adhesion between the 2D crystals, the polymer stamp was slowly lifted, thereby picking up the 2D crystals by van der Waals force acting between 2D crystals. This procedure was repeated until the desired vdW heterostructures were formed on the polymer stamp. (We discussed the typical cases which we fail in pick-up in Supplementary Note 7, Supplementary Figures 17, and 18.)

After finishing the vdW heterostructures assembly, the glass slide was unloaded from the stamping apparatus, taken out of the glovebox (Supplementary Figure 9E). The final transfer was conducted by using the similar stamping apparatus developed in the ambient air. The SiO2/Si chip was cleaned by the piranha solution (H2SO4:H2O2 = 2:1), followed by the ultrapure water rinse. The SiO2/Si was loaded to the stamping apparatus and was heated to 185 ℃. The glass slide was set to the stamping apparatus. The position where the vdW heterostructure was dropped was selected by using the XY stage. The SiO2/Si chip was slowly lifted and contacted to the vdW heterostructure. Then the polymer stamp was melted, thereby transferring the vdW heterostructure to the SiO2/Si chip. After a short duration of ~20 s, the SiO2/Si chip was lowered. The polymer stamp was prolonged and torn. Finally, the SiO2/Si chip was unloaded from the stamping apparatus and the stamp was dissolved by immersing SiO2/Si chip in chloroform for 1 min.

### How to control the vdW stack is peeled onto the Si substrate and not on the polymer stamp

Whether the vdW stack is peeled to the SiO2/Si substrate or stuck on the polymer stamp is controlled by the substrate temperature. A threshold temperature is determined by the glass transition temperature of the polymer utilized; Tg = 90 °C for the case of Elvacite 2552C (Technical Data Sheet of Elvacite 2552 C). When the substrate temperature is lower than the glass transition temperature T = 80 °C < Tg, the stack adheres to the polymer stamp. When the substrate temperature is higher than the glass transition temperature T = 185 °C < Tg, the polymer stamp is melted, and the stack is transferred to the SiO2/Si substrate.

### Automated extraction of edge patterns during final alignment

While stamping, the targeted 2D crystals had to be envisaged through the glass slide and the polymer stamp. Although the polymer stamp was transparent, the edges of the 2D crystals were obscured by light scattering and refraction at the polymer stamp surface (second panel of Fig. 7k). To resolve this problem, we implemented a procedure to aid the alignment (Fig. 7j).

First, the edges of the 2D crystals were automatically extracted by applying Canny’s edge detection algorithm. At this point, the edges of targeted 2D crystals as well as other thicker 2D crystals were extracted. The extracted edges were saved in vector-drawing format. The recorded edges were then overlaid on the optical microscope image on the computer screen (green curves in Fig. 7k). Then, the optical microscope was aligned with the Elvacite stamp. The targeted 2D crystal was observed with the overlaid edges (second panel of Fig. 7k). Note that these procedures were implemented in the software system and thus can be utilized by few clicks on the computer screen.

Now, although the edges of the targeted 2D crystals were obscured by the presence of the Elvacite stamp, the presence of thicker flakes scattered around the targeted flake exhibited a stronger optical contrast that could be aligned with the overlaid edge patterns. In the current form of the software implementation, this alignment was conducted by the operator. Following this procedure, we could achieve alignment of targeted 2D crystals within a lateral error of 1 µm (third panel of Fig. 7k). During the stamping process, the vertices of 2D crystals were recorded as a vector-drawing file to record the crystal positions. This information was helpful for identifying thin layers of 2D crystals, which became transparent when embedded in the encapsulating hBN flakes. Owing to these features, we could reliably design mesa-pattern and metal-contact shapes for the devices.

### Fabrication method of metal electrodes to vdW heterostructures

To fabricate the metal electrodes, we spin-coated a 10:18 solution of polymethyl methacrylate (PMMA)-A6:anisole at 4,000 rpm, and the chip was baked at 180 °C for 20 min in an oven. Hydrogen silsesquioxane (HSQ; Dow Corning Fox-12) was then spin-coated at 4000 rpm, and the chip was baked at 120 °C for 2.5 min in an oven. The mesa pattern, developed by NMD-3 (Tokyo Oka Kogyo Co., Ltd), was written by electron-beam lithography (EBL) with a dose of 450 µC/cm2. The chip was etched with an inductively-coupled plasma etching system (SAMCO, Inc.) using O2 and CF4/Ar plasma19. To produce the metal-contact pattern, a 3:2 solution of PMMA-A6:anisole was spin-coated at 4500 rpm, and the chip was baked at 180 °C for 30 min in an oven. The contact pattern was written by EBL with a dose of 400 µC/cm2. The pattern was developed in a 3:1 solution of isopropanol (IPA) and methyl isobutyl ketone (MIBK) for 30 s, followed by a 2-min rinse with IPA. Au/Pd/Cr (45/15/10 nm) were deposited by electron-beam evaporation. The metal layer was lifted off by acetone.

### Validation process of the correct and false detection rates

We describe the validation process we took to extract the correct and false detection rates in Fig. 4 in the main text. First, we note that the correlation between the optical color contrast and the layer thickness has been verified by using the transport and photoluminescence measurements. Supplementary Figure 10 shows the quantum Hall effects measured in (A) monolayer, (B) bilayer, and (C) trilayer graphene. Supplementary Figure 11 shows the Raman spectrum of monolayer, bilayer, and trilayer MoS2. From which we assigned the layer thickness. Furthermore, the thickness of SiO2 was controlled to 290 ± 5%, and the light illumination condition was kept constant by using the halogen lamp with the feedback control (LA-150FBU, Hayashi Watch Works). Therefore, the correlation between the optical microscope images and the layer thickness is tightly controlled. Upon these basis, the false detection rate was manually aggregated by checking all the extracted optical microscope images.

Supplementary Table 5 shows the spreadsheet summary utilized for calculating the false detection rate. Note that the confusion between layer thickness is relatively small and the major source of false detection was the extraction of contaminating objects such as particles (Supplementary Note 5).

### Data availability

The data that support the findings of this study are available from the corresponding author upon request. Readers interested in the detailed information on the hardware and software implementation should please contact S.M.

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. 1.

Dean, C. R. et al. Boron nitride substrates for high-quality graphene electronics. Nat. Nanotechnol. 5, 722–726 (2010).

2. 2.

Novoselov, K. S. et al. Electric field effect in atomically thin carbon films. Science 306, 666–669 (2004).

3. 3.

Novoselov, K. S. et al. Two-dimensional atomic crystals. Proc. Natl. Acad. Sci. USA 102, 10451–10453 (2005).

4. 4.

Zhang, Y., Tan, Y.-W., Stormer, H. L. & Kim, P. Experimental observation of the quantum Hall effect and Berry's phase in graphene. Nature 438, 201-204 (2005).

5. 5.

Huang, B. et al. Layer-dependent ferromagnetism in a van der Waals crystal down to the monolayer limit. Nature 546, 270–273 (2017).

6. 6.

Gong, C. et al. Discovery of intrinsic ferromagnetism in two-dimensional van der Waals crystals. Nature 546, 265–269 (2017).

7. 7.

Xu, X., Yao, W., Xiao, D. & Heinz, T. F. Spin and pseudospins in layered transition metal dichalcogenides. Nat. Phys. 10, 343–350 (2014).

8. 8.

Xi, X. et al. Ising pairing in superconducting NbSe2 atomic layers. Nat. Phys. 12, 139–143 (2015).

9. 9.

Qian, X., Liu, J. & Fu, L. Quantum spin Hall effect in two-dimensional transition metal dichalcogenides. Science 346, 1344–1347 (2014).

10. 10.

Novoselov, K. S., Mishchenko, A., Carvalho, A. & Castro Neto, A. H. 2D materials and van der Waals heterostructures. Science 353, aac9439 (2016).

11. 11.

Geim, A. K. & Grigorieva, I. V. Van der Waals heterostructures. Nature 499, 419–425 (2013).

12. 12.

Esaki, L. & Tsu, R. Superlattice and negative differential conductivity in semiconductors. IBM J. Res. Dev. 14, 61–65 (1970).

13. 13.

Blake, P. et al. Making graphene visible. Appl. Phys. Lett. 91, 63124 (2007).

14. 14.

Gorbachev, R. V. et al. Hunting for monolayer boron nitride: optical and Raman signatures. Small 7, 465–468 (2011).

15. 15.

Castellanos-Gomez, A., Agraït, N. & Rubio-Bollinger, G. Optical identification of atomically thin dichalcogenide crystals. Appl. Phys. Lett. 96, 213116–213118 (2010).

16. 16.

Li, H. et al. Rapid and reliable thickness identification of two-dimensional nanosheets using optical microscopy. ACS Nano 7, 10344–10353 (2013).

17. 17.

Castellanos-Gomez, A. et al. Deterministic transfer of two-dimensional materials by all-dry viscoelastic stamping. 2D Mater. 1, 011002 (2014).

18. 18.

Zomer, P. J., Dash, S. P., Tombros, N. & Van Wees, B. J. A transfer technique for high mobility graphene devices on commercially available hexagonal boron nitride. Appl. Phys. Lett. 99, 232103–232104 (2011).

19. 19.

Wang, L. et al. One-dimensional electrical contact to a two-dimensional material. Science 342, 614 (2013).

20. 20.

Kretinin, A. V. et al. Electronic properties of graphene encapsulated with different two-dimensional atomic crystals. Nano Lett. 14, 3270–3276 (2014).

21. 21.

Avsar, A. et al. Air-stable transport in graphene-contacted, fully encapsulated ultrathin black phosphorus-based field-effect transistors. ACS Nano 9, 4138–4145 (2015).

22. 22.

Castellanos-Gomez, A. et al. Isolation and characterization of few-layer black phosphorus. 2D Mater. 1, 025001 (2014).

23. 23.

Cao, Y. et al. Quality heterostructures from two-dimensional crystals unstable in air by their assembly in inert atmosphere. Nano Lett. 15, 4914–4921 (2015).

24. 24.

Withers, F. et al. Light-emitting diodes by band-structure engineering in van der Waals heterostructures. Nat. Mater. 14, 301–306 (2015).

25. 25.

Savall, J., Ho, E. T. W., Huang, C., Maxey, J. R. & Schnitzer, M. J. Dexterous robotic manipulation of alert adult Drosophila for high-content experimentation. Nat. Methods 12, 657–663 (2015).

26. 26.

Mattiazzi Usaj, M., et al. High-content screening for quantitative cell biology. Trends Cell Biol. 26, 598–611 (2016).

27. 27.

King, R. D. et al. The automation of science. Science 324, 85–89 (2009).

28. 28.

Nolen, C. M., Denina, G., Teweldebrhan, D., Bhanu, B. & Balandin, A. A. High-throughput large-area automated identification and quality control of graphene and few-layer graphene films. ACS Nano 5, 914–922 (2011).

29. 29.

Kang, K. et al. Layer-by-layer assembly of two-dimensional materials into wafer-scale heterostructures. Nature 550, 229–233 (2017).

30. 30.

Hunt, B. et al. Massive Dirac fermions and hofstadter butterfly in a van der Waals heterostructure. Science 340, 1427–1430 (2013).

31. 31.

Ponomarenko, L. A. et al. Cloning of Dirac fermions in graphene superlattices. Nature 497, 594–597 (2013).

32. 32.

Dean, C. R. et al. Hofstadter’s butterfly and the fractal quantum Hall effect in moiré superlattices. Nature 497, 598–602 (2014).

33. 33.

Cadiz, F. et al. Excitonic linewidth approaching the homogeneous limit in MoS2-based van der Waals heterostructures. Phys. Rev. X 7, 021026 (2017).

34. 34.

Gong, Y. et al. Vertical and in-plane heterostructures from WS2/MoS2 monolayers. Nat. Mater. 13, 1135–1142 (2014).

35. 35.

Garcia, A. G. F. et al. Effective cleaning of hexagonal boron nitride for graphene devices. Nano Lett. 12, 4449–4454 (2012).

36. 36.

Szeliski, R. Computer Vision: Algorithms and Applications (Springer-Verlag, New York, 2010).

37. 37.

Pizzocchero, F. et al. The hot pick-up technique for batch assembly of van der Waals heterostructures. Nat. Commun. 7, 11894 (2016).

38. 38.

Bishop, C. M. Pattern Recognition and Machine Learning (Springer-Verlag, New York, 2006).

39. 39.

Quigley, M. et al. ROS: an open-source robot operating system. In ICRA Workshop on Open Source Software (Open Robotics, 2009).

## Acknowledgements

The authors would like to thank Y. Hoshi, Z. Dou, M. Arai, and R. Moriya for helpful discussions and technical assistance. S.M. would like to thank T. Kitahara for providing the opportunity for gaining the experiences in autonomous robotics programming in his science, technology, engineering, and mathematics (STEM) education program. This work was supported by the Core Research for Evolutional Science and Technology (JPMJCR15F3), the Japan Science and Technology Agency (JST), and JSPS KAKENHI (Grant Nos. JP16H00982, JP25107003, and JP25107004).

## Author information

### Affiliations

1. #### Institute of Industrial Science, University of Tokyo, 4-6-1 Komaba, Meguro, Tokyo, 153-8505, Japan

• Satoru Masubuchi
• , Masataka Morimoto
• , Sei Morikawa
• , Momoko Onodera
• , Yuta Asakawa
•  & Tomoki Machida
2. #### National Institute for Materials Science, 1-1 Namiki, Tsukuba, Ibaraki, 305-0044, Japan

• Kenji Watanabe
•  & Takashi Taniguchi

### Contributions

S.M. designed 2DMMS, implemented the hardware and software, and fabricated the vdW heterostructures. M.M. performed mechanical exfoliation of the 2D materials and analyzed the results of automated scanning for 2D material flakes. S.M., M.O., and Y.A. fabricated devices from the assembled vdW heterostructures and conducted transport measurements. K.W. and T.T. synthesized the hBN crystals. T.M. supervised the research program. All authors wrote the paper.

### Competing interests

The authors declare no competing interests.

### Corresponding authors

Correspondence to Satoru Masubuchi or Tomoki Machida.