Potentiostat Development

weaverchurchSoftware and s/w Development

Aug 15, 2012 (5 years and 5 days ago)

1,290 views

UNIVERSITY OF LOUISV
ILLE

Two and Three Electrode
Potentiostats

Final Report


Josh Geiman, Kyle Bloomer, and Lucas Bennett

With Ben Williams

Project Manager: Dr. Andrew Dozier

Project Customer: Dr. Cindy Harnett

Rev. 0

Fall
2011





Two and Three Electrode Potentiostats






2

Table of
Contents


Table of Contents

................................
................................
................................
................................
..........

2

1.

Introduction/Background

................................
................................
................................
.....................

6

2.

System Description

................................
................................
................................
...............................

7

2.1 Two Electrode Potentiostat (Ardustat)

................................
................................
................................
...

7

2.1.1 Two Electrode Potentiostat System Interfaces

................................
................................
................

9

2.1.1.1 USB
Connection

................................
................................
................................
........................

9

2.1.1.2 Digital to Analog Convertor (DAC)

................................
................................
............................

9

2.1.1.3 Digital Potentiometer (POT)

................................
................................
................................
.....

9

2.1.1.4 Digital Relay Control Module

................................
................................
................................
....

9

2.1.1.5 PC with USB Connection

................................
................................
................................
...........

9

2.1.1.6 Power Connection

................................
................................
................................
.....................

9

2.1.1.7 Electrodes

................................
................................
................................
................................
.

9

2.1.2 Two Electrode Potentiostat System Functional Requirements

................................
.....................

10

2.1.2.1 Data Display Management System

................................
................................
.........................

10

2.1.2.1.1 Capture Input Parameters

................................
................................
..............................

10

2.1.2.1.2 Transmit Configuration to Arduino Development Board

................................
................

10

2.1.2.1.3 Starting Experiment

................................
................................
................................
.........

10

4.2.1.4 Exporting Data

................................
................................
................................
....................

10

2.1.2.2 Arduino Development Board

................................
................................
................................
..

10

2.1.2.2.1 Capture Configuration

................................
................................
................................
.....

10

2.1.2.2.2 Export of Measured
Data

................................
................................
................................
.

10

2.1.2.3 Daughtercard

................................
................................
................................
..........................

10

2.1.2.3.1 Measurements

................................
................................
................................
.................

10

2.1.3 Two Electrode Potentiostat System Hardware Overview
................................
..............................

10

2.1.3.1 Arduino Development Board

................................
................................
................................
..

10


Two and Three Electrode Potentiostats






3

2.1.3.1 Daughtercard

................................
................................
................................
..........................

11

2.1.3.1.1 Digital to Analog Convertor Output Amplifier

................................
................................
.....

11

2.1.3.1.2 Digital Potentiometer

................................
................................
................................
..........

11

2.1.3.1.3 Digital Relay Control Module

................................
................................
...............................

11

2.1.4 Two Electrode Potentiostat System Software Overview

................................
...............................

11

2.1.4.1 Arduino Development Board Firmware

................................
................................
..................

11

2.1.4.2 Data Display Management System Graphical User Interface

................................
.................

11

2.2

Three Electrode Potentiostat (CheapStat)

................................
................................
......................

13

2.2.1

Three Electrode Potentiostat System Diag
rams and Interfaces

................................
.............

14

2.2.1.1 External Interfaces

................................
................................
................................
..................

14

2.2.1.1.1 PC with USB Connection

................................
................................
................................
..

14

2.2.1.1.2 DC Power Converter

................................
................................
................................
........

14

2.2.1.2 Internal Interfaces

................................
................................
................................
...................

14

2.2.1.2.1 USB Connection

................................
................................
................................
...............

14

2.2.1.2.2 Windows operating System

................................
................................
.............................

14

2.2.1.2.3 Software to Software Interface

................................
................................
.......................

14

2.2.2

Three Electrode Potentiostat System Requirements

................................
..............................

15

2.2.2.1 Develop an inexpensi
ve Potentiostat for use in a lab setting
................................
.................

15

2.2.2.2 Document firmware for ease of use and later modification

................................
..................

15

2.2.2.3 Document Potentiostat so it can be produced by unskilled users

................................
.........

15

2.2.2.4 Log Data for later analysis

................................
................................
................................
.......

15

2.2.2.5 Make recommendations for expanding potentiostat to three electrode version

.................

15

2.2.3

Three Electrode Potentiostat H
ardware Overview

................................
................................
.

16

2.2.3.1 Processor

................................
................................
................................
................................
.

16

2.2.3.2 Data Display Management System (DDMS)

................................
................................
............

16

2.2.3.3 Voltage Converter

................................
................................
................................
...................

16


Two and Three Electrode Potentiostats






4

2.
2.4

Three Electrode Potentiostat Software Overview

................................
................................
..

16

2.2.4.1 Processor Firmware

................................
................................
................................
................

16

2.2.4.2 Data Display Management System (DDMS)

................................
................................
............

16

3.

Detailed Design

................................
................................
................................
................................
...

17

3.1

Two El
ectrode Potentiostat Detailed Design

................................
................................
..............

17

3.1.1

Hardware Detailed Design

................................
................................
................................
......

17

3.1.1.1 Arduino Development Board

................................
................................
................................
..

17

3.1.1.1 Daughtercard

................................
................................
................................
..........................

20

3.1.1.1.1 Digital to Analog Converter

................................
................................
................................
..

21

3.1.1.1.2 Digital Potentiometer (POT)

................................
................................
................................

23

3.1.1.1.3 Digital Relay Control Module

................................
................................
...............................

24

3.1.2

Software Detailed Design

................................
................................
................................
........

25

