Introduction: Arduino Based Chemical Titration (aka. the Titration Machine)

For an Introduction to Engineering class at Central Arizona College, my team and I decided to build a machine that would use a basic Arduino sensor array to detect the moment that chemical titration has occurred.

This is a process that first semester Chemistry students are all too familiar with. You place an erlenmeyer flask or beaker containing a known volume of an acid with an unknown pH with a little indicator like phenolphthalein under a burette containing a strong base with a known molarity or pH. Slowly you drip the base into the acid, mixing it frequently until the indicator just turns pink. At that point, you can use the known pH of your base, and the amounts of acid and base used in your reaction to calculate the original pH or molarity of your acid.

Frankly, we chose this project simply because we had a group consisting of an Electrical Engineer, a Chemical Engineer, a Mechanical Engineer, and a Computer Science major. We wanted to make sure that everyone learned something new!

As you can see from the intro pic, we got it working, so wanted to share it with you, in case you were crazy enough to want to build one!

Step 1: Parts List

Here is the parts list that will be needed to complete this. You will obviously need some basic tools for working with plastics if you want to build the housing, and be able to do some basic soldering for the electronics (although this can, for the most part be built one a breadboard should you want to try that first).

Please keep in mind that we've never built one of these before, so our parts list may differ from yours, but this should give you a basic idea of what we used to build our titration machine.


Step 2: So What Is the Principle Under Which We're Working Here?

So how does all of this work anyways?

We chose to use the principle that light, when traveling through a clear fluid will have a fixed (or nearly fixed) intensity that can be measured. When the indicator changes color, some of the light is obscured and no longer passes through the base/acid mixture.

If we can mix the fluid at that point and the light remains obscured, we have reached titration (at least reached, as we found...).

Step 3: Let's Build Something: Here's the Arduino Circuit.

So there are a couple of pieces to this circuit that are in play, so let me see if I can explain them.

First, in the bottom right of the circuit, we put a basic 9V barrel jack on our board. Be sure to get one that is compatible with a breadboard if you intend to use it that way!

Combined with that will be the 9V, 1.5A power supply that we used to power everything. This will provide all power to the 2 motors (the mixer and the liquid pump) as well as the LED that provides our light and the light sensor.

Moving up on the right just a hair, we've built a very rudimentary linear voltage regulator circuit. This provides +5V to the left side of the circuit ( the LED and sensor). There are quite a few diagrams online on how to set these up. If you aren't interested in doing this, just power the +5V items from the +5V on your Arduino. Just make sure that you are careful about separating the power into +9V for the pump/mixer motors and +5V for the LED/Sensor arrays. Note that I used a TO220 form factor 7805 (L7805CV) component and added a heat sink, since it can get hot enough to burn up without one.

The two circuit components at the top right are MOSFET circuits (IRF520). Using these we are able to rapidly switch the motor on/off and simulate reduced voltage conditions, using the PWM settings on the Arduino. We drove both of the motors from PWM ports (5,6 in our case).

To the middle left, we setup the light sensor(LX1972). Be sure to give yourself long leads on both the light sensor and LED, because you will be moving these around to find that sweet where the LED gives maximum illumination. This will be read from an analog input on the Arduino (A0 in our design).

Finally, the LED is setup on the bottom right of the diagram. It is simply an always on design.

Words of Caution:

Analog components can be tricky. 1) Be sure you know what lead needs to be positive and what lead needs to be connected to ground. 2) Most of the LEDs we used were optimized for 3.6V, hence the 220 Ohm resistor. The sensor needed a 10K resistor to cleanup the signal a bit. Don't run analog components without adding the correct resistor. They're not expensive, but it can be a bit disheartening to have to replace burned up LEDs and sensors.

Step 4: Now Some Coding!

I've uploaded the code that we used for both the Arduino sketch as well as the Java NetBeans application that we used for our interface. You are free to download, use, or modify it until your heart is content, so long as it is not used for commercial use.

With credit to Stephen, our code monkey de jour, the code will work, but I do not have a complete guide on how to install it as of yet. Use at your own risk.

