%% fig-alt: "Fan speed control circuit showing variable resistor controlling current flow to motor, demonstrating speed regulation through resistance adjustment"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#f4f4f4', 'fontSize': '16px'}}}%%
graph LR
A["12V Power<br/>Supply"] -->|High Current| B["Low Resistance<br/>(100Ω)"]
B --> C["Fast Motor<br/>⚡⚡⚡"]
D["12V Power<br/>Supply"] -->|Medium Current| E["Medium Resistance<br/>(500Ω)"]
E --> F["Medium Motor<br/>⚡⚡"]
G["12V Power<br/>Supply"] -->|Low Current| H["High Resistance<br/>(1kΩ)"]
H --> I["Slow Motor<br/>⚡"]
style A fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style D fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style G fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style B fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style E fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style H fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style C fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style F fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style I fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
588 Electricity Fundamentals: Applications and Labs
Passive components don’t require external power and don’t generate power.
588.0.1 Comparison Table
| Component | Property | Unit | Symbol | Function | IoT Application |
|---|---|---|---|---|---|
| Resistor | Resistance | Ohm (Ω) | Limits current | LED current limiting, pull-up/down | |
| Capacitor | Capacitance | Farad (F) | Stores charge | Power smoothing, filtering | |
| Inductor | Inductance | Henry (H) | Stores magnetic energy | DC-DC converters, RF circuits |
588.0.2 Capacitors
Function: Store electrical energy as electric charge (like tiny, fast-charging batteries)
Typical Values: - µF (microfarad): 10-6 F - Power supply decoupling - nF (nanofarad): 10-9 F - Signal filtering - pF (picofarad): 10-12 F - High-frequency circuits
IoT Applications: - Smoothing power supply voltage for microcontrollers - Filtering noise from sensor signals - Energy storage for low-power devices
588.0.3 Inductors
Function: Store energy as magnetic fields when current flows
Typical Values: - mH (millihenry): 10-3 H - Power inductors - µH (microhenry): 10-6 H - RF circuits
IoT Applications: - DC-DC converters (boost/buck regulators) - EMI filtering - Wireless charging coils
588.1 Real-World Applications in IoT
588.1.1 Application 1: Fan Speed Control
Concept: Adjust resistance to control motor current
{fig-alt=“Electrical circuit diagram showing”12V Power Supply”, “Low Resistance (100Ω)”, “Fast Motor ⚡⚡⚡” including voltage, current, resistance relationships, component connections, and signal flow for understanding sensor power requirements and circuit fundamentals in IoT applications.”}
588.1.2 Application 2: LED Current Limiting
Problem: LEDs will burn out if connected directly to power supply
Solution: Add a resistor to limit current
Example Calculation: - Power supply: 5V - LED forward voltage: 2V (typical red LED) - Desired current: 20mA (0.02A)
\[R = \frac{V_{supply} - V_{LED}}{I} = \frac{5V - 2V}{0.02A} = 150Ω\]
Use a 150Ω or 220Ω resistor (standard value)
588.1.3 Application 3: Sensor Pull-up Resistors
Why needed: Many IoT sensors have open-drain outputs that need pull-up resistors
Typical values: 4.7kΩ or 10kΩ
Application: I2C communication (covered in Chapter 4)
588.2 Hands-On Labs
588.2.1 Lab 1: Build Your First LED Circuit
Objective: Build a basic LED circuit with current limiting resistor.
Materials Needed (or use TinkerCAD simulator): - 1× LED (any color) - 1× 220Ω resistor - 1× Push button switch - 1× 9V battery (or 5V USB power) - Breadboard and jumper wires
Circuit Diagram:
%% fig-alt: "Basic LED circuit breadboard diagram showing battery, resistor, LED, and button switch connections for hands-on learning"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#f4f4f4', 'fontSize': '16px'}}}%%
graph LR
A["9V Battery<br/>(+)"] -->|"Step 1"| B["220Ω Resistor"]
B -->|"Step 2"| C["LED<br/>(Long leg +)"]
C -->|"Step 3"| D["Push Button"]
D -->|"Step 4"| E["Battery<br/>(-)"]
F["Press Button<br/>→ Complete Circuit<br/>→ LED Lights!"]
style A fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style B fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style C fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style D fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
style E fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style F fill:#FFF9C4,stroke:#E67E22,stroke-width:2px,color:#000
{fig-alt=“Electrical circuit diagram showing”9V Battery (+)“,”220Ω Resistor”, “LED (Long leg +)” including voltage, current, resistance relationships, component connections, and signal flow for understanding sensor power requirements and circuit fundamentals in IoT applications.”}
Instructions:
- Connect resistor to positive battery terminal
- Connect LED positive (long leg) to other end of resistor
- Connect LED negative (short leg) to one terminal of button
- Connect other button terminal to battery negative
- Press button → LED lights up!
Measurements to Record: - Measure voltage across the LED using multimeter - Measure current through the circuit - Calculate and verify resistance using Ohm’s Law
Expected Learning: - Current only flows when circuit is complete - Resistor limits current to safe level for LED - Practice reading circuit diagrams - Verify Ohm’s Law with real measurements
588.2.2 Lab 2: Voltage Divider for Sensor Interfacing
Objective: Create a voltage divider to scale down 5V to 3.3V for microcontroller ADC input.
Materials Needed: - 1× 1kΩ resistor (R1) - 1× 2kΩ resistor (R2) - 1× 5V power supply (or USB) - Multimeter - Breadboard and jumper wires
Circuit Diagram:
%% fig-alt: "Voltage divider circuit diagram showing two resistors in series dividing 5V input to 3.3V output for microcontroller interfacing"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#f4f4f4', 'fontSize': '16px'}}}%%
graph TB
A["5V Input"] --> B["R1: 1kΩ"]
B --> C["Output Point<br/>(Measure here)<br/>3.33V"]
C --> D["R2: 2kΩ"]
D --> E["Ground<br/>0V"]
F["Formula:<br/>Vout = Vin × (R2 / R1+R2)<br/>Vout = 5V × (2kΩ / 3kΩ)<br/>Vout = 3.33V"]
style A fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style B fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style C fill:#2C3E50,stroke:#E67E22,stroke-width:3px,color:#fff
style D fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style E fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
style F fill:#FFF9C4,stroke:#E67E22,stroke-width:2px,color:#000
{fig-alt=“Electrical circuit diagram showing”5V Input”, “R1: 1kΩ”, “Output Point (Measure here) 3.33V” including voltage, current, resistance relationships, component connections, and signal flow for understanding sensor power requirements and circuit fundamentals in IoT applications.”}
Instructions:
- Connect R1 (1kΩ) from 5V to middle point
- Connect R2 (2kΩ) from middle point to ground
- Measure output voltage at middle point
- Calculate expected voltage: \(V_{out} = 5V \times \frac{2kΩ}{1kΩ + 2kΩ} = 3.33V\)
- Compare calculated vs measured values
Expected Learning: - Voltage dividers reduce voltage proportionally - Essential for interfacing 5V sensors with 3.3V microcontrollers - Understand resistor ratio relationship to output voltage
Extension: - Try different resistor values (4.7kΩ and 10kΩ) - Calculate current through the divider - Determine power dissipation
588.2.3 Lab 3: Power Budget Analysis for IoT Device
Objective: Calculate total power consumption and estimate battery life for a battery-powered IoT sensor.
Scenario: Environmental sensor with these components: - ESP32 microcontroller: 160mA active, 10µA deep sleep - DHT22 sensor: 1.5mA when reading - LoRa radio: 120mA transmit, 15mA receive, 1µA sleep - Status LED: 20mA when on
Operating cycle (every 5 minutes): 1. Wake from sleep (0.1s) 2. Read sensor (2s) 3. Transmit data (0.5s) 4. Return to sleep (297.4s)
Instructions:
- Calculate duty cycles:
- Active time: 2.6s per 300s = 0.87%
- Sleep time: 297.4s per 300s = 99.13%
- Calculate average current for each component:
- ESP32: (160mA × 0.0087) + (0.01mA × 0.9913) = 1.40mA
- DHT22: 1.5mA × (2/300) = 0.01mA
- LoRa: (120mA × 0.5/300) + (0.001mA × 299.5/300) = 0.20mA
- LED: 20mA × (0.5/300) = 0.03mA
- Total average: 1.64mA
- Calculate battery life:
- Battery: 2000mAh Li-ion (3.7V)
- Battery life: 2000mAh / 1.64mA ≈ 1220 hours ≈ 51 days
- Use Python PowerBudget calculator to verify
Expected Learning: - Duty cycle dramatically affects battery life - Sleep modes are critical for IoT devices - Power budget analysis guides component selection
588.2.4 🧪 Interactive Lab: Series vs Parallel Resistor Networks
🎯 Interactive Challenges:
Try these experiments:
- Series Resistance Challenge: Calculate the total resistance of the 3 series resistors (each 1kΩ). Then measure it with the multimeter.
💡 Hint
For series: R_total = R1 + R2 + R3 = 1kΩ + 1kΩ + 1kΩ = 3kΩ. Resistances simply add up in series. - Parallel Resistance Challenge: Calculate the total resistance of the 3 parallel resistors (each 1kΩ). Is it higher or lower than one resistor?
💡 Hint
For equal resistors in parallel: R_total = R / n = 1kΩ / 3 ≈ 333Ω. Parallel resistance is always LOWER than any individual resistor. - Current Distribution Challenge: In the series circuit, measure current at different points. In parallel, measure current through each branch. What pattern do you see?
💡 Hint
Series: Current is the SAME everywhere (Kirchhoff’s Current Law). Parallel: Current DIVIDES among branches, but sum equals total current. - Voltage Division Challenge: Measure voltage across each resistor in series. Then in parallel. What’s the difference?
💡 Hint
Series: Voltage divides proportionally (5V/3 ≈ 1.67V each). Parallel: Voltage is the SAME across all resistors (5V each).
Part A: Series Configuration
%% fig-alt: "Series resistor circuit showing three 1kΩ resistors connected end-to-end with total resistance of 3kΩ and current of 1.67mA"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#f4f4f4', 'fontSize': '16px'}}}%%
graph LR
A["5V"] --> B["R1<br/>1kΩ<br/>~1.67V"]
B --> C["R2<br/>1kΩ<br/>~1.67V"]
C --> D["R3<br/>1kΩ<br/>~1.67V"]
D --> E["GND"]
F["Total R = 3kΩ<br/>Current = 1.67mA<br/>(Same through all)"]
style A fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style B fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style C fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style D fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style E fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
style F fill:#FFF9C4,stroke:#E67E22,stroke-width:2px,color:#000
{fig-alt=“Electrical circuit diagram showing”5V”, “R1 1kΩ ~1.67V”, “R2 1kΩ ~1.67V” including voltage, current, resistance relationships, component connections, and signal flow for understanding sensor power requirements and circuit fundamentals in IoT applications.”}
Instructions: 1. Connect three 1kΩ resistors in series 2. Measure total resistance: Expected = 3kΩ 3. Calculate current: I = 5V / 3kΩ = 1.67mA 4. Measure voltage across each resistor (should be ~1.67V each)
Part B: Parallel Configuration
%% fig-alt: "Parallel resistor circuit showing three 1kΩ resistors connected side-by-side with total resistance of 333Ω and total current of 15mA"
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#16A085', 'tertiaryColor': '#f4f4f4', 'fontSize': '16px'}}}%%
graph TB
A["5V"] --> B["Junction Point"]
B --> C["R1: 1kΩ<br/>5mA"]
B --> D["R2: 1kΩ<br/>5mA"]
B --> E["R3: 1kΩ<br/>5mA"]
C --> F["GND"]
D --> F
E --> F
G["Total R = 333Ω<br/>Total Current = 15mA<br/>(5V across each)"]
style A fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style B fill:#2C3E50,stroke:#E67E22,stroke-width:2px,color:#fff
style C fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style D fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style E fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style F fill:#7F8C8D,stroke:#2C3E50,stroke-width:2px,color:#fff
style G fill:#FFF9C4,stroke:#E67E22,stroke-width:2px,color:#000
{fig-alt=“Electrical circuit diagram showing”5V”, “Junction Point”, “R1: 1kΩ 5mA” including voltage, current, resistance relationships, component connections, and signal flow for understanding sensor power requirements and circuit fundamentals in IoT applications.”}
Instructions: 1. Connect three 1kΩ resistors in parallel 2. Measure total resistance: Expected = 333Ω (1kΩ/3) 3. Calculate total current: I = 5V / 333Ω = 15mA 4. Measure current through each resistor (should be ~5mA each)
Comparison Table:
| Configuration | Total Resistance | Total Current | Voltage per Resistor | Current per Resistor |
|---|---|---|---|---|
| Series | 3kΩ | 1.67mA | 1.67V | 1.67mA |
| Parallel | 333Ω | 15mA | 5V | 5mA |
Expected Learning: - Series: Resistance adds, current stays same - Parallel: Resistance decreases, current divides - Understanding when to use each configuration
588.3 Quiz 3
Test your understanding of electricity fundamentals with these questions.
A circuit has 12V voltage and 4Ω resistance. What is the current?
A) 3A B) 48A C) 8A D) 16A
Show Answer
Answer: A) 3A
\[I = \frac{V}{R} = \frac{12V}{4Ω} = 3A\]
An IoT device runs on 5V and draws 100mA (0.1A). How much power does it consume?
A) 0.5W B) 50W C) 5W D) 0.05W
Show Answer
Answer: A) 0.5W
\[P = V \times I = 5V \times 0.1A = 0.5W\]
You need to limit current to 20mA for a 2V LED powered by a 5V supply. What resistor value?
A) 100Ω B) 150Ω C) 220Ω D) 330Ω
Show Answer
Answer: B) 150Ω
\[R = \frac{V_{supply} - V_{LED}}{I} = \frac{5V - 2V}{0.02A} = 150Ω\]
In practice, use 150Ω or the nearest standard value (220Ω).
588.4 Question 4: Series Resistors
Three resistors (100Ω, 220Ω, 330Ω) are connected in series. What is the total resistance?
A) 217Ω B) 550Ω C) 650Ω D) 54Ω
Show Answer
Answer: C) 650Ω
For series resistors: \(R_{total} = R_1 + R_2 + R_3 = 100Ω + 220Ω + 330Ω = 650Ω\)
Two 1kΩ resistors are connected in parallel. What is the total resistance?
A) 2kΩ B) 1kΩ C) 500Ω D) 250Ω
Show Answer
Answer: C) 500Ω
For parallel resistors: \(\frac{1}{R_{total}} = \frac{1}{R_1} + \frac{1}{R_2} = \frac{1}{1kΩ} + \frac{1}{1kΩ} = \frac{2}{1kΩ}\)
Therefore: \(R_{total} = \frac{1kΩ}{2} = 500Ω\)
For identical resistors in parallel: \(R_{total} = \frac{R}{n}\) where n is the number of resistors.
A voltage divider uses 1kΩ (R1) and 3kΩ (R2) resistors to divide a 12V input. What is the output voltage across R2?
A) 3V B) 4V C) 9V D) 12V
Show Answer
Answer: C) 9V
\[V_{out} = V_{in} \times \frac{R_2}{R_1 + R_2} = 12V \times \frac{3kΩ}{1kΩ + 3kΩ} = 12V \times \frac{3}{4} = 9V\]
An IoT sensor draws 2mA continuously from a 1000mAh battery. How long will the battery last?
A) 50 hours B) 200 hours C) 500 hours D) 2000 hours
Show Answer
Answer: C) 500 hours
\[Battery\ Life = \frac{Battery\ Capacity}{Current\ Draw} = \frac{1000mAh}{2mA} = 500\ hours\]
This equals approximately 21 days.
A 220Ω resistor carries 50mA (0.05A) current. How much power does it dissipate?
A) 0.055W B) 0.55W C) 5.5W D) 11W
Show Answer
Answer: B) 0.55W
\[P = I^2 \times R = (0.05A)^2 \times 220Ω = 0.0025 \times 220 = 0.55W\]
This requires at least a 1W rated resistor for safe operation (with safety margin).
In conventional current flow notation used in circuit analysis, current flows:
A) From negative to positive B) From positive to negative C) In both directions simultaneously D) Only in AC circuits
Show Answer
Answer: B) From positive to negative
By convention, current flows from positive (+) to negative (-), even though electrons physically flow from negative to positive. This historical convention is used in all circuit analysis and design.
You need to select a resistor that will dissipate 0.3W of power. Which power rating should you choose for safe operation with a 2× safety margin?
A) 1/8 W (0.125W) B) 1/4 W (0.25W) C) 1/2 W (0.5W) D) 1 W
Show Answer
Answer: D) 1 W
With 2× safety margin: \(0.3W \times 2 = 0.6W\)
The next standard power rating above 0.6W is 1W.
Safety margins prevent overheating and ensure long-term reliability. Common practice is to use components rated for at least 2× the expected power dissipation.
Electricity is the foundation of all IoT systems, driven by the flow of electrons through conductors. Understanding the relationship between voltage (electrical “pressure”), current (flow rate), and resistance (opposition to flow) through Ohm’s Law (V = I × R) is essential for designing and troubleshooting IoT circuits. Power consumption (P = V × I) determines battery life and energy requirements for IoT deployments.
Circuit configurations significantly impact system behavior: series circuits share current but divide voltage, while parallel circuits share voltage but divide current. Series configurations are useful for voltage division and cumulative resistance, while parallel configurations provide redundancy and current distribution. Understanding these principles enables proper component selection and circuit design.
Passive components shape circuit behavior without requiring external power: resistors limit current and create voltage dividers, capacitors store energy and filter signals, and inductors resist changes in current. Real-world circuits combine these components to condition sensor signals, filter noise, store energy, and protect sensitive electronics.
Practical application of electrical principles includes power budget calculations (ensuring battery capacity meets device requirements), voltage regulation (maintaining stable supply despite load variations), and component selection (choosing resistor wattage, capacitor voltage ratings). Safety margins (typically 2×) prevent component failure and ensure long-term reliability in IoT deployments.