Using Labjack And Daqfactory To Obtain Results From Potentiostat For Cyclic Voltammetry


sepehr

Recommended Posts

Hi, 

 

I am a student at University College of London and working on an electrochemistry project to measure corrosion rate of steel. I have a Bank MP81 Potentiostat, which has two analogue terminals for voltage and current (converted to voltage). I have bought Labjack U3-HV and using DAQFactory in order to obtain results from my potentiostat. I am new to both data acquisition hardware and software and would very much appreciate and be very grateful if you could assist me on this matter.

 

In Cyclic Voltammetry experiment, you apply voltages in a specific range (like -0.5 to -1.5V) in a specific time (like 10mV/sec) then you monitor the current. So the potentiostat I am using has two analogue voltage terminals (one for the voltage control and one for the current(converted to voltage) output). My aim in using the LabJack is to login the two potentiostat output channels and save them in a file for future analysis.

 

From my readings through Azeotech forum, i found people who did similar project to mine and I know that I need to use Stream mode in DAQFactory to run Voltage scan and obtain results. But I dont know how to do it.

Also I have connected the voltage control terminal to the Analogue output of my labjack module and current output to the analogue input. Is that correct?

 

Thank you very very much for your help and time. This is very urgent for me as I need to get this part of my project with in this week. thanks

Sepehr  

 

 

Link to comment
Share on other sites

OK,

 

You are going to use one analog input channel, and one analog output channel.  Create them in the channel table and give them names.  Let's just use "in" and "out" for now.  Timing should be 0 since we are going to trigger everything manually.  I believe the LabJack output is unipolar, so can't output negative voltages.  If you need negative only, you should be able to simply reverse the polarity.  If you need bipolar, you are going to have to do some other electrical tricks (involving floating the ground) to get the unipolar to appear bipolar.  I leave that to the EE's.

 

Once you have created the channels you can create a simple sequence to run through your range.  Let's say you want to go from -0.5 to -1.5V and you have the polarity reversed on the output, so from the LabJack's point of view, you are going from 0.5 to 1.5V.  The sequence would look something like this:

 

out.clearHistory()          // clear the previous experiment

in.clearHistory()

private curOut = 0.5     // start at 0.5

while(curOut < 1.5)      // go until 1.5

   out = curOut             // set the output

   read(in)                     // read the input

   delay(1)                    // wait one second

   curOut += 0.01         // increase the output by 10mV

endwhile 

 

That's about it.  You can then create a graph of "in" vs "out".  You may want to go to the X axis properties and set the Align to -1 to turn off alignment.  

 

To log, create an export set you run after the experiment is done.

Link to comment
Share on other sites

Thank you very much indeed for your useful information Guru. 

 

My potentiostat has a polarity switch, which does what you said. So that's fine.

 

When I create the "in" and "out" channels, "in" would be A to D and "out" would be D to A, right?

 

And also I connected the current output from the potentiostat to the analogue input channel and the voltage control form the potentiostat to the analogue output channel. Is that right?   

 

Also, Where can I run the code that you gave me? 

 

Thanks alot again 

Link to comment
Share on other sites

Also, I have seen in the forum that some one else had the similar question and you had told him to use stream mode and gave him this code: 

 

// standard initialization: 
using("device.labjack")
include("c:\program files\LabJack\Drivers\labjackud.h")
// setup stream:
// set scan rate: 
AddRequest(0, LJ_ioPUT_CONFIG, LJ_chSTREAM_SCAN_FREQUENCY, 1000, 0, 0)
// setup channels to stream:
AddRequest(0, LJ_ioCLEAR_STREAM_CHANNELS, 0, 0, 0, 0)
AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 2, 0, 0, 0)
AddRequest(0, LJ_ioADD_STREAM_CHANNEL, 3, 0, 0, 0)
GoOne(0)
// start the stream: 
global scanrate = 0 
eGet(0,LJ_ioSTART_STREAM, 0, @scanrate, 0) // scanrate now has the actual scanrate, which you can display on the screen if you want. 

 

Is this different to what I want to do? Although, he wanted to have cyclic voltammetry and I want to have linear sweep voltammetry, which is not cyclic. Thank you

Link to comment
Share on other sites

You are correct for the connections, though if its a current output, you'll need a resistor across the input to convert it to voltage.  Use ohms law to scale the voltage appropriately to the 0-5V range.

 

The code goes in a sequence which you run each time you want to run an experiment.

 

