UNIVERSITY OF TARTU Faculty of Science and Technology Institute of Technology Computer Engineering Robert Valner Software Development for Isotonic and Isometric Electro- Chemo Measurement System Master’s Thesis Supervisor: Prof. Rudolf Kiefer Tartu 2015 Abstract The possibility to replicate and replace natural muscles is a noble idea that has led to development of a wide research field of artificial muscles. Artificial muscles comprise an abundant range of materials, which vary from each other in the aspects of working principle and actuation properties. As a type of artificial muscles, ionic electro active polymers have gained interest due to promising performance in common comparative characteristics like strain and ability to generate blocking force. The inseparable part of muscle characterization is an according set of measurement devices, which are commercially provided separately or as complete setups, consisting of an electrical signal generator, force sensor, linear displacement actuator and means for data acquisition. Although commercial software for hardware and experiment control is available, these solutions are directly designed for a certain hardware setup and do not allow customization. The main objective of this work was to develop a software solution for running isotonic and isometric experiments on ionic electro active polymers. A hardware setup, consisting of devices like potentiostat, linear displacement actuator, force sensor and a voltmeter for measuring force signal, was given as the main resource for software implementation. A set of functions, hardware drivers and measurement automation algorithms were developed in National Instruments LabVIEW 2014 system design software, that enable the user to control isotonic and isometric experiments over single compact graphical user interface. The developed software can also be viewed as a multifunctional tool that allows the user to control the basic functionalities of each main part of the hardware setup individually. The developed software was thoroughly tested with numerous test samples, meaning over 200 hours of experiment execution time where over 90% of the time the software handled the experiment process autonomously. The uncertainty of isotonic measurements was estimated to be 0.6μm and uncertainty of a single isometric measurement was estimated to be 19 mg in range of ±100 mg. 2 An algorithm was proposed for near 0 dB signal-to-noise ratio isotonic measurements, which help to clarify and interpret the results by fusing the displacement output data of linear displacement actuator and force sensor output data. 3 Table of contents Abstract ................................................................................................................................................... 2 List of figures ......................................................................................................................................... 6 List of tables ........................................................................................................................................... 7 Acronyms and abbreviations .............................................................................................................. 8 1 Introduction ................................................................................................................................. 10 2 Problem overview ....................................................................................................................... 11 2.1 Isotonic and isometric measurement hardware configurations .................................. 11 2.2 Commercial software solutions .................................................................................. 14 3 Methodology ................................................................................................................................ 15 3.1 Ionic EAPs .................................................................................................................. 15 3.2 Hardware overview .................................................................................................... 17 3.3 Hardware communication .......................................................................................... 19 4 Requirements .............................................................................................................................. 20 4.1 General functional requirements for the software ...................................................... 20 4.2 Real time requirements ............................................................................................... 21 4.3 Task mode specific functional requirements .............................................................. 21 4.3.1 Potentiostat mode ................................................................................................... 21 4.3.2 Stress measurement mode ...................................................................................... 21 4.3.3 Strain measurement mode ...................................................................................... 22 4.3.4 Elasticity measurement mode ................................................................................. 23 4.3.5 Force sensor calibration mode ................................................................................ 23 5 Software development ............................................................................................................... 24 5.1 File and folder management ....................................................................................... 26 5.2 Initialization of devices .............................................................................................. 27 5.2.1 Initialization of potentiostat .................................................................................... 28 5.2.2 Initialization of force sensing equipment ............................................................... 29 5.2.3 Initialization of linear actuation stage .................................................................... 30 5.3 Experiment control and data acquisition .................................................................... 31 5.3.1 Force sensor calibration .......................................................................................... 31 5.3.2 Elasticity estimation ............................................................................................... 33 4 5.3.3 Potentiostat experiments ......................................................................................... 36 5.3.4 Stress and strain experiments ................................................................................. 37 5.4 Automation of the experiments .................................................................................. 40 6 Testing and results ..................................................................................................................... 42 6.1 High signal-to-noise ratio isotonic measurements ..................................................... 42 6.2 Low signal-to-noise ratio isotonic measurements ...................................................... 44 6.3 Uncertainty evaluation ............................................................................................... 46 7 User interface .............................................................................................................................. 49 7.1 Layout section 1: Settings and controls ...................................................................... 51 7.2 Layout section 2: Experiment status info ................................................................... 57 7.3 Layout section 3: Measurement output graphs ........................................................... 59 8 Conclusions .................................................................................................................................. 60 Summary ............................................................................................................................................... 61 Kokkuvõte ............................................................................................................................................ 62 Acknowledgements ............................................................................................................................. 63 References ............................................................................................................................................. 64 Appendix A: Use cases ....................................................................................................................... 67 Stress measurement experiment ............................................................................................. 67 Strain measurement experiment ............................................................................................. 68 Elasticity measurement ........................................................................................................... 69 Appendix B: LabVIEW code samples ............................................................................................ 71 Lihtlitsents lõputöö reprodutseerimiseks ja lõputöö üldsusele kättesaadavaks tegemiseks ........... 73 5 List of figures Figure 1: Strain measurement setup implementing an isotonic transducer ............................... 12 Figure 2: Strain measurement setup implementing a laser displacement meter ....................... 13 Figure 3: A measurement setup which allows to measure both strain and stress ..................... 13 Figure 4: Architecture of CDC based actuator. porous media of CDC ..................................... 16 Figure 5: Actuation principle of a conductive polymer material .............................................. 16 Figure 6: Stress and strain measurement setup ......................................................................... 17 Figure 7: Connection hierarchy of the devices used for measurement setup. ........................... 18 Figure 8: General structure of the developed software ............................................................. 25 Figure 9: Automated folder creation hierarchy. ........................................................................ 26 Figure 10: Block diagram of the initialization process. ............................................................ 28 Figure 11: Block diagram of calibration process ...................................................................... 32 Figure 12: Block diagram of the elasticity measurement process. ............................................ 35 Figure 13: Block diagram of potentiostat experiment. .............................................................. 36 Figure 14: Block diagram of the strain measurement process .................................................. 39 Figure 15: Block diagram of automated multiple stress or strain measurement processes. ...... 41 Figure 16: Isometric measurement results ................................................................................ 43 Figure 17: Isotonic measurement results ................................................................................... 43 Figure 18: Near 0 dB SNR isotonic displacement measurement results and force sensor data fused with displacement measurements ..................................................................................... 44 Figure 19: Fused isotonic displacement measurements after being processed by slack correction algorithm compared to original LAS position measurements. .................................. 45 Figure 20: Near 0 dB SNR strain measurement data correction algorithm .............................. 46 Figure 21: Isometric measurement results and uncertainty of each measurement .................... 47 Figure 23: GUI of the general settings tab. .............................................................................. 52 Figure 24: GUI of the file directories and names tab ................................................................ 53 Figure 25: GUI of the LAS controls and elasticity settings tab ................................................ 54 Figure 26: GUI of the potentiostat settings tab. ........................................................................ 56 Figure 27: GUI of the experiment status info section. .............................................................. 58 6 List of tables Table 1: List of devices used for IIECMS. ................................................................................ 18 Table 2: The devices needed to be initialized depending on the experiment. ........................... 27 Table 3: ActiveX methods used for establishing a connection between potentiostat and computer. .................................................................................................................................... 29 Table 4: Commands that are used in the initialization process of the voltmeter ....................... 30 Table 5: Controls in the general settings tab ............................................................................. 51 Table 6: Controls in file and folder management tab ................................................................ 52 Table 7: LAS controls, elasticity measurement settings. .......................................................... 54 Table 8: General controls of the potentiostat. ........................................................................... 55 Table 9: CV, CA and CP controls. ............................................................................................ 56 Table 10: Description of experiment status info indicators....................................................... 58 Table 11: Axis representations of general use graph of graph tabs 2 according to the experiment. ................................................................................................................................. 59 7 Acronyms and abbreviations CV – Cyclic Voltammetry, a process where triangle wave voltage is applied to a sample and current is measured CA – Chrono Amperometry, a process where constant voltage is applied to a sample and current is measured. CDC – Carbide-Derived Carbon. CNT – Carbon Nanotube. CP – Chrono Potentiometry, a process where constant current is applied to a sample and voltage is measured. CPM – Conductive Polymer. DAQ – Data Acquisition EAP – Electroactive polymer. GPIB – General Purpose Interface Bus GUI – Graphical User Interface IIECMS – Isotonic and Isometric Electro-Chemo Measurement System IPMC – Ionic Polymer Metal Composite LAS – Linear Actuation Stage: A device which enables to linearly push and pull objects attached to it. P controller – proportional controller PPy – Polypyrrole, an ionic electroactive polymer. PLC – Power Line Cycles. PSE – Potentiostat Experiments SAR – Safe Actuation Region. A user defined allowable actuation region for LAS used in strain and elasticity measurement experiments. Used in order to avoid damaging any equipment and measurement specimen due to unwanted commands. 8 SDK – Software Develompment Kit SNR – Signal-to-Noise Ratio USB – Universal Serial Bus. 9 1 Introduction Artificial muscles are a group of materials that are designed to behave similarly to natural muscles, which are considered to be one of the most efficient type of actuators [1,2]. Ionic Electro Active Polymers (Ionic EAP) are one type of artificial muscles, which’s main common functionality with natural muscles is that through an electrochemical stimuli a mechanical response is triggered. Mechanical response leads to a reversible change in shape or size of the material and this effect is the basis for applications of soft robotics and concepts of replacements for natural muscle [2]. Ionic EAP types are compared with the efficiency in strain, stress and durability [1–3]. Usually a measurement setup, combining devices like force sensing transducers and linear actuators, are applied but are rarely commercially available as a complete device or are not corresponding to specific requirements of the task. In order to measure stress and strain of an ionic EAP combined with stimulating signal generation by a potentiostat over ionic conductive solution, a custom device, composed by commercially available parts, was proposed for carrying out the experiments. To integrate the devices and run experiments over a single and compact Graphical User Interface, a software had to be developed which corresponds specifically to implemented hardware resources and allows the user to configure and execute the tests. Objectives The main goals of this work are to:  Operate the proposed hardware resources in a single software development environment,  Create algorithms for running isotonic and isometric measurement experiments utilizing a potentiostat as a source of electro-chemical stimulus,  Create an organized graphical user interface for running the required experiments. 10 2 Problem overview In this chapter a brief overview is given about different device setups for conducting isotonic and isometric measurements. Also the availability and suitability of commercial software solutions for controlling a custom measurement setup is evaluated. 2.1 Isotonic and isometric measurement hardware configurations In order to measure stress (isometric measurements) or strain (isotonic measurements), different types of sensors are usually used. Isometric transducers are applied for force and isotonic transducers for strain measurements. Each type of sensor requires an individual experimental setup [4,5]. Also apart from transducers, optical systems have been implemented in order to measure strain. This chapter introduces different strain, stress and combined measurement setup solutions which have been reported in the literature. Figure 1 illustrates a setup used for strain measurements. The extension and contraction of sample was measured by linear variable distance transducer (LVDT) and recorded by a computer. A set of weights were used in order set a constant pulling force. [5] 11 Figure 1: Strain measurement setup implementing an isotonic transducer.[5] The advantage of this setup is that the force which is applied on the sample is always constant but on the down side, it is not possible to measure isometric stress. Different optical strain measurement methods have been implemented utilizing lasers [6,7]. Figure 2 shows a schematic diagram of the experimental set-up for direct measurement of the expansion and contraction of the test samples with aid of a laser system. A film is hung on the working electrode, and the bottom end of the film is connected to a thin wire. The wire suspends a tray or reflecting plate through the pinhole of the cell. The up–down movement of the plate due to contraction and expansion of the film is measured directly by a laser displacement meter. [6] 12 Figure 2: Strain measurement setup implementing a laser displacement meter. [6] By combining an isometric transducer with a Linear Actuation Stage (LAS), a device which’s position can be controlled in one axis, it is possible to measure strain or stress without changing the test setup [8–11]. Figure 3 depicts a setup where the test sample is connected both mechanically and electrically on both ends by means of copper alligator clips. The electrochemical solution is contained within a bath with a counter electrode and a reference electrode. A potentiostat controls the cell potential or current and is connected to a computer. In addition, mechanical information is passed from the force sensor (load cell) into the computer, enabling force feedback and constant stress measurements via the single axis LAS. [10] Figure 3: A measurement setup which allows to measure both strain and stress.[10] 13 In order to measure stress with the setup depicted in figure 3, the LAS is kept on constant position and force sensor data is logged. For strain measurements, force sensor is used as a source of feedback about extraction and contraction processes of the test sample caused by external stimuli. The principal idea is to keep force at a constant desired value (isotonic process) by counter reacting to force changes caused by external stimulations via pulling the muscle in according suitable direction. [10] When comparing the setup in Figure 3 to one described in Figure 1, setup in figure 3 is able to maintain the desired force within certain boundaries, rather than being completely constant as ideally preferred. This is because LAS cannot perform a controlled movement that is smaller than the smallest executable step (resolution of the device). Since the force sensor gives feedback about sample´s actuation, a coefficient is used that translates force changes into sample’s displacement changes. If displacement of the sample is smaller than the resolution of the LAS, no counteraction is performed to maintain the desired force. Therefore actual force can differ from desired value within a region that is described by above mentioned coefficient. 2.2 Commercial software solutions Numerous manufacturers of measurement, namely stress and strain, equipment have advertised various software solutions, which provide isotonic or isometric measurement functionalities with stimulating signal generating possibilities [12–14]. For example a company called Aurora Scientific provides a complete set of hardware (isotonic/isometric sensor, signal generator, data acquisition device) with a LabVIEW based software (named DMC) that controls the hardware resources, executes experiments and analyzes measured data [13,15,16]. Despite from apparent suitability of the DMC software and other similar products, these solutions are rarely shared as open source or as freeware. Even if this would not be the case, the isotonic/isometric measurement software solutions are directly designed for a specific hardware setup [14,17]. In order to have an isotonic and isometric measurement system that is composed of devices from different manufacturers, the most resource efficient solution was to develop custom made software for running desired experiments. 14 3 Methodology 3.1 Ionic EAPs Polymers that show change in size and shape by applying external stimuli are well studied over several years and named electro active polymers [2]. One of the biggest approaches in application of active polymers is found in biomimetics which implements concepts from nature to artificial devices such as fish, insects and plants [18–21]. The main ideas behind these concepts are to create lifelike robots and to investigate how electroactive polymers can replace or repair for example limbs, hearts or muscles in future applications [22]. Ionic EAPs are utilized in electrolytes and such materials lead to volume change due to ion distribution when a stimulating signal is applied. Typical ionic EAPs are Carbon Nanotubes (CNT), Carbide-Derived Carbon materials (CDC), Ionic Polymer Metal Composites (IPMC), ionic polymer gels and conducting polymers (CPM). The stimulating signal for the ionic EAP can be as low as 1-2 Volts and mostly a bending displacement is induced. The disadvantages of ionic EAPs are the need to be constantly solvated and they pose difficulties to sustain constant displacement when subjected DC voltage (except for CPMs). [2,3] The actuation mechanism of CNT, CDC (shown in Figure 4) and IPMC relies on formation of positive and negative ion layers due to charging/discharging process when voltage is applied on the material. The structural difference of the ion layers induce the bending of the material. [2,23] Figure 5 illustrates the actuation principle of a CPM material. In a deactivated state, no voltage is applied between the CPM and a counter electrode, which resides in the ionically conductive solution. When voltage is applied (in the case of Figure 5, CPM is a negative electrode), positive ions of the solution move inside the CPM, causing a volume change. [2] 15 Figure 4: (a) Architecture of CDC based actuator. (b) Notion of electrical double-layer formation inside porous media of CDC. (c) Strain of actuator under applied voltage. [23] Figure 5: Actuation principle of a conductive polymer material. (a) No voltage is applied. (b) Voltage is applied between the conductive polymer and a counter electrode, which causes the positive ions of the solution move inside the polymer, inducing an isotropic volume change. [2] The outcome of this work is focused on ionic EAPs like CNTs, CDCs and conducting polymers and their linear actuation performance in view of stress and strain. The reason for this approach relies in comparison to natural muscles where a linear length change is the result of the complex muscle reaction [1,2]. To use ionic EAPs on development of artificial muscles for 16 replacement for natural muscles or soft robotics, the main characteristics of linear length change (strain or stress) needs to be studied in order to obtain a reliably working material. 3.2 Hardware overview This chapter describes the particular devices used for stress and strain measurements. A similar setup to one depicted in Figure 3 was used to accomplish stress and strain measurement tasks. Figure 6 shows the 3D model of the instrument and Figure 7 illustrates the particular set and connection hierarchy of devices used for development of this work. Figure 6: Stress and strain measurement setup. (1) Linear actuation stage, (2) beaker with electrolyte, (3)(4)(5) electrodes of the potentiostat, (6) muscle sample, (7) force sensor. Author of the image: Margo Plaado. 17 The sample (6) is attached between two clamps. The lower clamp is static and is fixed to chassis (1) of the LAS. The upper clamp is attached to a force sensor (7) which is mounted on LAS’s plate that enables to perform linear movements. The signal of the force sensor is read off by a voltmeter which in turn exchanges data with the computer over General Purpose Interface Bus (GPIB) to Universal Serial Bus (USB) converter. The LAS is controlled by a controller which accepts commands from the computer over serial port. Lastly the potentiostat is directly connected to the computer via USB interface. Figure 7: Connection hierarchy of the devices used for measurement setup. The list of particular devices used for this work is shown in table 1. Table 1: List of devices used for IIECMS. Device Manufacturer Model Description Potentiostat Biologic PG581 [24] Voltage range: 2 V to -2V Current range: 1 nA to 10 mA Force sensor Panlab TRI202PAD [25] Max load: 25 g Voltmeter Keithley 2182A [26] --- GPIB-USB Controller Prologix Rev 6.4.1 [27] --- Linear stage Physik Instrumente M-414.3PD [28] Min. step size: lmin = 0,5μm Stage controller Physik Instrumente C-863 [29] --- 18 3.3 Hardware communication Potentiostat The manufacturer of the potentiostat provided an activeX based Software Development Kit (SDK). The SDK consists of low level functions that enable to set up the device for an experiment depending on input parameters. C++ code examples were provided as a template for setting up chronoamperometry (CA), chronopotentiometry (CP) and cyclic voltamperometry (CV) experiments. Voltmeter The voltmeter has a GPIB port which allows communicating with external devices. In order to exchange data with the computer over USB port, a GPIB-USB controller was applied. This controller emulated a virtual serial port which enabled to pass data over serial communication protocol. Linear actuation stage The controller of the LAS uses an FTDI chip to emulate virtual serial port. A LabVIEW SDK has been provided by the manufacturer with examples to control the device over LabVIEW software development environment. 19 4 Requirements The IIECMS software has to provide executing different experimenting modes or tasks, each having specific functional requirements. This section firstly describes the requirements common to all task modes of the software and secondly the modes are divided to subcategories, each describing shortly the working concept and requirements for each mode. 4.1 General functional requirements for the software The major tasks that the software must enable to perform are the following:  Enables to run stress measurement experiments,  Enables to run strain measurement experiments,  Enables to run experiments only with potentiostat,  Enables to measure test samples elasticity,  Enables to calibrate the force sensor. The general functional requirements, common to all or some task modes, of the software are the following:  All associated directories to files and folders can be changed by the user,  All working modes can be stopped in random moments by the user,  In case of an error, the program is stopped automatically, saving the so far gathered data, notifying the user about the error and saving the error message into a txt. file,  The software can be used as a controller for each device (LAS, potentiostat and force sensing equipment) independently,  User can automate isotonic or isometric experiments by giving a sequence of experiment parameters to the software,  User can define data acquisition periods. 20 4.2 Real time requirements  The shortest data acquisition period that the system must provide is 1 s.  After the user has chosen and activated an experiment, the devices must be initialized within 10 s. 4.3 Task mode specific functional requirements Each subsection describes the requirements and working concept of each mode. 4.3.1 Potentiostat mode This mode allows the user to conduct experiments only with the potentiostat without measuring stress or strain. This mode is explained in detail in chapter 5.3.3. Devices required to be set up:  Potentiostat. Functional requirements:  The user must be able to configure and run o CA (constant voltage is applied, current is measured), o CP (constant current is applied, voltage is measured), o CV (triangle wave voltage is generated, current is measured) experiments.  Experiment data has to be plotted on a graph in real time.  User can see charge-over-voltage graph. 4.3.2 Stress measurement mode This mode sets up and runs an experiment on a potentiostat and data is periodically acquired from force sensor and potentiostat. This mode is explained in detail in chapter 5.3.4. 21 Devices required to be set up:  Potentiostat,  Voltmeter. Functional requirements:  Experiment data has to be plotted on a graph in real time within specified data acquisition period,  The user must be able to configure and run CV, CA and CP experiments. 4.3.3 Strain measurement mode This mode enables the user to measure strain of an attached sample. The setup part is same as for force measurement mode with an addition of setting up and controlling the LAS. This mode is explained in detail in chapter 5.3.4. Devices required to be set up:  Potentiostat,  Voltmeter,  LAS. Functional requirements:  User can set a Safe Actuation Region (SAR) where the sample is supposed to be safe or normal to actuate. If the boundary of this region is reached, the software pauses the experiment, notifies the user and asks either for broadened SAR or an order to stop the measurement process.  Before the start of an experiment, the user must be notified about samples elasticity properties, preventing failures caused by inaccurate elasticity estimation or by other reasons.  User can enter the elasticity coefficient manually or get the estimated values from previously executed elasticity measurements.  Experiment data has to be plotted on a graph in real time within specified data acquisition period. 22 4.3.4 Elasticity measurement mode This mode enables the user to estimate the elasticity of a sample. Elasticity data is further used in strain measurements for the same sample. Elasticity measurement is explained in detail in chapter 5.3.2. Devices required to be set up:  Voltmeter,  LAS. Functional requirements:  User can set SAR. If this boundary is reached, the software pauses, notifies the user and asks either for broadened SAR or an order to stop the measurement process.  User can define the LAS step size and execute the movement in up or down direction.  User can define the amount of force measurement data samples and sampling period of a single recording. 4.3.5 Force sensor calibration mode This mode enables the user to calibrate the force sensor by attaching predefined weights on the force sensor. In the context of IIECMS device the calibration is a process where the force sensor’s output voltage measurements are transformed into values which represent the voltages in milligrams. This mode is explained in detail in chapter 5.3.1. Devices required to be set up:  Voltmeter Functional requirements:  User dialog must ask the user to place a weight and enter the value of the placed weight.  Weight placement continues until user decides not to continue with calibration. 23 5 Software development National Instruments LabVIEW 2014 programming environment was chosen to be the primary platform for software development, since it offers a variety prewritten functions for different communication protocols, has quickly rearrangeable user interface and is convenient environment for testing segments of code. Based on the requirements described in the requirements chapter, the general structure of the developed software (shown in figure 6) is following: 1. User input - Firstly, user sets the parameters of the experiment. If the parameters are set, user activates the software. 2. File and folder management - After activation, the existence and paths of all necessary files and folders are checked or created. 3. Initialization of devices - When necessary files and folders are present, an according set of devices, which are defined by the type of the experiment, are initialized. 4. Experiment control and data acquisition (DAQ) - If the initialization is successful, the experiment is started and measurement data is gathered periodically. 5. Data storage - After the experiment, the data is stored into according folders as .txt files. In a presence of an error, the execution of the program is stopped and a brief overview of the error is displayed to the user. The following subchapters describe the structure of the software in details. The user input section is described in user interface chapter (Chapter 7). 24 Figure 8: General structure of the developed software 25 5.1 File and folder management The file and folder management section of the software holds responsibility for checking if the user has provided correct paths for folders and files which are needed for chosen experiment. If some path is missing, the user is notified and is asked to point out the correct directory. Also if the user has chosen to partially automate the creation process of folders, the folders for experimental data are automatically created in a logical structure (Figure 9). The paths which are checked and managed are following:  Path to force sensor calibration file (Chapter 5.3.1),  Path to experiment data folder,  Path to folder for raw data of potentiostat,  Path to elasticity file (Chapter 5.3.2),  Path to experiment list file (Chapter 5.4). Figure 9: Automated folder creation hierarchy for force, strain, elasticity and potentiostat raw data folders. Each box represents a folder and the black line shows the folder nesting structure. For the purposes of followable data storing and documentation, user can choose to automate the management of measurement data folders. This means, that the user has to point out the 26 directories for calibration, experiment list files and set the directory where experimental data is stored, but specific folders for force, strain, elasticity measurement data and potentiostat raw data are created automatically in a way as shown in Figure 9. Each box in the Figure 9 represents a folder and the black line shows the folder nesting structure. Subfolders are created based on experiments that were executed where “Automated test-set” is a folder for measurement data which was created during automated experiments (described in chapter 5.4). 5.2 Initialization of devices After the file and folder checking process, a set of devices according to the experiment are initialized in order to keep the software modular. This means that this software can be used for example as a controller for the potentiostat without a need for other devices to be attached to the controlling computer. Table 2 shows the devices needed to be used depending on the experiment. Table 2. The devices needed to be initialized depending on the experiment. Device Strain Stress Potentiostat Elasticity Force sensor exp. exp. exp. measurement calibration exp. exp. Potentiostat    --- --- Force sensor   ---   equipment LAS  --- ---  --- A block diagram of device initialization process is presented on Figure 10. Depending on user’s choice of experiment type, the flags that indicate a specific device which is needed to be set up are set accordingly. Then a case statement structure is executed, where each flag is checked and in a positive case the according device is initialized. 27 Figure 10: Block diagram of the initialization process. The initialization process of the devices is further described in following subchapters. 5.2.1 Initialization of potentiostat The initialization process of the potentiostat consists of three basic steps: 1. Reading in the variables which determine how the experiment is set up, 2. Setting up the potentiostat for the experiment, 3. Starting the experiment. The setup variables are read in directly from user interface via user controllable variables. 28 The connection routine with the potentiostat is common to all experiments. Three activeX control methods, which are described in table 3, are used to establish connection. Table 3: ActiveX methods used for establishing a connection between potentiostat and computer. Name of the Input parameters Description method PSReset Hardware ID (0) Causes the instrument to perform a software reset. The software driver will pause for the required time (typically 5 s) such that the instrument will be ready to accept the next command. PSConnect Hardware ID (0) Connects the software driver to the instrument. Port number PSRemoteMode Hardware ID (0) Switches the instrument in (1) and out (0) of remote mode. Switching Port number to remote mode halts any real time operation, allowing the instrument to be fully utilized by the remote computer. Three types of experiments are supported: CP, CA and CV experiments. Each type requires to be set up individually, meaning that there are three separate routines which are selected based on user’s choice. The setup routines were created by the author based on C++ code examples of the routines, using the ActiveX SDK of the potentiostat. 5.2.2 Initialization of force sensing equipment The initialization process of force sensing equipment consists of two major parts: 1. Initialization of voltmeter 2. Reading in force sensor calibration file The voltmeter is initialized by three commands over virtual serial port using a GPIB to USB converter (described in hardware communication chapter 3.3). The commands and descriptions are shown in table 4. 29 Table 4: Commands that are used in the initialization process of the voltmeter. GPIB command Command description *RST Returns the Model 2182 to the *RST default conditions. Cancels all pending commands. *IDN? Returns which code includes the manufacturer, model number, serial number, and firmware revision levels. :SENSe:VOLTage:NPLCycles n Set measurement integration rate of analog-to-digital converter in units of Power Line Cycles (PLC). For 50 Hz power supply and 1 PLC the integration period is 20 ms. 5 PLC is 100 ms. Possible PLC values 0.1 < n < 5 After a successful read of device ID, the voltmeter is considered to be functional. Depending on the DAQ period selected by user, the voltmeter is set to 0.01 PLC to 5 PLC. If data acquisition period is >400 ms, the PLC rate is adjusted to be 5, which gives optimal measurement accuracy [26]. In order to convert the force sensor’s output voltage measurements into values which represent the measurements in milligrams, a set of calibration coefficients must be read in. Calibration coefficients are stored in a previously created .txt file, containing information about voltage bias in a case of 0 g of useful load weight and a conversion factor (or factors in a case when calibration was done with multiple predefined load weights) which converts unbiased voltages into milligrams. The calibration process is explained further in detail in chapter 5.3.1. 5.2.3 Initialization of linear actuation stage The LAS is initialized by using a prewritten function, provided by LAS’s manufacturers’ SDK, called “Mercury Configuration Setup”. It was important to configure the LAS in a way that it would not start self-calibration process, where the LAS is automatically moved throughout the actuation limits, because any equipment that is attached to the LAS will likely break. 30 5.3 Experiment control and data acquisition After the device initialization process the experiment control is started. There are 5 main tasks that the IIECMS software can perform (described in chapter 4) with 3 variations which enable to automatically run a sequence of experiments. Also there are 2 additional modes that allow just moving the stage and scan the force sensor values without recording. The software structure of 5 main task modes are described in following subchapters. 5.3.1 Force sensor calibration Calibration of the force sensor is necessary for converting the force sensor’s output voltage measurements into values which represent the measurements in milligrams. Figure 11 shows the block diagram of calibration process. After the start of the process the user is told to remove all weights, except for the muscle mounting clamp, to measure the voltage of the force sensor without any working load. This measurement is called voltage bias. After bias measurements, the user is told to place a weight on the force sensor. A dialog window asks the mass of the weight in milligrams. After getting the necessary values the voltage is measured again by the voltmeter (Block 1 in Figure 11). The voltage-to-milligram coefficient is calculated as shown in equation 5.1. m C  W , (5.1) UW UB where mW is weight of the calibration load in milligrams, UW is the voltage of the force sensor’s output which is measured by voltmeter when the calibration load is applied, U B is the bias voltage. The coefficient is stored into a .txt file. Calibration process is repeated as long as user wants and each calculated coefficient is stored. 31 Figure 11: Block diagram of calibration process In order to calculate force out of raw voltage measurements, the calibration coefficients: voltage-to-milligram coefficient and bias voltage are read from .txt file, which were produced during calibration, and used as shown in equation 5.2. F  C  U U B  , (5.2) where F is the force which is calculated and U is the potential measured from the force sensor’s output. 32 5.3.2 Elasticity estimation The elasticity estimation of an artificial muscle is based on Hooke’s law F  k  X , (5.3) where F is force needed to extend or compress an object by some distance X proportional to that distance and k is a constant factor characterizing objects elasticity. If a derivative of the force is taken with respect to distance, the equation becomes Fk   . (5.4) X † Equation 5.4 is taken as a basis for calculation the elasticity of a muscle. The idea is to perform a known movement with LAS and measure the changes of force. With the measurement setup described in chapter 3, the Equation 5.4 does not characterize the muscle sample alone but is rather combination of two systems which are the sample itself and the force transducer. Since equation 5.4 is only used in strain measurement process, the specific elasticity characterization values which describe the measurement setup and the sample can be unknown but also can be calculated when taking into account the working length and force range of the force transducer. Figure 12 shows the block diagram of the elasticity measurement process and the step by step description of the algorithm is following (notation of “block 1 to 5” refers to a set of operations shown in Figure 12): 1. The initial position of the LAS is acquired and stored as a constant. 2. User dialog appears, notifying about a new measurement cycle and asks whether user wants to continue with measurements. a. If user chooses not to continue, the available measurement data is checked (block 4). If there is not enough data, a dialog appears, asking for confirmation † The relative elasticity as described in Hooke´s law, not Young´s modulus. 33 if the user wants to stop the measurement process. Otherwise if there is enough data to calculate elasticity, the processes described in step 6 are carried out. b. If user chooses to continue, the processes described in step 3 are carried out. 3. LAS step size is read in (can be changed by the user in runtime) and the buttons for moving LAS up or down are checked. a. If “move up” or “move down” button is pressed, the program executes the block 2, which is checking if the desired movement does not make the LAS leave the SAR and in a positive case, execute the movement procedure. Otherwise the movement is not performed and the warning is passed to block 1 described in step 4. b. If up or down button is not pressed, the processes described in step 4 are carried out. 4. Position of the LAS is acquired, force is measured and SAR condition is checked (block 1). If check shows that the LAS is ordered to leave SAR (negative case) then: a. User chooses to continue with the measurement process by broadening SAR, after that the processes described in step 3 are carried out. b. User chooses not to continue, processes described in step 6 are carried out. In positive case of safe actuation area check, the processes described in step 5 are carried out. 5. The button for recording force and LAS position is checked a. If the button is not pressed then, the processes described in step 3 are carried out. b. If the button is pressed, then a user predefined amount of force measurements are taken with predefined time intervals. A mean value with type A uncertainty is calculated. Averaged force value, its uncertainty and position of LAS is stored in an temporary array (block 3). The processes described in step 2 are carried out. 6. Execution of block 5: Averaged force values with according uncertainties and positions of LAS are extracted from a temporary array. Elasticity and its uncertainty is calculated out of 2 measurement pairs, meaning that if 10 measurements were taken, 5 values of 34 elasticity can be calculated. Elasticity and uncertainty calculations are stored into a .txt file. The measurement process is finished. Figure 12: Block diagram of the elasticity measurement process. The numbers from (1) to (6) refer to according step in the description of the algorithm. 35 5.3.3 Potentiostat experiments The potentiostat is necessary for stress and strain experiments as a source of electrical stimulus for the muscle sample. This chapter describes the controlling and data acquisition methodology of the potentiostat. The same methodology applies on stress and strain measurement process. After initialization and setup of the experiment, the main loop of the experiment program is entered. Firstly a data downloading command is executed, which downloads any available data from potentiostat and retrieves the number of available samples. If there are any new samples, the data (voltage, current, time) is appended to according storage arrays (block 1 in Figure 13). Figure 13: Block diagram of potentiostat experiment. Stress and strain experiments have the same basic structure if according commands are added (Stress or strain experiment block). 36 If the number of downloaded samples is equal to the number of total amount of data samples, which is calculated in the setup process, the experiment is considered to be finished. The dashed arrow between force and strain measurement block and the end node in Figure 13 represents the case when strain experiment has exceeded the safe actuation boundary and user decides to not to continue. 5.3.4 Stress and strain experiments The stress and strain experiments have similar general operating structure as the Potentiostat Experiments (PSE) do, since the duration of the stimulating signal determines the duration of the experiment. The stress experiments have an additional force measuring section in comparison with PSE, right after the block 1 shown in Figure 13. Strain experiments, compared to PSE, include an additional muscle length controlling logic after the block 1 shown in Figure 13. The principal idea for measuring the strain is explained in chapter 2.2. In order to keep a constant force a Proportional controller (P controller) is implemented. Equation 5.5 shows the structure of the P controller, which is derived from equation 5.3. The input (F ) is difference between measured force and the set state (force value which the P controller is intended to track), output is a step size (X ) needed to carried out in order to maintain the muscle in the set state force. The gain (k) for the P controller is elasticity coefficient of a muscle which’s strain is to be measured. X  k´F , (5.5) where k´ = k  u k  and u k is the uncertainty of k. The addition of u k to k assures, that no faulty steps are done in a case when k  u k . The minimal step, that the LAS can carry out is lmin = 0,5μm , so if F is smaller than lF  minmin (5.6)  k´ 37 then no movement is carried out since it would require a step size < lmin . Therefore muscle sample’s linear displacement that is smaller than the resolution of the LAS, translates linearly to a region within the actual force can differ from the set value and is equal to Fmin . Figure 14 shows the block diagram of the strain measurement process and the step by step description of the process is following: 1. Start of the code. 2. Force is measured and F is calculated: l a. If F  min then the processes described in step 3 are carried out.  k´ l b. If F  min then the processes described in step 5 are carried out.  k´ 3. X is calculated based on equation 5.5. a. If (X < SAR) & (X + LAS position < SAR) is true, meaning that if the step size is not bigger than SAR and the movement process (X ) would not cause the LAS exit SAR then the processes described in step 4 are carried out. b. If the condition described in step 2 a is not true, then condition (X + LAS position < SAR) = TRUE? is checked again. i. If true, then the processes described in step 5 are carried out. ii. If not true, then the user is asked whether to continue with the experiment or not. If user chooses to continue, then new value for SAR is asked and step 5 is carried out. Otherwise step 6 is carried out and rest of the following program is stopped. 4. LAS carries out a movement which was calculated in step 3. 5. Position of the LAS is acquired from LAS’s controller and stored. 6. End of the code. 38 Figure 14: Block diagram of the strain measurement process. The depicted diagram is a sub diagram, belonging to force and strain measurement block in Figure 13. The numbers from (1) to (6) refer to according step in the description of the algorithm. 39 5.4 Automation of the experiments One muscle sample often requires a variety of tests to be done and more often same set of tests are carried out on different muscles. For the purposes of:  Measurement automation,  Avoiding user introduced errors of mislabeling the experiment data,  Avoiding user introduced errors of accidentally selecting wrong settings for the experiment, user can select a previously prepared list of tests and execute the testing process based on this list. The basic principle of measurement automation is setting up the potentiostat in accordance with the description of the stimulating signal type from the list, before starting each experiment. So if user chooses to automate the tests, a list where a set of coefficients describe the signal must be created beforehand. In the course of this work a LabVIEW based program was written, which allows the user to create signal type lists containing CV, CA and CP signals over simple to use user interface. Automated measurement process (depicted in a form of a block diagram in Figure 15) starts with reading in the signal (experiment) list .txt file and coefficients which describe the experiments are extracted and placed into a temporary array. The program enters to a for-loop where the potentiostat is initialized and user chosen experiment is executed. After the execution one cycle of the for-loop is complete. The number of cycles of the for-loop is equal to the amount of experiments from the list. The lists contain data only about signal type for the potentiostat. This means that user has to define whether this list applies on isotonic, isometric or potentiostat experiments. 40 Figure 15: Block diagram of automated multiple stress or strain measurement processes. 41 6 Testing and results Isotonic and isometric measurement results of two different test samples are presented in this chapter. One of the measurements represent a case where isotonic length change or displacement amplitude is about 2 orders of magnitude bigger (referred as high signal-to-noise ratio ca. 20 dB) than minimal step size of the LAS (lmin = 0,5μm ). The second case shows the results where displacement amplitude is comparable to lmin (referred as low signal-to-noise ratio ca. 0 dB) and a technique for refining the interpretation of the measurements is proposed. The isometric and isotonic experiments were executed on over 50 different ionic EAP samples, meaning about 200 hours of measurement time. Minimal DAQ period Minimal PLC (PLC described in Table 4) rate of the voltmeter is 0.1, meaning that minimal DAQ period which can be selected by user is 2 ms from the voltmeter data integration side. IIECMS commands and data processing takes additional 160(5) ms (60 ms on voltmeter communication and 100 ms on potentiostat communication and data management). Therefore the minimal DAQ period is 160 ms which fulfills the requirement of min. DAQ period being at least 1000 ms. 6.1 High signal-to-noise ratio isotonic measurements Figure 16 shows isometric and Figure 17 isotonic measurement results of a conductive polymer film sample, where the stimulating signal was CV with potential range from -0.6 V to 0.65 V and scanning rate 5 mV/s. 42 Figure 16: Isometric measurement results. Stimulating signal was CV with potential range from -0.6 V to 0.65 V and scanning rate 5 mV/s. Figure 17: Isotonic measurement results. Stimulating signal was CV with potential range from -0.6 V to 0.65 V and scanning rate 5 mV/s. 43 Isotonic measurements show some noise for example in the range of 500 s. The noise is introduced when the actual elasticity coefficient, which is used for P controller, temporarily differs from measured one due to ongoing electrochemical processes and the result is overshooting. In extreme cases, when elasticity coefficient is measured to be much lower than it actually is, the P controller starts to generate. 6.2 Low signal-to-noise ratio isotonic measurements Figure 18 shows isotonic displacement measurement results of a conductive polymer film sample (blue line) where displacement amplitude is comparable tolmin (near 0 dB SNR). The stimulating signal was CV with potential range from -0.3 V to 0.5 V and scanning rate 5 mV/s. Figure 18: Near 0 dB SNR isotonic displacement measurement results (blue line) and force sensor data fused with displacement measurements (red points). 44 The raw measurements alone give a rough estimate about specimen’s isotonic actuation properties but the figure cannot be used in further data analysis. In order to give better interpretation for the measurement results, force sensor data can be fused with isotonic displacement measurements. Since the change of force is proportional to change of length (described by elasticity coefficient), the data fusion can be implemented as L fused  L  kF  F , n LASn n set (6.1) where n is the index of a measurement data sample, LLAS is the isotonic displacement measured n by LAS’s controller, Fn is measured force and Fset is a set force which is constant throughout the experiment. The fused measurements are shown in Figure 18 as red points. Figure 19: Fused isotonic displacement measurements (red points) after being processed by slack correction algorithm compared to original LAS position measurements. 45 It can be seen in Figure 18, that the fused measurements show some sort of ambiguous slack in the LAS actuation system since for example in a range of 200 s to 220 s, there is approximately 0,5μm gap (comparable with lmin ) between measurement points and similar gaps appear at other time steps. The slack might be a combination of the slack in muscle sample’s clamping system, samples internal properties and LAS controller’s position measurement or actuation error. Since the combined slack is comparable withlmin , it is probably caused mainly by LAS controller’s position measurement or actuation error. Figure 19 shows the fused isotonic displacement measurements (red points) after being processed by slack correction algorithm compared to original LAS position measurements. The algorithm processed the data in two cycles, where first cycle removed 0.5μm gaps and the second 0.7μm gaps. The near 0 dB SNR strain measurement data correction algorithm is shown in Figure 20. Figure 20: Near 0 dB SNR strain measurement data correction algorithm. LAS and force sensor data (inputs) are fused via equation 6.1. Then 0.5 um and 0.7 um gaps are eliminated and resulted data is outputted. 6.3 Uncertainty evaluation The uncertainty of force measurements depend on the components which are used in force calculations. Since force is calculated based on equation 5.2, the combined uncertainty is 2 2 2  F   F   F  2u   (6.1) F   uC   C  uU   u   u B  U Fd    U B   U  46 where uC is uncertainty of voltage-to-milligram coefficient, uU is uncertainty of bias voltage, B uU is uncertainty of the potential measured from the force sensor and uFd is uncertainty caused by drift of force measurements. The expanded uncertainty of stress and strain measurements are stated as the standard uncertainty of measurement multiplied by the coverage factor k = 2, which for a normal distribution corresponds to a coverage probability of approximately 95%. The uncertainty of force measurements are proportional to voltage values measured from the force sensor, which can be seen from equation 5.2. This means that small force amplitude signals have better accuracy, whereas with the growth of signal amplitude, the measurement uncertainty increases. Figure 21 displays the stress measurement results of a conductive polymer film sample and according measurement uncertainty (B type) based on equation 6.1, where uC was estimated to gram be 16.8 and uU = uU = 0.005 mV. V B Figure 21: Isometric measurement results (blue line) and uncertainty of each measurement (red line) based equation 6.1. 47 It can be seen on Figure 21, that in the range of 100 mg to -100 mg the steady state error (about 19 mg) is dominant and B type uncertainty is marginally affected by measurement results. The most important contributor to strain measurement error is the resolution of LAS position estimation system, which is 0.5μm , therefore the B type uncertainty of strain measurements 0.5 μm without assistance of data fusing (equation 6.1) is k   0.6μm . The data fusion 3 contributes marginally (usually <0.05μm ) to the uncertainty of strain measurements, but it clarifies the interpretation of the results. 48 7 User interface This chapter gives an overview of the layout of the GUI and explains the input/output fields. The GUI which’s layout is shown in Figure 22 consists of 3 main sections and each section is divided as follows: 1. Section 1: Settings and controls  General settings  File directions and names  Potentiostat settings  Motor controls / Elasticity measurement settings 2. Section 2: Experiment status info  Ongoing experiment info  Experiment list info 3. Section 3: Measurement output graphs  Force and displacement graphs  Potentiostat XY and charge graphs Section 1 includes all controls necessary for setting up and controlling an experiment. Section 2 includes a set of indicators of experiment progress and section 3 includes 4 graphs that plot measurement data. Each section is further described in a form of a table, which contains descriptions about input/output fields. . 49 50 Figure 22. Layout of the graphical user interface of the developed software. 7.1 Layout section 1: Settings and controls General settings tab Table 5. Controls in the general settings tab Name of the control Type Functionality Experiment mode Enum A dropdown menu where the type of the experiment can be selected. Delay between measurement Integer Delay between measurement cycles. cycles Applies for isotonic, isometric and elasticity measurements. Experiment Comment String User can write comments and comments are saved into a separate txt. file. Timeout: User intervention Boolean In case of potentiostat freeze timeout, user can set if the error is handled automatically (false) or is an intervention required by user (true). Timeout: Stop all if timeout Boolean If “User intervention = false” then in case of a potentiostat freeze timeout the experiments are stopped (true) or next experiment is started (false). Prologix COM port I/O menu Port number of Prologix GPIB to USB converter. 51 Figure 23: GUI of the general settings tab. File and folder management tab Table 6. Controls in file and folder management tab. Name of the control Type Functionality General data folder Path (String) Folder where all subfolders are kept. Directory for the data files Path (String) Folder where measurement data is saved. Applies for force and strain measurements. Directory for potentiostat data Path (String) Folder where potentiostat data is saved. Calibration file path Path (String) Path for force sensor calibration file. 52 Table 6 continued. Elasticity file path Path (String) Path for elasticity file. Experiment list file path Path (String) Path for a file containing a list of experiments. Used in automated experiments mode. Automated folder management Boolean Creates automatically a set of folders depending on the type of the experiment (folder creation hierarchy explained in chapter 5.1). “true = enabled”. Name of test set String If automated folder management = true, then this is the name of the folder where measurement mode specific folders are created. Figure 24: GUI of the file directories and names tab 53 LAS controls and elasticity measurement settings tab Table 7. LAS controls, elasticity measurement settings. Name of the control Type Functionality Step size Double Size of LAS’s singe step. Move Up Boolean Move LAS up for one step. Move Down Boolean Move LAS down for one step. Number of samples Integer Number of force measurement data samples taken per one elasticity measurement recording cycle. Duration of force Integer Duration of force sampling process in measurement procedure (ms) milliseconds. Record values Boolean Starts gathering force samples. Figure 25: GUI of the LAS controls and elasticity settings tab 54 Elasticity meas. LAS controls Controls Potentiostat settings tab Potentiostat settings tab is used in order to manually set up an experiment which utilizes the potentiostat. This section consists of 4 tabs and according contained controls are explained in tables:  General controls of the potentiostat (table 8),  CV controls,  CA controls,  CP controls (table 9). Table 8. General controls of the potentiostat. Name of the control Type Functionality Potentiostat mode Enum Selects CV, CP or CA experiment. Hardware ID Integer Device ID number of the potentiostat. Port number Integer Port number where potentiostat is connected. Number of cycles Integer Number of CA, CP or CV measurement cycles. Current range Enum Current range for CV or CA experiment. Post experiment cell state Boolean If “true” then cell of the potentiostat is not isolated after the experiment. Calculate charge curve Boolean If “true”, the charge over potential is calculated 55 Figure 26: GUI of the potentiostat settings tab. Table 9. CV, CA and CP controls. Name of the control Type Functionality Volts per point (V) Double Defines the voltage step per one sample in volts. Scanrate (V/s) Double Defines the increase of applied voltage per second in Volts/s. Vertex 1 Double Peak 1 applied voltage value in the cycle. CV starts from according value. Vertex 2 Double Peak 2 applied voltage value in the cycle. CA Sample rate Integer Sampling frequency of CA experiment (Hz). Potential 1 Double Starting potential step of the cycle in Volts. Potential 2 Double Second potential step of the cycle in Volts. 56 CA tab CV tab Applied potential time 1 Integer Duration of Potential 1 in seconds. Applied potential time 2 Integer Duration of Potential 2 in seconds. CP Sample rate Integer Sampling frequency of CP experiment (Hz). Current 1 Double Starting current step of the cycle in Amperes. Current 2 Double Second current step of the cycle in Amperes. Applied current time 1 Integer Duration of Current 1 in seconds. Applied current time 2 Integer Duration of Current 2 in seconds. 7.2 Layout section 2: Experiment status info Experiment status info section shows information like duration, name and etc. about ongoing experiment and list of experiments. The info indicators are described in table 10. 57 CP tab Table 10. Description of experiment status info indicators. Name of the indicator Functionality Duration of the experiment Shows how long the experiment lasts in minutes. Current experiment progress Shows the percentage of the progress of the experiment. Name of the experiment Name and basic information about the experiment. Number of experiment Shows the number of ongoing experiment out of total number of experiments. Duration of experiment list Shows how long the testing process lasts from the first experiment to last. Figure 27: GUI of the experiment status info section. 58 7.3 Layout section 3: Measurement output graphs Measurement output graphs section consists of a set of 4 graphs. Force and strain graph which are plotted over time (unit in seconds) are positioned in the upper right side of the GUI (see Figure 22). These graphs also plot the stimulating signal. The force is plotted in milligrams and strain is plotted in micrometers. Other 2 graphs, which are for plotting potentiostat’s data, consist of general use graph and a charge graph. The charge graph is plotted over potential and the representation of general use graph axes change automatically according to the experiment (shown in Table 11). Table 11. Axis representations of general use graph of graph tabs 2 according to the experiment. Experiment X axis label Yaxis label CV Potential (V) Current (mA) CA Time (s) Current (mA) CP Time (s) Potential (V) 59 8 Conclusions Software and a graphical user interface for controlling isotonic and isometric electro-chemo measurement system was developed in LabVIEW software development environment and tested. The hardware setup was combined by separately acquired commercial off-the-shelf devices like force sensor, voltmeter, linear actuation stage and potentiostat. The IIECMS software was developed by combining software development kits of the implemented devices, creating algorithms for execution of isotonic, isometric measurements and automating the measurement and user input processes in LabVIEW. In order to operate the potentiostat in LabVIEW, an according set of software drivers were created with ActiveX based SDK of the potentiostat. The most important findings of this work are following:  The B type uncertainty of isometric measurements depends proportionally on measurement values but in the range of 100 mg uncertainty was estimated to be 19 mg and increases if stress is > 100 mg.  The accuracy of isotonic measurements estimated to be 0.6μm where the biggest contributor to measurement error was the position estimation resolution of LAS.  The maximum user selectable measurement frequency for IIECMS is 160 ms,  The developed software fulfills all the requirements that were set for this work. A technique of giving better interpretation for near 0 dB signal-to-noise ratio isotonic test results was proposed, which combines LAS measurements with force sensor output measurements. After implementation of the proposed technique, partial discontinuity of the data indicated that the IIECMS setup has an occasionally appearing slack of approximately 0.7μmwhich can be eliminated with post experiment data processing. Future perspective for IIECMS software is to fully automate the isotonic and isometric experiments. This means that the user has an option to run both experiment types in an automated sequence, thus eliminating the need for a user to measure sample’s elasticity. 60 Summary Ionic electroactive polymers, belonging to a group of artificial muscles, are materials which have been studied in aim of creating an actuator that has characteristics of a natural muscle. Natural muscle is considered to be a highly optimized and efficient system due to its reoccurring similar structure in many organisms. The main goal in this wide research field is to investigate how artificial muscles can replace or repair for example limbs, hearts or muscles in future applications. Artificial muscles are mostly compared with electrochemical properties, efficiency in strain, stress and durability. Often a measurement setup is used that integrates devices like force sensing transducer, linear actuator and a potentiostat in order to measure muscles electrical and mechanical characteristics with a single system of devices. The main goal of this work was to develop software and a graphical user interface for carrying out isometric and isotonic measurements combined with electrochemical stimulus on ionic electroactive polymer samples. As a result of authors work a set of algorithms that automate experiment processes, simplify the use of software and refine isotonic measurement results were created, implemented and successfully tested within time span of one and a half semesters on a setup, which was provided as a hardware basis for this work. 61 Kokkuvõte Isotoonilisi, isomeetrilis ja elektrokeemilisi mõõtmiseid teostava seadme tarkvara arendamine Ioonsed elektroaktiivsed polümeerid on materjalid, mis muudavad elektrivälja toimel oma suurust ja kuju. Populaarteaduslikult kutsutakse selliseid materjale ka tehislihasteks. Tehislihaste arendamise peamiseks sihiks on luua bioloogilise lihasega sarnanev aktuaator. Bioloogilisi lihaseid peetakse kõrgelt optimeeritud ja efektiivseteks süsteemideks, sest nende ülesehitus erinevates organismides on sarnane. Tehilihaste uurimise üheks oluliseimaks eesmärgiks on leida võimalused loomulike lihaste tugevdamiseks, parandamiseks ja asendamiseks. Tehislihaste omavahelise võrdluse peamisteks karakteristikuteks on elektrokeemilised omadused, eluiga, suhteline pikenemine, avaldatava jõu suurus ja efektiivsus. Tihtipeale kasutatakse nende omaduste hindamiseks mõõtesüsteemi, milles kasutatakse potentsiostaati, mis genereerib tehislihast stimuleerivat elektrilist signaali, jõuandurit, mis registreerib avaldatava jõu muutust, ja lineaarmootorit, mis võimaldab muuta tehislihase pikkust. Antud töö peamiseks eesmärgiks oli arendada tarkvara ja graafiline kasutajaliides seadmele, mille abil saab ioonsete elektroaktiivsete polümeeride peal teostada isotoonilisi ja isomeetrilisi mõõtmiseid. Töö tulemusena arendati ja testiti autori poolt valmistatud tarkvara. Välja arendati tehislihaste mõõtmisteks metoodika ning algoritmid, mis teostavad elektromehaanilisi mõõtmiseid ja lihtsustavad tarkvara kasutamist. Lisaks koostati algoritm 0 dB lähedase signaal- müra suhtega isotoonilise mõõtmistulemuse esitamiseks. 62 Acknowledgements I would like to thank my supervisor Rudolf Kiefer for keeping up the positive spirit in the lab, introducing me to the vast research field of artificial muscles and supporting me in the course of this work. Also I would like to express my gratitude to Mihkel Väljaots, Heiki Kasemägi, Friedrich Kaasik, Arko Kesküla and the rest of Intelligent Materials and Systems lab for excellent constructive criticism and help. Thanks to Veiko Vunder for always having the time to answer to my rookie questions about the quirks of LabVIEW. I would especially like to thank my family and close ones, who understood and accepted the social side effects of the intense periods in the course of this work. 63 References [1] M. Mohsen Shahinpoor, Kwang J. Kim, Artificial Muscles (Taylor & Francis, 2007). [2] Yoseph Bar-Cohen, Electroactive Polymer Actuators as Artificial Muscles (SPIE Press, 2004). [3] Kwang J. Kim and S. Tadokoro, Electroactive Polymers for Robotics Applications (Springer, 2007). [4] F. Carpi, P. Chiarelli, A. Mazzoldi, and D. De Rossi, “Electromechanical characterisation of dielectric elastomer planar actuators: Comparative evaluation of different electrode materials and different counterloads,” Sensors Actuators, A Phys., vol. 107, no. 1, pp. 85–95 (2003). [5] G. M. Spinks, B. Xi, D. Zhou, V. T. Truong, and G. G. Wallace, “Enhanced control and stability of polypyrrole electromechanical actuators,” Synth. Met., vol. 140, no. 2–3, pp. 273–280 (2004). [6] K. Kaneto, H. Fujisue, M. Kunifusa, and W. Takashima, “Conducting polymer soft actuators based on polypyrrole films - energy conversion efficiency,” Smart Mater. Struct., vol. 16, no. 2, pp. S250–S255 (2007). [7] T. Tanaka, M. Sato, and M. Kozako, “Voltage-strain characteristics of cylindrical polymer actuators,” Proc. 2005 Int. Symp. Electr. Insul. Mater. 2005. (ISEIM 2005)., vol. 3, pp. 780–783 (2005). [8] J. D. Madden, D. Rinderknecht, P. a. Anquetil, and I. W. Hunter, “Creep and cycle life in polypyrrole actuators,” Sensors Actuators, A Phys., vol. 133, no. 1, pp. 210–217 (2007). [9] J. D. Madden, R. a. Cush, T. S. Kanigan, C. J. Brenan, and I. W. Hunter, “Encapsulated polypyrrole actuators,” Synth. Met., vol. 105, no. 1, pp. 61–64 (1999). 64 [10] N. Vandesteeg, P. G. Madden, J. D. Madden, P. a Anquetil, and I. W. Hunter, “Synthesis and characterization of EDOT-based conducting polymer actuators,” Smart Struct. Mater. 2003 Electroact. Polym. Actuators Devices, vol. 5051, pp. 349–356 (2003). [11] T. Xiao, Y. Ren, K. Liao, P. Wu, F. Li, and H. M. Cheng, “Determination of tensile strength distribution of nanotubes from testing of nanotube bundles,” Compos. Sci. Technol., vol. 68, no. 14, pp. 2937–2942 (2008). [12] ADInstruments, “LabChart,” www.adinstruments.com/products/labchart. (Accessed: 14- May-2015). [13] Aurora Scientific Inc., “Dynamic Muscle Control software,” http://hubspot.aurorascientific.com/product/dmc-dma. (Accessed: 14-May-2015). [14] Panlab, “Protowin,” http://www.panlab.com/en/products/protowin-software-panlab. (Accessed: 14-May-2015). [15] National Instruments, “LabVIEW,” http://www.ni.com/labview/. (Accessed: 14-May- 2015). [16] Aurora Scientific Inc., “1400A - Permeabilized Fiber Test System,” 14.05.2015. [17] Harvard Apparatus, “ACAD® Isolated Tissue Data Acquisition Software,” https://www.harvardapparatus.co.uk/webapp/wcs/stores/servlet/product_11555_10001_ 52805_-1_HAUK_ProductDetail___. (Accessed: 14-May-2015). [18] K. J. Kim and M. Shahinpoor, “A novel method of manufacturing three-dimensional ionic polymer-metal composites (IPMCs) biomimetic sensors, actuators and artificial muscles,” Polymer (Guildf)., vol. 43, pp. 797–802, (2001). [19] M. Shahinpoor, “Ionic polymer-conductor composites as biomimetic sensors, robotic actuators and artificial muscles - A review,” Electrochim. Acta, vol. 48, pp. 2343–2353, (2003). 65 [20] R. D. Kornbluh, R. E. Pelrine, P. K. Gallagher, J. S. Eckerle, and Q. Pei, “ELECTROACTIVE POLYMER ANIMATED DEVICES,” 6,586,859 B2. [21] J. W. Paquette and K. J. Kim, “Ionomeric electroactive polymer artificial muscle for naval applications,” IEEE J. Ocean. Eng., vol. 29, no. 3, pp. 729–737 (2004). [22] Ray H. Baughman, “Playing Nature’s Game with Artificial Muscles,” Science (80-. )., vol. 308, no. 5718, pp. 63–65, (2005). [23] J. Torop, V. Palmre, M. Arulepp, T. Sugino, K. Asaka, and A. Aabloo, “Flexible supercapacitor-like actuator with carbide-derived carbon electrodes,” Carbon N. Y., vol. 49, no. 9, pp. 3113–3119 (2011). [24] Bio-Logic, “Potentiostat PG581.” http://www.bio-logic.info/instruments/potentiostat- pg581/. (Accessed: 16-May-2015). [25] Panlab, “Isometric transducer TRI202PAD,” http://www.panlab.com/en/products/transducers-panlab. (Accessed: 16-May-2015). [26] Keithley, “Voltmeter 2182A,” http://www.keithley.com/products/dcac/sensitive/lowvoltage?mn=2182A. (Accessed: 16-May-2015). [27] Prologix, “GPIB-USB Controller,” http://prologix.biz/gpib-usb-controller.html. (Accessed: 16-May-2015). [28] Physik Instrumente, “High-Load Precision Stage M-414.3PD,” http://www.physikinstrumente.com/product-detail-page/m-414-701755.html. (Accessed: 16-May-2015). [29] Physik Instrumente, “C-863 Mercury Servo Controller,” http://www.physikinstrumente.com/product-detail-page/c-863-900606.html. (Accessed: 16-May-2015). 66 Appendix A: Use cases This chapter explains how to run stress, strain and elasticity measurement experiments described in the requirements chapter (chapter 4) using the GUI of the designed software. Some of the steps are uniform for all or some of the experiments. In order to keep the step-by- step explanation more followable, some of the common functionalities are explained once and are referred to in step-by-step guide: A File and folder management paths remain unchanged if “Automated folder management” is disabled. User has to define the paths only once unless user decides to change them manually for different experiments. B If “Automated folder management” is enabled, user has to define the path for a folder where experiment data subfolders will be created (based on Figure 9). Also user has to name the subfolder where experiment data is saved. If the name of the subfolder is changed after folder creation (initiated by running an experiment), a new folder is created with the changed name. If user disables the “Automated folder management”, all created paths will remain in the file and folder management tab until program is closed without making current input values of the VI as default or is changed by user. C The software is automatically stopped after the experiment finishes. Stress measurement experiment Single experiment case: 1. User selects “Single stress experiment” option from measurement mode menu under general settings tab. 2. Path management: a. If the experiment is ran for the first time: User defines a location for force sensor calibration file, experiment and potentiostat data folders under file and folder management tab. Alternatively user enables the “Automated folder management” and defines the location of experiment data folder, names the subfolder that is automatically created and gives path force sensor calibration file. 67 b. If the experiment has been run before: User does not have to change the paths if not needed. 3. User defines the stimulating signal of the potentiostat under “Potentiostat settings” tab. 4. User runs the VI. Multiple experiment case: 1. User selects “Multiple stress experiments” option from “Experiment mode” menu under general settings tab. 2. Additionally to Single experiment case step 2.a, a path to experiment list file must be specified. 3. User runs the VI. Strain measurement experiment Single experiment case 1. User selects “Single strain experiment” option from “Experiment mode” menu under general settings tab. 2. Path management: a. If the experiment is ran for the first time: User defines a location for force sensor calibration file, elasticity file, experiment and potentiostat data folders under file and folder management tab. Alternatively user enables the “Automated folder management” and defines the location of experiment data folder, names the subfolder that is automatically created and gives path force sensor calibration file. b. If the experiment has been run before: User does not have to change the paths if not needed. 3. User defines the “Safe actuation region” under “LAS controls” tab. 4. User defines the stimulating signal of the potentiostat under “Potentiostat settings” tab. 5. User runs the VI. 68 6. A user prompt appears which asks if user wants to run the experiment with currently measured force or define custom “Set force”. After setting the force, user clicks “OK”. Next, user dialog asks if user wants to manually change the elasticity value. After setting the elasticity, user clicks “OK” and the experiment is started. User can also cancel without initiating the measurement process by clicking “CANCEL” button, which is present in all user prompt windows. Multiple experiment case 1. User selects “Multiple strain experiments” option from “Experiment mode” menu under general settings tab. 2. Additionally to Single experiment case step 2.a, a path to experiment list file must be specified. 3. User carries out the steps 3, 5 and 6 described in single experiment case. Elasticity measurement 1. User selects “Measure elasticity” option from “Experiment mode” menu under general settings tab. 2. Path management: a. If the experiment is ran for the first time: User defines a locations for force sensor calibration file and for folder where elasticity data is saved under file and folder management tab. Alternatively user enables the “Automated folder management” and defines the location of experiment data folder, names the subfolder that is automatically created and gives path force sensor calibration file. b. If the experiment has been run before: User does not have to change the paths if not needed. 3. User defines the “Safe actuation region”, “Number of samples” and “Duration of force measurement procedure” under “LAS controls/ Elasticity settings” tab (see Figure 25). 4. User runs the VI. 69 5. A dialog pops up indicating the measurement cycle and asks if user chooses to continue or stop the measurement process. If user chooses to continue, then the processes described in step 6 are carried out. If user chooses to stop, the measurement process is finished. 6. User pulls the muscle sample for a step which is defined in “LAS controls/ Elasticity settings” tab (see Figure 25). User records the force measurements by pressing “Record values”. Program goes back to step 5. 70 Appendix B: LabVIEW code samples LabVIEW code of file and folder management (Figure b) process and initialization of devices (Figure a). Figure a: Initialization of devices 71 72 Figure b: Folder management and path checking. Lihtlitsents lõputöö reprodutseerimiseks ja lõputöö üldsusele kättesaadavaks tegemiseks Mina Robert Valner 1. annan Tartu Ülikoolile tasuta loa (lihtlitsentsi) enda loodud teose „Software Development for Isotonic and Isometric Electro-Chemo Measurement System“ mille juhendaja on Rudolf Kiefer. 1.1. reprodutseerimiseks säilitamise ja üldsusele kättesaadavaks tegemise eesmärgil, sealhulgas digitaalarhiivi DSpace-is lisamise eesmärgil kuni autoriõiguse kehtivuse tähtaja lõppemiseni; 1.2. üldsusele kättesaadavaks tegemiseks Tartu Ülikooli veebikeskkonna kaudu, sealhulgas digitaalarhiivi DSpace´i kaudu kuni autoriõiguse kehtivuse tähtaja lõppemiseni. 2. olen teadlik, et punktis 1 nimetatud õigused jäävad alles ka autorile. 3. kinnitan, et lihtlitsentsi andmisega ei rikuta teiste isikute intellektuaalomandi ega isikuandmete kaitse seadusest tulenevaid õigusi. Tartus 18.05.2015 73