Skip to main content

Mastering the Voltage Divider Circuit: Practical Exercise with Step-by-Step Solution



Whether you are designing an Arduino project, interfacing sensors, or stepping down voltage signals, the voltage divider is one of the most fundamental circuits every electronics enthusiast and engineer must master. In this post, we will break down the core theory, work through a practical exercise, and solve it step-by-step with clear equations.

What is a Voltage Divider?

A voltage divider is a simple passive linear circuit that converts a higher voltage into a lower one using two resistors in series. The output voltage (Vout) depends on the input voltage (Vin) and the ratio of the two resistors (R1 and R2).

The fundamental voltage divider equation is:

Vout = Vin × [ R2 / (R1 + R2) ]

The Exercise Problem

Scenario: You want to measure the voltage of a 12V battery using a microcontroller analog input pin (such as an Arduino ADC). However, the microcontroller pin can only handle a maximum voltage of 5V.

Given Parameters:

  • Input Voltage (Vin) = 12 V
  • Target Output Voltage (Vout) = 5 V
  • First Resistor (R1) = 10 kΩ (10,000 Ω)

Your Tasks:

  1. Calculate the exact required value for R2 to get exactly 5V at the output.
  2. Select the safest standard resistor value from the E24 series and calculate the actual Vout.
  3. Calculate the total current drawn by the voltage divider circuit.

Step-by-Step Solution

Task 1: Calculate the exact value of R2

We start with the primary voltage divider equation:

Vout = Vin × [ R2 / (R1 + R2) ]

Rearrange the formula to solve for R2:

Vout / Vin = R2 / (R1 + R2)

R2 = R1 × [ Vout / (Vin - Vout) ]

Now substitute our known values into the equation:

R2 = 10,000 × [ 5 / (12 - 5) ]

R2 = 10,000 × (5 / 7)

R2 = 10,000 × 0.71428 ≈ 7,142.86 Ω (~7.14 kΩ)

Task 2: Select Standard Resistor and Recalculate Actual Vout

In real-world electronics, custom resistor values like 7.14 kΩ aren't readily available. We must pick a standard value from the E24 series (5% tolerance).

If we choose 7.5 kΩ:

Vout = 12 V × [ 7.5 kΩ / (10 kΩ + 7.5 kΩ) ] = 12 × (7.5 / 17.5) = 5.14 V

Warning: 5.14V exceeds the microcontroller's 5V limit, which could damage the GPIO pin! To remain safe, pick the lower standard value, R2 = 6.8 kΩ:

Vout_safe = 12 V × [ 6.8 kΩ / (10 kΩ + 6.8 kΩ) ] = 12 × (6.8 / 16.8) = 4.85 V

Using R2 = 6.8 kΩ safely keeps the output below the maximum 5V limit.

Task 3: Calculate Circuit Current and Power Dissipation

To find the current (I) flowing through the circuit, use Ohm's Law (I = V / Rtotal):

Rtotal = R1 + R2 = 10,000 Ω + 6,800 Ω = 16,800 Ω

I = Vin / Rtotal = 12 V / 16,800 Ω = 0.000714 A = 0.714 mA

Now calculate total power consumed by the divider:

P = Vin × I = 12 V × 0.000714 A = 0.00857 W (8.57 mW)

Since 8.57 mW is well under the standard 1/4 Watt (250 mW) limit, standard resistors will work cleanly without overheating.

Key Design Takeaways

  • Loading Effect: Remember that a voltage divider works best when connecting to a high-impedance load (like an ADC pin). Connecting a low-resistance load across R2 will draw current and alter your voltage calculations.
  • Choosing Resistance Values: Values that are too low drain extra power and waste battery life; values that are too high make the output susceptible to electrical noise. Standard values in the range of 1 kΩ to 100 kΩ are generally ideal for digital microcontrollers.

Did you find this exercise helpful? Try recalculating R2 if your input voltage increases to 24V and post your answers in the comments!

Comments

Popular posts from this blog

How to Play a Sound After a Terminal Command Completes

  Sometimes, while working on the terminal, especially during long-running processes, it’s useful to have an audible notification when the task is finished. In this guide, we’ll show you how to make your terminal play a sound after any command completes, ensuring you're alerted without constantly checking the terminal. Why Do This? This trick can save time and improve workflow, especially when: You’re running lengthy build processes or installations. You’re waiting for large file transfers. You're programming embedded systems and need confirmation when flashing is done. Let’s dive into how to do this on a Linux system. Step-by-Step Guide to Playing a Sound After a Command 1. Using paplay or aplay to Play Sounds On most Linux distributions, you can use paplay or aplay to play sound files directly from the terminal. Here's how you can append a sound notification after a command. Basic Command Structure : PC:~$ your_command && paplay /path/to/soundfile.oga  Or, if...

Building a Robot Actuator with ESP32 and a 5010 BLDC Motor

Introduction Modern robotics demands actuators that aren’t just strong, but also smart — capable of precise control, smooth motion, and safe human interaction. Traditional servos are great for small robots, but they can be stiff, noisy, and limited in range or torque. This project demonstrates a custom robot actuator built around a 5010 360 KV brushless DC (BLDC) motor , controlled by an ESP32 running the SimpleFOC library. The goal is to create a compliant joint — one that can be moved by hand, but automatically returns to its home position with adaptive stiffness. 🧠 What Makes This Actuator Special Unlike a typical servo, this actuator behaves intelligently : You can turn it by hand — it feels soft and back-drivable. When you release it, the motor returns to its initial position smoothly. If you twist it harder (e.g., due to gear reduction), it becomes stiffer , resisting displacement more strongly. It’s powered by 12 V and controlled by a simple ESP32 boar...

How to Automatically Change Citation Color in Word (e.g., Blue) Using Zotero + Macro

  Hi everyone 👋 I’ll be honest upfront: I’m not a huge fan of Microsoft Word — I usually work in LaTeX , where formatting and citations behave exactly the way I want without any hacks 😄 That said, we all occasionally find ourselves back in Word , whether for collaborations, journal templates, or institutional requirements. And when that happens, a few quirky tricks can go a long way. If you’re using Zotero with Microsoft Word and want to improve the visual style of your document, this small trick can be surprisingly useful. In many scientific papers and technical documents, in-text citations appear in blue , similar to hyperlinks. Unfortunately, Zotero does not provide a built-in option to automatically change citation colors in Word. The good news? You can achieve this easily using a simple Word VBA macro  no need to abandon Zotero or manually format citations one by one. i originally found this in zotero forms this >  Post  < Below is a simple,...