About this simulatorเกี่ยวกับโปรแกรมจำลองนี้
This sensor simulator shows how a light-dependent resistor (LDR) and an NTC thermistor turn a physical quantity into an electrical signal. Inside the material, photons or heat free electrons; outside, a voltage divider turns the changing resistance into a voltage, and a 10-bit ADC turns that voltage into the number a microcontroller reads.โปรแกรมจำลองเซนเซอร์นี้แสดงว่าตัวต้านทานไวแสง (LDR) และเทอร์มิสเตอร์แบบ NTC เปลี่ยนปริมาณทางฟิสิกส์ให้เป็นสัญญาณไฟฟ้าได้อย่างไร ภายในวัสดุ โฟตอนหรือความร้อนปลดปล่อยอิเล็กตรอน ภายนอก วงจรแบ่งแรงดันเปลี่ยนความต้านทานที่เปลี่ยนไปให้เป็นแรงดัน และ ADC 10 บิตเปลี่ยนแรงดันนั้นเป็นตัวเลขที่ไมโครคอนโทรลเลอร์อ่านได้
What you can do hereสิ่งที่ทำได้ในหน้านี้
- Watch photons free electrons in an LDR, and see why infrared below the band gap frees none.ดูโฟตอนปลดปล่อยอิเล็กตรอนใน LDR และดูว่าทำไมอินฟราเรดที่มีพลังงานต่ำกว่าแถบช่องว่างจึงปลดปล่อยไม่ได้เลย
- Heat a thermistor and watch the lattice shake and electrons break free, with kT and the activation energy to scale.ให้ความร้อนกับเทอร์มิสเตอร์ ดูโครงผลึกสั่นและอิเล็กตรอนหลุดเป็นอิสระ พร้อมเทียบ kT กับพลังงานกระตุ้นตามสเกลจริง
- Follow the electron flow around a voltage divider and read Vout on a 10-bit ADC.ติดตามการไหลของอิเล็กตรอนรอบวงจรแบ่งแรงดัน และอ่านค่า Vout ด้วย ADC 10 บิต
- Play a day–night or heat–cool cycle and watch the physical and electrical signals move together.เล่นรอบกลางวัน–กลางคืน หรือร้อน–เย็น แล้วดูสัญญาณทางฟิสิกส์และสัญญาณไฟฟ้าเปลี่ยนไปพร้อมกัน
Concepts coveredหัวข้อที่ครอบคลุม
- Photoconductivityสภาพนำไฟฟ้าเชิงแสง (Photoconductivity)
- Band gap and photon energyแถบช่องว่างพลังงานและพลังงานโฟตอน
- NTC thermistorเทอร์มิสเตอร์แบบ NTC
- Voltage dividerวงจรแบ่งแรงดัน
- Analog-to-digital conversionการแปลงแอนะล็อกเป็นดิจิทัล (ADC)
- Sensor resolutionความละเอียดของเซนเซอร์
Common questionsคำถามที่พบบ่อย
- How does an LDR (photoresistor) work?LDR (ตัวต้านทานไวแสง) ทำงานอย่างไร?
- An LDR is a film of cadmium sulfide. Each photon it absorbs frees one electron, so brighter light means more free electrons and a lower resistance, from about a megohm in darkness to a few hundred ohms in sunlight. Photons below the band gap energy, such as infrared, free none.LDR คือฟิล์มแคดเมียมซัลไฟด์ โฟตอนแต่ละตัวที่ถูกดูดกลืนจะปลดปล่อยอิเล็กตรอนหนึ่งตัว แสงยิ่งสว่างจึงมีอิเล็กตรอนอิสระมากขึ้นและความต้านทานต่ำลง ตั้งแต่ประมาณหนึ่งเมกะโอห์มในที่มืดจนถึงไม่กี่ร้อยโอห์มใต้แสงแดด โฟตอนที่มีพลังงานต่ำกว่าแถบช่องว่าง เช่น อินฟราเรด ปลดปล่อยอิเล็กตรอนไม่ได้เลย
- Why does a thermistor’s resistance decrease with temperature?ทำไมความต้านทานของเทอร์มิสเตอร์จึงลดลงเมื่ออุณหภูมิสูงขึ้น?
- In an NTC thermistor’s metal-oxide semiconductor, electrons need about 0.34 eV to break free. Thermal energy kT is only about 26 meV at room temperature, so only a small, exponentially temperature-dependent fraction escape. Warm it up and many more escape, so the resistance falls by about 4 % per °C.ในสารกึ่งตัวนำโลหะออกไซด์ของเทอร์มิสเตอร์ NTC อิเล็กตรอนต้องใช้พลังงานประมาณ 0.34 eV จึงจะหลุดเป็นอิสระ แต่พลังงานความร้อน kT ที่อุณหภูมิห้องมีเพียงประมาณ 26 meV จึงมีอิเล็กตรอนเพียงส่วนน้อยที่หลุดได้ และส่วนนี้เพิ่มแบบเอกซ์โพเนนเชียลตามอุณหภูมิ เมื่ออุ่นขึ้นอิเล็กตรอนก็หลุดมากขึ้น ความต้านทานจึงลดลงประมาณ 4 % ต่อ °C
- How do you connect a sensor to a microcontroller?ต่อเซนเซอร์เข้ากับไมโครคอนโทรลเลอร์อย่างไร?
- Put the resistive sensor in a voltage divider with a fixed resistor of similar value. The divider turns the resistance into a voltage, and the microcontroller’s ADC turns the voltage into a number. Firmware then runs the calibration curve backwards to get lux or °C.ต่อเซนเซอร์แบบตัวต้านทานเป็นวงจรแบ่งแรงดันร่วมกับตัวต้านทานคงที่ที่มีค่าใกล้เคียงกัน วงจรแบ่งแรงดันเปลี่ยนความต้านทานเป็นแรงดัน แล้ว ADC ของไมโครคอนโทรลเลอร์เปลี่ยนแรงดันเป็นตัวเลข จากนั้นเฟิร์มแวร์ใช้กราฟสอบเทียบย้อนกลับเพื่อคำนวณเป็นลักซ์หรือ °C