# I. Voltage Division and Loading
> [!table] Initial Potentiometer Settings & $V_{out}$
> | Expected Voltage (V) | Measured Voltage (V) | Percent Error |
| -------------------- | -------------------- | ------------- |
| 5.000 | 5.0001 | 0.002% |
---
> [!table] Adjusted Potentiometer Resistances & $V_{out}$
> | Expected Resistance ($k\ohm$) | Measured Resistance ($k\Omega$) | Percent Error |
| ---------------------------- | ------------------------------ | ------------- |
| 10.000 | 9.5457 | 4.543% |
---
> [!table] Load Resistance vs Output Voltage
> | Desired V<sub>out</sub> (V) | R1 Initial Setting (k$\ohm$) | R2 Initial Setting (k $\ohm$) | **Measured V<sub>out</sub> (**V) | **Best Adjusted V<sub>out</sub> (**V) | R1 Adjusted Resistance (k$\ohm$) | R2 Adjusted Resistance (k$\ohm$) |
| --------------------------- | ---------------------------- | ----------------------------- | -------------------------------- | ------------------------------------- | -------------------------------- | -------------------------------- |
| 3.3 | 3.3952 | 6.6048 | 1.827 | 3.307 | 6.341 | 3.659 |
| 1.5 | 7.034 | 2.966 | 3.698 | 1.497 | 2.838 | 7.162 |
| 2.5 | 5.005 | 4.995 | 2.641 | 2.5081 | 4.846 | 5.154 |
---
>[!table] Measured vs Expected Source Current
>| Calculated Load Resistance ($k\ohm$) | Measured Load Resistance ($k\ohm$) | Percent Error | Measured V<sub>out</sub> (V) | Measured I<sub>R</sub> (mA) | Expected I<sub>R</sub> (mA) | Percent Error |
| ------------------------------------ | ---------------------------------- | ------------- | ---------------------------- | ---------------------------------- | --------------------------- | ------------- |
| 100k | 99,852 | 0.148% | 2.44 | 0.505 | 0.51 | 0.980% |
| 4.7k | 4,702.2 | 0.047% | 1.623 | 0.667 | 0.68 | 1.912% |
| 10 | 9.954 | 0.46% | 0.00968 | 1.012 | 1.030 | 1.748% |
| 0 | 0.072 | undefined | 0.008 | 1.016 | 1.032 | 1.550% |
---
- Possible potentiometer benefits
- Allows output voltage to be quickly adjusted
- Makes it easy to observe loading effects w/o going thru process of changing resistors
- Works w/o software
- Smooth adjustments possible
- Possible potentiometer disadvantages
- Small adjustments make noticeable voltage changes
- Wiper degradation over time
- Large size
- Use cases
- Calibration & trimming
- User controls
- Prototyping
- Simple systems where digital control isn't necessary
# II. Voltage Division w/ LDR
> [!table] Measured LDR Resistance at Different Light Levels
> | Light level (Normal, high, low) | Measured Resistance ($k\ohm$) |
| --- | --- |
| Low | 6.8 |
| Normal | 1.33 |
| Bright | 0.36 |
---
$\text{Voltage divider equation: }V_{out}=V_{in} \frac{R_{2}}{R_{1}+R_{2}}\to \text{using }R_{1}=1.33k\Omega,\text{ ideal resistance }R_{2}=680\Omega \approx670\Omega$
---
<div style="page-break-after: always;"></div>
>[!figures] LDR Voltage Divider Schematic
>![[circuit (2).png|center|350]]
---
> [!table] LDR Output Voltages vs. Light Level
> Determined location of LDR: $R_{2}$
>
> | Light Level | V<sub>out</sub> (V)|
> | ----------- | ------------------- |
> | Low | 4.72 |
> | Medium | 3.19 |
> | High | 0.721 |
---
- Voltage divider worked as expected -> when LDR switched w/ $R_{1}$, circuit response is inverted b/c $V_{out}$ depends on which resistor is connected to the supply & which is connected to the ground.
- Changing position from top <-> bottom changes whether increasing environmental light causes $R_{L}$ to increase/decrease
---
<div style="page-break-after: always;"></div>
# III. Making the Relay Work with the Voltage Divider
>[!figures] LDR-controlled Relay Module for Automatic Lamp Switching
>![[circuit (1).png|center|500]]
---
- Turn on voltage (V): 1.807V
- Turn off voltage (V): 2.033V
- $V_{off}>V_{on}$ makes sense because when going from dark -> light environmental lighting, more voltage is required as resistance is increased