Micro Controller Based Potentiostat

6
MICROCONTROLLER BASED POTENTIOSTAT DESIGN FOR METALLURGICAL APPLICATION O.K. Sheela, R. Mallika and J. Jayapandian Design Development & Services Section. Materials Science Division. Indira Gandhi Centre for Atomic Research. Kalpakkam – 603 102, Tamil Nadu. India ABSTRACT In metallurgy studies, the current density as a function of time in electrochemical systems with a working electrode at a controlled potential has been recorded in investigations where the variation of cell current with time provides information on the formation or break-down of boundary layers. Potentiostats are analytical instruments playing vital role in the metallurgical ageing properties measurements and studies. The operation sequences of the potentiostats are the prime importance of these measurements. A Microcontroller based novel programmable scanner design for the “ Wenking” make potentiostat HP88 has been described in this paper, it accepts the menu driven user- friendly window based control program written in LabVIEW ver.7.1, a graphical language, through PCs serial port, controls the working electrode potential and acquires the cell current data from the electrochemical cell. A microcontroller 89C2051 has been programmed in such a way to sets the slewing control electrode potential in a user required step and time. For each step, acquiring the cell current data through a high resolution DVM, communicating the digitized data to PC through its serial port. This design finds potential usage in metallurgical applications. The acquired current data has been plotted on-line against the step control electrode potential as well as stored in the PC memory. 1. INTRODUCTION Precise measurement of electrochemical phenomena is a prime need, not only in R&D, but also in day-to-day practical applications like corrosion, effectiveness and life of surface coatings and the investigation of biological and photoelectric effects. Among the applications corrosion and surface treatments are most important applications in the area of metallurgy. By direct analytical methods measurements can be made to find out the effects like corrosion rate, weight loss etc, but the analytical method is very slow and time consuming, since the processes are electrochemical. Instead, these measurements are possible by electrical methods on the basis of Farada’s law which relates the change in mass per unit area to the current flow [1]. The main advantages in this approach are a relatively short measuring time, high accuracy and the possibility of monitoring the process continuously. But the system under J. Instrum. Soc. India 38(1) 44-49

Transcript of Micro Controller Based Potentiostat

Page 1: Micro Controller Based Potentiostat

44

MICROCONTROLLER BASED POTENTIOSTATDESIGN FOR METALLURGICAL APPLICATION

O.K. Sheela, R. Mallika and J. JayapandianDesign Development & Services Section.

Materials Science Division. Indira Gandhi Centre for Atomic Research.Kalpakkam – 603 102, Tamil Nadu. India

ABSTRACT

In metallurgy studies, the current density as a function of time in electrochemical systemswith a working electrode at a controlled potential has been recorded in investigationswhere the variation of cell current with time provides information on the formation orbreak-down of boundary layers. Potentiostats are analytical instruments playing vitalrole in the metallurgical ageing properties measurements and studies. The operationsequences of the potentiostats are the prime importance of these measurements. AMicrocontroller based novel programmable scanner design for the “Wenking” makepotentiostat HP88 has been described in this paper, it accepts the menu driven user-friendly window based control program written in LabVIEW ver.7.1, a graphical language,through PCs serial port, controls the working electrode potential and acquires the cellcurrent data from the electrochemical cell. A microcontroller 89C2051 has been programmedin such a way to sets the slewing control electrode potential in a user required step andtime. For each step, acquiring the cell current data through a high resolution DVM,communicating the digitized data to PC through its serial port. This design finds potentialusage in metallurgical applications. The acquired current data has been plotted on-lineagainst the step control electrode potential as well as stored in the PC memory.

1. INTRODUCTION

Precise measurement of electrochemical phenomena is a prime need, not only in R&D,but also in day-to-day practical applications like corrosion, effectiveness and life of surfacecoatings and the investigation of biological and photoelectric effects. Among the applicationscorrosion and surface treatments are most important applications in the area of metallurgy.By direct analytical methods measurements can be made to find out the effects like corrosionrate, weight loss etc, but the analytical method is very slow and time consuming, since theprocesses are electrochemical. Instead, these measurements are possible by electrical methodson the basis of Farada’s law which relates the change in mass per unit area to the currentflow [1]. The main advantages in this approach are a relatively short measuring time, highaccuracy and the possibility of monitoring the process continuously. But the system under

J. Instrum. Soc. India 38(1) 44-49

Page 2: Micro Controller Based Potentiostat

45

investigation has to be interrupted from its normal state by an application of external signal,which may change the actual property of the system. The applied external signal may be ACor DC signal, the AC and DC technique has been widely used for corrosion rate measurement.But AC methods are dominating the in electrochemical research due to the requirement ofless external application voltage for the measurement and do not affect the electrode propertiesmuch.

2. ELECTROCHEMICAL INSTRUMENTATION

The electrochemical methods measure the interactions between an electrode and thesolution in contact with the electrode. These are broadly classified as static and dynamicmethods [2]

Static: no current passes between the electrodes, concentration of species inelectrochemical cell remain unchanged.

Dynamic: current flows and concentrations change as the result of a redox reaction

Electrical and chemical transport properties are measured with various methods, whichalso allow to determine electronic or ionic conductivities and to investigate the elementaryprocesses which determine the transport properties [3]. One such method is using a devicecalled potentiostat (fig.1). It is an electronic device that controls the voltage difference betweena working electrode and a reference electrode. The circuit for the potentiostats works to keepthe potential constant by noticing changes in the resistance of the system and compensatinginversely with a change in the current. As a result, a change to a higher resistance wouldcause the current to decrease to keep the voltage constant in the system. A potentiostat typicallyfunctions with three electrodes in an electrochemical cell.

Fig. 1 : Block diagram of three electrode electrochemical cell and potentiostat circuit

Working Electrode (WE): Electrochemical reactions being studied occur at the workingelectrode. This is analogous to testing using weight loss coupons. The working electrode canbe bare metal or coated.

Reference Electrode (RE): A reference electrode is used in measuring the workingelectrode potential. A reference electrode should have a constant electrochemical potential aslong as no current flows through it.

Microcontroller based potentiostat design for metallurgical application

Page 3: Micro Controller Based Potentiostat

46

Counter Electrode (CE): The counter electrode is a conductor that completes the cellcircuit. The counter electrode in laboratory cells is generally an inert conductor like platinumor graphite. In field probes it’s generally another piece of the working electrode material.

The circuit for the potentiostats (fig.1.) works to keep the potential constant by noticingchanges in the resistance of the system and compensating inversely with a change in thecurrent. As a result, a change to a higher resistance would cause the current to decrease tokeep the voltage constant in the system. Since R = U/I (Ohms law) and the output potentialI

0 = V

C / R, where I

O = output electrical current of the potentiostat, V

c = voltage that is kept

constant and R = electrical resistance that varies. The electrometer circuit in the potentiostatmeasures the voltage difference between the reference and working electrodes. An idealelectrometer has zero input current and infinite input impedance. The Current to Voltage (I/V) converter in the potentiostat measures the cell current. It forces the cell current to flowthrough a current measurement resistor. The voltage drop across that resistor is a measure ofthe cell current. A servo amplifier circuit in the potentiostat compares the measured cell voltagewith the desired voltage and drives current into the cell to force the voltages to be the same.Under normal conditions, the cell voltage is controlled to be identical to the signal sourcevoltage [4].

A microcontroller based embedded programmable scanner unit for “Wenking” makepotentiostat HP88 has been designed and fabricated at Materials Science Division of IGCAR,Kalpakkam, which programmatically sets the control potential for the working electrode (WE)and measures the cell current as a function of working electrode potential, records the acquiredon-line data in to the PC memory. This paper describes the novel design approach for theprogrammable scanner, which automates the potentiostate for the user required mode ofoperation.

3. EMBEDDED DESIGN FOR PROGRAMMABLE POTENTIOSTATSCANNER

The programmable potentiostat interface hardware design shown in fig.2., consists of asingle chip micro-controller 89C2051 [5], which has two input/output (I/O) ports P1 and P3,

O.K. Sheela, R. Mallika and J. Jayapandian

Fig. 2 : Programmable Scanner for “Wenking” make Potentiostat

Page 4: Micro Controller Based Potentiostat

47

two 16 bit programmable timer/counters, an internal clock circuit with crystal clock input forits operation, 2k on-chip erasable flash memory and 128 byte RAM. This is interfaced to PCserially through its P3 port bit 3.0 and 3.1. The I/O ports P1 connectivity and micro-controllerprogramming sequence, ensures the interfacing of Wenking make potentiostat with host.Microcontroller (C) port_1 bits P1.5 through P1.7 interfaces a 16 bit digital-to-analogconverter (DAC), MAX 542, for setting the user required potential to the potentiostat counterelectrode (CE). In which, bit P1.5 assign chip select /CS for the DAC, bit P1.6 sets clocksignal, SClk, to transfer 16 bit data to the DAC and bit P1.7 sets data bits, D

IN, in

synchronization with SClk. Bits P1.0 through P1.3 controls the switches SW1, SW2, SW3,SW4. The RC network input configuration of the stage two op-amp, OP 07, acts as anintegrator (with the time constant of 1 second) to produce ramping potential for the potentiostat.Switches SW1 and SW2 controls integrators charging and discharging cycle, controlled bythe Cs program routine. Switches SW3 and SW4 provides selection of positive or negativeoutput voltage ramp for the potentiostat. The standalone scanner designs available forpotentiostat control uses variable RC network for setting the slope of the ramping voltageoutput [6]. In this design, a novel design approach has been implemented, which providesramping voltage of different slope by properly setting the integrator charging voltage throughDAC, programmed by the C, close the switch SW1 for charging to 1 second and subsequentlyactivating the switch SW2 for discharging the acquired charge, if it is required. This actionwill provide ramping voltage of different slope depends on the DAC output voltage, whichcharges the integrator capacitor. Out of two on-chip counter timers of micro-controller, onecounter is used to set the baud rate for the serial communication, through which the Cinteracts with PCs serial port. A USB to serial converter cable has been used to avoid theburden on searching for the serial port availability in PC, since normally PCs are coming upwith 2 communication port only. Apart from that being a plug ‘N’ play devices the USB-serial cable automatically installed by the device manager in window environment. A 11.059MHzx-tal connected to pin 4 and 5 provides the basic clock for the micro-controller. The leveltranslator chip MAX 232 converts the TTL logic from micro-controller to the RS232C standardof +/- 12 V and provides the proper interconnectivity to the PCs serial port.

Fig. 3 : Block diagram of the programmable potentiostat scanner

Microcontroller based potentiostat design for metallurgical application 47

Page 5: Micro Controller Based Potentiostat

48

4. VIRTUAL INSTRUMENT PROGRAM

Virtual instruments (VI) enable easy use of general purpose digital PCs for the measurementand control of various parameters like temperature, flow, pressure, position etc., The VIprograms mimic the control processes, which are in a remote area, on the PC screen. Theexperimentalist/operator can visualize the on going process control action through the PCscreen. VI programs provide an inexpensive and powerful platform for the control and dataacquisition of process variables. These programs are easy to implement with graphic languages(G-language) like LabVIEW, HP-vee, Bridge VIEW, Agilent VIEW etc., The G languageimplements the data flow technique and provides easy interfacing with PCs under the Windowsenvironment. VI programs can also be developed in any other text language like C,C++, Pascal,Visual Basic, Visual C etc., but requires considerable efforts to access hardware modules inthe Windows environment. The G language provides built-in function libraries for a variety ofapplication requirements as graphic palettes, which in turn invokes the required DLLs for thefunctions to run under Windows environment. Usually the G language VI programs consistsof two frames viz., panel diagram and functional diagram. In the panel diagram,programmers can assign various controls and indicators ( i.e, input and output variables) asper their requirements and in the functional diagram , the designer can implement the requiredfunctions like mathematical operations, comparison, loop functions, filters, curve fittingfunctions, decision making, data conversion, file copying sequence, input/output portaddressing, implementing standard interfacing like parallel port, serial port, GPIB (IEEE488),

O.K. Sheela, R. Mallika and J. Jayapandian

Fig. 4 : Virtual instrument program front panel diagram for programmable potentiostat

Page 6: Micro Controller Based Potentiostat

49

Universal Synchronous Bus (USB), etc., The National Instruments LabVIEW version 7.1incorporates all the necessary functions as ‘icons’ in its package [7]. Even beginners canwrite their own programs making use of this package within a reasonable time span. Therecent trend in laboratories as well as in industrial automation, indicates the use of virtualinstrument programs and the concept of minimal hardware and maximum support of softwarefor the control of process automation.

In this design, menu driven user-friendly graphical user interface (GUI) virtual instrumentprogram written in LabVIEW controls the microcontroller and acquire the cell current datafrom a high resolution DVM interfaced to the another serial port of PC. The VI controlprogram provides on-line plot of cell current as a function of the control electrode potentialapplied to the potentiostat (fig.4). The file save/load menu in the VI program permits theuser to save/load the acquired data in/from the specified file path.

5. CONCLUSION

Embedded potentiostat scanner design and the usage of G language VI provides easyinterfacing of the electrochemical cell with personal computer in Window environment. Theautomation of electrochemical cell analysis using potentiostat and its embedded Cprogrammable scanner interface provides easy way of performing rapid and accuratemeasurement of electrochemical phenomena in metallurgical applications. The executable versionof Virtual instrument automation program built with LabVIEW application builder can be loadedin any PC. One simply plugs the serial connectivity to the PC and enables the automationsequence through the VI automation program. The menu driven user friendly VI front panelenables easy interaction of the user with the potentiostat and in turn electrochemical cell.

REFERENCES1. N D Cogger and N J Evans. Technical Report No.6. 5th May ’99, Solartron Limited, 1999

http://www.solartron.com

2. http://www.corrosion-doctors.org/Instrumentation/Introduction.htm

3. http://en.wikipedia.org/wiki/Potentiostat

4. Operation manual “Wenking” make potentiostat model HP88.

5. Micro-controller 89C2051 datasheet. Atmel Corporation. www.Atmel.com.

6. Operation manual “Wenking” make Scanner unit (1988).

7. National Instruments Corporation, User manual LabVIEW Ver. 7.1(2005).

Microcontroller based potentiostat design for metallurgical application