Getting NTU from Turbidity Sensor on 3.3v

I learned that the formula for converting voltage to NTU is

y = -1120.4x^2 + 5742.3x - 4352.9

but this is only for 4.2 volts and according to the guide of the sensor, the conversion is not linear

see guide: https://raw.githubusercontent.com/DFRobot/DFRobotMediaWikiImage/master/Image/_relationship_diagram.jpg

I am powering my sensor on a 3.3v, how could I convert it to NTU?

Thanks!

The relationship shown in the image is valid for any voltage between 2.5 and 4.2V. But the equation can't be very well determined with just 3 points.

Post a link to the product page or data sheet for the sensor. If it is this sensor, it requires 5V.

Here is the link to the product page

https://www.dfrobot.com/product-1394.html

Your only option is to power it with 5V.

@kateanne419

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

Or do it properly and calibrate it with Formazin solutions (FTU = Formazin Turbidity Units)

Look it up and you might get some more useful information.
You can buy concentrated solutions ready made up, or with care, you can make it up from two ingredients.

That frees you from voltage constraints and gives you confidence that the results might be close to the truth.

For what it's worth, Formazin solutions look like diluted milk.

I've started playing with the same sensors, and the same issue.

I've got a couple of the Adafruit powerboost units (link that will output 5V, but then I'd need to power the Adalogger (power management link)) I'm using. It's got a 3.3V regulator, with only JST and USB connections for incoming power though. Would running the 5V from the powerbooster through the JST work, or am I going to blow something? USB?

Edit: Seems the simplest thing to do is use a step up regulator like this) and a logic level converter.
Thanks

Hello,
I am also experimenting with Arduino turbididty sensor. I am using Arduino Duemilanove with 2x16 LCD screen. The LCD module, that clips straight to Arduino has analog outputs brought out along with GND and 5V pins. If I set the turbididty meter to Analog and connect all wires to turbidity meter, I get voltage readings:

  1. in completely dark room and nothing between the sensor = 3.84 V
    This should be 0 NTU (the datasheet says it is measuring from 0 NTU to 3000 NTU).
  2. in dark room, with untransparent paper between the sensor = 0 V
    This should be 3000 NTUs.

So I made a linear function of this where in graph x1, x2, y1,y2 are known.

Basic linear function formula: y = m*x + b
Where m is the slope of the line, calculated m = (y2-y1)/(x2-x1)
b is intercept with y-coordnate, where x = 0.

So got the voltage to NTU conversion formula:
ntu = (-781.25*volt) + 3000
volt is measured by Arduino.
Seems to work.
Measurements should be done also in completely dark environment, like some small plastic bottle (ex old plastic film can). If I shine some extra light to the sensor the voltage goes higher. Although I do not know, if the analog output voltage is linear or logaritmic. At the moment I am assuming linear.

Also to be noted, that scientific turbidity meters are measuring in an angle, and the reflectance/scattering from the particles in fluid. But this sensor straight light intensity from the light source to detector. So cannot compare with scientific devices, because these two are completely different and have different accuracy.

The product page for that sensor shows three points for the turbidity-voltage relationship. For some unexplained reason, they fit those points with a quadratic curve.

The best way to understand the meaning of the sensor output is to compare that output with that from a calibrated instrument, over a range of turbidity values.

Thank you!
So my test with the untransparent paper between the sensor where the output was 0 Volts - was wrong.
One possibility is to use just output volts and calibrate those with suspended matter concentrations (by filtrating water samples through filters and getting the dried filter weight).

jremington:
The product page for that sensor shows three points for the turbidity-voltage relationship. For some unexplained reason, they fit those points with a quadratic curve.

I wondered the same thing. The curve they've created looks like it was made to fit through the middle of the sensors response range and follows the same shape, see the bottom of the sensor datasheet:

One possibility is to use just output volts and calibrate those with suspended matter concentrations (by filtrating water samples through filters and getting the dried filter weight).

