For use with: Alpaca Kernel
Voltammetry - Final Project
Goals - Overview:
Week 17: Understand the design limitations and build a simple model of a potentiostat
Week 18: Build the potentiostat and write code for voltammetric measurements
Week 19: Run voltammetric measurements with different techniques and samples
Experiments - Week 17:
17A: Design and Limitation
17B: Testing and Calibration
17C: Implement and Investigate
17A - Potentiostat: Design and Limitations - Introduction#
Goals#
Get an overview of the proposed implementations of a Potentiostat on Alpaca with Pico Pi
Understand the challenges, limitations, pros and cons in suggested designs
Choose a design for your implementation
Learn how to control the potentiostat
Structure#
Background: 90 min
Anticipate: 5 + 60 + 30 min
Simulate: 10 + 20 + 30 min
Conclude and Choose: 15 min
Check-off rules#
If you are still unsure which design to choose at the beginning of the Classroom session, feel free to reach out to the TAs and discuss which option would be the most suitable for you and your partner.
Reach out to the TAs for checking off this notebook after completing Background + Anticipate + Simulate and discussing your results, preference and decision with your partner
Prepare your answers (and if you still have some questions) from the Anticipate section
Present the simulated Voltammomogram
Discuss your answers from the Conclude and Choose section
Optional assignments#
🏆 = Entirely optional. Interesting and useful.
🏆🏆 = Optional. Recommended.
🏆🏆🏆 = Recommended. It might be challenging, but not necessarily.
🏆🏆🏆🐐 = Challenging. Surely, it’s worth it!
Background#
The Measurement Cell#
There are many approaches to constructing measurement cells. Historically, these were made from glassware, but modern techniques increasingly favor planar designs. Planar construction allows for electrodes to be screen-printed, resulting in cost-effective and disposable sensors.
Sensor#
Below are examples of such planar sensors, which will also be used in our experiments:
Sensors
These sensors are printed on a foil substrate, except for the Metrohm sensor, which is printed on a ceramic base. The brown strip on the right acts as a support strip, providing mechanical stability for the foil sensors.
All sensors share a standard connection method, as shown below:

Sensor Connections
At the top is the Voltammetry Adapter, designed for use with a breadboard. Below it is the sensor. Since foil sensors are only 0.2 mm thick, the brown strip serves as a filler, ensuring mechanical stability when the sensor is inserted into the adapter.
The adapter includes a GND connection linked to a copper plane on the circuit board. When grounded, this acts as a shield to minimize interference from external sources, such as the 50 Hz noise from power lines.
In the adapter, pairs of pins are connected in parallel, making them compatible with standard breadboard contact arrangements.
Below is an example of how the adapter connects to the ALPACA system:
Sensor Connected to the ALPACA
Finally, detailed photographs of the Voltammetry Adapter board are provided below:
Voltammetry Adapter Board
Voltammetry Adapter Board - Back Side (Yellow = Support)
Cell Models#
In the development of measurement systems, extensive testing is often required. When testing procedures focus on the electronic components, it is often practical to simplify or bypass the processes occurring in the electrochemical measurement cell. This can be achieved by replacing the chemical cell with a simple, predictable circuit.
Below are two example models for this purpose:

Cell Models
Measurement Cell Model 1 - Linear#
This basic model uses two resistors, the values of which can be selected based on the specific testing requirements. For our current setup, resistor values in the range of 1 kΩ to 10 kΩ are appropriate. This model provides a straightforward and predictable behavior, ideal for initial testing of electronic components.
Measurement Cell Model 2 - Non-linear#
This model introduces a more complex, non-linear behaviour by incorporating a Zener diode. In practice, this means that the signal from the potentiostat will be distinctly different for a negative and a positive cell potential, unlike in Model 1. This response mimics the measurement of a netural Buffer solution and can be very useful and significantly faster for testing of your complete setup. For example, for testing your Cyclic Voltammetry code.
Replacements for the Zener diode#
When the goal is to achieve an asymmetric response of the Measurement Cell Model, Zener diode can be replaced with various components, for example:
a Si-diode (\(V_{th\,Diode} = 0.6 V\)) and a LED (\(V_{th\,LED} = 2 V\))
connected in parallel - with opposing polarity.a Si-diode (\(V_{th\,1xDiode} = 0.6 V\)) connected in parallel to two Si-diodes in series
(\(V_{th\,2xDiode} = 1.2 V\)), but in reverse polarity with respect to the single diode.
This combination produces a similar behaviour as LED, but across a smaller range of simulated cell potentials, which might be more practical in some designs or applications.
Potentiostat - Principle of Operation#
In the three-electrode potentiostat, two electrodes are used to conduct the current, while the third electrode is dedicated solely to measuring potential. Since the potential-measuring electrode carries no current, the voltage drop across its resistance in the liquid is zero volts, as per Ohm’s law: \( U = I \cdot R = 0 \cdot R = 0 \, \text{V}. \)
The general arrangement of this setup is shown below:

