When Electronics Meets Chemistry: A Conductivity Sensor For Liquid Solutions

Every now and then, my wife asks me to build a gadget that she can use in school for her demos, or for the students labs. This time she asked me for a device able to figure out if a liquid solution has low or high resistivity. Basically, if it is an ionic or covalent solution.
Here is what I put together for her in just a week-end.

Every now and then, my wife asks me to build a gadget that she can use in school for her demos, or for the students labs. This time she asked me for a device able to figure out if a liquid solution has low or high resistivity. Basically, if it is an ionic or covalent solution.

Here is what I put together for her in just a week-end.

It is a simple circuit that turns on an LED if a simple probe is put in contact with an ionic solution with relatively low resistance.

Since it needs to be portable, it is powered with a simple 9V battery.

The circuit uses an op-amp configured as a voltage follower. The output is connected to a green LED which lights up if the output goes low.

The non-inverting input is connected to the +9V through a resistor, which I calibrated empirically. Because the non-inverting input is connected to the +9V, the output will also be high and the LED will be off.

However, I can also connect the non-inverting input and the ground of the circuit to the solution through a couple of wires. If the resistance of the solution is low enough, the voltage at the non-inverting input will lean toward ground, making the op-amp output to switch to low which, in turn, will turn on the LED.

Simple enough, don’t you think?

My wife’s students will use this device to check the conductivity of a solution, to determine if the material they put in some distilled water is an ionic or covalent compound. The LED will turn on only with ionic compounds, that will decrease the resistivity of the distilled water.

For this simple device, I designed in OpenSCAD a small box to contain it. Here is the corresponding code:

$fa=0.5;
$fs=0.5;

//body
difference()
{
    cube([52, 23, 70]);
    translate([1, 1, 1]) cube([50, 21, 70]);
    translate([23, 1, -1]) cube([6, 3, 3]);
}

// cap
translate([0, 35, 0]) difference()
{
    cube([55, 26, 30]);
    translate([1, 1, 1]) cube([53.5, 24, 30]);
    translate([(55-14.5)/2, (26.5-9.5)/2, -1]) cube([14.5, 9.5, 4]);
    translate([(55-14.5)/4, 26/2, -1]) cylinder(d=5, h=4);
}

and here is a picture from the OpenSCAD preview window:

Here, instead, is a picture of the actual case:

Now a picture of the prototype mounted on a breadboard:

Testing of the device requires a small cup of plain water. We submerge the tip of the sensor (the two breaded wires) in to the cup and make sure that the LED stay off. Then we add a pinch of table salt to the water and try again. This time the LED must turn on, to signify that there is an ionic compound mixed in the water.

I mounted the circuit on a half piece of solderable breadboard.

I have chosen to cut the board in half for two reasons:

  1. The circuit is very small and does not require that much space to assemble it. Moreover, being small it will be easier to handle it with a single hand when using it in a chemistry lab.
  2. Using a solderable breadboard rather than a perfboard simplifies the wiring, because it is reduced just to some jumpers to complete the connections already available on the board.

These boards are very easy to find in online stores. I usually by mines on Amazon, but also other stores that sell electronic components have them available. Of course, you are free to use any kind of board you like, be it a simple perfboard, or a solderable breadboard, or a strip-board, or even make your own PCB.

I decided not to use the PCB because of the simplicity of the circuit. With so few components, making a PCB and put the components on it would have not saved me time, nor there was much risk of making mistakes.

Once the circuit on the board was completed, I put it inside the case I made for it, and completed the assembly with the LED and the power switch mounted on the cover. I also decided to use some tape to hold the cover on the case, considering that these little devices will be managed by students, and I don’t want them to easily open it and break it.

As an alternative, I could have used a couple of small screws to hold everything together, but this was something I had to do over a single week-end, so I decided to go through the fastest possible route for the design of the case.

My wife used the device in school right on the next day after I made it. She told me the sensor worked perfectly and her chemistry students enjoyed using it, while experimenting with different compounds to verify their nature.

