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, 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!

An LED Bar Graph VU Meter


Bar graphs VU meters can be easily made with a simple integrated circuit. There are several of them with different characteristics, but they all present the same basic functionality: one or more LED in a row are used to visualize, more or less precisely, the voltage amplitude presented to the input. That voltage can be either a direct current or an alternate current and, in particular, it could be the output of an audio amplifier.

But, what is inside these integrated circuits? How do they make possible this kind of behavior?

Here is the design of a simple gadget that shows how a bar graph VU meter works. Building and using this device is certainly a fun way to learn the principles used to design the bar graph integrated circuits.


The basic element of the circuit is the one made with the components Q1, R1, R10, D1, and D10.

This block of components then replicates several times to increase the number of LEDs used in the bar graph. In this particular case, the same circuit is replicated 8 more times, for a total of 9 LEDs in the bar.

You can also see that each block, or stage, receives as the input the output from the previous stage.

Diodes form D10 to D17 are used to provide a different threshold to each stage. In fact, let’s say that the first stage is triggered when the voltage on the anode of D10 reaches about 3V. In order to trigger the second stage we will need 3V on that stage, but that means that the voltage at the first stage has to go up to 3+0.6V, or 3.6V. The extra 0.6V is the forward voltage of diode D10.

Similarly, to reach each further stage, we will need an input voltage 0.6V higher for each stage we want to light up.

In the end, to light up the last stage we will need an input voltage of at least 3 + 8 times 0.6V, or 7.8 volts.

Once the threshold is reached in a stage, the corresponding transistor switches on and starts conducting a current that is only limited by the LED and the series resistor which, in this case, is 330 ohms. With the values in the circuit, the LED current will be about 20 mA.

So, when we apply a voltage to the input terminals, depending how high the voltage is we will see a number of consecutive LEDs lighting up, while the remaining will stay off because their respective stages have not been triggered yet or, in other words, the voltage at those stages hasn’t yet reached the threshold imposed by the diodes.

Note also that resistors R10 to R18 are not all of the same value. This is because by the time the voltage reaches the threshold in the last stage with transistor Q9, the voltage on the previous transistors is higher and higher while we move to the left of the circuit, since we need to add back the 0.6V that the diodes are dropping. Therefore, to avoid damage to the transistors on the left, we need to increase the base resistor when moving from the right to the left of the circuit.

Another thing to notice is the trimpot located at the connectors for the input signal. The circuit as it is, is capable of handling signals up to the value of the power supply, which is 9V.

However, we can adjust the trimpot to handle higher signals, just by moving the trimpot cursor toward the end that is connected to ground, in order to get only a fraction of the actual input signal.

Conversely, if you had a very small input signal, that could not trigger even the first stage of this circuit. In that case, you could still add a very simple amplifier between the source of the signal and the input of this circuit, which would help increase the level of the signal to the required value.

Finally, you see that the bar graph meter is powered with a 9V power supply. I used such value so you can use a 9V battery, if you like to try the circuit.

However, if you wanted to use this circuit as part of a more complex system having a higher value of the power supply, you could just modify resistors from R1 to R9 and use the power supply of that system.

For example, if you planned to use 12V instead of 9, you would use resistors of 470 ohm rather than 330, and everything would work just fine.

Remember, however, that 9V is the minimum voltage you can use to correctly power the bar graph circuit. You can only increase the power supply voltage to a higher value and increase accordingly the resistors R1 to R9. That is because we need a power supply that exceeds the voltage at the base of the leftmost transistor Q1, which can be as high as 7.8 volts, as we said before.

The circuit can be easily assembled on a per-board, like in the case in the frnt picture of this post. There, I used a 3 prongs connector to provide the power supply and the input for the external signal.

Once the circuit is assembled, set the trimpot with the cursor toward the ground side, then power up the device and put a signal to its input. The signal should be the highest possible with the amplifier to which you are attaching the VU meter. Then, adjust the trimpot until all the LEDs are lighted up. Now the circuit is tuned and you can input to it any signal that changes between 0V and the max you used for the tuning.

For further information, and to see the VU meter in action, take a look at this video that I posted on my YouTube channel.

Happy experiments!!!

%d bloggers like this: