This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LMP91000 2-lead galvanic cell in potentiostat configuration

Other Parts Discussed in Thread: LMP91000

Hi,

I am interfacing an LMP91000 with an Arduino in trying to read current in the µA-range from a 2-lead glucose fuel cell. Settings:

  • Supply voltage 5 V
  • Reference voltage 2.5 V external
  • Internal zero 20%
  • Bias 0 %
  • Bias polarity POSITIVE
  • 3-lead amperometric mode with CE and RE shorted
  • Load resistance 100 ohm
  • RTIA 350 kohm
With all electrodes left floating, Vsense reads 506 mV. 
When I test the system with a 1.4 V battery and multiple 8.2 Mohm resistors (negative end connected to RE and CE, positive to WE through a number of resistors), the current increases with an increase in resistance. Here are the values I get:
  • 8.2 Mohm between WE and positive battery terminal: 447 mV
  • 2x8.2 Mohm = 16.4 Mohm: 477 mV
  • 3x8.2 Mohm = 486 mV
  • 4x8.2 Mohm = 491 mV
  • 5x8.2 Mohm = 494 mV
So why is the voltage increasing when I increas the resistance? Shouldn't it be opposite?
Some comments on the settings would also be appreciated. The ATMega32u4 has a 10bit ADC with up to 200x amplification.
  • Hello Psii,

    Perhaps somewhere in your circuit you are getting a parallel resistance with the load.  Or the input inpedence of the MCU is causing the error.

    Use a rail-to-rail opamp in the voltage follower configuration and feed that into your MCU.  That will eliminate any loading effects.

    Thanks,

  • Thank you for your reply.

    I also tried just measuring Vsens with a voltmeter without interfacing it to a µC. The results are the same.

    On second thoughts.. maybe this is correct? The difference between internal zero (506mV) and the voltage proportional to the cell current is what I am supposed to look at?

  • I have not yet tried a voltage follower, since I didn't have any op amps at hand. 

    Something happened today though. I was in the middle of testing different internal zeros and bias polarity settings when my Vsense when the electrodes were floating change from 506 mV to 863 mV. I reset MCU program to the settings I had at the start of the day (when Vsene was 506 mV with no electodes connected), but Vsense was still 863 mV. I tried to change the internal zero settings, internal, extarnal, 20 %, 50 % 67 % and found that each value measured between Vsense and ground having the electrodes connected to nothing was off by a certain amount. What could have happened?

    Regardless of the above problem, I went ahead with the testing I had scheduled for today.  I set Rtia to 7kohm to better fit my range (1-1000 µA). With these settings (Internal_Zero_67 | Bias_Negative | Bias_24_Percent | ) I tested the circuit with a 1.4 V battery and some 10k resistors. 

    I got these values between Vsense and ground (Internal Vref 4.95 V at 67 %)

    • Not connected: 3.45 V
    • 100 kOhm: 3.28 V
    • 90 kOhm: 3.27 V
    • 80 kOhm: 3.25 V
    • 70 kOhm 3.22 V
    • 60 kOhm 3.18 V
    • 50 kOhm 3.13 V
    • 40 kOhm 3.04 V
    • 30 kOhm 2.90 V
    • 20 kOhm 2.62 V
    • 10 kOhm 1.79 V
    So I still get these values which seem to be inverse proportional to the current. Is this right? Could anyone provide me with the formula to calculate the current flowing into the working electrode?
  • So I changed the battery terminals and the values are correct. This does not make any sense to me... Positive terminal connected to RE and CE, negative to WE. Now, every measurement is close to the calculated value. I did the same with a another setup I have with the LMP91000 (range 1 - 154 nA), and it also gave correct values. How come!? 

  • Dear PSII:

    We are also starting to experiment with LMP91000 and Arduino, so could you be so kind to share with us your Arduino sketchs to program the internal registers of LMP. My email is fferminp@unmsm.edu.pe

    Thank you a lot

    Regards

  • Hi Felix,

    That sounds like an interesting project. I eventually got my setup to work quite well, although the final setup involved using the LabVIEW for Arduino (LIFA) software, programming the registers directly from there. I did however write some test sketches using the Arduino IDE. Here is one of them:

    Main code

    <code>

    #include <Wire.h>
    #include "LMP91000.h"

    #define sampleDelay 100

    void setup()
    {
    Serial.begin(9600);
    pinMode(7, OUTPUT);
    pinMode(9, OUTPUT);
    pinMode(A5,INPUT);
    pinMode(A6,INPUT);
    pinMode(A8,INPUT);
    Wire.begin();
    LMP_CFG();

    }

    void loop()
    {
    /*
    digitalWrite(7,HIGH);
    digitalWrite(9,LOW);
    delay(sampleDelay);
    Serial.print(analogRead(A8));
    Serial.print(",");
    delay(sampleDelay);
    */

    // MOSFET control logic and test measurements
    digitalWrite(9,HIGH);
    digitalWrite(7,LOW);
    delay(sampleDelay);
    Serial.print(analogRead(A6));
    Serial.print(",");
    Serial.println(analogRead(A5));
    Serial.println(analogRead(A2)*5.0/1024);
    }

    /* Configure LMP91000 for the intended operation */
    void LMP_CFG(void)
    {
    /* MODECKN register: Configure device mode to Three Lead Amperometric*/

    Wire.beginTransmission(LMP91000_Slave_Address);
    Wire.write(MODECN);
    //Wire.write(Three_Lead_Amperometric);
    Wire.write(Three_Lead_Amperometric); // 2-wire galvanic mode
    Wire.endTransmission();

    /* LOCKN register: Unlock for configuring TIACN and REFCN */
    Wire.beginTransmission(LMP91000_Slave_Address);
    Wire.write(LOCKCN);
    Wire.write(Write_TIACN_REFCN); // Unlock
    Wire.endTransmission();


    /* Sets the Reference Control Register to select the following parameters:
    * External reference voltage | Internal zero selection = VREF*0.2 |
    * Bias polarity = positive | BIAS selection = VREF*0.24 */
    Wire.beginTransmission(LMP91000_Slave_Address);
    Wire.write(REFCN);
    Wire.write(Internal_Vref | Internal_Zero_50 | Bias_Negative | Bias_0_Percent);
    //Wire.write(Internal_Vref | Internal_Zero_20 | Bias_Positive | Bias_0_Percent);
    Wire.endTransmission();

    /* Sets the TIA Control Register to select 350kohm gain resistance
    * and load resistance (100 ohm)*/
    Wire.beginTransmission(LMP91000_Slave_Address);
    Wire.write(TIACN);
    Wire.write(Gain_350KhOhm | Rload_100_Ohm);
    Wire.endTransmission();

    // LOCKN register: LOCK for configuring TIACN and REFC
    Wire.beginTransmission(LMP91000_Slave_Address);
    Wire.write(LOCKCN);
    Wire.write(Read_TIACN_REFCN); // Lock
    Wire.endTransmission();
    }

    </code>

    Header file

    <code>


    /*
    / Created by: Sindre Søpstad
    */

    #define LMP91000_SLV_ADDR_WRITE 0x90
    #define LMP91000_SLV_ADDR_READ 0x91
    #define LMP91000_Slave_Address 0x48

    #define STATUS 0x00

    #define MODECN 0x12

    #define Fet_Short_Enabled 0x80
    #define Deep_sleep 0x00
    #define Two_lead_gnd 0x01
    #define Standby 0x02
    #define Three_Lead_Amperometric 0x03
    #define Temperature_meas_TIA_Off 0x06
    #define Temperature_meas_TIA_On 0x07

    #define LOCKCN 0x01

    #define Write_TIACN_REFCN 0x00
    #define Read_TIACN_REFCN 0x01

    #define TIACN 0x10

    #define Gain_External_Resistance 0x00
    #define Gain_2p75KOhm 0x04
    #define Gain_3p5KOhm 0x08
    #define Gain_7KOhm 0x0C
    #define Gain_14KOhm 0x10
    #define Gain_35KOhm 0x14
    #define Gain_120KOhm 0x18
    #define Gain_350KhOhm 0x1C

    #define Rload_10_Ohm 0x00
    #define Rload_33_Ohm 0x01
    #define Rload_50_Ohm 0x02
    #define Rload_100_Ohm 0x03


    #define REFCN 0x11

    #define Internal_Vref 0x00
    #define External_Vref 0x80

    #define Internal_Zero_20 0x00
    #define Internal_Zero_50 0x20
    #define Internal_Zero_67 0x40
    #define Internal_Zero_Bypassed 0x60

    #define Bias_Negative 0x00
    #define Bias_Positive 0x10

    #define Bias_0_Percent 0x00
    #define Bias_1_Percent 0x01
    #define Bias_2_Percent 0x02
    #define Bias_4_Percent 0x03
    #define Bias_6_Percent 0x04
    #define Bias_8_Percent 0x05
    #define Bias_10_Percent 0x06
    #define Bias_12_Percent 0x07
    #define Bias_14_Percent 0x08
    #define Bias_16_Percent 0x09
    #define Bias_18_Percent 0x0A
    #define Bias_20_Percent 0x0B
    #define Bias_22_Percent 0x0C
    #define Bias_24_Percent 0x0D

    </code>

    I will be happy to answer any questions :)

  • Hi, PSii

    Could you tell me how to connect the LMP91000 to the arduino?  

    I can't understand your connection from your sample code?

    Thanks.

    Sort

  • If you are going to use one LMP91000 only, you connect AGND, MENB and DGND to ground. Connect VDD to the Arduino supply, I used 5 V. SCL and SDA should be connected to your arduino clock and data lines and VSENSE to an analog-to-digital input on your Arduino (Capital letters are all on the LMP91000). Arrange the electrode connections as to fit your electrochemical cell.