Step 5: Building the Stirring Mixer and Pump

You can see from the earlier design that the mixer is just treated as a PWM motor as far as the arduino is concerned. We simply used a standard 80mm computer case fan and attached a neodymium magnet to it that had N/S polarity to the sides of the magnet. This was oriented on the top center of the fan and connected to our MOSFET circuit providing +9V.

The pump was simply a peristaltic pump that was purchased and connected to the acid and base receptacles by a long strand of silicone tubing. It is powered by the second MOSFET circuit providing +9V.

Step 6: Housing Considerations

You can see from the above images that we attempted to keep the acids and bases segregated from the electronics, and attempted to provide enough room to work with our hands. Frankly, we probably should have either built it bigger or cut an access panel in the right side to help us work with the electronics, since that was the hardest part to connect up for testing.

In the final design, the light sensor and LED were moved so that the light shined directly UP through the bottom of the beaker and was sensed above the acid/base solution. Just be sure to protect the sensor electronics from being splashed! That will short out your sensor.

Step 7: In the End...

Well, we got a reasonable set of results in our tests, being able to discern strong acid/strong base reactions to about .1 pH. I'm sure this could be improved on, and hopefully one of you will take up that challenge.

Thanks for following our project!


russ_hensel made it!(author)2015-05-03

If your indicator turns pink then a red filter in the light circuit will probably increase the sensitivity. About as simple a modification as can be.

Enginerds2015 made it!(author)2015-05-03

We actually tried that. It did two things. 1) It actually reduced the sensitivity (since the pink indicator's job is to filter out the blue and the green light), and 2) it dropped our initial intensity dramatically.

We discussed using a green or blue colored filter in order to just catch the wave lengths that were reduced by the indicator, but had trouble calibrating them.

In the end, it was sufficient to just measure the drop in light.

Thanks for the comment!

russ_hensel made it!(author)2015-05-04

Interesting. I would expect that the overall signal would be less, but I would also expect that the ratio would improve. If the signal just drops into the noise, that may explain why no filter is better, and of course the filter could just be too dark.

Finally what works best is best.

mrayw made it!(author)2016-03-25

Russ_hensel: a colorless solution passes all colors through. A pink solution passes red through, but blocks a bit of the non-red colors. It's the non-red colors that are changing when the indicator changes. If you use a red filter, and therefore are only looking at red, you will see little or no change when the indicator changes colors. A ~550 nm filter should improve the signal to noise ratio somewhat, though.

Enginerds2015 made it!(author)2015-05-04

Exactly! That is what happened. The signal dropped into the noise range with the filter. I'm sure that if we would have looked harder for a cleaner filter, or used a more intense light source we could have gotten away with that, but in the end, due to time constraints, we went without a filter.

EvilChemist made it!(author)2015-05-04

Nice work! I'm an analytical chemist and have been developing titration methods for way longer than I want to admit. My company does a lot of volunteer work with STEM education, and I'm thinking that your setup might be good for high school chemistry classes.

One recommendation: Ditch the peristaltic pump. They aren't very precise and they tend to become less accurate as the tubing ages.

Commercial instruments all use syringe pumps. All they are is a worm gear drive that pushes the plunger in on a disposable syringe. Attach a threaded rod to a stepper motor for the drive. Put a couple nuts on the bottom side of the block that will push the syringe. You should probably clean up the threads with a tap/die to make sure it moves smoothly. Position the block in a channel between two pieces of wood so it will move forward with the drive. A motor shield will make control easy.

The volume delivered is a function of the thread pitch and syringe diameter.

If you need any other advice feel free to ask me!

Enginerds2015 made it!(author)2015-05-04

Interesting! I'll definitely take this back to the group! That makes total sense, and I'll see what they think. The titration machine isn't old enough, and the bases that we've been pumping in it haven't been concentrated enough to show any major decay of the tubing interior, but I could see that.


About This Instructable




More by Enginerds2015:Arduino Based Chemical Titration (aka. The Titration Machine)
Add instructable to: