คำอธิบาย
มอเตอร์เกียร์ดีซี เอ็นโค้ดเดอร์ 37mm DC Gear Motor Hall Encoder
- Hall Type Encoder
- มอเตอร์เกียร์ เส้นผ่าศูนย์กลาง 37mm
- แรงดันไฟฟ้า Motor DC12V
- Rated Current 1A
- Rotation CW/CCW
- เส้นผ่าศูนย์กลางเพลา 6mm
- ความยาวเพลา 15mm
Gear Specification
- Gear Ratio 1/30
- No Load Speed 333rpm +/-10%
- แรงบิด Rated Torque 6.5Kgf.cm
Encoder Specification
- แรงดันไฟฟ้า Encoder DC3.3-5V
- 11-line double magnetic Hall Encoder disc AB-phase common output
- 90 pulses per turn (Gear Ratio 1/30)
- Total pulses single phase is 30×11 = 330
- AB Phase Incremental
Wiring Connector
- Red M1 ต่อมอเตอร์ Motor
- Black GND Encoder
- Yellow A phase encoder output
- Green B phase encoder output
- Blue VCC Encoder
- White M2 ต่อมอเตอร์ Motor

Dimension (Unit mm.)
Gear Box lenght L 22mm

ในชุดประกอบด้วย
- 1pcs x 37mm DC Gear Motor Encoder Hall
- 1pcs x PH2.0 6 Pin Cable Connector – 15cm
- 1pcs x L Motor Bracket + M3 Screw Set
คำแนะนำเกี่ยวกับมอเตอร์
- คุณสมบัติมอเตอร์ 110RPM ความเร็วต่ำ ง่ายต่อการควบคุม แรงบิดสูง เหมาะสำหรับ หุ่นยนต์แข่งที่แบกรับน้ำหนัก ยกน้ำหนัก balance trolley, heavy trolley.
- คุณสมบัติมอเตอร์ 330RPM ความเร็วปานกลาง แรงบิดเพียงปานกลาง เหมาะสำหรับ หุ่นยนต์ 4 ล้อ รถบังคับ 4 ล้อ หุ่นยนต์แข่งหุ่นยนต์เดินตามเส้น หุ่นยนต์เดิน walking robots, fire fighting robots, climbing robots.
ตัวอย่างโครงสร้างโค้ดเบื้องต้น (สำหรับ Encoder แบบ Incremental)
หากคุณต้องการนับพัลส์จาก Encoder แบบ Incremental เพื่อคำนวณความเร็วของมอเตอร์ อาจใช้โค้ดโครงสร้างดังนี้:
const int encoderPinA = 2; // Pin ที่เชื่อมต่อกับช่อง A ของ Encoder
const int encoderPinB = 3; // Pin ที่เชื่อมต่อกับช่อง B ของ Encoder
volatile long encoderValue = 0; // ตัวแปรเก็บจำนวนพัลส์ที่นับได้
volatile long previousMillis = 0; // เวลาที่นับพัลส์ครั้งล่าสุด
void setup() {
pinMode(encoderPinA, INPUT_PULLUP);
pinMode(encoderPinB, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(encoderPinA), ISR, RISING);
Serial.begin(9600);
}
void loop() {
long currentMillis = millis();
if (currentMillis - previousMillis >= 1000) { // คำนวณความเร็วทุก 1 วินาที
float rpm = (float)encoderValue * 60 / (currentMillis - previousMillis);
Serial.print("RPM: ");
Serial.println(rpm);
encoderValue = 0;
previousMillis = currentMillis;
}
}
void ISR() {
// ฟังก์ชัน ISR สำหรับนับพัลส์
// ตรรกะการนับพัลส์ขึ้นอยู่กับชนิดของ Encoder และการเชื่อมต่อ
encoderValue++;
}





รีวิว
ยังไม่มีบทวิจารณ์