การวัดอุณหภูมิด้วย LM35 และ DS18B20
การออกแบบนี้เป็นวิธีง่ายๆ ในการรับค่าอุณหภูมิจากเซ็นเซอร์สองตัว เพื่อให้ได้ค่าเฉลี่ย ค่าทั้งหมดจะถูกส่งผ่าน bluetooth แต่ค่าอุณหภูมิเฉลี่ยจะทำให้ชุดของ LEDs สว่างขึ้นตามพารามิเตอร์บางอย่าง
รายละเอียดทางเทคนิคเพิ่มเติม
การเปรียบเทียบเซ็นเซอร์และตรรกะ
โปรเจกต์นี้มุ่งเน้นไปที่ความแตกต่างระหว่างการวัดอุณหภูมิแบบ analog และ digital
- LM35 (Analog): ให้เอาต์พุต 10mV/°C โดย Arduino จะอ่านค่านี้ผ่าน 10-bit ADC
- DS18B20 (Digital): สื่อสารผ่าน 1-Wire bus ให้ความแม่นยำสูงกว่า (เพิ่มขึ้นทีละ 0.0625°C) และทนทานต่อสัญญาณรบกวนทางไฟฟ้าได้ดีกว่าเมื่อใช้สายเคเบิลยาวๆ
การตรวจสอบหลายโหนด
เฟิร์มแวร์ใช้ตรรกะการเปรียบเทียบดังนี้:
- การอ่านแบบขนาน: เซ็นเซอร์ทั้งสองตัวจะถูกสุ่มตัวอย่างพร้อมกัน
- การคำนวณข้อผิดพลาด: ระบบจะระบุค่าเบี่ยงเบนระหว่างเซ็นเซอร์ทั้งสอง ซึ่งมีประโยชน์สำหรับการสอบเทียบข้าม (cross-calibration)
- การบันทึกข้อมูลผ่าน Bluetooth: โดยใช้โมดูล HC-05 หรือ HC-06 ค่าที่อ่านได้จะถูกส่งไปยังแอปพลิเคชันบนสมาร์ทโฟน (Bluetooth Terminal) เพื่อเป็นสถานีตรวจสอบแบบไร้สายสำหรับห้องปฏิบัติการ หรือการปรับแต่งระบบ HVAC ภายในบ้าน
ข้อมูล Frontmatter ดั้งเดิม
title: "Measuring temperatures with LM35 and DS18B20"
description: "Temperature is measured from two different sensors and send data through bluetooth and a set of LEDs is lit according to average temperature"
author: "jomar"
category: "Sensors & Environment"
tags:
- "environmental sensing"
- "lights"
- "communication"
- "monitoring"
views: 17434
likes: 4
price: 1120
difficulty: "Easy"
components:
- "1x HC-05 Bluetooth Module"
- "1x LM35"
- "1x Arduino Mega 2560"
- "9x Resistor 221 ohm"
- "1x Resistor 4.75k ohm"
- "1x DS18B20 Programmable Resolution 1-Wire Digital Thermometer"
- "1x Resistor 100 ohm"
- "8x LED (generic)"
tools: []
apps:
- "1x Bluetooth Terminal"
- "1x Arduino IDE"
downloadableFiles:
- "https://projects.arduinocontent.cc/e0f90759-5843-4fd0-a9b7-69492dea696e.ino"
- "https://projects.arduinocontent.cc/e0f90759-5843-4fd0-a9b7-69492dea696e.ino"
documentationLinks: []
passwordHash: "c62fd601afaf4b5d79f2df3abea09e0625ed6e2758c618d6e69f65621d4d7b59"
encryptedPayload: "U2FsdGVkX185wmI6hw76ev32Xd341V5Sv72/9sDtCO0S+y0gud89q4rDnvlKMj9dSwMqEjhIqpMp8fuCeaPW2bATaUmVRjBuX2eGqJYTQb0bCJ46iDk5nHYCACiGVflf"
seoDescription: "Learn to measure Temperature with LM35 and DS18B20 sensors, transmit data via Bluetooth, and control LEDs using Arduino."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/measuring-temperatures-with-lm35-and-ds18b20-fee8f8_cover.jpg"
lang: "th"