No, you don't need to stream unless you are doing this at high speed.  The code I gave only changes the output once every second.  You can make it faster, but don't make the delay shorter than maybe 0.02.  

 

Streaming doesn't work so much for you because you are controlling the output from software.  You can't stream the output.  The fastest the ramp can be is one step ever 0.01 to 0.02 seconds.  The other post probably had a hardware driven ramp, or was alternating between two output levels, which you can do by using one of the LabJack timing modes (which is a hardware mode).

Link to comment
Share on other sites

Thank you very much again.  

The potentiostat converts the current to voltage itself, so I will receive voltage signal representing current.

 

Where can I find the sequence? Is it in the right hand side of DAQFactory menu? I am going to Uni in a bit and I can check all this then, as I don't have DAQFactory software on my personal laptop. 

 

Ok, perfect I will use the code you gave me and will let you know. Exactly, I want to change the output once every second, but I might also need to increase the scan rate to 1mV/s rather than 10mV/s for some of my experiments. Would that be alright? And how can I do that?

Just by changing    curOut += 0.001         // increase the output by 10mV ? 

 

I really appreciate this forum and your help and time. This would help me a lot in my thesis. 

Sepehr 

Link to comment
Share on other sites

Ok, I have tried the code, but I dont know if it is working or not. How and where can I see the results? I went through the "Sequences and Scripting" guidance you have in the software but could not find where to see my results. 

 

I also checked my "in" and "out" channel and page_0, but could not find any data. Also, when I Apply and compile or "begin the sequence", there is "ALERT" sign on the bottom right of the screen switching on and off. Is that normal? Thanks 

Link to comment
Share on other sites

I just realised that the Potentiostat does not take in the sequence and hence does not produce any results.

My potentiostat has a knob to control the voltage variation manually, so when I vary that I see chemical reaction. But I want to control this from my computer, and read out the results.  Thank you 

Link to comment
Share on other sites

Thanks, I just made it work but still not getting the correct results. 2 questions; 

 

1. Does this code mean that the voltage would vary automatically from 0.5 to 1.5 without requiring me to change the knob manually? In other words, if the voltage goes from 0.5V to 0.75V for example, does the potentiostat overwrites the new voltage itself? Or I still need to change it manually?

 

2. I need Ln(current) Versus Voltage, I change the "style" to Log in the "graph property"-->"axes" tab, but nothing happens.

 

Thanks a lot. 

Link to comment
Share on other sites

1) I don't know your setup so can't address this.  The output of the DAC should step from 0.5 up with each loop.  The rest is up to your system.  Put a voltmeter on DAC0.

 

2) it won't display log if you have ANY values that are invalid (i.e. <= 0).  You also probably want to change the Y expression to:  log(in)

Link to comment
Share on other sites

1. Yeah I did that and Voltmeter showed exactly that what you said. But I am worried that maybe my potentiostat is not capable of overwriting it. I will see what I can do. 

 

2. Ok, I changed the expression to Log(In) and I got better shape. I don't have invalid values by the way. If I want to plot it in Excel i need to export it right? And how do I do that? Thanks

Link to comment
Share on other sites

Hi Guru, 

 

Regarding my project, I have a problem that I can not solve. 

 

When I send voltage to the potentiostat from my computer (using LJControl Panel) and collect current (converted to voltage) read out with a voltmeter, the results are totally fine. So I get current output ranging from -0.74 to 0.81 for voltage input of -0.5 to -1.5. 

However, when I try to do the same thing using DAQFactory (i,e. using the code you gave me, to send voltage and receive current (converted to voltage)), I do not get any variation for my "in" channel. So "out" channel would go from 0.5 to 1.5, which is what I want but my "in" channel would show the same value of -0.81 or -0.82. This should vary form -0.81 to +0.73. Could you assist me on this matter please. Thank you very much.  

Link to comment
Share on other sites

I have connected the current out puts (converted to voltage) one to AIN3 and one to GND. so i call my "in" channel # 3. Similarly I have connected my voltage control to DAC1 and GND, so I call my "out" channel # 1. Please find attached my .ctl document and a photo of the set up. Thanks a million.

 

post-9066-0-71875600-1376933394_thumb.jp

test.ctl

Link to comment
Share on other sites

Hi Guru, I realised the problem was to do with the input impedance of the LabJack U3-HV. I used another data logger and it worked. So I might buy Labjack U3-LV, which offers a much higher input impedance to solve the problem. Instead of using two usb modules as I am doing now. Thanks for all your help Guru. 

 

Regards, 

Sepehr 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.