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!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
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!