شحن مجاني للأوردرات فوق
1000 ج
رمضان كريم
Linear +10mV/°C Output for Accurate Temperature Measurement
The LM35DZ is a precision integrated-circuit temperature sensor that provides an analog output voltage linearly proportional to the Celsius temperature. With ±0.5°C accuracy (at 25°C) and no external calibration required, it’s ideal for environmental monitoring, HVAC systems, and industrial applications.
+10mV per °C (0°C = 0V)
±0.5°C at 25°C (typical)
Single analog output
60μA current draw (typical)
| Temperature Range | 0°C to +100°C (DZ version) |
|---|---|
| Output Scale Factor | +10.0mV/°C |
| Accuracy | ±0.5°C at 25°C |
| Supply Voltage | 4V to 30V (5V typical) |
| Current Drain | 60μA (typical) |
| Package | TO-92 (3-pin) |
| Pin | Name | Description | Arduino Connection |
|---|---|---|---|
| 1 | VCC | Power Supply (4-30V) | 5V |
| 2 | VOUT | Analog Output | A0 |
| 3 | GND | Ground | GND |
// Basic Connections: // VCC → 5V // VOUT → A0 (or any analog input) // GND → GND // Optional: Add 0.1μF capacitor between VCC and GND // for noise reduction in electrically noisy environments
const int sensorPin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
// Read analog voltage (0-1023)
int sensorValue = analogRead(sensorPin);
// Convert to voltage (5V reference)
float voltage = sensorValue * (5.0 / 1023.0);
// Convert to temperature (10mV per °C)
float temperature = voltage * 100;
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
delay(1000);
}
// For -55°C to +150°C range:
// Use LM35CZ version with dual supply
// Connect VCC to +5V, GND to -5V
// Output will be 0V at 0°C, positive for
// temperatures above zero, negative below
// Use Arduino's internal 1.1V reference
analogReference(INTERNAL); // 1.1V on ATmega
// Now 1.1V = 1023, giving ~0.1°C resolution
// in the 0-110°C range
// Array of sensor pins
const int sensorPins[] = {A0,A1,A2,A3};
float temperatures[4];
void readTemperatures() {
for(int i=0; i<4; i++) {
int val = analogRead(sensorPins[i]);
temperatures[i] = (val * (5.0/1023.0)) * 100;
}
}
// Moving average filter
#define READINGS 10
float tempHistory[READINGS];
int index = 0;
float getFilteredTemp() {
tempHistory[index] = temperature;
index = (index + 1) % READINGS;
float sum = 0;
for(int i=0; i
No account yet?
Create an Account
Recent Comments