Go Down

Topic: Current - voltage correlation on PWM pins for cyclic voltammetry application. (Read 358 times) previous topic - next topic

HoomanTX

I've searched the forum and found kind of similar topics for performing cyclic voltammetry with Arduino. But the design and question are different here, hence creating a new thread.

I'm a chemist with elementary electronics background.
The target is to build a potentiostat that can apply a digitized triangular waveform to a two-electrode cell (could be a battery, supercapacitor, electrochemical cell, etc.) and records the current at the end of each potential step, to extract chemical information about the system under study.

Minimal hardware list:
- Arduino uno (replicate);
- ADS 1115 16 bits ADC for potential measurement;
- 2 X INA219 DC current sensors with the default 0.100 Ohm shunt resistor replaced with 1.00 and 10.0  Ohms for 10 uA and 1 uA measurement resolution, respectively.
 - 2 X 1 kOhm, 200 uF RC filters for smoothing the pwm output (will be optimized later);
A schematic of the circuit is attached as a Figure1.
The minimal code is attached. Please note that due to the necessity of polarity reversal, two pwm outputs are used, with one of them shorted to the GND when the other pin applies a positive bias.


Problem: The voltage-time triangular waveform looks fine when there is no load connected between the two electrodes (i.e., open circuit conditions) as can be seen from the attached Figure 2. However, when a cell is connected, the applied voltage by the microcontroller deviates from the expected value, depending on the magnitude of the current flowing through the system. The maximum magnitude of the current (~ 500 uA max) is well below the current limit of the pwm pins. Also, the slope of Voltage-time curve gets affected by this (Figure 3).

Question: is the applied duty cycle of the pwm a function of current passed through the pin? if yes, then what would be a safe current where the duty cycle can be assumed almost independent from the magnitude of the current? If not, is it something that I'm missing in my circuit that causes this out of control behavior?

In the next phase, I'm planning to use 12-bit DAC chips instead of pwm to have better control over the potential resolution. But if this is a common problem, it may still suffer from the same problem.

Any hint is much appreciated.

HoomanTX

Forgot to attach the resultant I-V curve from a cell that can be cycled in both positive and negative voltages.

-Hooman

HoomanTX

Sorry for multiple posts. Just realized it might be easier to embed the images.




wvmarle

PWM is not an analog voltage; it's a waveform. You need to do low-pass filtering to get to a voltage. I see what looks like two RC circuits in your spaghetti diagram, please post proper schematic then it becomes a lot clearer what those components really do. Values are also quite important.

At your low currents that is probably enough, if not you should add a buffer (voltage follower - unity gain OpAmp).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

HoomanTX

As mentioned in post # 1, I'm using a pair of 1 KOhm-200 uF for low-pass filtering of the pwm output. The 200 uF is too large, and hence there is a significant lag time for large potential shifts, but I'll optimize it later. So far I can say that it is the electrochemical cell under study (which is a low capacity battery in this case) that interferes with the smoothed voltage from pwm pins. Therefore, the voltage follower with an OPAmp would be the direction to go, as you said.

Thanks for the reply,
Hooman

MarkT

Your output impedance from the PWM is the impedance of an output pin (about 40 ohms) plus the impedance of the R in the RC filter (1k).  If you want to apply a fixed voltage you'll need to buffer that voltage with an opmp and perhaps a current buffer too if the current you want is large.

So what is the load current worse case?

("Impedance" is the general term used for how a current depends on voltage, given as delta V / delta I)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up