Potentiostat
In this system:
The Counter Electrode (CE) and the Working Electrode (WE) carry the current.
The current is measured using an Ampere-meter (Am).
The potential \(U_{cell}\) of the Working Electrode (WE) is measured relative to the Reference Electrode (Ref) using a voltmeter (Vm).
A variable voltage source \(U_{\text{var}}\) powers the entire setup.
The potential of the working electrode (\(U_{cell}\)) is the parameter controlled in this setup. The voltage source \(U_{\text{var}}\) is adjusted to achieve the desired \(U_{cell}\). Typically, \(U_{cell}\) is not held constant but is swept across a range of voltages defined by the sample under study.
Historically, potentiostats required manual operation, with users adjusting \(U_{\text{var}}\) while monitoring the voltmeter and recording current measurements. Modern potentiostats, however, are computer-controlled, with a feedback loop that automatically fine-tunes \(U_{\text{var}}\) to maintain the desired \(U_{cell}\).
Computer-Controlled Potentiostat#
The operation of a computer-controlled potentiostat is illustrated in the diagram below:

Computer-Controlled System
In this setup:
A voltage source \(U_{\text{sweep}}\) can generate negative and positive voltages and sets the desired value for \(U_{cell}\).
A feedback loop, implemented using an operational amplifier (OPAMP1), adjusts the voltage of the CE. This ensures that the measured \(U_{\text{cell}}\) reflects \(U_{\text{sweep}}\), i.e., \(U_{cell} = \text{GND} - U_{\text{sweep}}\) and so: $\( U_{\text{cell}} = - U_{\text{sweep}} \)\( In the schematic, the Ampere-meter (Am) is idealized to have no voltage drop. However, in real-world applications, a small voltage drop across the Ampere-meter can result in a slight discrepancy between \)U_a\( and \)U_{\text{sweep}}$.
The voltage sweep range is chosen based by expected the properties of the sample being analyzed and the composition of the surrounding solution. It often spans from the negative to positive voltages.
During the sweep, the current \(I_{cell}\) can take on positive or negative values, regardless of the value of \(U_{cell}\), because it depends on the chemical reaction taking place in the cell and the conditions of the measurement.
This wide range of possibilities causes a technical challenge for controlling and measuring such a system, and it is the case with Pico Pi and Alpaca.
Potentiostat Controlled with Positive Voltages Sources#
The configuration explained in the previous section can be extended by an additional voltage source \(U_{\text{offset}}\).

Potentiostat Controlled with two Voltages Sources
Thanks to this, both negative and positive \(U_{\text{cell}}\) can be set using voltage sources that output only positive voltages: $\( U_{\text{cell}} = U_{\text{offset}} - U_{\text{sweep}} \)$
Current measurement#
Measuring current in a circuit can be accomplished in several ways. One common method involves placing a resistor in series with the circuit and measuring the voltage drop across it. While simple and effective, this technique introduces an additional voltage drop into the circuit, which may lead to errors. Whether this is acceptable depends on the circuit’s requirements and the magnitude of the introduced error.
🏆 Optional Challenge
Implement this technique in your potentiostat and compare it with the suggested designs. Make sure to report your observations.
Preferably, an operational amplifier (OPAMP) can be used as a current-to-voltage converter. This method allows for current measurement with negligible voltage drop. However, the measurement range is limited by the current-handling capacity of the OPAMP.
In voltammetry, where currents typically range from microamperes to milliamperes, OPAMP-based current measurement is highly effective. Below is an example of such a circuit:

Current Measurement
In this circuit:
There is only one voltage source to control the potentiostat, which means that it must be able to generate negative voltages, if the positive \(U_{\text{cell}}\) is desired, and vice versa.
💡 Hint
Alpaca’s
DAC Assistantcan be used in this case.
The voltage \(U_a\) represents the current (\(I_{\text{cell}}\)).
The cell current (\(I_{\text{cell}}\)) is converted into a voltage by the OPAMP2 acting as a current-to-voltage converter in combination with the feedback resistor \(R_f\).
The value of \(R_f\) should be carefully chosen to ensure the current of interest utilizes the full range of the analog-to-digital converter (ADC).
The conversion is described by the equation: \(U_{a} = - ( - I_{\text{cell}} ) \cdot R_f\), which simplifies to: $\( U_{a} = I_{cell} \cdot R_f \)$
A positive current results in a positive voltage, and vice versa.
💡 Hint
If this configuration is implemented on Alpaca, the signal must be measured via the non-inverting and the inverting amplifier using two separate ADCs simulataneously,
i.e.AMP0:SIGNAL+ to ADC0andAMP1:SIGNAL- to ADC1, and then added together.
Current-to-Voltage Converter with Offset#
Additionally, the output range of the OPAMP-based current-to-voltage converter can be adjusted with an offset voltage source \(U_{\text{offset}}\) at the non-inverting input of the OPAMP2.

Current Measurement with Offset
In this circuit:
The conversion is described by the equation: $\( U_{a} = I_{cell} \cdot R_f + U_{offset} \)$
Positive currents result in positive voltages, but with an offset.
Additionally, a pre-defined range of negative currents also results in a positive voltages.
💡 Hint
Note that:
\(U_{\text{offset}}\) affects the value of \(U_{\text{cell}}\)
Setting \(U_{\text{offset}} = 0V\) reduces this system to the previous one.
Handling Noise#
Filtering with a Tamed Integrator#
One of the easiest to implement and a very effective method to increase the signal-to-noise ratio and to improve the quality of your measurements is to use filters. A simple addition of a capacitor parallel to the feedback line of the current-to-voltage converter creates a low-pass filter between the Measurement Cell and the Voltmeter.

Current-to-Voltage Converter with a Low-pass Filter
💡 Hint
Keep in mind that setting the cut-off frequency of the filter too low might obscure some essential information in your results, so use your intuition first to set a cut off frequency for a given set of parameters, and test your setup before running the actual measurement.
🏆🏆🏆 Optional
Think at which other points in the circuit of your setup filtering could be applied. It might require some creativity and a closer look at the Alpaca’s main circuit diagram. Do let us know your about your ideas before trying! But if you give it a thought, make sure to include that in your report.
Averaging#
For the extra bit of noise below the cut-off frequency, averaging over several measurements in a very short time can dramatically improve your results. However, pay attention to the often neglected issue that each measurement takes time, and if it’s not accounted for properly in your procedure, your measurement results might deviate from the expectation.
Potentiostat - Design#
The considerations of the previous section can be summarised in three functions of a potentiostat that will guide the design choices:
Controlling \(U_{\text{cell}}\)
Controlling \(I_{\text{cell}}\)-to-\(U_{\text{a}}\) conversion
Measuring \(U_{\text{a}}\)
Based on the functionality and the limitations of Alpaca and Pico Pi, we outlined two design options for a Potentiostat. Their features, as well as, some key advantages and disadvantages are presented in this section.
Basic Design (Design B)#
This design is recommended when ease of use is prioritised.
Layout#

