By: Mike Aubrey
We’ve been working to estimate lattice strain and interfacial stress between layers of materials within an electrochemical cell. This summer, we put together our first prototype for making these measurements at relatively large, macroscopic length scales (~1 cm). The challenge is that while we are measuring a mechanical phenomena (actuation) over centimeter length scales, we are trying to reduced the fundamental mechanism of actuation to the intermolecular forces at play across a single molecule that is less than 1 nm thick.
We can do this using a typical 3-electrode electrochemical cell, a potentiostat, and a microscope to collect images as the potential of the working electrode is swept in the course of a normal cyclic voltammogram. The basic schematic of the experimental setup is shown in Figure 1. Our actuators are composed of multiple layers:
Upon, oxidation the active material (shown in orange in Figure 1) undergoes a volumetric contraction and in order for the bulk electrode to remain intact—without slippage or delamination—a deformation manifests as an out-of-plane bending motion with the now smaller active material forming the inner radius of the circle. Conveniently, for electrodes of this type, the strain ($\alpha$) in the active material turns our to be indirectly proportional to the curvature of the electrode ($\kappa$). Using high-aspect-ratio electrodes, the curvature of the entire electrodes can be modeled using a single radius of curvature that can be determined by fitting a circle to the working electrode’s shape.
Figure 1 | Experimental three-electrode cell using a flexible multilayer electrochemical actuator as the working electrode. Our working electrodes about 2-5 cm long with inert substrates (in blue) that are ~20 µm thick.
Our goal over the last few months of kicking off the lab has been to demonstrate that we can make electrochemical actuators of this type and accurately quantify their shape deformation in situ during electrochemical measurements. Apart from developing the procedures for high fidelity materials processing and finding reliable sources for high quality starting materials, led by Kate Murphy, we’ve also solved many of the challenges in data collection, processing, and analysis. In the latter case there were a number of primary issues to consider: (1) image collection (2) synchronization of potentiostat and microscope data (3) segmentation of the electrode pixels from images (4) determination of electrode curvature from an image, and (5) efficient means for data visualization and exploration. One of our recent experiments that address these points is shown in the video.
Images are captured as individual frames as quickly as the camera can acquire and save the data which is largely limited by the exposure time and the size of each the image saved. Even with relatively small images, ~540p, there are more than enough pixels present that we can attribute to the working electrode to obtain a well determined circle fit to the image. Our typical acquisition rate is around 40-50 fps. We have clear and easy routes to improve the frame rate, such as brighter key lighting and smaller image sizes but this current time interval is good enough given the time scale of the cyclic voltammograms we are collecting. To avoid issues with dropped frames or inconsistencies in frame rate during data collection, instead of recording direct to video, individual images are collected and their timestamps recorded. This results in about ~10,000 images per measurement that must then be analyzed and correlated with the potentiostat measurements. In the video above the constant framerate and time interval (timelapse) has been altered due to practical limitations of mp4 file formats as well as illustrative purposes.
Our first method for synchronization was crude be effective. We noted that vibrations in the microscope table were clearly observable in both the images collected and in the potentiostat’s ammeter. These features were very sharp and by spacing a few intentional shocks in sequence, it was trivial to synchronize the frames. Later we found that there was essentially no significant dephasing of the actuator’s mechanical motion with the voltage sweep controlled by the potentiostat at 50 mV/s sweep rates and we could just as accurately align the change in curvature vs time plots with the current response from the potentiostat directly. Over relatively short experiment 5-10 cycles no significant dephasing is observed. We are currently working on installing a software trigger solution to synchronize these measurements going forward.
After collecting the images of the electrode, in order to determine the curvature of the electrode first the electrode pixels need to be extracted and scaled to units of length. The general problem of pixelwise classification of an image is called image segmentation which is entirely its own field of research. Here we have good contrast between background and the working electrode so nothing particularly sophisticated is required. Currently we’ve implemented a random forest classifier to ID electrode pixels, followed by a custom region grouping procedure to account for non-contiguous segmentation regions while avoiding the most egregious misidentifications.
The grid in the background of the microscope image is a square lattice. We extract the pixel locations at the intersections and fit a square lattice to the data points using a single lattice constant (the px to cm conversion factor) and a 2D orientation matrix.
The extracted pixel row and column indices are then used as data point that describe a circle function. This resource does a great job describing a variety of methods for doing this. It turns out that to fit a circle only the $x$ and $y$ coordinates of its center need to be refined since the best fit circle radius is just the average (or median if you prefer) distance from the center to each data point. The loss function is then simply $\sum(R_{avg}-R_i)^2$. The curvature of the electrode in each frame is then just the multiplicative inverse of $R_{avg}$. As can be seen in the video a simple circle fit does an excellent job at defining the entire shape of the electrode throughout the cyclic voltammogram.
All data is visualized using the Plotly software package as implements in Python 3. This affords us with an interactive web first data visualization environment that we can also integrate into a Jupyter Notebook such that our entire analysis and data exploration workflow can be contained within a single notebook file. Using callbacks we are able to isolate subregions of our data on multiple plots simultaneous and select anomalous data points by clicking them on the graph to pull up the original image in the dashboard.