Lesson 26: Voltage divider
تحتاج هذه الصفحة إلى متصفح حديث (يدعم SharedArrayBuffer). يرجى تحديث Chrome أو Edge أو Firefox أو Safari إلى أحدث إصدار.
English
Share the voltage
- Two resistors in a line from 5V to GND make a voltage divider. The point between them has a voltage between 0 and 5 V.
- Sensors such as the light sensor (LDR) and the thermometer work this way: the sensor is one of the two resistors.
analogReadturns the voltage into a number from 0 to 1023.raw * 5.0 / 1023turns it back into volts.
Words for this lesson
| Word | Meaning |
|---|---|
| voltage divider | two resistors in a line that share the voltage |
| in series | one after the other, so the same current flows through both |
| share | a part of the whole |
| ADC | analogue-to-digital converter: voltage in, number out |
English
The formula
V(A0) = 5 V × R(bottom) ÷ (R(top) + R(bottom))
| top | bottom | V(A0) |
|---|---|---|
| 10 kΩ | 10 kΩ | 5 × 10 ÷ 20 = 2.5 V |
| 10 kΩ | 4.7 kΩ | 5 × 4.7 ÷ 14.7 = 1.6 V |
| 2.2 kΩ | 10 kΩ | 5 × 10 ÷ 12.2 = 4.1 V |
- The bigger resistor takes the bigger share of the 5 V.
- Only the ratio matters: 1 kΩ with 1 kΩ also gives 2.5 V.
English
From number to volts
void setup() {
Serial.begin(9600);
int raw = 512;
float volts = raw * 5.0 / 1023;
Serial.println(volts);
}
void loop() {
}
- 512 is about half of 1023, so the sketch prints 2.50.
English
In the exam (IGCSE Physics 0625)
Physics calls your voltage divider a potential divider.
- 0625/41/M/J/23 Q7(a): describe what is meant by a potential divider. Two resistors in series share the e.m.f. (the supply voltage), in proportion to their resistances: the bigger resistor gets the bigger share. Your two 10 kΩ resistors share 5 V equally: 2.5 V each.
- 0625/41/O/N/24 Q6: an LDR and a thermistor in series form a potential divider, and a voltmeter measures the p.d. across the LDR. (b) The p.d. across the thermistor is the e.m.f. minus the voltmeter reading. (c) When the LDR's resistance falls, it takes a smaller share of the e.m.f., so the voltmeter reading decreases.
الصعوبة 3/5 · 200 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Two resistors in a line from 5V to GND share the voltage. Build it: a 10 kΩ resistor from the 5V row to the A0 row, and another 10 kΩ from the A0 row to the GND row. The sketch reads A0 and prints the voltage. It should be about 2.5 V.
اضغط تشغيل لرؤية المخرجات هنا.
الصعوبة 4/5 · 280 عملة + مكافأة صغيرة عند الإنجاز الأول اليوم
Many sensors work at 3.3 V and break at 5 V. Change the two resistors so that A0 gets 3.2 to 3.5 V. Use the formula: V(A0) = 5 V × R(bottom) ÷ (R(top) + R(bottom)).
اضغط تشغيل لرؤية المخرجات هنا.