Potentiostat - Basic Design
In this design, current measurement is realised via the standard current-to-voltage converter without the offset (Uoffset = GND). This approach has the following implications for the implementation on Alpaca:
In order to control
Ucellacross a range of positive and negative values,DAC Assistanthas to be used.💡 Hint
Think carefully what is the output of
DAC Assistant: OUT, whenDACAis not active, soDACA=0V. Check the section Disconnecting the measurement cell below for more information.Uacan be both positive and negative, so to obtain reliable and precise results, this signal has to be measured with two channels simultaneously;one configured to measure the positive part of the signal
AMP0:SIGNAL+ to ADC0and the other, to measure the negative part of the signal
AMP1:SIGNAL- to ADC1.
In this configuration,AMP0acts as a non-inverting amplifier andAMP1as an inverting amplifier. Further details on the correct settings will be presented later in this assignment. You can also find further instructions in the Alpaca Manual.
🏆🏆🏆 Optional: The original
DACAvalues before they’re converted toDAC Assistant:OUTcan be measured independently viaAin2for reference.
Advantages#
Intuitive control of
Ucelland evaluation ofIcellWide range of
Ucell, from -10V to ca. +5VWide range of
Icell, thanks to the dual channel measurement
Disadvantages#
Lower accuracy of and lower resolution of
UcellcontrolLower accuracy for measurements of low voltages
-100mV<Ua<100mVbecause of the dual-channel measurementHigher total noise
Relaymust be used to disconnect the Measurement Cell at idle operation
🔌Disconnecting the Measurement Cell
The electrochemical reaction within the measurement cell continues as long as a current can flow. To prevent undesired reactions during idle periods, it's crucial to make sure that the signals applied to the cell do not generate a substantial current.
This can be achieved by setting the voltage to the cell to zero, by controlling the voltage in the potentiometric regulation loop. This comes with its own challenges in this design, which you will discover during the test procedures.
Alternatively, the relay on the ALPACA board can be used to electrically disconnect the measurement cell from the control setup. The relay is located on the ALPACA board, close to the construction site. It can be controlled using the pin labelled Relay on J8. The relay will react (energize the electro-magnet) when a signal 3.3V or 5V is applied to the pin “relay”.
ALPACA's Relay
In its default state, the electromagnet is not energized:
the relay connects the
COMMONterminal to theNORMAL CLOSED.In its energized state, the electromagnet switches this connection:
and the relay links the
COMMONterminal withNORMAL OPEN, effectively connecting the measurement cell.Use the
GPIO14pin ofJ1on Cria to control the action of the relay.
You can instantiate and manipulate the Python object for the relay with:from machine import Pin relay = Pin(14, Pin.OUT) relay.value(0) ## OFF relay.value(1) ## ON
Have a look into the Alpaca Manual (Download from Brightspace) for more info on the use of the relay and a complete Alpaca circuit layout on the last page of the manual.
Design A (Advanced)#
This design is recommended for high quality measurements.
Layout#

Potentiostat - Advanced Design
In this design, current measurement is realised via the current-to-voltage converter with offset (Uoffset = DACB). This approach has the following implications for the implementation on Alpaca:
In order to control
Ucellacross a range of positive and negative values,DACAandDACBare used directly in combination. They can be configured such thatUcelltakes positive or negative values.The offset
Uoffsetcan be set such thatUatakes only positive values for a range of currents, negative and positive, and thus,Uacan be measured with a single analog-to-digital converter, for example:ADC0viaAMP0:SIGNAL+.🏆🏆🏆 Optional:
DACAandDACBcan be measure independently viaAin1orAMP1:SIGNAL+andAin2for reference.
Advantages#
Higher accuracy and a higher resolution of
Ucellcontrol.Precise measurement with a single ADC across a range of negative and positive cell currents.
Lower total noise.
🏆🏆🏆🐐 Optional: Range of
Uacan be adjusted programatically.🏆🏆🏆🐐 Optional:
Relayis available and can be used for switchingRfon demand.
Disadvantages#
Control of
Ucelland evaluation ofIcellare slightly more complicatedLower range of
UcellLower range of
IcellDepending on the control procedure the range of
Icellmeasured viaUamight be correlated with the value ofUcell
Anticipate#
A1: Identify and make considerations about known design limitations of Alpaca and Pico Pi#
⏳ Estimated time: 5 + 60 + 30 min
Range and Resolution#
What is the available range and resolution of:
Pico Pi’s analog-to-digital converters (ADC)?
Alpaca’s digital-to-analog converters (DAC)?
Device timer#
Recall the smallest value of DELAY_MS used in your previous experiments with Pico.
What is then the highest sampling rate achievable with Pico?
🏆 Optional: Do you think it is reliable and consistent?
In one of the experiments in the notebook 17B, you will have a chance to explore some timing peculiarities and timing inconsistencies of Pico Pi.
Opamps#
What are the highest and the lowest outputs of the OPAMPs that you measured in the previous assignments?
Keep this in mind throughout the project and also when answering the questions in A2.Are you expecting the \(U_{\text{offset}}\) and \(I_{\text{bias}}\) of the OPAMPs to affect your measurement significantly?
A2: Predict signals#
We would to encourage you to choose the Advanced Design for this project. However, if you decide to go with the Basic Design, you may consider the tasks in the Advanced track as optional.
A2.1: Required
A2.2: Required only for the Advanced design - Recommended!
A2.1 Design B (Basic) - Linear Potentiostat Model#

