We Code, built, and share our thoughts to do chemistry

Wednesday, 20 November 2024

Devlog - Building a Potentiostat

For the past couple of years, we've been aware of one thing about the mountain we had to climb, having the access to instrumentation for research and development purposes. Renting an instrument is really expensive for one trial run, let alone purchasing one. Moreover, our funding is extremely little to none. It's completely impeded our development and forces us to think of the solutions with such constrains. How can we have the access to the instrument without burning so much cash? Well why not make one?

Last year, we decided to build a potentiostat, an instrument to perform cyclic voltammetry -- a method in which one can study about the transport phenomena of an electroactive particle and study about its reduction potentials. This device can help us to study and develop electrocatalysis for hydrogen production and battery research. Because of this importance, we attempted to build one.

Because we are trying to squeeze the cost of development, it came to our attention that we are going to make it more modular and upgradable. Therefore, should we want to improve the performance of device, we only need replace the IC/modules with a better performing one. With this approach, we can choose tune our accuracy based on our needs and cost while maintaining the performance of the device. 

We make the device consisting of three main parts: signal generator, signal processor, and data acquisition modules. Signal generator generates desired voltage programmed by the microcontroller through digital-to-analog (DAC) module. Because of the modular approach we use, the DAC signal could originate from the external DAC module (MCP4725), built-in DAC from the microcontrollers, or based on the pulse-width modulation. We used built-in DAC from CH32V307 microcontroller because our external DAC kept breaking down. This difference of approach can result in difference in the maximum voltage it generates. For example, the built-in DAC can only generate up to 3.3V with 12-bit resolution. 

Signal processor is the heart of the device in which the signal generated from DAC would be processed and connected to the electrodes. This module consists of op-amps and resistors to perform voltage shiftings, feedback loop, and generate measurement signals. As op-amps offer different performances, we make the op-amps upgradable. Instead of soldering it directly to the circuit board, we use op-amp ports to make it upgradable. Despite its upgradability, it puts more constraints on the op-amp upgrade selection as we cannot change the port lanes.

Finally, the data acquisition, the part in which it would capture the measurement data. Data acquisition mainly consists of analog-to-digital converter (ADC) and a microcontroller to store the data. There are various ADCs on the market or we can also use the built-in ADC despite the limited resolution.

Besides the three main components, the device still needs a brain to run. We've tried several microcontrollers for our development such as STM32, Raspberry pi pico, ESP8266, and CH32V307. Different microcontroller provides different paradigm in development of the project. There should be an unified API such that the development friction wouldn't be to severe should we change one platform to another. Therefore, we also develop an API to generate the DAC signals data. We call it ARAStat-core.We share the github link here. 

We would post more updates in due course.

References:
Cyclic Voltammetry (link)

Crespo, J. R., Elliott, S. R., Hutter, T., & Águas, H. (2021). Development of a low-cost Arduino-based potentiostat. (link)

Meloni, G. N. (2016). Building a microcontroller based potentiostat: A inexpensive and versatile platform for teaching electrochemistry and instrumentation. (link)

Our potentiostat circuit design approach compared to a glucometer

Previously, we rebuilt a potentiostat circuit to improve our design. We built it on a breadboard as we can experiment with it. You can watch...