What I want to do
This note describes some recent development work on potentiostat, an instrument that measures current / voltage curves for electrode processes. I have been told that I should worry less about having something fully developed and put more of our results online. In response, this is my attempt to be more transparent about the process. This note just covers development history. In the near future, I hope to write one that describes how to build one of these (it will probably be as boring as this one, but it will have more pictures). In the not-as-near future, I will put actual code on my GitHub site (https://github.com/WheeSci). If you are interested in design files or code and don't find what you need at the GitHub site, let me know and I will send you what I can.
The main image of this research note shows component placing and the top wire traces for version 5.2 of the WheeStat. The design also has a few wire traces on the bottom of the board, and the whole thing stacks onto a Texas Instruments Stellaris LaunchPad microcontroller development board.
This is our most recent design of our potentiostat. In an earlier incarnation (described on the Pioneer Valley Open Science web site, http://pvos.org/), the instrument had a rotary switch for controlling the current gain and an analog potentiostat to control the offset. The 4 and 5 series WheeStats replaced the analog inputs with digital ones. I really liked the analog inputs. They gave the impression that what you did on the outside of the box really mattered to the data that came out and I hated replacing them with more electronics. The problem was that fiddling with the wires reduces the reliability of the thing (the solder joints were always coming apart) and soldering a dozen resistors to a rotary switch was kind of a manufacturing nightmare.
The earlier version also relied on a +/- 12 volt dc converter to power the op amps. The dc converter had to go, partly because of cost and complexity, but mostly because when you screwed something up, the 12 volts would toast the digital hardware in the microcontroller board (TI LaunchPad MSP430g at the time).
My attempt and results
For the sake of keeping track, lets say that versions made on a breadboard ended with version 2.0, when we started etching our own copper boards, and version 3.0 began when we started building 'shields' that stack on the microprocessor board (the LaunchPad). Picture of a 3 series potentiostat below showing the rotary switch and potentiometer.
So anyway, the +/- 12 volt version was pretty reliable but suffered from some minor annoying characteristics, as described above. To get rid of the voltage converter, we started running the amps off of +5 volts that comes directly from the usb connection on the LaunchPad. Removing the negative voltage input, however, means you need to have a reference voltage for your working electrode somewhere between your high (+5 v) and low (gnd) available voltages. We started using low dropout oscillators (ldo) to provide the reference signal. At some point, it occurred to us that there was no real advantage to having an external oscillator for the reference voltage when the microcontroller we were using was perfectly capable of generating the voltage we want using a pwm signal. Similarly, the potentiometer we used to generate an offset voltage was replaced by a pwm signal from the OFFSET pin. In version 5.2, the reference and offset voltages are supplied by pwm signals output at pins labelled VREF and OFFSET. I guess you can't talk about electronics without having a diagram to refer to, so here is the schematic for the 5.2 version:
The basics of how the electronics work is pretty well described in Chapter 15 of Bard and Faulkner's book "Electrochemical Methods, Fundamentals and Applications". Look for it in your library. For god sake though, don't stray outside of this chapter (you have been warned).
The reference voltage (Vref) is input to the non-inverting pins of IC1C and IC1D (IC1 is a quad op amp, a TI product named LM324ADR that has, of late, been the object of much profanity in the house of jack). The voltage difference between the working and reference electrodes (connected at solder pads labelled WE and RE) for this configuration equals Vsig - Vref, where Vsig equals the pwm input on the Signal pin. Thus, if you have a 5 volt supply and a 2.5 volt reference, you can scan voltage space between +/- 2.5 volts which is plenty large enough to electrolyze water into H2 and O2 (that is, we have overkill in the voltage department). So, we made these changes and the 5 volt potentiostat seemed to be working pretty well. In fact, it worked so well that I decided that it needed fixing. Since we were able to drop the available voltage from +/-12 volts to +/- 2.5 volts, why couldn't we run it off of VCC (3.3 volts to gnd) to give +/- 1.65 volts (still plenty of overkill in aqueous solution)? I gave this project to Ben, who was one of my students at the time, and he came back with the pronouncement that it did not work. Never one to let empirical observation (It don't work) get in the way with a nifty hypothesis (it should work), I proceeded to dump a bunch of my own time and that of other students into making it work. Long story short; It still don't work. I have some graphs showing how the output from the amps when powered by vcc was limited to between about 1.4 and 2.8 volts. I have another graph showing how, when powered by the +5 volt output, the voltages measured at the vRead pin covered the entire measurable 0 to 3.3 volt range. I was going to post these graphs in here but I couldn't figure out how to get an excel graph into the note. Anyway, the output to vRead closely tracked the expected behavior when the voltage called for was within the 1.4 to 2.8 volt range and flat-lined at either 1.4 or 2.8 when call outside the range. So, this makes me suspect the aforementioned product named LM324ADR. I don't think I was trying to pull more current through the vcc pin than it can handle since the voltage at vcc did not drop when the performance was sucking. In LM324ADR's defense, I have to say that it is not listed as a "rail to rail" amp. Still, it is rated as functioning when powered by as little as 3 volts and I find the 1.4 volt dynamic range disappointing. I guess I could try a different product, like LMV324QDR that is listed as a rail to rail amp, but I have a whole bunch of the LM324ADRs and they work fine as long as you keep the input voltage up. So anyway, WheeStat versions from the mid 3s to version 5.1 featured the 3.3 volt input and we went back to 5 volts for version 5.2.
Questions and next steps
Ok, so what I did not mention is that when we tried incorporating the multi-pwm strategy into a board interfaced to the original launchpad (WheeStat 4.0 with MSP430g) we found that it was not set up to output three pwm signals (at least it would not the way we had it configured). This presented us with the opportunity to transition to a higher performance microcontroller development board, the Stellaris Launchpad. That, of course means that all the code we wrote for the earlier microcontroller needs to be re-written. I just got the output to the vRead pin looking OK the other night and the output on the iRead pin still looks like poo. I am hoping that it is a simple issue of inputting appropriate values to the digital pot (IC2 on the schematic), but the output looks to me like there is some hardware issue that needs to be addressed.
The voltage read on the iRead pin should be proportional to the current passed between the working and counter electrodes. The proportionality constant should be R0*10K / R1, where R0 and R1 are the resistances of channels 0 and 1 of the digital pot. If you derive amusement from reading about the frustrations of others you might want to check out my misadventures with the digital pot at http://forum.stellarisiti.com/topic/1719-spi-with-16-bit-data/.
I also need to figure out specs on the resisters and capacitors that take the ripple out of the offset and vRef pins. For the 5.1 prototype, I just put in huge resisters (160 Kohm) to make sure the pwm signals went totally analog. This works fine once the capacitors are charged up, but it introduces a multi-second delay between when you power the instrument up and when you can make an accurate measurement. So that is where we are currently at. Sorry if it rambled too wildly. Let me know if you have questions or want eagle files or code. Jack
4 Comments
Hi there, Very interesting project. Does this software offer multi-potential steps mode for the GUI? I'm interested in making some lead dioxide on graphite electrodes using a potentiostat. THe "CheapSTAT" software does this, but the board is considerably more complex than yours.
Thanks Doug
Is this a question? Click here to post it to the Questions page.
Reply to this comment...
Log in to comment
Hi Doug, I am not sure what kind of multi-potential steps you would want to do. Right now we can do a number of voltage profiles, including voltage ramps, and one and two square voltage step experiments. If you just want to set a voltage and deposit the oxide on the electrodes, that should be possible with the experiments we have. If those experiments do not provide the voltage profile that you want, it is reasonably straight forward to write code for any new profile that you want. What kind of voltage profile are you trying to establish? Jack
Is this a question? Click here to post it to the Questions page.
Reply to this comment...
Log in to comment
Thanks Jack, In its simplest form, I need to set a voltage (2.2v) and keep it there for an extended period of time but in more elegant forms, being able to pulse the system with a reverse polarity for a fixed period. I should also ask, what are the voltage / current limits of this potentiostat? If necessary, can they simply be extended? (Or is this limit simply in the supplied/reference sources)
Doug
Is this a question? Click here to post it to the Questions page.
Reply to this comment...
Log in to comment
Hi Doug, I am still not entirely clear on what it is that you ultimately want to do. I understand that you wish to prepare a PbO2 surface on graphite. Are you preparing this to measure electrochemistry on the surface of the PbO2? If so, then you will ultimately want to have a three electrode potentiostat like the WheeStat or the Cheapstat. It might be easiest (and most cost effective) for you to have a separate power supply to prepare of your electrode and a potentiostat to do your analysis. If you only want the potentiostat to prepare the electrode, then perhaps you can get by with an adjustable power supply and a couple of transistors. Sparkfun has a nice tutorial on making such a power supply (https://www.sparkfun.com/tutorials/57) and I will be happy to help you figure out how to program a microcontroller to do the switching . If you want to monitor the current while you do this, then that is something of intermediate complexity, and I am willing to help you with that as well. Of course, if you wish to do preparative electrochemistry with the PbO2 electrode, then you may need higher current electronics for that step. The answer to your question about voltage limitations is that our potentiostat (and also the Cheapstat) is capable of delivering +/- vcc/2. Since we are using a 3.3 volt microcontroller that means 1.65 volts. I believe the Cheapstat runs off of 3.3 volts also, but I am not sure. If you use a microcontroller with 5 volt logic, then you will be able to get to 2.5 volts. The current is probably limited by what you can get out of the usb port on the computer, although it might be limited by the voltage regulator on the microcontroller board. Hope this helps. Best, Jack
Is this a question? Click here to post it to the Questions page.
Reply to this comment...
Log in to comment
Login to comment.