text editor for writing the code/program in C language, which is called sketches and the pro- gram is to be saved with an extension filename.ino. There are different options on the main window, which allows the verification of the code and download the same on the Arduino board.
Table 7.1: Arduino UNO development board technical specifications.
Symbol Value Symbol Value
Microcontroller ATmega328 Operating Voltage 5V
Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V Digital I/O Pins 14(of which 6 provide
PWM output)
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA Flash Memory 32 KB
SRAM 2 KB EEPROM 1 KB
Clock Spped 16 MHz
(a)
(b)
Figure 7.2: (a) Flow diagram of the experimental set-up and (b) actual experimental set-up.
drops across the SMA wire and the total circuit are measured via a voltage divider circuit and the analog input pins of the Arduino board. These voltage signals are used to calculate the electrical resistance of the SMA wire actuator, which will be used in the EKF model to estimate the displacement of the spring. It is to be noted that, the EKF model discussed in
section 3.6.1.2, with temperature and stress of SMA constituting the state vector, has been implemented in the Arduino. The modified EKF model, discussed in section 6.5.2, compris- ing of four state variables, requiring more computational effort, could not be implemented in real-time using this Arduino board. In what follows, the details of the low pass filter, inverting amplifier and voltage divider circuits are discussed.
(a) Firstly, EKF algorithm, developed using explicit numerical integration scheme as dis- cussed in section 3.6.1.2, is implemented in C language. This is essential to implement the model in Arduino boards. The compiler converts this code to assembly language and then to machine language, that the processor can understand. This is done by the software Arduino 1.6.7 ©Arduino.
(b) The voltage signal required to be applied across the SMA, to ensure resistive heating of the SMA wire actuator, is developed in one of the subroutine of the C-code. This voltage signal is then passed through the PWM pin of the Arduino board. The PWM signal is then converted to analog signal using RC low pass filter (LPF), presented in Fig. 7.3a.
The schematic of the process is shown in Fig. 7.3b. This voltage signal is then sent to the power amplifier, to amplify this analog signal.
(c) Since, the existing power amplifier (Agilent 6642A) takes input from 0 to -5 V, and the microcontroller's working range is from 0 to 5 V. Hence, to invert the voltage signal, the output of the low pass filter is passed through an op-amp (UA-741), working as unity gain amplifier. Figure 7.4a represents the pin configuration of the 741 op-amp. Pin 1 and Pin 5 of the opamp is used to making the offset voltage zero. Pin 2 and pin 3 are the inverting and non-inverting inputs terminal, respectively. Pin 4 and 7 is used for the supply voltage.
Inverting Amplifier :
This means that if the positive input voltage is applied to(a)
(b)
Figure 7.3: Schematic of (a) low pass filter, and (b) connection between Arduino and low pass filter.
the 741 op-amp, it is converted to a negative voltage signal. It implies, that the output signal has reverse polarity than that of the input signal. Here, the gain is decided by the two resistors (R1 andR2), connected with the 741 chip, as shown in Fig. 7.4b. IfR1 = R2, then the amplifier is called unity gain amplifier, offering a gain of 1. In unity gain amplifier, the polarity of the output signal is opposite to that of an input signal, but the magnitude of the both signal remains same. The output and input signals are related as,
Vout =−R2
R1Vin. (7.1)
Here,Vinis the positive input voltage,R1andR2are taken as, 100ΩandVoutrepresents the negative output voltage, which is being applied to the input pin of the power amplifier.
This process is schematically shown in Fig. 7.4c. It illustrates that, PWM signal obtained from the board is converted in analog form using the low pass filter and is then inverted
(a) (b)
(c)
Figure 7.4: (a) Pin configuration of 741 op-amp, (b) inverting amplifier of unity gain, and (c) signal flow diagram using inverting amplifier.
using unity gain amplifier; and finally fed to the existing power amplifier.
(d) The power amplifier amplifies the voltage signal by a gain of 4. The amplified voltage signal is then applied across the SMA wire, as shown in Fig. 7.5. Then depending on the applied voltage, SMA wire gets heated or cooled, resulting in change in length of the spring.
(e) This displacement of the SMA actuated linear spring is measured by the laser displace- ment sensor, discussed in section 4.2. The analog output voltage (Vout) of the sensor
which is proportional to the displacement of the system, is acquired using one of the analog input pins of the board as depicted in Fig. 7.5. Using this measured output volt- age of the sensor, the displacement of the SMA actuated system has been calculated using Eqn. (4.1) as
δ= 25(Vout−V0) mm (7.2) (f) Similarly, for measuring the electrical resistance of the SMA wire, the required voltage signals across the SMA and the total circuit, are acquired using two other analog pins of the Arduino UNO, shown in Fig. 7.5. Following Eqn. (4.2), the electrical resistance of SMA is calculated as
RSM A =
VSM A VT −VSM A
R0. (7.3)
(g) To ensure complete transformation in the SMA wire of length 250 mm, the amplitude of voltage signal needs to be 7 V. However, the analog input pins of the Arduino board has a measuring range of 0 - 5 V. To obviate this problem, another voltage divider circuit, shown in Fig. 7.6a, is designed and used.
Figure 7.5: Voltage signal acquired from Arduino UNO for measuring the actual displace- ment of the system, and electrical resistance of SMA.
(a)
(b)
Figure 7.6: Schematic of (a) voltage divider circuit and (b) connection between voltage divider circuit with Arduino UNO.
This circuit divides the applied voltage by two, forR1 =R2, following Eqn. (7.4). Then the out voltage of the divider circuit is measured using the analog pin of the Arduino, depicted in Fig. 7.6b. However, this fact is taken care while computing the electrical resistance.
Vout= R2
R1+R2Vin. (7.4)