





| รหัสสินค้า | AS00556 |
| หมวดหมู่ | วัดสภาพแวดล้อมและแก๊ส Environmental / Gas |
| ราคา | 585.00 บาท |
| สถานะสินค้า | พร้อมส่ง |
| จำนวน | ชิ้น |

| Controller(Master) Protocol Format: | Frame Header | Data Length | Write Command | Read Command | Frame Trailer |
|---|---|---|---|---|---|
| Peripheral(Slave) Protocol Format | Frame Header | Data Length | Write Command Response | Data | Frame Trailer |
| Controller reads dirty data | 0X18 | 0X05 | 0X00 | 0X01 | 0X0D |
| Peripheral sends data | 0X18 | 0X05 | 0X00/0XAA | 0X00-0XFF | 0X0D |
| Peripheral reads AD data | 0X18 | 0X05 | 0X00 | 0X02 | 0X0D |
| Peripheral sends AD value | 0X18 | 0X05 | 0X00/0XAA | 0X00-0X0F/0X00-0XFF | 0X0D |
| Controller Calibration | 0X18 | 0X05 | 0X55 | 0X00 | 0X0D |
| Calibration transmitting succeeded | 0X18 | 0X05 | 0XAA | 0X00 | 0X0D |
| Controller clears calibration | 0X18 | 0X05 | 0X5A | 0X00 | 0X0D |
| Calibration clearing succeeded | 0X18 | 0X05 | 0X00 | 0X00 | 0X0D |
The sensor communicates with MCU via TTL and transmits the data through serial port after detecting different turbidity data.
Black=GND Blue=TX Red=VCC White=RX
Recommended connection diagram

Here we connect the sensor to the UNO board using Gravity: 4Pin Sensor Adapter and Gravity-4P Cable (PH2.0 to 2.54 DuPont female). The connections are as shown in the table below.
| Sensor | Adapter | UNO |
|---|---|---|
| GND | GND | GND |
| VCC | VOUT | VCC |
| RX | IO1 | 11(TX) |
| TX | IO2 | 12(RX) |


The two probes should be oppositely fixed on a transparent container.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
unsigned char str[5] = { }; //Serial receives data
unsigned char col;
unsigned int distance = 0;
unsigned char a[5] = {
0x18,0x05, 0x00, 0x01 ,0x0D
};
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
mySerial.write(a, 5);
while (!mySerial.available());
while (mySerial.available() > 0) //Detect if there is data on serial port
{
for (int i = 0; i < 5; i++)
{
str[i]=mySerial.read();
delay(5);
}
Serial.println(str[3],DEC);
mySerial.flush();
}
delay(500);
}





ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
| หน้าที่เข้าชม | 15,522,312 ครั้ง |
| ผู้ชมทั้งหมด | 6,025,390 ครั้ง |
| เปิดร้าน | 21 พ.ค. 2556 |
| ร้านค้าอัพเดท | 6 ธ.ค. 2568 |