3.1.2.1 Arduino Development Board Firmware

................................
................................
..................

25

3.1.2.2 Data Display Management System

................................
................................
.........................

25

3.1.2.2.1 DDMS GUI Frame

................................
................................
................................
.................

27

3.1.2.2.2 Serial Communication

................................
................................
................................
..........

28

3.1.2.2.3 Data
Logger

................................
................................
................................
..........................

28

3.1.2.2.4Data Visualization

................................
................................
................................
.................

28

3.1.2.3 Daughtercard

................................
................................
................................
..........................

28

3.1.2.3.1 Digital to Analog Converter

................................
................................
................................
..

28

3.1.2.3.2 Digital Potentiometer (POT)

................................
................................
................................

29

3.2

Three Electrode Potentiostat Detailed Design
................................
................................
............

30

3.2.1

Hardware Detailed Design

................................
................................
................................
......

30

3.2.1.1 Processor

................................
................................
................................
................................
.

30

3.2.2

Software Detailed Design

................................
................................
................................
........

31

3.2.2.1

Processor Firmware

................................
................................
................................
............

31

3.2.2.2 Data
Display Management System (DDMS)

................................
................................
............

31


Two and Three Electrode Potentiostats






5

4.

Experiment

................................
................................
................................
................................
..........

32

4.1

Ascorbic Acid Preparation

................................
................................
................................
...........

32

4.2

Experimental Procedure

................................
................................
................................
.............

32

4.2

Results

................................
................................
................................
................................
.........

32

5.

Conclusions

................................
................................
................................
................................
.........

38

6.

Recommendat
ions for Future Work

................................
................................
................................
...

38

6.1 Two Electrode Potentiostat System

................................
................................
................................
..

38

6.1.1 Add Other Modes of Operation

................................
................................
................................
.

38

6.1.2 Add Edit Calibration Settings

................................
................................
................................
.....

38

6.2 Three Electrode Potentiostat System

................................
................................
...............................

38

6.2.1 Implementation of a Graphical User Interface

................................
................................
..........

38

6.3 Universal System Recommendations

................................
................................
...............................

39

6.3.1 Electro
-
Chemistry Procedure Integrity

................................
................................
......................

39

6.3.2 Two Electrode Potentiostat Firmware Audit

................................
................................
.............

39

6.3.3 Hardware Integrity Verification

................................
................................
................................
.

39

7.

Material Documentation and Reconciliation

................................
................................
......................

40

7.1 References

................................
................................
................................
................................
........

40









Two and Three Electrode Potentiostats






6

1.

Introduction/
Background




The purpose for developing this system is to achieve an affordable (less than $100 per)
alternative to laboratory quality potentiostats. This device will be used in a laboratory environment by
faculty and students, and will allow verification and characte
rization of fuel cells, and other
chemical
redox reactions.

The Electrical and Computer Engineering Department of the University of Louisville needs to
outfit Dr. Cindy Harnett’s laboratory with up to 15 potentiostats for use in verifying fuel cells and
other
electrochemical redox reactions. Research quality potentiostat work stations are currently available “off
the shelf”. However, these devices typically range in price from $1,000 for a model with limited
functionality, to over $10,000 for a general
purpose, research quality workstation

[1]
.


The Two Electrode Potentiostat system is a continuing project from a previous ECE 599 ‘Capstone’
project. At the time of the project hand
-
off, there were two previous iterations of an open
-
source
potentiostat kn
own as the “Ardustat”
[
2
]
.

This Ardustat open source project was created and implemented as designed and documented
in
http://steingart.ccny.cuny.edu/ardustat
. This system was originally developed by
Dan Steintgart at
the City College of New York (CCNY). Unfortunately, very little documentation was provided with this
system and thus reverse engineering was required to finalize the development of the system. While
some beneficial progress was made from
the first capstone group, there were errors that left
functionality limited and the unit inoperable.

A follow
-
on independent study produced another attempt at the creation of the Ardustat, which
is a Two Electrode Potentiostat. Ben Williams, a graduate stu
dent of the ECE department made several
successful contributions to the system. Williams found the misuse of a resistor in the systems board
layout. Additionally, Williams was able to improve the system documentation and comment the source
code of the proc
essor board firmware. The system is able to operate in both Potentiostat and
Galvanostat modes of operation. In Potentiostat mode, a constant potential voltage is held, while in
Galvanostat mode, a constant current is held. These currents are held until a
specified threshold is
reached.

The current effort is a third follow
-
on project, which will improve the existing Ardustat
management, control and display software. The Ardustat is currently operated by a user using the Data
Display Management System (DDMS)
, which runs on a Personal Computer. The DDMS Graphical User
Interface (GUI) is poorly implemented. The GUI is cumbersome and non
-
intuitive. Since the
measurements of chemical redox reactions are a very complex, the need for an easy to use GUI is a
necessi
ty.


Concurrent with this effort, our group is working on development of a Three Electrode
Potentiostat (also known as the “Cheapstat”). With the success of the three
-
electrode configuration
implementation, our group was able to run a common experiment w
ith both Potentiostat designs. With
the results of the procedure, it is possible to compare the electrical results of the different designs.



Two and Three Electrode Potentiostats






7

2.

System Description

2.
1
Two Electrode Potentiostat (Ardustat)


Fig
ure 1



Two Electrode Potentiostat System Block Diagram


The Two Electrode Potentiostat is used for the characterization of various devices over various voltage,
current and load ranges. The system will be able to perform a cyclic voltammetry test. In this test
, the
working electrode potential will be linearly ramped until it reaches a set potential at which point the
potential ramp will be inverted. This inversion will happen several times during the experiments and will
be able to be specified by the user.

The
re are three major components that form the system:

1) A DDMS software system running on a COTS PC with a 64
-
bit Windows O/S.


2) An Arduino Development Board that executes the measurement algorithm and interfaces to a
custom daughter card.


3) A Daught
ercard PCB that provides additional electrical control components.

Items 2 and 3 are housed in a project box, with an interface to the measurement cell and a USB
interface to the DDMS PC.


Two and Three Electrode Potentiostats






8


Figure 2: Constructed Ardustat System


For the purpose of this p
roject, the housing containing Items 2 and 3 will be referred to as the
“Ardustat”.

The DDMS software system will allow communication with the Ardustat, calibration and configuration of
the Ardustat, measurement of data during the experiment, data loggin
g and timestamping, and
execution of the voltage/current profiles required for the experiment. Once connected to the Ardustat,
the DDMS communicates with the Ardunio Development Board. In the GUI of the DDMS, the user will
specify the measurement of a cycl
ic waveform, as well as other parameters, such as maximum voltage
or current for the experiment. While executing the specified measurements, the instantaneous results
will be displayed to the user on the GUI. Upon completion of the experiment, the user can

review logged
measurements in a CSV file for easy manipulation. The DDMS connects to the Ardunio Development
Board through a Universal Serial Bus (USB) connection.

The Arduino uses its onboard Analog Inputs to measure the voltage of the power source, t
he voltage
across the Digital Potentiometer (POT), and the Digital to Analog Power Output (DAC)

[
2
]
.

This allows the
Arduino microprocessor to adjust the resistance of a programmable POT and the voltage output of the
DAC, thus adjusting the output of the power source.


Two and Three Electrode Potentiostats






9

2.1.1

Two Electrode Potentiostat
System Interfaces

2.1.1.1

USB Connection

The system w
ill be utilized by the user through the use of the DDMS running on a Personal
Computer (PC). To connect this major system component to the rest of the system a Universal
Serial Bus (USB) connection will be implemented between the components.

2.1.1.2

Digit
al to Analog Convertor (DAC)

For further system communication a DAC must be utilized. The Arduino Development Board
establishes communication with the DAC through the use of an SPI bus and a control digial
output pin. The DAC should be able to handle the r
equests of the Arduino Development Board
and output voltage between 0
-
5V accordingly.

2.1.1.3

Digital Potentiometer (POT)

For system implementation, the utilization of a POT is imperative. The Arduino Development
Board establishes communication with the PO
T using an SPI bus as well as a control digital
output pin. The POT should be able to handle requests from the Arduino Development Board
and set resistance between 0

Ω and 50kΩ accordingly.

2.1.1.4

Digital Relay Control Module

For handling communication
purposes, a Digital Relay Control Module will be implemented. For
communication a digital output pin will be utilized. This will allow for the connection between
the Arduino Development Board and the DAC.

2.1.1.5

PC with USB Connection

Since communication
through the major system components will rely heavily on a USB
connection, it is necessary that this external interface is in place. Since most modern computers
have this capability, it should not be of much concern.

2.1.1.6

Power Connection

The measuremen
ts taken by a Potentiostat are electrical by nature; as such, a power supply to
the system will need to be implemented. The power supply will only feed power to the Arduino
Development Board and Daughtercard componenets. The supply will come to these
compo
nents via the USB connection with the PC.

2.1.1.7

Electrodes

For the system to accept measurements, the Daughtercard will contain a set of two leads, one
positive and one negative, which will be connected with an analog input. This analog input will
connec
t using a 2.5mm headphone jack on the Daughtercard. The leads will have to attach to
electrodes on the device under testing(DUT).



Two and Three Electrode Potentiostats






10

2.1.2 Two Electrode Potentiostat System

Functional Requirements

2.1.2.1 Data Display Management System


2.1.2.1
.
1

Captu
r
e

In
put Parameters

For proper measurement of DUT’s, users will need to set maximum voltages or currents. For a
user to accomplish this, the GUI will provide text fields for specifying these items. In addition,
the user will be able to specify the amount of tim
e to run the experiment in the DDMS.

2.1.2.1.2 Transmit Configuration to Arduino Development Board

Once the parameters are specified they, the DDMS will transmit them to the Ardustat through a
USB connection.

2.1.2.1.3 Starting Experiment

The DDMS will pr
ovide a button to allow the user to start the experiment. Once the experiment
has been started, the DDMS must issue the appropriate commands to the Ardustat, and display
that the experiment is under way.

4.2.1.4 Exporting Data

The recorded results will be

exported in a Comma Separated Valued (CSV) format file. To
accomplish this, the DDMS will provide an export button within the GUI .

2.1.2.2
Arduino Development Board


2.1.2.2.1 Capture Configuration

The Arduino Development board will receive the test conf
iguration from the DDMS and convert
it to executable commands that will be sent to the Daughtercard.

2.1.2.2.2 Export of Measured Data

The Arduino Development board will send Daughtercard measurements back to the DDMS
through the USB connection.

2.1.2.3
Daughtercard

2.1.2.3.1 Measurements

When the Daughtercard receives the execution instructions from the Arduino it must set the
appropriate voltage and current cross the DUT. Measured data will be provided to the
development board via the appopriate analog

input to the development board.

2.1.3 Two Electrode Potentiostat System

Hardware Overview

2.
1.3
.1
Arduino Development Board


The control board used for the potentiostat is a base level Arduino. (An Arduino Uno,
Duemilanove
, or Diecimila will work). This

