Will the IR work through on a 25mm blue MDPE water pipe? The thickness of the plastic is 4.6mm
JaneYu 2024-03-20 17:25:11 129 Views8 Replies Will the IR work through on a 25mm blue MDPE water pipe? The thickness of the plastic is 4.6mm
But when looking at the standard deviation values of the 60 readings used for the average, one can see that once a certain threshold is crossed, there's a huge variance.
This suggests that the previous graph does not represent non-linear behavior of the sensor but rather that beyond a certain threshold, it loses its accuracy significantly.
https://uploads.disquscdn.c... According to these data, the usable range of the sensor is much more limited.
JaneYu The readings were made using the following code. This code provides the reading as required from a Python code running on a computer connected to an Arduino. The python code makes the statistics and provides a GUI (will be happy to share it to). BTW i noticed after rigorous testings that delays in the reading process do not alter the activity or accuracy of the sensor :
#include <softwareserial.h>
SoftwareSerial mySerial(12, 11); // RX, TX
// Command to request AD data from the sensor
unsigned char requestAD[5] = {0x18, 0x05, 0x00, 0x02, 0x0D};
void setup() {
Serial.begin(9600); // Start serial communication with the computer
mySerial.begin(9600); // Start serial communication with the sensor
}
void loop() {
if (Serial.available() > 0) {
char request = Serial.read(); // Wait for a trigger from the Python script
if (request == 'r') { // Check if the trigger is the 'r' character
// Delay before sending the request could be added here if necessary
// for example, delay(XXX); where XXX is the time in milliseconds
//delay(10);
// Send request for AD data to the sensor
mySerial.write(requestAD, sizeof(requestAD));
//delay(10); // Delay to give sensor time to respond
if (mySerial.available() >= 5) {
// Read the data and look for the frame header
while (mySerial.available() && mySerial.read() != 0x18);
if (mySerial.available() >= 4) {
mySerial.read(); // Byte 0: status byte, not part of the AD value
mySerial.read(); // Byte 1: separator or status indicator
int highNibble = mySerial.read(); // Byte 2: High nibble of AD value
int lowByte = mySerial.read(); // Byte 3: Low byte of AD value
// Combine the high nibble and low byte to form the AD value
unsigned int adValue = ((highNibble & 0x0F) << 8) | lowByte;
// Send the reading back to the Python script
Serial.println(adValue);
// Delay after sending data back to Python, if needed to regulate the data request rate
delay(0); // Adjust XXX to your requirements
}
}
}
}
}
Hello,
Could you tell us what kind of controller you are using? Like Arduino or ESP32, this looks a bit like an on-board ADC issue.
I used the sensor and I used the more accurate reading (which comes back from the sensor in two parts).
For the measurement, I used a yeast solutions in 0.1 molar salt (for obtaining a uniform solution that simulates turbidity from a microorganism. The salt is for stabilizing the status of the yeast by osmosis).
The value was determined based on an average of 60 readings. However, there seems to be some issue that I would like to consult with you about, and the details are as follows:
JaneYu In the lower values, the reading is accurate and seems linear
https://uploads.disquscdn.c...
For the first question, we do not have fairly precise values.
And for your second question, there are threaded holes on both sides of the sensor probe that you can use to secure it to the vessel wall.
JaneYu 