If you've got access to a microbalance that can measure that small surely you can get some NTU standards?

Thank you for the datasheet. I was wondering if all these turbidity sensors that are sold in different places have the same electronics inside?

For example from the datasheet "TSW-10" and from dfrobot:
https://wiki.dfrobot.com/Turbidity_sensor_SKU__SEN0189

And yes, I have access to university microbalances and also to oven and filtration system along with special microcellulose filters.

Fredx:
Thank you for the datasheet. I was wondering if all these turbidity sensors that are sold in different places have the same electronics inside?

For example from the datasheet "TSW-10" and from dfrobot:
Turbidity_sensor_SKU__SEN0189-DFRobot

And yes, I have access to university microbalances and also to oven and filtration system along with special microcellulose filters.

As far as I can tell if you search for "Arduino turbidity sensor" then all of the sensors themselves are exactly the same. The board that interfaces between the sensor and the arduino can be slightly different though, eg. https://www.seeedstudio.com/Grove-Turbidity-Sensor-p-4399.html which has the same sensor but a different board. It also says you can use 3.3V input.

If I were you I'd see if you can borrow an NTU meter and some standards from someone at the university. That's exactly what I plan on doing once the campus isn't locked down.

Depending on what you're planning on doing with it, it's worth noting that the resolution is only +/- 7 NTU.

I’m powering the DFRobot SEN0189 with an ESP32 @ 3V3, and I’m in the same boat as you. There are 3 points on the graph, so I used multiple-variable algebra and solved.

TL;DR:

3V3 quadratic equation:
y = -2572.2x² + 8700.5x - 4352.9


I’ll post my work, so you can catch me if I’m wrong.

First, we need to transform the X-axis from 5V to 3V3:

5V 3.3V
2.5V 1.65V
3.9V 2.574V
4.2V 2.772V

Now to transform the quadratic equation from 5V to 3V3:

y = -1120.4x² + 5742.3x - 4352.9

Replace the coefficients with a, b, and c

y = -ax² + bx - c

Now, substitute in the three points:

3000 = -a(1.650)² + b(1.650) - c
1000 = -a(2.574)² + b(2.574) - c
0 = -a(2.772)² + b(2.772) - c

Represent c, as values of a and b:

c = -a(2.772)² + b(2.772)

Replace c:

1000 = -a(2.574)² + b(2.574) - (-a(2.772)² + b(2.772))

1000 = 1.058508a - 0.198b

1000 + 0.198b = 1.058508a

a = 0.187055743b + 944.725972784

Represent c in terms of b:

c = -1.437333336b - 7259.259259259 + 2.772b

c = 1.33466664b - 7259.259259259

Substitute and solve for b:

3000 = -0.50925926b - 2572.016460904 + 1.650b - 1.33466664b + 7259.259259259

3000 = -0.1939259b + 4687.242798355

0.1939259b = 1687.242798355

b = 8700.451040088

Solve for c:

c = 1.33466664 * 8700.451040088 - 7259.259259259

c = 4352.9424969

Solve for a:

a = 0.187055743 * 8700.451040088 + 944.725972784

a = 2572.195306523

3V3 quadratic equation:
y = -2572.2x² + 8700.5x - 4352.9

The new equation works for the 3V3 points:

  • 3000.11 = -2572.2×1.65² + 8700.5×1.65 - 4352.9
  • 1000.14 = -2572.2×2.574² + 8700.5×2.574 - 4352.9
  • 0.14 = -2572.2×2.772² + 8700.5×2.772 - 4352.9

As well as (3.5, 2000) from the original graph:

3.5V => 2.31V

2019.74 = -2572.2(2.31)² + 8700.5(2.31) - 4352.9

Not to complain about your successful effort, but it is hard to justify fitting 3 data points with a quadratic equation. Here is the linear fit, which is believable:
Capture

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.