board
has 14 digital input/output pins (of which 6 can
be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a
power jack, an ICSP header, and a reset button
.


Two and Three Electrode Potentiostats






11

The Control Board uses the SPI bus on the daughtercard to com
municate to the Digital to Analog
Convertor Output Amplifier (DAC), as well as the Digital Potentiometer. It uses a Digital Output
to open and close the Relay, and has an FTDI chip for USB communications to the GUI.

The Control Board uses the on
-
board A/D

converter to measure the cell voltage, which is then
used by the Control Board to adjust the DAC or POT as
needed

[2
]
.


2.
1.3
.1
Daughtercard


2.
1.3
.1
.1

Digital to Analog Convertor Output Amplifier


The DAC is able to output 0V


5V on 4 channels, only one

of which is wired on this board.
This is the primary control for maintaining a constant voltage across the cell. The output is
controlled by the Control Board via the SPI bus

[2
]
.


2.
1.3.1.2 Digital Potentiometer


The Digital Potentiometer (POT) is able

to vary the resistance between a terminal and the
wiper. The installed POT can vary the resistance between 0
Ω

and 50k
Ω

programmatically
via the SPI bus

[2
]
.



2.
1.3.1.3 Digital Relay Control Module


The Digital Relay Control Module (RELAY) is wired in se
ries with the POT and DAC, allowing
them to be removed from the circuit and the CELL read without any external influence

[2
]
.


2.1.4 Two Electrode Potentiostat System

Software Overview

2.
1.4
.1
Arduino Development Board Firmware


The Control Board Firmware
(Firmware) takes input from the Graphical User Interface (GUI) as
well as readings from the CELL to make adjustments to the DAC and the POT. Depending on the
mode set by the GUI, and the set
-
point given by the GUI, the Firmware will either try to hold the

voltage across the CELL constant, or the current through the CELL constant

[2
]
.


2.
1.4
.
2

Data Display Management System Graphical User Interface


The DDMS will be operated on PC running on any operating system. The DDMS will be operated
through the use o
f a GUI. It is through this GUI the user will have the means for managing the
entire Two Electrode Potentiostat system. The DDMS must provide a platform for displaying the

Two and Three Electrode Potentiostats






12

user interface, setting configuration parameters, data logging and communication bet
ween the
DDMS and the Arduino Development Board.






Two and Three Electrode Potentiostats






13

2.2

Three Electrode Potentiostat (CheapStat)



Fig
ure
3



Three Electrode Potentiostat
System Diagram


The system will consist of a processor that will be in charge of making pontentiostat type
measurements that will be controlled by the user interface ran on the Data Display Management
System(DDMS). The DDMS will be designed so that the user will have mini
mal interaction and a
guided process for configuring the processor. The system will have a three electrode configuration
that will be used for measuring given Devices Under Testing(DUT). The DDMS will have a graphical
user interface (GUI) so that the user

can log data and display measurements in a readable manner.




Two and Three Electrode Potentiostats






14

2.
2.
1

Three Electrode Potentiostat

System Diagrams

and Interfaces

2.
2
.1
.1

External Interfaces

2.
2
.1.1
.1

PC with USB Connection


To run the system, a connection to a PC must be established
though the USB interface of the
Potentiostat. This will allow for a user to run a Graphical User Interface portion of the DDMS and
thus specify and record particular measurements.


2.2.1.1
.2
DC Power Converter


Due to the necessity of electrical power feed
ing the Potentiostat system, a DC power converter
will be utilized within the system so that 120 VAC, 60Hz, 15 A power can operate the system for
user’s ease.

2.2.1
.2 Internal Interfaces

2.2.1
.2
.1
USB Connection


The Potentiostat system will require that
signals be sent to and from a PC running the DDMS.
Signals will be captured from the GUI portion of the DDMS which specify how the processor will
measure the DUT. Response signals will be sent to the PC representing the measured values.
The best interface
for handling these signals is USB.


2.2.1
.2
.2
Windows operating System


The DDMS will be designed so that it is compatible with Windows 7 Operating System
environment.


2.2.1
.2
.3
Software to Software Interface


The DDMS running on a PC will have to communi
cate with the processor software by sending
signals through the USB device which represent actions, parameters, and recorded values. There
is a need for a binary interface scheme for representing these communication methods.



Two and Three Electrode Potentiostats






15

2.2
.2

Three Electrode Potentiostat
System Requirements

2.2
.2
.1
Develop an inexpensive
Potentiostat for use in a lab setting


A c
ommercial
p
otentiostat can cost in the price range of $5,000
to $10,000
per channel, which is
prohibitively expensive for widespread l
aboratory use.
For example, an instructional lab
environment requires a low
-
cost potentiostat that can be produced for individual use.


2.2
.2.
2
Document firmware for ease of use and later modification


All firmware must be documented at a level that a new

user ca
n come in and modify parameters

or add new functionality without having to go through detailed circuit analysis, or program
analysis.


2.2
.2.
3
Document
P
otentiostat so it can be produced by unskilled users


The potentiostat boards must be able to be easily assembled by unskilled users, such as first or
second year electrical engineering students. This will allow for many boards to be built for
laboratory use,
while allowing such students to gain circuit expe
rience
.


2.2
.2
.4
Log Data for later analysis


As the potentiostat will be used in a laboratory environment, data logging is needed for l
ater
analysis and comparison.



2.2
.2
.5
Make recommendations for expanding potentiostat to three electrode version


A
hi
gh level recommendation for expanding the potentiostat from a single electrode to a multi
electrode model should be included for future projects.



Two and Three Electrode Potentiostats






16

2.
2.
3

Three Electrode Potentiostat
Hardware Overview

2.2.3.
1

Processor


The final product will also entail a

controlled processor system. The system will be dedicated to
measuring current across specified devices. Additionally, the system will have its own power
input as well as an USB interface for communication to a computer hosting the DDMS. The
processor wil
l make measurements across DUT’s with its three electrode configuration.


2.2.3
.
2

Data Display Management System (DDMS)


The DDMS will be run on a PC running a Windows 7 operating system and have a USB
connection. The DDMS will be operated through the use
of a GUI. This GUI will be a means for
the user to operate and maintain the system. The DDMS must provide a PreTest Mode, a Test
Mode and a Post Processing Mode. The PreTest Mode will allow for configuration of the
processor and calibration. The Test Mode

must execute the measurements on the processor.
The Post Processing Mode will allow for data formatting.


2.2.3
.
3

Voltage Converter


Due to the necessity of electrical power feeding the Potentiostat system, a DC power converter
will be utilized within the

s
ystem so that 120 VAC, 60Hz, 15
A power can operate the system for
user’s ease.

2.
2.
4

Three Electrode Potentiostat
Software Overview

2.2.4
.
1

Processor

Firmware


2.2.4
.
2

Data Display Management System

(DDMS)





Two and Three Electrode Potentiostats






17

3.

Detailed Design

3.1

Two Electrode Potentiost
at
Detailed Design


3.1.1

Hardware Detailed Design


3.1.1.1 Arduino Development Board

The control board that was selected for the system the Arduino Development Board. The board
is open sources and based on the Atmel ATMega328 microcontroller. The board
will utilize many
of its components such as the Digital Pins, Analog Input Pins, FTDI USB chip and the USB Jack.


Figure
4
: Arduino Development Board

The Arduino Development Board will serve the Two Electrode Potentiostat as a central interface
between the major components. Due to the open source platform and diverse nature of the
Arduino Development Board, it can easily be used in many other systems as

well as allowing for
future expansion without platform changes.

The Arduino firmware is responsible for initializing the USB connection with the DDMS as well as
the POT and DAC. The POT and DAC will be set to safe and known values to prevent hardware
fai
lure.

When the Arduino is connected to the DDMS via the USB cable, it will check for data packets
from the DDMS. If they exist, it will read the binary packets as described in Section 2.1.1. The
firmware on the Microcontroller should decompile the data an
d instruct the Daughtercard

Two and Three Electrode Potentiostats






18

measurement process with the SPI bus. This process will be executed in a set number of loops.
When results are obtained on the Daughtercard and returned to the Arduino, they will be sent
back to the DDMS using the schema describ
ed in Section 2.1.1.

The execution of the firmware on the Arduino when operating in Potentiostat mode follows a
simple flow chart testing mechanism which can be seen below.

Start Up
Read Serial
Modify Parameters
Run the
Potentiostat
Function
Run the Galvanostat
Function
Run the test
_
dac
function
Send Data to serial
Potentiostat
Active
?
Serial data
available
?
Is the DAC in
test mode
?
Galvanostat
Active
?
Yes
Yes
Yes
Yes
No
No
No
No
Run the test
_
pot
function
Is the POT in
test mode
?
Yes
No
Sufficient cycles
complete
?
Yes
No

Figure
5
: Control Board Software State Diagram


Two and Three Electrode Potentiostats






19

These o
perations are based on the main Potentiostat Function equation which can be seen in
the following figure.















(







)





Figure
6
: Potentiostat Function Equations

The system will also have the abilit
y to function in a Galvanostat mode. This mode’s execution
will be based on the following flow chart.

Start Up
Measure Vcell and
Vdac
Decrease DAC
Increase DAC
Is
((
Vdac


Vcell
)
<
setpoint
)
?
Is
((
Vdac


Vcell
)
>
setpoint
)
?
No
Is
(
outvoltl
>
0
)
?
Is
(
outvoltl
<
1023
)
?
No
Yes
Yes
Yes
Yes
Increase DAC
Decrease DAC
Is
((
Vcell


Vdac
)
>
setpoint
)
?
Is
((
Vcell


Vdac
)
>
setpoint
)
?
No
Is
(
outvoltl
<
1023
)
?
Is
(
outvoltl
>
0
)
?
No
Yes
Yes
Is
(
sign
>
0
)
?
Yes
Yes
Is
(
sign
<
0
)
?

Figure
7
: Potentiostat Function Flow Diagram




Two and Three Electrode Potentiostats






20

3.1.1.1
Daughtercard

The Daughtercard is responsible for the electrical processes necessary to obtain Potentiostat
measurements. It is constructed using a simple circuit which can be seen in the figure.



Figure
8
: Daughtercard Layout


Once assembled, the board is very modest and can be seen in the figure.


Two and Three Electrode Potentiostats






21

.

Figure
9
: Picture of Assembled Daughtercard


It comprised of three subcomponents:

3.1.1.1
.
1

Digital to Analog Converter


The DAC will be mainly responsible for managing specific g
ain configurations, remote sensing,
serial data output and high output drive capacity. In addition, the DAC will have the ability for an
active
-
low reset. This reset will clear all registers and DAC’s to zero.

For the DAC, a +5 MAX5250 will be implemented.

This chip combines four low
-
power, voltage
output, 10
-
bit DAC’s and four precision output amplifiers. The precision output amplifiers are
configured in a 20 pin package to save space.


Two and Three Electrode Potentiostats






22

AGND
1
FB
-
A
2
3
Out
-
A
4
Out
-
B
VDD
FB
-
D
Out
-
D
Out
-
C
20
19
18
17
FB
-
B
5
REFAB
6
7
RST
/
CLR
8
CS
FB
-
C
REFCD
PowerDown
Logic Out
16
15
14
13
Ser
.
IN
9
CLK
10
Ser
.
OUT
DGND
12
11


Digital to Analog
Convertor
MAX
5250
R
1
10
k

R
2
10
k

R
4
100

+
5
V
Black
R
3
100


Figure 1
0
: Max 5250 Pinout

The three wire
serial interface is compatible with SPI™/QSPI™ and Microwire™. With this
compatibility, the registers are able to act both independently and simultaneously with a single
command from the Arduino.

Of the four DAC’s only one is to be implemented, but future
expansion can utilize the remainder
DAC’s in addition to the input buffers for a three electrode Potentiostat configuration.

A feedback resistor and a voltage reference resistor are required for operation of the MAX5250.
For this system, two 10k
Ω

resistors

will be used for the feedback resistor(as noted by R1 and R2
in the following figure) and two 100k

Ω

resistors for the voltage references(as noted by R3 and
R4 in the following figure). The voltage reference resistors will form a voltage divider operation

which will place a 2.5V voltage on the Vref pin.


Two and Three Electrode Potentiostats






23


Figure 1
1
: Digital to Analog Converter Block Diagram



3.1.1.1
.
2

Digital Potentiometer (POT)


For the POT, an MCP4261 chip will be implemented. This chip is an 8
-
bit Dual SPI Digital
Potentiometer with
Non
-
Volatile Memory. There are several models available for this chip, but
for this system the 503e will be utilized. With this model, the POT will be adjustable in the range
between 0
Ω



50k
Ω.

There will be a series of equal value resistors (RS) that esta
blish the resistor ladder (ladder).
There will be a connection point (TAP) between the two resistors. By increasing or decreasing
the number of resistors in the ladder, a desirable amount of resistance can be achieved. The end
points of the resistors are c
onnected to analog switches which are connected to the Terminal A
and Terminal B pins. Since this is an 8
-
bit device only 256 resistors in a string are available. This,
in addition to the Terminal A and Terminal B settings, provide for a maximum possibilit
y of 257
settings which can be set to be accessed by the wiper.


Two and Three Electrode Potentiostats






24


Figure 1
2
: Digital Potentiometer Block Diagram


3.1.1.1
.
3

Digital Relay Control Module


The Digital Relay Control Module is an R56
-
1D.5
-
6 implemented in an SPST
-
NO relay so that the
DAC and
POT can be removed for an unimpeded measurement. The relay will receive
communication from the Arduino via the Digital Output pin. The figure below shows illustrates
th
e Digital Relay Control Module.


Figure 1
3
: Relay Control Module


Two and Three Electrode Potentiostats






25

3.1.2

Software Detaile
d Design

3.1.
2
.1 Arduino Development Board

Firmware

The Control Board Firmware will start
-
up the serial connection that will use the USB port to
communicate with the DDMS. It will then initialize the Digital POT and the DAC by setting them
to safe and kno
wn values. The control loop then starts by checking to see if a data packet, as
shown in Figure 7, from the DDMS if available. If it is, it will modify control parameters to meet
the requested values. The parameters are then checked to see which control

function must be
run, and the selected function is run. This loop will run a set number of times, and a data packet
will be sent to the GUI for logging, and display, as shown in the following figures

[2
]
.



MSB ………………………………………………………… LSB
5
Bytes of Serial Data
Char
[
4
]
Data Bytes
(
char
)
MSB …………………………………………………
.
……
.
LSB
Char
[
3
]
Char
[
2
]
Char
[
1
]
Char
[
0
]



Figure
14



GUI Data Packet (Received)

Control
Bits
MSB ………………………………………………………… LSB
11
Bytes of Serial Data Comma Separated
with Start and Stop Byte
Data Bytes
(
int and char
)
MSB ……… LSB
Int
[
10
]
Start
Stop
Int
[
9
]
Int
[
8
]
Int
[
7
]
Int
[
6
]
Int
[
5
]
Char
[
4
]
Char
[
3
]
Char
[
2
]
Char
[
1
]
Char
[
0
]
“Go”
“ST”

Figure
15



Control Board GUI Update Packet (Transmitted)


3.1.
2
.
2

Data Display Management System

The Data Display Management System will function as a major component on a PC. I
t will
communicate to the rest of the Two Electrode Potentiostat system using a USB interface.


Two and Three Electrode Potentiostats






26


Figure 1
6: Two Electrode Potentiostat DDMS GUI

The type of PC will not be of concern as the DDMS will be written in the environment free
programming language
Java. The minimal amount of memory to run the DDMS should be
512 MB of RAM. The DDMS should operate on a 32 bit processor environment with the
best intentions of providing 64 bit support. The PC should have the ability to run Java
Applications and will req
uire the support of the RXTX library.

All implementation of Java source code will be contained in java class file “Ardustat.java”
which can be referenced in the appendix.

The figure below illustrates how the software is organized.


Two and Three Electrode Potentiostats






27

Control Board Firmware
On
-
Board FTDI to USB Convertor
Serial Port Drivers
32
-
bit Operating System
RXTX Communication Package
Graphical User Interface
Run on Laptop
Run on Potentiostat Control Board
Custom Software
COTS Software
/
Hardware
USB

Figure
17
: Software System Diagram

3.1.
2
.
2
.
1

DDMS
GUI
Frame


The GUI, will be a Netbeans designed frame which will provide the user with means of
controlling the Two Electrode Potentiostat system. The frame will contain functionality for
allowing the u
ser to connect the DDMS to the other components via a USB connection. It will
also allow for the selection of the type of Potentiostat measurement as well as the parameters
of the measurement. Additionally, it will allow for the input of a file path where
the logged data
will be stored. Finally, the frame will also display a table of live measurements to the user.


Two and Three Electrode Potentiostats






28

3.1.
2
.
2.2
Serial Communication


The Arduino Development Board will check for data packets sent from the DDMS are available.
The DDMS will send th
e packets in the form described in the figure. The DDMS will receive
packets from the Arduino Development Board in the figure below. It will take this data and
convert it to usable data that can be read by the user or logged.

3.1.
2
.
2.3
Data Logger


The da
ta logger is responsible for storing all returned measurements of the other two
components of the Two Electrode Potentiostat system. Each time a measurement is received,
the DDMS is responsible for storing the values into a prestructured CSV file.

3.1.
2
.
2.
4
Data Visualization


The data visualization is designed so that the user can watch a live feed of the measurements
being taken by Two Electrode Potentiostat system. The values will be displayed in uneditable
form fields. The readings will include voltages,

currents, and times.


3.1.
2
.
3

Daughtercard

3.1.
2
.
3
.
1

Digital to Analog Converter


The DAC’s each have double
-
buffered input organized as an input register followed by a DAC
register.

The DAC is controlled by the Arduino thru the usage of the SPI Bus. The
data packets received by
the DAC following the schema of the figure. This 16
-
bit serial word loads data into each of the
inputs and DAC registers. In addition to the data carried in the packet, the address is also
received which will allow for future expan
sion of the other DAC’s on the Daughtercard.

MSB……………………………………………………………
.
LSB
16
Bits of Serial Data
Address
Bits
A
1
A
0
C
1
C
0
Control
Bits
D
9
………………
..
D
0
S
1
S
0
Data Bits
(
10
+
2
)
MSB………………………
..
LSB

Figure 1
8
: write_dac Function Packet



Two and Three Electrode Potentiostats






29

3.1.
2
.
3
.
2

Digital Potentiometer (POT)


The POT is controlled by the Arduino thru the usage of the SPI Bus. The data packets received by
the POT
following the schema of the figure. The data can be used to adjust the resistance
between a single terminal (which in this system will be Terminal B and the wiper). In addition to
the data carried in the packet, the address is also received which will allo
w for future expansion
of the other POT’s on the Daughtercard

MSB ………………………………………………………… LSB
16
Bits of Serial Data
Address Bits
(
4
)
MSB ……
...

.
LSB
A
3
A
2
A
1
A
0
D
9
………………
..
D
0
Data Bits
(
10
)
MSB ………………………
.
LSB
MSB ………………………………………………………… LSB
16
Bits of Serial Data
Address
Bits
A
3
A
2
A
1
A
0
D
9
………………
..
D
0
Data Bits
(
10
)
MSB ……………………
.
LSB
Control
Bits
C
1
C
0

Figure 1
9
: write_pot Function Packet




Two and Three Electrode Potentiostats






30

3.2

Three Electrode Potentiostat Detailed Design

3.2.1

Hardware Detailed Design


3.
2.1
.1
Processor



Figure 20: Three
Electrode Potentiostat Processor



Two and Three Electrode Potentiostats






31


Figure 21: Three Electrode Processor Flow Diagram


3.2
.2


Software Detailed Design

3.2.2.1

Processor

Firmware


3.2.2.2
Data Display Management System

(DDMS)





Two and Three Electrode Potentiostats






32

4.

Experiment


4.1

Ascorbic Acid
Preparation

1.

Crush the appropriate
amount of 500 mg Vitamin C tablets into a fine powder keeping in mind
the conversions necessary for obtaining 0.1,0.2,0.3M of ascorbic acid if one 500mg tablet will
add 250 parts per million(ppm) to a solution.

2.

Fill a sauce pan with about 8 ounces of water

and the fine powder.

3.

Boil the mixture until bubbles begin forming on the bottom of the pan.

4.

Place a coffee filter in a plastic funnel and pour the mixture into the funnel

leading into
containers for the calculated molarity value.

5.

Mix any needed cold water

to keep the ppm and molarity values at the appropriate levels.


4.
2

Experimental Procedure


To test the two different Potentiostat configurations, the same experiment was ran on both systems.

The procedures of this experiment were mimicked of that of those previously performed by Aaron Rowe
in his Cheapstat testing
[
3
]
.

The procedure was as follows:

6.

Prepare four orange juice samples, one as a control, the other three containing the addition o
f
exogenous ascorbic acid at 0.1,.02, and 0.3M respectively.

7.

Prepare a working electrode using a graphite pencil “lead”.

8.

Prepare a reference electrode using a standard Ag/AgCl electrode.

9.

Prepare a counter electrode using a piece of platinum wiring. (This w
ill not be used for the Two
Electrode Potentiostat configuration)

10.

Attach the electrodes to the Potentiostat systems.

11.

Perform a cyclic voltammetry test taken from 200 to 900 mV, with a constant current of 550 mV.

12.

Export the data to CSV file and graph the re
sults.

13.

Analyze graphed results against Rowe’s results using an eye inspection test.

4.2

Results

The following figures illustrate the results of the testing procedure that was performed by Aaron Rowe.
It is against these figures that our results will be com
pared against using an eye inspection test for
analysis.


Two and Three Electrode Potentiostats






33


Figure
2
2
:
Aaron Rowe’s Cheapstat Results, Potential vs. Current


Figure
2
3
:
Aaron Rowe’s Cheapstat Results, Added Ascorbate vs. Current





Two and Three Electrode Potentiostats






34

The following figures illustrate the results of the Two

Electrode Potentiostat of the test procedures
outlined in Section 4.


Figure
2
4
:
Two Electrode Potentiostat Results, Potential vs. Current

Figure 2
4

shows qualities that mimic traits presented in Figure 2
2
. The overall size of the lines in Figure
2
4

increase in a stair stepping fashion for the four different samples. This behavior is defined in the
Conclusion section.




0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
-0.5
0
0.5
1
1.5
2
Current (mA)

Potential (V vs Ag/AgCl)

Potential vs Current of Ascorbic Acid in Orange
Juice Using Two Electrode Potentiostat

0.0 M
0.1 M
0.2 M
0.3 M

Two and Three Electrode Potentiostats






35



Figure
2
4
:
Two Electrode Potentiostat Results, Added Ascorbate vs. Current

Figure 2
4

is constructed by obtaining the peak curre
nt value from the resulting data where the potential
is equal to 600 mV. There is a clear lack of presence of a line of regression.




Two and Three Electrode Potentiostats






36


Figure
2
5
:
Three Electrode Potentiostat Results, Potential vs. Current

Figure 2
5

does not show qualities that mimic trai
ts presented in Figure 2
2
. It is constructed by mapping
the Potential vs. Current data results found from the experiment.This behavior is defined in the
Conclusion section.





Two and Three Electrode Potentiostats






37


Figure
2
6
:
Three Electrode Potentiostat Results, Added Ascorbate vs. Current

Figure 2
6

is constructed by obtaining the peak current value from the resulting data where the potential
is equal to 600 mV. There strong indication of the existence of a line of regression.




Two and Three Electrode Potentiostats






38

5.

Conclusions


Af
ter analyzing the results, the comparisons of
both Potentiostat systems to the Cheapstat prepared by
Aaron Rowe did not meet the expectations of the eye inspection test. There are several possibilities for
these results.

One possibility for unexpected results of the Two Electrode Potentiostat is due t
o the usage of the relay.
The design of this system is such that a capacitor is charged and then a relay is closed followed by a
quick measurement of the current. When the contacts of a relay are closed it is possible to obtain noisy
voltages which are ver
y likely to disrupt the samples. This mechanical closure is just one possibility for
the erratic results.

It is also possible that the usage of a faulty Ag/AgCl electrode contributed to the erratic results.

It is
imperative that the reference electrode be
fully operational for the results to be meaningful.

In addition, both systems were under the assumption that the mathematical procedures of the firmware
were appropriately designed. It is possible that somewhere in these calculations something as simple as

a binary bit was misplaced. Future work would suggest that an audit of the firmware of both systems
calculations be verified.

Finally, the test procedures outlined by Aaron Rowe were very ambiguous. Throughout his detailed
experiment, the magnitudes of me
asurements were changed with no reasoning or explanation. After
several attempts of communication with him, no clarification could be found. It is possible that this
magnitude
anonymity

contributes to the erratic graphs.

6.

Recommendations for Future Work

6
.1

Two Electrode Potentiostat System

6.1.1 Add Other Modes of Operation

Currently, the Two Electrode Potentiostat System can only perform the Cyclic Voltammetry test. Since a
Potentiostat can generally operate in other modes, it would be beneficial to add ot
her testing modes
such as linear sweep, square wave, and stripping.

6.1.2 Add Edit Calibration Settings

At the current state, a user can access the Settings menu by clicking Edit
-
>Settings. These settings are
for controlling the calibration of the system.
By changing these fields, the calibration state of the system
is unmodified. The structure for this functionality is already in place, it simply needs to be implemented.

6
.2
T
hree

Electrode Potentiostat System

6.
2
.1
Implementation of a Graphical User Inter
face

The current Three Electrode Potentiostat System must be operated manually using a joystick and an LCD
screen. Editing the pre
-
test configuration settings is very cumbersome and not intuitive. To enhance the

Two and Three Electrode Potentiostats






39

end user’s experiment and optimize testing p
rocedures, a GUI should be implemented that will allow
the user to easily configure these setting in a text field input form fashion. There should be a selection of
radio buttons that will
be utilized for selecting the Potentiostat mode of operation. Once
a radio button
is selected, the appropriate fields of configuration inputs should be displayed to the users and
aesthetically labeled. For data logging, the recorded information should be sent to a neatly labeled CSV
file so that the user will know what th
e data means. A mockup schematic for this can be seen in the
following figure.


Figure
2
7
: Three Electrode Potentiostat GUI Mockup

6
.3 Universal System Recommendations

6.3.1 Electro
-
Chemistry Procedure Integrity

It would be beneficial for future users to
obtain meaningful results by verifying the integrity electro
-
chemistry procedures with the inclusion of chemical engineering students.

6.3.2 Two Electrode Potentiostat Firmware Audit

It is possible that the calculations performed by the Two Electrode
Potentiostat are out of sync. The
integrity of these calculations should be verified by auditing the entire system’s manipulation of
calculations.

6.3.3 Hardware Integrity Verification

Since it is possible for faulty results due to hardware failures, it is

imperative that future work on this
project include the verification that all hardware (such as the Ag/AgCl electrode) functions
appropriately.


Two and Three Electrode Potentiostats






40

7.

Material Documentation and
Reconciliation

7
.1

References


[1]
Rowe AA, Bonham AJ, White RJ, Zimmer MP, Yadgar R
J, et al. (2011) CheapStat: An Open
-
Source, “Do
-
It
-
Yourself” Potentiostat for Analytical and Educational Applications. PLoS ONE 6(9): e23783.
doi:10.1371/journal.pone.0023783

[2] Arduino. Arduino IDE Download. [Online]

http://www.plosone.org/article


[
2
] Williams, Benjamin. 2011. Potentiostat Development, Final Report.

[3]
Rowe, Aaron A., et. al. "PLoS ONE: CheapStat: An Open
-
Source, “Do
-
It
-
Yourself” Potentiostat for
Analytical and Educational Applications."

PLoS ONE : Accelerating the Publication of Peer
-
reviewed
Science
. Web. 14 Nov. 2011. [Online]
http://www.plosone.org/article/
info:doi%2F10.1371%2Fjournal.pone.0023783