Sunteți pe pagina 1din 12

Bulk Electrolysis 7.

Convoluted CV's
Posted by roadchem Apr 20, 2012

So I've just added a document to my list which allows for the analysis of cyclic voltammetry data through normalization to dimensionless form, and then by "convolution" of the data. The upshot is that the CV's are corrected for timescale, so you can use published general working curves to figure out mechanism and rate constants from the CV's. The convoluted data has a bonus that should make it a popular supporting tool for bulk electrolysis as described in my previous posts. Convolution is the application of the following equation to your CV data: (Bard and Falkner p. 247)

Digitized data can be treated quite simply using:

The vi's available in Dimensionless and Convoluted Cyclic Voltammograms will do all of this automatically. The upshot is that CV data can be translated into the "slow scan CV" , "the sampled DC voltammogram" or the "rotating disk electrode" shape (i.e. an S-shaped curve) appropiate for judging how complete an electrolysis happens to be. For example, the figure on the left shows experimental CV data recorded at 3.2 V/s before and after an exhaustive bulk electrolysis. The pink is the "before" and the blue is "after." The classic CV shape of the data does not reveal much about how complete the electrolysis is. The convoluted data on the right looks much more like a polarogram or a RDE scan. The S-shaped curve has exactly the same E1/2 value, but is shifted up or down on the y-axis, corresponding to anodic current being passed, or cathodic current being passed. The forward and reverse current are ideally supposed to overlap, but i did not correct for resistance and capacitance for this diagram.

The fact that once scan lies almost completely above the zero-current line, andf the other lies completely below suggests strongly that the electrolysis has proceeded close to completion. Most people find it easy to collect CV data, and the convolution is now easy to perform. The alternatives include setting up an RDE in your bulk electrolysis cell, or using a dropping mercury electrode, or worrying about whether the initial current is subtracted from a sampled DC voltammogram, or worrying about whether your potentiostat has enough sensitivity to measure the current from a slow scan at a microelectrode. The details on how to use the programs are included in the documents in Dimensionless and Convoluted Cyclic Voltammograms. There are a bunch of alternate uses, including using corrected CV data to determine mechanism and rate constants without starting with digital simulations, which can lead you down a misleading path quite easily.

References:

(a.) Saveant, J. M. Elements of Molecular and Biomolecular Electrochemistry: An Electrochemical Approach to Electron-Transfer Chemistry, Wiley-Interscience, Hoboken, New Jersey: 2006, and references contained therein. (b.) Bard, Allen J; Faulkner, Larry R. Electrochemical Methods: Fundamentals and Applications, Second Edition, John Wiley and Sons, New York: 2001, and references contained therein.
41 Views 0 Comments Permalink Tags: cyclic_voltammetry, electrochemical, electrochemistry, file_conversion, labview8.2, voltammetry, cv, electrolysis

So you want to study a new compound by CV....


Posted by roadchem May 31, 2009

Good for you! One of the most frequent questions by beginners is "I know how to record a CV, but how do I choose the scan parameters for a new compound?" A systematic study is a good idea... Let's assume that you are using a non-aqueous solvent (aqueous is OK, too, but it limits the scan range) under an inert atmosphere, with a sufficiently high concentration of supporting electrolyte to minimize resistence and problems due to ionic migration etc... Let's also assume you are using a silver wire coated with silver chloride as your reference electrode. In acetonitrile the silver chloride will dissolve and you'll just be using a bare silver wire. Or maybe you are using CH2Cl2 and your compound gets oxidized by the AgCl... I've seen it happen. As long as your reference potential is fairly stable, you can do your experiment, but you should add a compound which has a known redox potential at the end of your experiment, and you should reference your potentials to this internal reference by doing a set of scans which includes your compounds and the newly added standard. Usually you do this at the end of your experiment. For more details, see Geiger's Chapter 23 in Laboratory Techniques in Electroanalytical Chemistry, 2nd Ed, Kissinger and Heineman, Eds, Dekker, New York: 1996) Assuming that your reference electrode potential is either stable and known, or that you plan to add an internal standard at the end of the experiment, the first thing you should do is check out the baseline. I know... boring. But it is much better than adding your compound, finding interesting peaks, writing a Thesis chapter, and then having someone point out at your Defense that your interesting peaks are a common impurity in your solvent. So the first thing to to is check out the baseline, to the positive and negative solvent limits. Here's an example of THF to the positive solvent limit:

The baseline should look like a sausage... this one is thin because I used a small electrode (0.8 mm) and a slow scan rate (50 mV/s). There appears to be a small "lump" on the return wave which is due to the re-reduction of somethign formed at the solvent limit. The current is actually in nanoamps, so it is pretty small. Note that this graph is from my "general file display program" packaged with my "interpolation" document on this site. The second thing to do is to add your compound and get scans of the whole range accessible in your solvent window... so you don't miss anything. You can do it in one CV or several. Here's an example of one of the first CV's of [(C5Ph5)Rh(1,5cyclooctadiene)] (more on this compound was published in Organometallics, 1999, 17, 5486). I like to get my "exploratory" data at 200 mV/s, but sometimes I use 400 mV/s.

There's a lot happening in this CV. The scan range was -1 to -3 to +1 to -1 at 200 mV/s, i.e. clockwise in this "classical" representation. There are irreversible features at negative potentials, and then a series of oxidations. On the next scan we went positive initially (i.e. -1 to +1 to -3 to -1) and we determined that the features between 0 and -1 were daughter peaks. So what to focus on? Generally, you want to focus on reversible features before you focus on irreversible features. I would look at the reversible feature (i.e. scan from -0.2 to +0.5 and back) at a series of scan rates first. My favorite scan rates are 50, 100, 200, 400, 800, 1600, and 3200 mV/s because logarithmic plots with these scan rates have evenly spaced points. I'm also usually pleased with how the CV's change on doubling the scan rates, which leads to a small data set which can be effectively simulated. Anyway, if you scan reversible features first, there is usually less chance of fouling the electrode surface at the beginning of the experiment.

From there you have a choice... there are irreversible oxidation AND reduction features, either of which might foul the electrode. As for me, I might choose to look at the second oxidation first. That means I would set my potential range to -0.2 V to 1 V to -0.2V, and I would scan over my usual raqnge of scan rates. You should always start your scan from where zero current is flowing, unless you have a specific reason not to. (Remember also that the Nicholson equation to determine reversibility only gives useful data for the first oxidation or reduction you encounter.) It turned out that the oxidations did not foul the electrode. Yay! So I turned my attention to the reductions, which were of interest to us to compare with the cobalt system which had been characterized a few years earlier. There are two closely spaced reductions which appear to be irreversible. I scanned from -1 to -3 back to -3 at the usual scan rates. I also wanted to check if there were any signs of reversibility on repeat scans... here's an example:

This is also a good trick to use to determine whether peaks are due to daughter products are not. For example, the second oxidation yielded daughter products:

So in the CV above, I scanned from -1 to 0 to -1 to +1 to -1. The first, short cycle establishes no peaks between zero and 1. The daughter peak only shows up after the second oxidation is scanned, and it is irreversible when scanned multiple times. If you are using a PAR potentiostat, then the "VERTEX" command is what you would need to add more switching potentials... I only have two vertices allowed in "CV_for_PAR_potentiostat.vi" but you could add more... my Quickbasic programs (see earlier blog post) allowed up to ten.

It wouldn't hurt to do a chronoamperomogram at this point... I would do one just so that I have the data, even if I never need it. The diffusion coefficient may come in handy some time. At this point, you have a good idea of how this compound behaves electrochemically. It is time to add the internal standard. In this case decamethylferrocene would be good, since ferrocene itself would be too close to the reversible feature already present. The potentials of ferrocene vs. decamethylferrocene have been published in a recent Geiger paper... they vary by solvent. I would scan just the standard alone at the usual scan rates so i can see how the difference in its peak potentials compare to my compound's data. Then I would do several scans which include all the peaks in the solvent window, so I can reference the individual peaks to the internal standard... then you don't have to worry about how stable your reference electrode is, or what its potential really is. Now this is only the beginning. You need to repeat the experiment to make sure that your data is reproducable. You should look at a different solvent. When I looked at this compound in CH2Cl2, both oxidations were reversible! If you are accuse a peak of being influenced by slow electron-transfer, you should try different electrode surfaces too (gold, platinum and glassy carbon are good. Mercury would be nice, too, but I understand if you don't want to use an Hg electrode). Other experiments could include adding a compound to your sample which might react in an interesting way with your electrode product. If you accuse a peak of being influenced by a second order process, you should look at the data at a series of concentrations just to make sure. And... if you are going to do simulations, you should do a separate experiment where you collect data on the baseline at all the scan rates and the potential window that you will collect your compounds data on. That way, you can subtract the baseine data from the experimental data and achieve much better matches between experiment and simulation Anyway, here's a summary of how the first experiment should go: Summary: (1) Baselines. (2) Add compound, scan whole solvent window. (3) Look at reversible features at a variety of scan rates. (4) Look at irreversible features at a variety of scan rates. (5) Determine which features give rise to daughter peaks. (6) Add internal standard. Look at internal standard under usual scan rates. Scan entire solvent window again. More scans with the internal standard present do not hurt. Once you are comfortable with CV, you should include square-wave-voltammetry in these initial forays. I have noticed that when second-order mechanisms are in operation, CV's and SWV's tend to have very different looking reversibilities, when you would expect similar values from the experimental timescale.
518 Views 5 Comments Permalink Tags: cyclic_voltammetry, fast_scan, cv, electrochemical, potentiostat, electrochemistry, voltam metry

Tips for fast scan CV's...


Posted by roadchem May 12, 2009

My main tip is to start at slow scan rates where the features are recognizable. Jumping into fast scan rates might not show you what you expect to see because the chemistry might have a mind of its own. The kind of current you usually want to see is called "Faradaic Current" which most often involves electron transfer to/from an electrode from/to a species in solution at the electrode surface. From Fick's Laws of diffusion (see a p-chem textbook) the rate at which analyte gets to the electrode is inversely proportional to the square root of time (as in the Cottrell Eq'n)...the upshot is that Faradaic current increases with the square root of scan rate. If we leave species which are chemically adsorbed onto the surface for another posting, the other kind of current you will see is "charging current." Charging current is what makes a background CV scan look like a sausage. A "background scan" is a CV of the solvent/support electrolyte before you've added your analyte... I hope you are always recording background scans to make sure everything is OK before wasting expensive analyte! And even more expensive time! Anyway, background current exists because as you change the potential on the electrode, the ions at the surface in the solvent/supporting electrolyte will organize themselves into a double layer whose structure depends on electrode potential. This is a kind of capacitance, so its magnitude will be proportional to the electrode area. The magnitude of charging current increases linearly with scan rate, since the ions are already at the electrode surface so diffusion is not really an issue here. So if the current you want to see (Faradaic) increases with the square root of scan rate, but the charging current increases proportional to scan rate, there will be some scan rate where the charging current is so large that it swamps out the signal

you want to see. If this is all that goes on, you could subtract out the charging current and see the desired Faradaic current... but it isn't that simple. The other player here is 'uncompensated resistance." Ohm's Law, of course, is V=IR. The "V" here will be an "error" voltage that gets added to the desired potential measured on the x-axis, and will be an error directly proportional to the amount of current flowing. The basic behaviour is that the more current that flows, the more the CV begins to resemble an Ohm's Law plot (i.e. a diagonal straight line). So no only does the Faradiac current "sit" on a big "sausage" of charging current, the whole CV gets distorted by being stretched diagonally. The severety of these problems depends on the size of the electrode. Smaller electrodes pass less current and can give good data at high scan rates without much distortion, although generally baseline subtraction should be used. For a 3 mm Pt disk electode, you might get OK data at 5V/s but you might not, too. For a 50 micrometer electrode, you can see good data at 200 V/s, or even faster if you are lucky. However, to be sure to see good data, you should start at at a slow scan rate where you can definitely see the features your are looking for. For my 50 micrometer electrode, "slow" means 1 V/s. I usually double the scan rate until the distortions are so bad that I can't see any useful data any more, and then I go back to my slow scan rate to make sure the electrode isn't fried (i.e. not passivated by some nasty surface layer). Another complicating factor is if your chemical system undergoes slow electron transfer. If it does, you can literally "outrun" the ability of the compound to be oxidized or reduced at high scan rates. For these compounds, slower scan rates actually improve the appearance of the CV. "Slow electron transfer" is a term that is more meaningful (but often used synonymously with) the term "electrochemically irreversible." If you do Fast Scan CV with a compound that exhibits slow electron transfer, then you may not see any signal at all, and you may make an erroneous conclusion about the system. Anyway, these are a few thoughts brought on my my use of the "Fast Scan CV" program posted here a couple of months ago. We had a system that had slow electron transfer, so going at really really slow scan rates gave us the answers that we thought we were going to get at really fast scan rates. I plan to continue to post these thoughts on electrochemistry, equipment and Labview as time permits... I might be a ittle less verbose since my sabbatical is now at an end.... I will be teaching a class this summer starting in 2 weeks, and I will present at talk at the CERMACS meeting next week, not to mention that I have collaborators visiting my lab for a month of fast scan CV, and Labview-driven spectroelectrochemistry! Happy scanning!
711 Views 0 Comments Permalink Tags: cyclic_voltammetry, cv, scan_rate, electrochemical, voltammetry, fast_scan, electrode, pot entiostat, electrochemistry

Chronoamperometry vi's
Posted by roadchem Apr 30, 2009

