หากต้องการใบเสนอราคา / ใบแจ้งหนี้ ติดต่อได้ทาง LINE Official: @mikroelec |
![]() |
รหัสสินค้า | SKU-02473 |
หมวดหมู่ | โมดูลแปลงสัญญาณ (signal conversion) |
ราคา | 150.00 บาท |
สถานะสินค้า | พร้อมส่ง |
ลงสินค้า | 10 ก.ย. 2566 |
อัพเดทล่าสุด | 13 ต.ค. 2567 |
จำนวน | ชิ้น |
Documentation |
Datasheet | SGM58031.pdf |
Library | 1.0.0 (latest) |
Features:
1.SGM58031 is a 4-channel adapter board, very suitable for use in high-resolution analog-to-digital conversion microprocessors
2.Its working voltage is between 2V and 5V, so it is suitable for all ordinary 3.3V and 5V processors
3.This 4-channel adapter board controls two identical I2C buses, and the ZUI can provide up to 16 single ended or 8 differential channels
4.Programmable gain amplifier provides up to × 16 gain, SGM58031 has high resolution
5.The chip is small, so it keeps AVDD and AGND quiet with ferrite on a breakthrough board. The interface is completed through l2C, and the address can be changed to one of four options, so you can connect up to 4 SGM58031 on a 2-wire l2C bus for 16 single ended inputs
Parameters:
Resolution: 16 bits
Wide power range: 2.0V to 5.5V
Low current consumption:
1. Continuous mode: only 150uA
2. Single mode: automatic shutdown
Programmable data rate: 8SPS to 860SPS
Internal low drift reference voltage source
Internal oscillator
Internal PGA
I2C interface: pin selectable address
Four single ended or two differential inputs
Programmable comparator
This board/chip uses addresses ranging from 0X48 to OX4B between l2C 7 bits, which can be selected through jumpers
Size: approximately 28mm * 12mm
Package include:
1X module
1X needle arrangement
โคดตัวอย่าง 1
#include <Wire.h>
// กำหนดค่าต่างๆ
const int SGM58031_ADDRESS = 0x48; // ที่อยู่ I2C ของ SGM58031
const byte CONFIG_REGISTER = 0x01; // รีจิสเตอร์สำหรับตั้งค่า
void setup() {
Serial.begin(9600);
Wire.begin();
// ตั้งค่า SGM58031 (ปรับค่าตาม Datasheet)
Wire.beginTransmission(SGM58031_ADDRESS);
Wire.write(CONFIG_REGISTER);
Wire.write(0x00);
Wire.endTransmission();
}
void loop() {
// อ่านค่าจาก SGM58031
Wire.requestFrom(SGM58031_ADDRESS, 2); // อ่าน 2 ไบต์ (16 บิต)
uint16_t value = Wire.read() << 8 | Wire.read();
// แปลงค่าเป็นแรงดันไฟฟ้า (ปรับค่าตาม Datasheet)
float voltage = value * (5.0 / 65535.0);
Serial.print("ค่าที่อ่านได้: ");
Serial.print(value);
Serial.print(" แรงดันไฟฟ้า: ");
Serial.print(voltage);
Serial.println(" V");
delay(100);
}
โคดตัวอย่าง 2
#include <Wire.h>
const int SGM58031_ADDR = 0x48; // I2C address of SGM58031 (default)
void setup() {
Wire.begin();
Serial.begin(9600);
// Initialize SGM58031
Wire.beginTransmission(SGM58031_ADDR);
Wire.write(0x01); // Point to configuration register
Wire.write(0x84); // Set to continuous conversion mode, data rate to 128 SPS
Wire.endTransmission();
}
void loop() {
int16_t adc_value;
// Request 2 bytes from SGM58031
Wire.requestFrom(SGM58031_ADDR, 2);
if (Wire.available() == 2) {
adc_value = Wire.read() << 8 | Wire.read();
// Convert to voltage (assuming VREF = 3.3V)
float voltage = adc_value * (3.3 / 32768.0);
Serial.print("ADC Value: ");
Serial.print(adc_value);
Serial.print(", Voltage: ");
Serial.print(voltage, 4);
Serial.println(" V");
}
delay(1000); // Wait for 1 second before next reading
}
หน้าที่เข้าชม | 554,627 ครั้ง |
ผู้ชมทั้งหมด | 312,270 ครั้ง |
ร้านค้าอัพเดท | 6 ก.ย. 2568 |