Picture of NanoStat in 3D-printed enclosure with LiPo battery and US quarter for scale.

An ESP32-Based Potentiostat

Ever wanted to make your own wireless chemical sensor? Researchers from the University of California, Irvine (UC Irvine) have got you covered with their ESP32-based potentiostat.

We’ve talked about potentiostats here on Hackaday before. Potentiostats are instruments that analyze the electrical properties of an electroactive chemical cell. Think oxidation and reduction reactions (redox) from your chemistry course, if you can remember that far back. Potentiostats can be used in several different modes/configurations, but the general idea is for these instruments to induce redox reactions within a given electroactive chemical cell and then measure the resulting current produced by the reaction. By measuring the current, researchers can determine the concentration of a known substance within a sample or even determine the identity of an unknown substance, to name a few potential applications.

These instruments have become mainstays in research labs around the world and have incredible utility in the consumer space. Glucometers, devices used to measure blood glucose levels, are an example of technologies that have made their way into everyday life due to the advances made in electrochemistry and potentiostat research over the last few decades. Given their incredible utility to scientific research and medical technologies, a great deal of effort has gone into democratizing potentiostats, making them more available to the general public for educational and hobbyist purposes. Of course, any medical applications must go through rigorous testing and approvals by each country’s appropriate governing bodies. So we’re talking more non-medical purposes here.

The first popular open-source, DIY potentiostat was the CheapStat, which we’ve covered here on Hackaday before. Since then, developing newer and more advanced open-source potentiostats has become a popular endeavor within the scientific community. The researchers from UC Irvine wanted to put their own special spin on the open-source potentiostat craze and they did so with their inclusion of the ESP32 as their main processor. This obviously opens up them up do a whole host (see what we did there) of wireless capabilities that others before them have not explored.

With the ESP32, they developed a nice web-based GUI that makes controlling and collecting data from the potentiostat very seamless and user-friendly. You can imagine the great possibilities here. Teacher-led classroom demonstrations where the instructor can easily access each student’s device over the cloud to help troubleshoot or explain results. Developing soil monitoring sensors that can be deployed all around a farm to remotely collect data on feed, soil composition, and plant health. The possibilities here sure are promising.

We hope you’ll dive into their paper as it’s well worth a read. Happy hacking, Hackaday.

Electrochemistry At Home

A few years ago, I needed a teeny, tiny potentiostat for my biosensor research. I found a ton of cool example projects on Hackaday and on HardwareX, but they didn’t quite fulfill exactly what I needed. As any of you would do in this type of situation, I decided to build my own device.

Now, we’ve talked about potentiostats before. These are the same devices used in commercial glucometers, so they are widely applicable to a number of biosensing applications. In my internet perusing, I stumbled upon a cool chip from Texas Instruments called the LMP91000 that initially appeared to do all the hard work for me. Unfortunately, there were a few features of the LMP91000 that were a bit limiting and didn’t quite give me the range of flexibility I required for my research. You see, electrochemistry works by biasing a set of electrodes at a given potential and subsequently driving a chemical reaction. The electron transfer is measured by the sensing electrode and converted to a voltage using a transimpedance amplifier (TIA). Commercial potentiostats can have voltage bias generators with microVolt resolution, but I only needed about ~1 mV or so. The problem was, the LMP91000 has a resolution of ~66 mV on a 3.3 V supply, mandating that I augment the LMP991000 with an external digital-to-analog converter (DAC) as others had done.

However, changing the internal reference of the LMP91000 with the DAC confounded the voltage measurements from the TIA, since the TIA is also referenced to the same internal zero as the voltage bias generator. This seemed like a problem other DIY solutions I came across should have mentioned, but I didn’t quite find any other papers describing this problem. After punching myself a little, I thought that maybe it was a bit more obvious to everyone else except me. It can be like that sometimes. Oh well, it was a somewhat easy fix that ended up making my little potentiostat even more capable than I had originally imagined.

I could have made a complete custom potentiostat circuit like a few other examples I stumbled upon, but the integrated aspect of the LMP91000 was a bit too much to pass up. My design needed to be as small as possible since I would eventually like to integrate the device into a wearable. I was using a SAMD21 microcontroller with a built-in DAC, therefore remedying the problem was a bit more convenient than I originally thought since I didn’t need an additional chip in my design.

I am definitely pretty happy with the results. My potentiostat, called KickStat, is about the size of a US quarter dollar with a ton of empty space that could be easily trimmed on my next board revision. I imagine this could be used as a subsystem in any number of larger designs like a glucometer, cellphone, or maybe even a smartwatch.

Check out all the open-source files on my research lab’s GitHub page. I hope my experience will be of assistance to the hacker community. Definitely a fun build and I hope you all get as much kick out of it as I did.

Getting Data Off Proprietary Glucometers Gets A Little Easier

Glucometers (which measure glucose levels in blood) are medical devices familiar to diabetics, and notorious for being proprietary. Gentoo Linux developer [Flameeyes] has some good news about his open source tool to read and export data from a growing variety of glucometers. For [Flameeyes], the process started four years ago when he needed to send his glucometer readings to his doctor and ended up writing his own tool. Previously it was for Linux only, but now has Windows support.

Glucometers use a variety of different data interfaces, and even similar glucometers from the same manufacturer can use different protocols. Getting the data is one thing, but more is needed. [Flameeyes] admits that the tool is still crude in many ways, lacking useful features such as HTML output. Visualization and analysis are missing as well. If you’re interested in seeing if you can help, head over to the GitHub repository for glucomerutils. Also needed are details on protocols used by different devices; [Flameeyes] has only been able to reverse-engineer the protocols of meters he owns.

Speaking of glucometers, there is a project for a Universal Glucometer which aims to be able to use test strips from any manufacturer without needing to purchase a different meter.

Thanks for the tip, [Stuart]!