
Reading a Temperature Sensor — SIK Circuit 7
ညွှန်ကြားချက်များ
Parts & Introduction
Parts & Introduction
The TMP36 is an analog temperature sensor that outputs a voltage proportional to temperature. You'll learn to use the Serial Monitor to display real-time readings — an essential debugging tool.
Parts Needed
- 1x Arduino Uno + USB cable
- 1x Breadboard
- 1x TMP36 Temperature Sensor
- 5x Jumper Wires
Warning: The TMP36 looks similar to the transistor. Look for "TMP" in tiny letters and a triangle logo. The transistor has "222" printed on it. Inserting the wrong component can damage it!
ဤအဆင့်အတွက် ကုန်ကြမ်းများ:
SparkFun Inventor's Kit - V3.21 အစုံလိုအပ်သော ကိရိယာများ:
Arduino IDE ပါ ကွန်ပျူတာHardware Hookup
Hardware Hookup
Wiring Instructions
With the TMP36 flat side facing you and pins pointing down, the pins are (left to right): 5V, Signal, GND.
- Connect the left pin to 5V.
- Connect the middle pin (signal) to Analog Pin A0.
- Connect the right pin to GND.
That's it — just 3 wires! The TMP36 can only be connected in one direction. Double-check before powering on.
ဤအဆင့်အတွက် ကုန်ကြမ်းများ:
ဘရက်ဘုတ်1 ခု
ဆက်သွယ်ဝါယာ3 ခုArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
ဤအဆင့်အတွက် ကုန်ကြမ်းများ:
Arduino Uno R31 ခုလိုအပ်သော ကိရိယာများ:
Arduino IDE ပါ ကွန်ပျူတာTest & Experiment
Test & Experiment
What You Should See
Open the Serial Monitor (magnifying glass icon in Arduino IDE, or Ctrl+Shift+M). You'll see lines updating once per second:
voltage: 0.73 deg C: 23.24 deg F: 73.84
Troubleshooting
- Nothing happens: Open the Serial Monitor! The output goes there, not to the LEDs.
- Gibberish text: Set the Serial Monitor baud rate dropdown to 9600.
- Temperature unchanged: Pinch the sensor with your fingers to warm it up, or apply ice to cool it down.
Experiments to Try
- Add an LED that turns on above a temperature threshold (like a heat warning).
- Log data over time to see temperature trends.
- Combine with the LCD (Circuit 15) to display temperature without a computer.
ပစ္စည်းများ
5- SparkFun Inventor's Kit - V3.210% ကော်မရှင်1 အစုံ$105.94
- မှစ၍$4.16
- မှစ၍$27.06
- နေရာယူပစ္စည်း
လိုအပ်သော ကိရိယာများ
1- နေရာယူပစ္စည်း
CC0 အများပိုင်
ဤအစီအစဉ်ကို CC0 အောက်တွင် ထုတ်ဝေထားသည်။ ခွင့်ပြုချက်မလိုဘဲ ကူးယူ၊ ပြင်ဆင်၊ ဖြန့်ဝေ နှင့် အသုံးပြုနိုင်သည်။
အစီအစဉ်မှတစ်ဆင့် ကုန်ပစ္စည်းများဝယ်ယူ၍ ဖန်တီးသူကို ပံ့ပိုးပါ ဖန်တီးသူ ကော်မရှင် ရောင်းချသူက သတ်မှတ်သည်၊ သို့မဟုတ် ဤအစီအစဉ်၏ ဗားရှင်းအသစ်ဖန်တီး၍ ဝင်ငွေခွဲဝေရန် သင့်အစီအစဉ်တွင် ချိတ်ဆက်မှုအဖြစ် ထည့်သွင်းပါ။