Linear Potentiostat Model - Basic Design
Recall the answer from Anticipate1: Resolution and compute the smallest \(U_{\text{cell}}\) step when DAC Assistant is used to control it.
Derive the formula for \(U_a\) as a function of \(U_{DAC A}\)
Compute the range of \(U_{DAC A}\) required to generate \(U_{DAC Assistant} = (-3V ,3V)\)
Compute the range of \(I_{cell}\) generated by \(U_{DAC Assistant} = (-3V ,3V)\) for:
\(R_1 = R_2 = 1k\Omega\)
\(R_1 = R_2 = 10k\Omega\)
Compute the ranges of \(U_a\) generated by \(U_{DAC Assistant} = (-3V ,3V)\) for:
\(R_1 = R_2 = 1k\Omega\) and \(R_f = 1k\Omega\)
\(R_1 = R_2 = 1k\Omega\) and \(R_f = 3.3k\Omega\)
\(R_1 = R_2 = 10k\Omega\) and \(R_f = 10k\Omega\)
\(R_1 = R_2 = 10k\Omega\) and \(R_f = 33k\Omega\)
Which attenuation and the jumper setting (A,B,C,D,E) on Alpaca’s
ATTENUATORonJ42of theAMP0would you choose to make the best use of the available range ofADC0=(0,3.3V)when capturing the positive signals viaJ40:SIGNAL+? Answer the question for each of the cases above💡 Hint
What is the highest value of
Uapossible?What is the highest value of
Uathat can be measured at each attenuation factor?Use the relevant table from the Alpaca Manual in section 2.10 The Amplifier to match the attenuation with the jumper setting.
You will use
AMP1to measure the negative part of the signal viaJ60:SIGNAL-. In the default setting - recommended - the inverting amplifierAMP1:SIGNAL-has a resistorR69=100kon the feedback line. So, in order to use it as an attenuator, you can simply insert a resistor between the outputUaandAMP1:SIGNAL-.Calculate the resistor \(R_{preamp}\) that you need to add to your circuit on the breadboard between
UaandJ60:SIGNAL-to match the attenuation selected for the positive inputs viaADC0in the previous question.
💡 Using AMP1 as an inverting attenuator
If you have a look into the Alpaca’s circuit diagram in the Alpaca Manual, the last page, and find the circuit of the amplifier associated with
ADC1(Hint: Look for jumpers and resistors in series 60, i.e.J62orR69to findAMP1), you will notice that theJ62:ATTENUATORonly works for signals measured viaJ60:SIGNAL+.Reading and understanding Alpaca’s circuit diagram may seem daunting and complicated at first, but it turns out that in order to attenuate a negative input and match the attenuation on the positive part of the signal, you will simply have to add an extra resistor before the inverting input of the OPAMP.
The default setting for
J60:SIGNAL-isGAIN=-1and it is realised with the following combination:
UatoJ60:SIGNAL- = J60:3
J60:SIGNAL+ = J60:2toJ60:GND = J60:1
J60:DC
J62:1-4 = J62:B = 0 Ohm
J63:1-4 = J63:B = 0 Ohm
J65:1-4 = J65:B = 0 OhmNo jumpers on
J64andJ17
A2.2 Design A (Advanced) - Linear Potentiostat Model#

Linear Potentiostat Model - Advanced Design
Recall the answer from Anticipate1: Resolution and compute the smallest \(U_{\text{cell}}\) step when
DAC AandDAC Bare used to control it.
Derive the formula for
Uaas a function ofDAC AandDAC B, and calculate the maximum range of \(U_{cell}\) achievable with this configuration.
There are at least three procedures to control
Ucelland operate the potentiostat:
Use
DAC Ato fix the potential of theRefand useDAC Bto control theUcellUse
DAC Bto fix the potential of theWEand useDAC Ato control theUcellModulate
DAC AandDAC Bsimultaneously to control theUcell
Each procedure has its pros and cons when used to perform a voltage sweep across the Measurement Cell.
🏆🏆🏆 Optional: List pros and cons for each control procedure mentioned above.
Use procedure 2 in this and in the following exercises. Take the range \(-0.5 V\) to \(1.5 V\), so \(U_{cell} = (-0.5V,1.5V)\) as an example. You may assume that \(R_1 = R_2 = 1k\Omega\) and \(R_f = 3.3k\Omega\). Remember that you can only measure positive voltages at Ua. For simplicity or to optimise for resolution and signal-to-noise ratio, we will use attenuations 1:1 and 1:3 via ADC0:SIGNAL+, depending on the priority.
Derive the formula to find the range of \(I_{cell}\),
Compute the range for both attenuation factors when
DAC B = 1.5V.🏆Optional: Derive the general formula for the effective resolution of \(I_{cell}\) and compute it for both attenuations factors.
💡 Hints
What is the highest value of
Uapossible?What is the highest value of
Uathat can be measured at each attenuation factor?Use the relevant table from the Alpaca Manual in section 2.10 The Amplifier to match the attenuation with the jumper setting for
J42.
In the previous question, the sample generated a relatively high peak current \(I_{cell} = 1.5mA\) during the voltage sweep.
Now, assume that your sample generates a much weaker current in the range \(I_{cell} = (-50\mu A, 150 \mu A)\).
Choose the most suitable resistor \(R_f\) (roughly) for your measurement with attenuation
1:1and1:3. Give arguments for your choices.
🏆 🏆 🏆 🐐 Optional - Recommended: It turns out that a change of parameters for the cyclic voltammetry of that analyte delivers:
an oxidation peak \(I_{cell} = 120 \mu A\) at \(U_{cell} = 1.1 V\), and
a reduction peak \(I_{cell} << -50 \mu A\) at \(U_{cell} = -0.1 V\), which is clipped
You learn that your original maximum detectable range of \(I_{cell} = (-50\mu A, 150 \mu A)\) is insufficient to capture the signal. You could intuitively reduce the amplification factor and replace the resistor \(R_f\) with a smaller one, but that will negatively affect your resolution. Recall that the detectable range of \(I_{cell}\) can be adjusted with the offset voltage at the current-to-voltage converter. In this design, and in this procedure, it is controlled by DAC B, which is simulataneously used to fix the ground reference for the Measurement Cell.
Describe the technique to change the offset at the I-to-V converter, thereby change the detectable \(I_{cell}\) range, and yet still perform a voltage sweep \(U_{cell} = (-0.5V,1.5V)\).
Note that the Measurement Cell Model 1 isn’t valid in this situation, but the value or R1 and R2 and in fact not relevant so you might consider the Measurement Cell as a black box.
A3: Make a wire diagram#
Choose the design and make a wire diagram of your implementation on Alpaca and its Sandbox (breadboard) to get a practical overview and a better understanding of the circuit.
For making a wire diagram or a scheme, you can use:
The graphical organiser, also known as the Layout table (in Excel) from last week,
Draw a (readable) circuit,
Go fancy and download Fritzing and Alpaca’s template from Brightspace.
💡 Fritzing - links
Here are some links to developer’s versions of Fritzing. They are known to be unstable, but they should be just enough to help you with a wire diagram. Please let us know if that’s not the case.
One of the last open source beta version of Fritzing is available on archive.org
There are also some compiled builds of open source versions of Fritzing on GitHub, and here you can find an example build for Windows, MacOS and Linux
A3.1 Design B (Basic)#
Implement the Basic Potentiostat Design B.
Use the linear Measurement Cell Model - Model 1.
Add the relay and its control to the circuit for disconnecting the sensor during idle operations.
A3.2 Design A (Advanced)#
Implement the Advanced Potentiostat Design A.
Use the linear Measurement Cell Model - Model 1.
🏆 Optional: Add the relay and its control to the circuit for switching between
Rfoptions.
Simulate#
⏳ Estimated time: 10 + 20 + 30 min
S1: Complete the circuit#
Download the simulation file from Brightspace and use Alpaca’s circuit diagram from the last page of the Alpaca Manual for reference. Use one of the intuitive combinations, like R1=R2=Rf=1k and your results from the Anticipate to begin with.
S1.1 Basic Design#
Required only for the B track
Set the correct values of the following resistors in the simulation: J42, Rpreamp to record Ua with:
attenuation 1:1 on
ADC0andADC1attenuation 1:3 on
ADC0andADC1
It might be usefull to save your configurations in separate files for later use. Also, if you want to try other resistor combinations for the Measurement Cell Model or the current conversion factor.
💡 Hint: R_{preamp}
R_{preamp} is not present in the original Alpaca circuit diagram. Recall your results from the Anticipate section. It is the resistor that has to be added between Ua and AMP0:SIGNAL- to set the attenuation on the inverting amplifier for ADC1
S2: Simulate the Potentiostat for fixed cell potentials#
S2.1 Basic Design#
Required only for B track
Use the Measurement Cell Model 1 configuration
R1=R2=Rf=1k, and run the simulation with Attenuation 1:1 for each of the output of theDACAssistant:
DACAssistant= -0.5 V
DACAssistant= 0 V
DACAssistant= 1.5 V
Plot the measurements of:
V(DACAssistant)
I(R2)
U(Ua)
U(ADC0)
U(ADC1)
and compare these values with your results from the Anticipate 2.1. Do they agree with your previous results?
Repeat for the simulation with attenuation 1:3.
🏆Optional: Repeat the simulation for a different Measurement Cell Model 1 configuration, for example
R1=R2=1kandRf=3.3k
S2.2 Advanced Design#
Required only for A track
Use the Measurement Cell Model 1 and an intuitive configuration
R1=R2=Rf=1k. Apply the control procedure B, and recall your insight from the Anticipate 2.2. Run the simulation with Attenuation 1:1 and set the value ofDACAandDACBto generate the following values of \(U_{cell}\):
Ucell = -0.5 V
Ucell = 0 V
Ucell = 1.5 V
Plot the measurements of:
V(we)-V(re)
I(R2)
U(Ua)
U(ADC0)
U(ADC1)
Compare these values with your results from the Anticipate 2.2 Do they agree with your previous results?
🏆 Optional: Repeat the simulation for a different Measurement Cell Model 1 configuration, for example
R1=R2=1kandRf=3.3k
S3: Simulate a linear cell potential sweep#
S3.1 Basic Design#
Use the Measurement Cell Model 1 configuration R1=R2=1k and Rf=3.3k, and configure the DACAssistant to generate a linear voltage ramp such that \(U_{cell} = (-0.5V,1.5V)\).
Use a slowly rising/falling pulse that mimics a triangular waveform, and the design with 1:1 attentuation.
💡 LTSpice: Linear voltage ramp
LTPspice: Voltage Source configuration - Triangle waveform
Use
VinitialandVonto set the limits of the Triangle waveform.Note that you can’t choose a “half a period” or change the symmetry here, but you can simply run your transient analysis for only a half of the set period.
Run the simulation and plot the following:
V(DACAssistant)
U(Ua)
U(ADC0)
U(ADC1)
What are the highest values at ADC0 and ADC1?
In the meantime, recall what are the highest values that can be measured via
ADC0andADC1on Alpaca:
As you might expect, clipping would occur if this model was implemented on Alpaca, so to alleviate this problem you are presented with two options:
A. Change the current-to-voltage conversion factor
RfB. Change the attentuation at the ADC
Which one, or why both, and what changes (roughly) would you choose in this particular case to calibrate your potentiostat?
Change the current conversion factor \(R_f\) to
Rf=10k. Explain what result caught your attention.
Finally, set
R1=R2=1k,Rf=6.6kand adjust the attenuation to 1:3. Run the simulation and make some changes in the window with the plots:
Change the “Quantity Plotted” on the x-axis to display
V(we)-V(re)instead oftime.
This is
Ucellin LTSpice.
Remove the following traces:
V(DACAssistant)andU(Ua)
Modify the traces for
U(ADC0)andU(ADC1)with an algebraic expression to convert these outputs using the current-to-voltage conversion factor to represent the measured current,
for example:V(adc0)*6.6e-3*3.3forRf=6.6kand the attentuation 1:3.
Add
I(R2)for comparison.
For a better overview, adjust the y-axis limits (voltage and current) to be symmetric, and optionally, to (roughly) match the conversion with
Rfand the value of the attenuation.
😎 This plot can be considered as your first Voltammogram in this project.
Take a moment to appreciate how well optimised this last configuration is!
For
Ucell = (-0.5V,1.5V):R1=R2=1k,Rf=6.6kand attenuation to 1:3Using a relatively high
Rfdelivers a strong signal from the current-to-voltage converter, but it is cleverly chosen such that it doesn’t saturate the converter’s OPAMP output (Ua < 10.8V) in the entire range of the currents generated during the voltage sweep. Simultaneously, the attenuation 1:3 scales this signal down just right such that the entire range of the ADCs can be utilised for the measurement.
S3.2 Advanced Design#
Use the Measurement Cell Model 1 configuration R1=R2=1k and Rf=3.3k, and configure the voltage sources:
DACAto generate a linear voltage ramp
DACBto a fix reference potential
such that \(U_{cell} = (-0.5V,1.5V)\).
Use a slowly rising/falling pulse that mimics a triangular waveform, and set the attentuation 1:1.
💡 LTSpice: Linear voltage ramp
LTPspice: Voltage Source configuration - Triangle waveform
Use
VinitialandVonto set the limits of the Triangle waveform.Note that you can’t choose a “half a period” or change the symmetry here, but you can simply run your transient analysis for only a half of the set period.
Run the simulation and plot the following:
V(DACA)
U(Ua)
U(ADC0)💡 Optionally:
U(ADC1)with attenuation 1:3
What is the highest value at ADC0?
In the meantime, recall what are the highest values that can be measured via
ADC0on Alpaca:
As you might expect, clipping would occur if this model was implemented on Alpaca, so to alleviate this problem you are presented with two options:
Change the current-to-voltage conversion factor
Rf
Change the attentuation at the ADC
Which one, or why both, and what changes (roughly) would you choose in this particular case to calibrate your potentiostat?
Change the current conversion factor \(R_f\) to
Rf=10k. Explain what you observe in the results.
Finally, set
R1=R2=1k,Rf=6.6kand adjust the attenuation to 1:3. Run the simulation and make some changes in the window with the plots:
Change the “Quantity Plotted” on the x-axis to display
V(we)-V(re)instead oftime.
This is
Ucellin LTSpice.
Remove the following traces:
V(DACA),V(DACB)andU(Ua)
Modify the traces for
U(ADC0), (and if presentU(ADC1)) with an algebraic expression to convert this output using the current-to-voltage conversion factor to represent the measured current, for example:V(adc0)*6.6e-3*3.3forRf=6.6kand the attentuation 1:3.
Add
I(R2)for comparison.
For a better overview, adjust the y-axis limits (voltage and current) to be symmetric, and optionally, to (roughly) match the conversion with
Rfand the value of the attenuation.
😎 This plot can be considered as your first Voltammogram in this project.
S4: Summary (Basic + Advanced)#
Take a moment to appreciate how well optimised this last configuration in S3 is!
For
Ucell = (-0.5V,1.5V):R1=R2=1k,Rf=6.6kand attenuation to 1:3Using a relatively high
Rfdelivers a strong signal from the current-to-voltage converter, but it is cleverly chosen such that it doesn’t saturate the converter’s OPAMP output (Ua < 10.8V) in the entire range of the currents generated during the voltage sweep. Simultaneously, the attenuation 1:3 scales this signal down just right such that the entire range of the ADCs can be utilised for the measurement.
Conclusions and Choose#
⏳ Estimated time: 15 min
Reach out to the TAs for checking off this notebook after completing Background + Anticipate + Simulate and discussing your results, preference and decision with your partner.
Prepare your answers (and if you still have some questions) from the Anticipate section
Present the simulated Voltammomogram
Prepare your responses to the following questions:
Explain the essential differences between the designs (Basic vs. Advanced) that guided your choice:
Why does design B use two ADCs, and design A only one?
How can you adjust the attenuation of AMP when measuring a negative signals?
What is the function of
Rf?What is the function of
DAC Bin design A?Why does design B require the relay to disconnect the sensor, and design A does not?
What is the function of R1 and R2 in the Measurement Model Cell 1?
Explain how to change the measurement range of the detectable
Icellin the design of your choice:by changing Rf?
by changing the attenuation of the amplifier (AMP)?
by adjusting the
Uoffsetby combining some of the above options?