A couple of weeks ago, I posted a set of vi's which will do chronoamperometry on an analogue potentiostat using something like a NI-USB-6251 as a function generator (analogue output) and data recorded (potential and current -- analogue input). Chronoamperometry (CA) doesn't receive nearly as much attention as cyclic voltammetry (CV) does. However, it is a useful technique, and is conceptually much simpler to visualize than CV. It is possible to obtain quantitative results from CA about reaction mechanisms, rate constants etc. The most common uses are to find the "electrochemical area" of an electrode and the diffusion coefficients of electroactive compounds. These are two vital pieces of information for anyone who is serious about simulating CV data with a program like Digisim, DigiElch, or ESP 2.4. I thought I would provide a little more detail here... A description of a common electrochemical cell The usual electrochemical cell has three electrodes. The first electrode is a "reference electrode" which has two redox states (an oxidized form and a reduced form) in contact with each other. The "saturated calomel electrode" is a nice example where Hg and Hg(I) are present. One way of looking at the Nernst equation (below) is to compare it the Henderson-Hasselbach equation (the buffer equation!) With both redox forms present, the potential of the electrode is "buffered" against change, especially when tiny tiny tiny currents are all that's allowed to pass through the electrode.

The purpose of the reference electrode is to provide the potentiostat's electronics with a steady potential to compare the potentials of the other electrodes to. That way, drift in the measured potentials caused by changes at the other electrodes surface is minimized. The other two electrodes will be an anode and a cathode, and current will pass between these electrodes. Of course, since we are interested in controlling the voltage applied across these electrodes, their function as anode and cathode can be swapped at will as we vary the potential. These other two electrodes are called a "working"and "auxilliary" (or counter) electrodes. The potentiostat applies a voltage to the auxilliary electrode so as to drive the working electrodes potential to where we want it to be. The potentiostat simultaneously measures the current which flows through the working electrode as a result of the applied potential... so the working electrode is where the "action" that we care about occurs. Something happens at the auxilliary electrode, too, but we don't focus on the auxilliary electrode. Often, the working electrode is a polished disk of platinum and the counter electrode is a platinum wire. You have to pay a lot more attention to the working electrode. the surface needs to be cleaned scrupulously and reproducibly. Various materials and shapes of working electrodes have been used, ranging from pools of mercury, beads of gold, disks of platinum, to carbon fibers small enough to measure electrochemistry inside a neuron. So what is Chronoamperometry? The word "chronoamperometry" implies that current is measured as a function of time. As shown in the figure below, the working electrode is stepped from a potential where no current flows to a potential which results in the oxidation or reduction of the analyte... i.e. a potential where current does flow. (The potential is shown in blue). The current jumps momentarily (red) upon changing the potential, but it soon decays to a value which is determined by the rate of diffusion of analyte to the working electrode. [Did I mention that the solutions are not stirred or agitated? And that an inert salt is added to minimize migration of charged species in response to the electric field?]

The math behind this is described thoroughly in the references below. One thing to remember is that the technique assumes you step to a potential where virtually 100% of the analyte undergoes electron transfer when it reaches the electrode surface... to be safe, you should set the potential maybe 0.2 V (if you can!) past the E value of the analyte. The current follows the Cottrell Equation:

In the Cottrell Equation, I is current in Amps, F is Faraday's number (96484.6 coulombs per mol), Ae is the electrode area in square centimeters, D is the diffusion coefficient in cm-squared per second, pi is pi, and t is time in seconds. The really really important thing is that the units of concentration (C*a) are moles per cubic centimeter. NOT moles per liter. There is a factor of 1000 difference. I have incorporated this unit change into my vi's already, so you can enter regular Molar units into the Labview programs. However, if you use a spreadsheet to work up the data, keep the units in mind. I suspect that many students have thrown out perfectly good chronoamperometry data because the results don't make sense because of unit issues! The usual way to plot CA data is a Cottrell plot, which plots current vs. the reciprocal of the square root of time, as shown in the next figure.

