Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Voltage Divider and Applications | Circuit Analysis with Python
Python for Electrical Engineers

bookVoltage Divider and Applications

The voltage divider is a fundamental concept in electrical engineering that allows you to produce a specific output voltage from a higher input voltage using just two resistors. This simple yet powerful arrangement is widely used in practical scenarios such as adjusting voltage levels, interfacing sensors with microcontrollers, and conditioning analog signals for measurement. By selecting appropriate resistor values, you can tailor the output voltage to suit the requirements of a sensor or downstream circuit.

12345678910111213
def voltage_divider(v_in, r1, r2): """ Calculate output voltage of a two-resistor voltage divider. Parameters: v_in (float): Input voltage in volts r1 (float): Resistance of the upper resistor in ohms r2 (float): Resistance of the lower resistor in ohms Returns: float: Output voltage across r2 in volts """ return v_in * r2 / (r1 + r2)
copy

The voltage divider formula is derived from Ohm's Law and the concept of series circuits. When two resistors, R1 and R2, are connected in series across a voltage source Vin, the total resistance is R1 + R2. The current flowing through both resistors is the same, and the voltage across R2 (the output voltage, Vout) can be found by multiplying the current by R2. This leads to the classic voltage divider equation: Vout = Vin * R2 / (R1 + R2).

The Python function you have seen above allows you to quickly compute the output voltage for any combination of input voltage and resistor values, making it especially useful for tasks like sensor signal conditioning. For instance, many sensors output voltages that need to be scaled down to match the input range of an analog-to-digital converter (ADC) or a microcontroller pin. By choosing the right resistor values, you can ensure that the sensor's output is safely and accurately read by your measurement system.

1234567
# Example: Calculate the output voltage of a voltage divider vin = 12.0 # Input voltage in volts r1 = 4700 # Upper resistor in ohms (4.7 kΩ) r2 = 2200 # Lower resistor in ohms (2.2 kΩ) vout = voltage_divider(vin, r1, r2) print(f"Output voltage (Vout): {vout:.2f} V")
copy

1. What is the formula for the output voltage in a two-resistor voltage divider?

2. Why are voltage dividers commonly used in sensor circuits?

3. What happens to the output voltage if the lower resistor value increases?

question mark

What is the formula for the output voltage in a two-resistor voltage divider?

Select the correct answer

question mark

Why are voltage dividers commonly used in sensor circuits?

Select the correct answer

question mark

What happens to the output voltage if the lower resistor value increases?

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

bookVoltage Divider and Applications

Deslize para mostrar o menu

The voltage divider is a fundamental concept in electrical engineering that allows you to produce a specific output voltage from a higher input voltage using just two resistors. This simple yet powerful arrangement is widely used in practical scenarios such as adjusting voltage levels, interfacing sensors with microcontrollers, and conditioning analog signals for measurement. By selecting appropriate resistor values, you can tailor the output voltage to suit the requirements of a sensor or downstream circuit.

12345678910111213
def voltage_divider(v_in, r1, r2): """ Calculate output voltage of a two-resistor voltage divider. Parameters: v_in (float): Input voltage in volts r1 (float): Resistance of the upper resistor in ohms r2 (float): Resistance of the lower resistor in ohms Returns: float: Output voltage across r2 in volts """ return v_in * r2 / (r1 + r2)
copy

The voltage divider formula is derived from Ohm's Law and the concept of series circuits. When two resistors, R1 and R2, are connected in series across a voltage source Vin, the total resistance is R1 + R2. The current flowing through both resistors is the same, and the voltage across R2 (the output voltage, Vout) can be found by multiplying the current by R2. This leads to the classic voltage divider equation: Vout = Vin * R2 / (R1 + R2).

The Python function you have seen above allows you to quickly compute the output voltage for any combination of input voltage and resistor values, making it especially useful for tasks like sensor signal conditioning. For instance, many sensors output voltages that need to be scaled down to match the input range of an analog-to-digital converter (ADC) or a microcontroller pin. By choosing the right resistor values, you can ensure that the sensor's output is safely and accurately read by your measurement system.

1234567
# Example: Calculate the output voltage of a voltage divider vin = 12.0 # Input voltage in volts r1 = 4700 # Upper resistor in ohms (4.7 kΩ) r2 = 2200 # Lower resistor in ohms (2.2 kΩ) vout = voltage_divider(vin, r1, r2) print(f"Output voltage (Vout): {vout:.2f} V")
copy

1. What is the formula for the output voltage in a two-resistor voltage divider?

2. Why are voltage dividers commonly used in sensor circuits?

3. What happens to the output voltage if the lower resistor value increases?

question mark

What is the formula for the output voltage in a two-resistor voltage divider?

Select the correct answer

question mark

Why are voltage dividers commonly used in sensor circuits?

Select the correct answer

question mark

What happens to the output voltage if the lower resistor value increases?

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4
some-alt