DIY Glucose Monitor

I successfully reverse-engineered my glucose monitor.
I wanted to dip my toe into electrical engineering, but I didn’t want to build another blinking LED circuit as my “Hello World.” I wanted something challenging - something with real-world value.
Since I have type 1 diabetes, I rely heavily on glucose monitors to keep my blood sugar in check. So I thought it would be a cool exercise to try to reverse-engineer a commercial glucose monitor using their own test strips.
I was actually surprised how relatively simple the principle behind glucose detection is - basically the way it works is that glucose test strips are coated with an enzyme called glucose oxidase. When this enzyme comes into contact with glucose, it triggers a chemical reaction - glucose gets oxidized, producing hydrogen peroxide and releasing electrons.
When the strip is connected to an electrical circuit and a constant bias voltage is applied (in my case it was 1.65V) the electrons generated from this reaction create a measurable electrical signal. Some systems measure the resulting current, but in my setup, I monitored changes in voltage over time. The characteristics of this voltage drop can be used to estimate the glucose concentration in mmol/L.
Supplies
- Microcontroller: Elegoo Uno R3
- Breadboard
- Jumper wires
- 10kΩ resistor x3
- 47.MΩ resistor x2
- 0.1µF capacitor x2
- 2200pF ceramic capacitor x1
- Analog-to-Digital Converter (ADC): ADS1115
- Operational Amplifier (Op-Amp): MCP6002
- 0.91 Inch OLED Display 128x32 I2C Interface SSD1306
- Tactile Push Button Switch x1
- Test Stand PCB Clip 2.54mm x2
The Schematic

Here’s the schematic of my setup. Since this was my first attempt at designing one, there might be a few mistakes or rough edges, but it captures the core idea.
The Setup
To begin, I needed to understand how commercial glucose test strips work and how their signals can be measured. These strips typically contain two key components: the Working Electrode (WE) and the Reference Electrode (RE). The RE must be supplied with the steady bias voltage to maintain a fixed electrochemical potential, while the WE is where the chemical reaction occurs and generates a measurable current. That current - which correlates with glucose concentration - must be then converted into a readable voltage.
I built my circuit using an Elegoo Uno R3 microcontroller, which provided a stable 3.3V power supply to the breadboard. To create the necessary 1.65V bias voltage for the RE, I connected two 10kΩ resistors in a voltage divider configuration. This midpoint voltage was then applied directly to the RE.
To read the output from the WE, I needed to convert the analog signal to a digital voltage reading. For this, I used the ADS1115, a high-resolution 16-bit Analog-to-Digital Converter (ADC). It provided precise voltage measurements from the WE, which were then logged or analyzed in real time.
However, because the current generated by the chemical reaction is often extremely small (in the nanoamp range), I needed to amplify it. For this, I used the MCP6002 - a dual-channel Operational Amplifier (Op-Amp) configured as a Transimpedance Amplifier (TIA). A TIA converts current from the WE into a proportional voltage. To increase the sensitivity, I added two 4.7 MΩ resistors in series as the feedback resistor (Rf), yielding a total resistance of 9.4 MΩ. This means that for every 1 nA of current, I would see a 9.4 mV voltage response - significantly amplifying the weak signals produced during glucose reactions.
But high sensitivity often comes at the cost of increased noise. To stabilize the signal and reduce high-frequency fluctuations, I added a few key capacitors:
- A 2200 pF ceramic capacitor across the feedback loop of the op-amp (between IN– and OUT) to suppress noise in the TIA.
- Two 0.1 µF decoupling capacitors near the ADS1115 input pin to further smooth out the signal line.
This configuration gave me a clean, stable, and highly sensitive signal - ideal for capturing meaningful trends in glucose concentration based on the voltage drop observed at the WE.
Data Analysis

At first, I saw noticeable voltage dips during my tests and was pumped - it looked like I had captured a real glucose reaction! But little did I know how unstable, noisy, and unpredictable those readings could be. The voltage drop can vary dramatically depending on factors like humidity, temperature, the quality of the enzyme coating, and even tiny vibrations in the setup.
To make sense of the chaos, I had to take a lot of measurements and constantly compare my readings against a commercial meter to calibrate my system.
From my observations, I identified several key features in the voltage signal that could be used to estimate glucose levels with decent accuracy. The baseline voltage - the stable reading before any reaction occurred - served as a reference point. When the glucose reaction began, I measured the drop height, which is how far the voltage dipped from the baseline to the minimum voltage recorded during the reaction. I also calculated the area under the voltage drop, representing the overall impact of the reaction over time. Another important metric was the slope after the drop - how quickly the voltage began to recover - which helped capture the reaction’s dynamics. I also tracked the time to recovery, which measured how long it took for the signal to climb back toward baseline levels. Lastly, I used the peak-to-peak range during the reaction window to quantify the overall volatility of the signal. Together, these features helped form a fingerprint of the reaction that I could correlate with actual glucose levels.
Once I had collected a decent set of reference data, I needed to train a prediction model that could estimate glucose levels based on the extracted features. Unfortunately, I couldn’t gather an extensive dataset because commercial glucose test strips are prescription-based, and each test consumed one strip from my limited supply. Every measurement counted.
I've added the Python file I used to train my model in the attachment below.
Downloads
Training the Data Model

Another important constraint was that I wanted my DIY monitor to run entirely offline, just like commercial glucose meters. That meant I couldn’t rely on a cloud-based model. I needed to embed the prediction algorithm directly onto my Elegoo Uno R3, which has only 32 KB of flash memory and 2 KB of SRAM. Not exactly a machine-learning powerhouse.
At first, I tried to fit a simple polynomial regression to my data, hoping to extract a compact mathematical formula I could hard-code into my program. But none of the polynomial models I tested gave me a good enough Mean Absolute Error (MAE). I eventually switched to a Random Forest Regressor, which offered the best overall performance given my small dataset. I managed to achieve an MAE of around 0.96 mmol/L, which was surprisingly good - especially considering the model used only 15 estimators and a maximum depth of 6. This kept the model small enough to fit within my Uno’s constraints while still delivering solid predictions.
To deploy it, I used a Python library called micromlgen, which converts trained scikit-learn models into compact C++ functions ready for embedded boards. With that, I had a working prediction engine running entirely offline, powered by a few kilobytes of code and a handful of well-chosen features.
Final Steps
Putting it all together, I wrote a compact script in the Arduino IDE that turns the glucose monitor on with a button press. It starts with a welcome message on the screen, then enters a continuous monitoring loop, watching for the telltale voltage drop that signals a glucose reaction. Once a drop is detected, the system captures the drop event and records data for the following 5 seconds. This data is then fed into the onboard prediction model, which calculates and displays the estimated glucose level - right there on the device, completely offline.
This project started as a personal challenge, but it ended up teaching me more than I expected - not just about electronics or machine learning, but about how powerful curiosity and a bit of persistence can be when paired with the right tools. While it’s still just a DIY prototype, it’s amazing to see a home-brewed device giving real glucose readings from commercial test strips. If you’re curious to dive into the code, you can check out the full project on GitHub.