All in all I am satisfied. I was able to design and build five of these devices in just a week-end, and they were all up to the expectations, of my wife of course.

If you are interested in making this device and would like to see more details on its construction, please click on the following link which will take you to my youtube video with the whole story:

The Turbidity Tester

Plastic and other garbage in the waters has become a real issue in recent times. To make a difference in the effort of keeping clean the world in which we all live, thousands of YouTube creators have teamed up, lead by Mr. Beast and Mark Rober, to create the #teamseas global campaign, with the goal to raise $30M by the end of this year 2021 to remove from the waters of rivers, seas, and oceans all over the world, an amount of 30M pound of plastic and other garbage. One pound for every dollar.

To do so, #teamseas is partnering with the non-profit charities Ocean Conservancy and The Ocean Cleanup. They pledged to remove the 1 pound of plastic from seas and rivers for every dollar we will collect through the #teamseas effort.

To increase the awareness on this issue, today today I present you a device that can give you an idea of how many pollutants are contained in a sample of water. A corresponding video is also available here.

Here is the schematic of the device, which I named Turbidity Tester.

The sensor that measures the particles dispersed into the water is made of an LED and a photoresistor, on the bottom left.

The photoresistor I used is more sensitive to the green light, and so I used a green LED to make the circuit work at its best.

When the LED shines its light directly on to the photoresistor, the resistance will drop to a minimum, causing the voltage at the non-inverting input of the op-amp to reach a very low value.

When the LED shines its light through a sample of water, the more the water is polluted, the less light will hit the photoresistor and, therefore, the more its resistance will increase, which will cause the voltage at the non-inverting input to raise. The more pollution, the more voltage.

The op-amp is connected in a non-inverting amplifier configuration, and the gain of such amplifier depends on the resistors R3 and R4, which I selected in such a way that I can have on the output of the op-amp a voltage in the range between 0.3 and 8 V.

This voltage is applied to the input of the LM3915, which is a bar graph VU meter driver, configured through the resistors R1 and R2 to work exactly within the same range of 0.3 and 8V.

This way, the VU meter will light up one of the LEDs depending on the amount of pollutants in the water sample.

For the VU meter, I used LEDs of different colors: a blue one for clean water, then green, for less that clean , than orange for dirty water and red for really bad water.

To be able to put a water sample between the LED and the photo resistor, I 3D printed this simple device.

The LED is inserted in one of the side holes, and the photo resistor on the other one, so they will face each other.

The big hole on the top is made of a size that fits perfectly a tic-tac candy container, which will hold the water sample. But of course, if you want to try this project, you can use any kind of transparent container. Just adapt the size of the chamber to fit it snugly.

So, to test some water, we fill the container, we insert it in this sort of chamber, then we power up the circuit, and we take our reading on the VU meter.

This of course is not a device that can take actual measurements of the quantity of pollution in the water, but is an example on how such measurements can be done. Using more sophisticated photo-resistors that can detect different light wavelengths, we could build, using the same principle, a spectro-photometer, and we could tune it up to have precise numerical readings for each frequency. This would enable us to determine not only the presence of pollutants, but also their chemical composition and their quantity.

And talking about pollutants, don’t forget that you can help making Earth a better place to live in by donating to the #teamseas campaign.

Once again, #teamseas is a global campaign to raise $30 M to remove 30 M pound of plastic and trash from our oceans, rivers and beaches. It’s also the second wave of the largest creator-led fundraising campaign to ever hit the internet: #teamtrees. We launched #teamtrees in 2019 with a goal of raising $20M to plant 20M trees and we smashed it, raising over $23M and generating more than 1B video views. Even after two years, teamtrees.org is still receiving donations for planting 2600 trees every day.

#teamseas has partnered up with Ocean Conservancy and The Ocean Cleanup. All donations to teamseas will be split by the two charities 50/50.

Let’s repeat together the success we made back in 2019. Let’s help the world where we live to flourish again.

And finally, here is the archive with all the files for this project:

Happy Experiments!