Because the reciprocal of time's square root is plotted, the shortest times correspond to the largest x-values on the graph above. We usually throw out the first 50 milliseconds of data because of charging current issues. That corresponds to the 15 points (or so) on the right of the diagram. Sometimes you have to throw out a few more points... This graph is pretty curvy above for x-values above about 2.5, which corresponds to the first 150 milliseconds of data. We don't always see this problem. However, the rest of the data (9.850 seconds worth!) is straight with a very good R-squared value. We ended up discarding only the first 80 points out of 5000 points of data... but these 80 are widely-spaced int he Cottrell plot so they look more important than they are. In our setup we have an obstruction close to the electrode (fiber optics controlled by Labview will be the subject of a future post) which might have an effect on the data. The slope of the green line corresponds to nFAC(D/pi)^0.5. If you know the concentration and the diffusion coefficent (see the vi documentation for good aqueous and non-aqueous standards) you can get the electrode area. Once you have the electrode area, you can do another experiment to find some other compound's diffusion coefficient. The electrode area is good for a few experiments if you take care not to scratch the electrode. I have two vi's set up for data analysis. Both let you choose the left and right range of the linear region, input the concentration, and then input either the D-value or the area. They return the area or the D-value respectively. Diffusion coefficents depend strongly on temperature and solvent. If you are trying to simulate CV data which correspond to a complicated mechanism, you should find the diffusion coefficents and the areas... that will reduce the number of variables you have to worry about. Sometimes diffusion coefficients subtly affect how CV's appear for some mechanisms. There are more advanced applications of chronoamperometry that depend on TWO potential steps instead of just one. With two steps, you can compare the current on the forward and reverse steps, and you can vary the time between the steps. Such methods can give you precise information about reversibility at a longer timescales than usually possible by CV, and details of reaction mechanisms. However, to get these gems it requires a little more data analysis. If I have occasion to develop such data analysis programs in Labview, I will post them on this site. In themeantime, the details are covered in the references below. I suppose if you know the electrode area, and the diffusion coefficent of your compound, you could use the electrode response to quantify the amount of analyte in your sample. I don't think this is a common use of CA.... if you need to do this, then you could use the vi which calculates area... just enter area where concentration should go and then the concentration should be returned. One last point... Chronocoulometry is what you get when you integrate chronoamperometry data. This is also a very useful technique which can tell you about adsorption of analyte or its redox product to electrode surfaces. However... if you can get charge vs. time data directly from your potentiostat, do so. Otherwise, you will need to apply a correction to the chronoamp data before integration to correct for the effect of radial diffusion. This is true even if you are using an electrode which seems large (i.e. 1 cm-squared!). J. Heinze covers how to do this correction in J. Electronanal. Chem. 1981, 124, pp 73-86. I have some applications under development that should automate the edge correction with Labview. Finally, the ubiquitous e-chem references...You really should glance at these before becoming serious about the kind of experiments discussed here... Happy chronoamping! (1) A.J. Bard, L. R. Faulkner, "Electrochemical Methods: Fundamentals and Applications," 2nd Ed., Wiley, New York: 2001. (2) "Laboratory techniques in Electroanalytical Chemistry," 2nd Edition, Revised and Expanded, P.T. Kissinger W. R. Heineman, Eds, Marcel-Dekker, New York: 1996.
2117 Views 0 Comments Permalink Tags: chronoamperometry, simulation, electrode, description, electrochemical, diffusion, potenti ostat, area, electrochemistry

Software for Digital Potentiostats


Posted by roadchem Apr 11, 2009

So I spent the past couple of days translating my "inputCV.bas" program and "cv2.bas" program from Quickbasic into Labview. I had made a start at this task a few years ago, but the availability of the manufacturer's software made the project a low priority at the time. However, one of the things I have wanted to do while on sabbatical this semester is to work on papers to disseminate the chemistry my group has explored in recent times, and also to find an outlet to make the software I have developed over the llast twenty years or so available. The result of the last couple of days work is the document I posted a couple of hours ago. It actually has more error-control and timing control than the original Quickbasic version, thanks to Labview's versatility on this front. And just the graphical display capabilities would have made life a lot easier 15 years ago! Like the old program, there are three suroutines that control the flow of information. "Send.vi" passes commands to the potentiostat, and does not expect a response. A nice way to crash a program is to send a command to the potentiostat which elicits a response. For example, "CELL 1" just turns the cell on, "CELL 0" turns the cell off and both commands expect no response from the instrument via the GPIB. But if "CELL" is sent, then the potentiostat responds with a "1" or a "0" depending on wither the cell is on or off respectively. For commands that elicit a response "Query.vi" should be used. Both of these vi's check the "command done" status bit (bit 0 of the status poll) to see whether more information can be sent to the potentiostat. Send.vi is very robust. Query.vi is a little less robust... My suspicion is that the reading of the buffer may not be complete always when the computer terminates read on receiving EOI signal... I had a bad time with the PROG command, which elicits the initial potential, all the switching potentials, and the final potential... I got the first couple, but the rest showed up when I was running Query again. The third subroutine that controls the flow of information is "Extract.vi". I made a nice little icon for it that's supposed to depict an orange in a vise, to get every last drop of information out . It also uses the "command done" status bit, but it also uses the "data ready" status bit (bit 7 of the serial poll) to make sure that the DC (dump curve) command is done before the buffer is read. This vi reads a stream of data that ends with the EOI command. There is a binary version of the command, but I don't mind waiting a little to deal with the ASCII data. One more subroutine would be necessary for a complete set of communication protocols for PAR instruments. In the Quickbasic square wave programs, I had the computer calculate the waveform to apply and download it to the potentiostat. I think I used an "LC" or load curve command, but I can't really remember. Basically, it would be like Extract.vi, but sending info the other way. A good name would be "Export.vi" With this last vi, one would be able to program any random waveform into the potentiostat. I seem to remember that once I developed the Quickbasic Square Wave Voltammetry program, I was able to crank out versions which did Normal Pulse, Differential Pulse, Reverse Normal Pulse, and Chronoamperometry in just a few days. At some point when time permits, I will try to develop such a vi and post it here. So the end result is a kinda fragile vi that will do CV. My hope is that it will be useful enough to those who need it so that the occasional power-down of the potentiostat won't be a deal-breaker. Obviously there is room for some error managment. The clue I have right now is that the ST command returns a value of 1 (command error) when the talk light goes on... it is trying to tell the computer what the command error was, but not at an appropriate time. One way to force good behaviour is to program pauses in... a bit heavy handed, but it seemed to work. It won't do a live update of the front panel as the data is collected... for that, you may want to invest in the commercial software. But it will run a decent CV at scan rates of less than 3.2 V/s. I managed to find and get rid of the commands that caused the error lights to go on, and that has improved the stability of the program quite a bit. I'm still working on a problem where the second extract command leaves the "talk" light on after all the data points have been transfered... I think that reinitializing the potentiostat may help immensely. If the posted version does not work well for you, then you might try this Labview 8.0 version (attached) which has been tested a little more thoroughly. I force Labview to pause for a time equivalent to the scan time of the istrument before it requests data via the second "Extract" command. As alway, I welcome feedback... especially in this case where there's room for some improvement. This is not really a program I would make extensive use of myself, since I have the M270 software, and I kinda like "Fast scan CV.vi" now.
1261 Views 2 Comments Permalink Tags: electrochemical, voltammetry, gpib, 273, electrochemistry, potentiostat, scan_rate, instru ment_driver, cv, cyclic_voltammetry, eg&g

Interpolating data and mapping new Y values etc...


Posted by roadchem Apr 3, 2009

Thanks for the encouraging comments! I'm glad that there have been a bunch of downloads and views of the documents I posted... my goal is to share some of the useful stuff I've developed. Some of the new and very cool applications have to wait until they have described in papers in chem journals, but I'm working on them...

So I just posted a new Labview document based on a Quickbasic program I called "parsing.bas" which I wrote in the mid1990's. As I recall, it was very useful, but I had to modify it for each different application since Quickbasic was very fussy about the file format... comma's vs tabs threw it into a tizzy and there were cases where I had to copy the original data into Word to do a search and replace, and then into Notepad to delete the final "END" statement... for some reason Word wouldn't do it right. I don't know how I figured which program was able to do what... and since the ideosyncracies probably only applied to Win95, it's moot now. Anyway, Labview won't be as fussy since I wrote "general file display.vi" to open data files, parse out header lines, and be robust as regards data delimiters. It also deals with EG&G M270's tendency to list current in the first column of data and potential in the second column by allowing the axes to be swapped. I didn't post it separately because I have quite a few display applications listed here already... but this one will be th basis of what I do in the future, I think. So "parsing.bas" was very useful. There are two applications that I will share. The first was to convert the experimental CV data collected with my Quickbasic applications (posted on an earlier blog entry) so that the ESP 2.4 program (Electrochemistry Simulation Package by Carlo Nervi, http://lem.ch.unito.it/chemistry/esp_manual.html) could display overlaid experimental and simulated CV files. If the experimental and simulated files didn't have exactly the same X-axis (point by point!) then the overlay did not work properly. So who cares? Well, ESP 2.4 does a nice job of simulating CV data, as well as Square Wave and Chronoamperometry data, and the price was right (free for academic use). At the time Digisim did not support SWV (and still doesn't, but Manfred Rudolph's DigiElch does! http://www.elchsoft.com). It was comforting that the output from ESP and Digisim for the CV's we recorded for the electrocatalytic paper (J. Am. Chem. Soc. 1998, 119, 2804) were pretty much identical (Beware: ESP's 2nd order rate constants are in mM-1 not M-1), and that allowed us to include the SWV data and simulations, too. ESP does have a problem when the rate constants get too fast, so you have to watch the "NI" values... too large and you are waiting overnight for what Digisim will give you in seconds. But that may be a tradeoff you're willing to make since Digisim is very expensive. DigiElch is more reasonably priced, is more flexible, and is also a very high-quality simulator. The second example was for EPR (electron paramagnetic resonance) data. At the time our EPR spectrometer had only a chart recorder as its only mode of output. We digitized the data by scanning the traces and saving them as bitmaps, and then we used an old program called WINDIG10 to convert the bitmap data into an X,Y file. {Unfortunately WINDIG doesn't seem to work on my current computer, since it was designed for Windows 3.1. But there are some cheap alternatives now.} The digitized experimental files could be loaded into freely available ESR simulation programs, after the "parsing.bas" program had been run. If you're looking for a good ESR program, I recomend "simpow6" by Mark Nilges (http://ierc.med.uiuc.edu/~nilges/software.html). The input file for simpow6 is somewhat fiddley, and I have written a Labview shell which makes it easier to use. Once I solve a couple of bugs, I'll post it in a future document. My current problem with it is that the simpow6.exe window will not close once it has executed when called by Labview. It works fine if you do that step manually, though, but I still want it more automated. Anyway, to overlay experimental and simulated CV's and other data these days I use a Labview program similar to ones I've already posted... There's less fiddling with data files that way, but on occasion I need to do a baseline subtraction that "parsing.bas" helps with. So this week I undertook to translate the fairly simple code in the Quickbasic program into Labview. I'm pleased with the result, but it did take longer than I expected it to. The "GOTO" command in Quickbasic sure made "parsing.bas" simpler. The Labview version does the same thing in the same way, and will be more robust. I have put some reasonable documentation in place, so I hope that it ends up being useful.
563 Views 0 Comments Permalink Tags: electrochemistry, file_conversion, simulation, cyclic_voltammetry, eg&g, potentiostat, electr ochemical, voltammetry, interpolation

More analogue potentiostat CV: HP 7090A digital plotter


Posted by roadchem Mar 25, 2009

So here's some more files from the past... When I was a Ph.D. student in the late 80's, we used a function generator, an analogue potentiostat (EG&G PAR 173), and a HP7090A digital plotter to record all of our cyclic voltammetry data. The latter instrument not only drew pretty pictures of the data, it also did an A/D conversion. It had a small (by current standards) buffer... 1000 points of data on three channels, with a maximum data collection rate of 33kHz on all three channels at once with a GPIB interface. My labmate Neil wrote a

simple BASIC program to interface the plotter to a computer so we could manipulate the data digitally. I improved this program, although at the time, the computers were so slow that the data needed to be downloaded point-by-point to avoid errors, which made the program cumbersome to use. When I was a postdoc, Bill Geiger's lab in Vermont had the same equipment, so I was able to continue to refine the plotter program. It is not surprising that my Ph.D. lab and postdoc lab had similar equipment... my Ph.D. advisor had previously sent a student to Vermont for a couple of weeks to learn how to do electrochemistry, and this student recommended a list of equipment we needed before I was on the scene. Slightly faster computers could handle the "data dump" command so the data transfer rate improved from 3 minutes to about 20 seconds... this made the program much more attractive for others to use, and with some jiggering, it could handle chronoamperometry data nicely. One nice thing about using the plotter was the fact that it could record CV's at fast scan rates. I had some good data at 200 V/s. While I had written programs which made the EG&G PAR digital potentiostats collect data at slower scan rates, at faster scan rates the digital approximation of the analogue triangular waveform necessary for CV is poor... you shouldn't use them as digital potentiostats above say 5 V/s. As analogue potentiostats, these devices are reliable at much faster scan rates, but you'll need a function generator, and some means of recording the current/potential ouput. My most recent solution to this problem is posted elsewhere on the NI site as "Fast Scan cv.vi", which allows for faster scan rates than the 200 V/s limit which the HP7090A runs up against. Anyway, the final Quickbasic program is included in this package as HP7090A.BAS. The README_BAS.txt file provides some useful hardware and software instructions. The plotter's default GPIB address is 5, the command delimiter is a semicolon, and the program assumes that a carriage return follows each command delimiter. When I arrived at SIUE in 1998, I was pleasantly surprised to find that there had been an HP7090A donated to the department a few months before. I don't know the donor. However, it meant that I could continue to collect CV data at faster scan rates. I adapted all the functions that had been developed for the Basic program to Labview. I have included the VI's and all the sub-VI's in the zip file associated with this blog entry. The main program file is called "CV with HP7090A.vi" and it is basically a menu which calls the other sub-vi's when necessary. The instructions are basically the same as in the readme_bas.txt file.
1303 Views 0 Comments Permalink Tags: hp7090a, cv, potentiostat, electrochemical, hp_7090, electrochemistry, voltammetry, scan _rate, cyclic_voltammetry

Very old code for the EG&G PAR 273 potentiostat...


Posted by roadchem Mar 20, 2009

I have always had an interest in electrochemistry with a secondary interest in programming. Most of my programming knowledge has been self-taught, but I like to think that the courses I had in high school in Pascal and Basic impressed on me the need for order and good documentation and labelling in programs. These days I do everything in Labview and I hope that the offerings in my blog and in the development zone are documented well enough for you to make sense of them. This post is to offer some code that might help anyone who is writing code to control a PAR 263, 273, Versastat 1, or similar generation instrument. When I started as a post-doc in Dr. Geiger's lab at the University of Vermont in 1993, I had access to instruments such as the PAR273 and a PAR173 with the 276 insert, (which pretty much turned the original 173 analogue potentiostat into a digital instrument.) I started out using the RS232 connection on the 273 to an AT&T 8088 computer to run cyclic voltammetry. The download of the data took a very long time, but the programs worked. I dug up a NI GPIB card and cable and learned how to make the computer communicate with the instrument via the fast GPIB connection. At this point I'll apologize for the fact that the programs I've included here are written in Quickbasic 4.5... However, they worked well enough so that the data the group collected with them is featured in over 20 papers. Over the next 5 years, I developed a suite of programs that cause the potentiostat to collect the following types of data: (1) Cyclic Voltammetry (CV) using only an x-y recorder as the recording device (e.g. No Frills) (2) CV, transfer the data to the computer which saves it as a file. There were a couple of variations on this theme. (3) Square wave voltammetry (4) Normal Pulse Voltammetry (5) Differential Pulse Voltammetry (6) Controlled potential coulometry, suitable for a bulk electrolysis (7) display data (8) Communicate directly with the instrument These programs were called from a shell called "Main" which I mention here since its code can basically (hah!) serve as a table of contents for the other files. Note that the other files each start out with a chunk of code that defines variables and subroutines so that the program could call on the GPIB card. The programs were pretty much no-frills solutions to getting

the potentiostat to collect the types of data we were interested in. For example, the CV programs rely on the "CV " command, which tells the potentiostat to calculate a potential waveform based on starting potentials, switching potentials and a final potential. My solution was to have the potentiostat come up with the waveform, download it to the computer, then apply the waveform and download the current data to the computer. the two downloads ended being X-axis and Y-axis data respectively. Unfortunately my approach did not display the CV on the screen as it was being scanned... but beggars can't be choosers. Anyway, I've attached a zip file with the Quickbasic code for all the programs I developed in Vermont saved as text (PAR273.zip). I'm posting this information because this code might help someone who is trying to use Labview to develop similar applications to figure out all the instructions that need to be given to the potentiostat to make it work. I've also attached the executible files in a separate zip file (ECHEM_exe.zip)... I do not believe these files will work easily since they were designed for an older computer with a GPIB-AT type interface running DOS. I did use them when I started as an assistant professor in Edwardsville (outside ST. Louis in IL) in 1998, but I stopped using them when I got a copy of the manufacturer's M270 software. However, if they work for you, then you're in luck! They may work if you have the DOS GPIB drivers enabled... and they will need to be in a directory called C:\PAR273... no guarantees! Since my time in Vermont, I have developed and continue to develop Labview applications for PAR instruments such as myPAR 263A and Versastat 1. Many of these apps just use the potentiostat as an analogue instrument, with an interface board (I like the USB 6251!) serving as a function generator attached to the potentiostats BNC external input port. The interface board also digitizes the current and potential data from the BNC outputs on the potentiostat. This is necessary so as to provide better synchronization of the application of potential with various spectrometer functions which will be the subject of future postings. Another upshot of this configuration is that it makes a CV program such as the Fast Scan CV.vi (posted in the Labview User groups) easier to write than a program which relies on only the potentiostats internal command set. It also gets around the fact that I don't trust the potentiostat's digital waveform at scan rates above 5V/s. As an aside, I'm still happy with the PAR M270 software, except for their electrolysis program... I'll post a Labview program I like better at some point in the future. Happy programming! Mike P.S. Note that PAR is part of Ametek now. Their website is http://www.princetonappliedresearch.com/ Their application notes are very good resources!

S-ar putea să vă placă și