A field team faces an unresolved physical question: How does a GPIO command a 300 mA fan safely? They must answer it before changing fan current on the real device. Predict the direction first.
See the relationship before changing it
The figure reads from left to right. The blue card is fan current. The middle card applies this page's relationship. The green card is gpio overload ratio. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
The retained audit below checks several chapter fixtures. This added model holds every other chapter fixture fixed, so the numeric fixture does not switch without explanation.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline for fan current is 300.
- 2
Name the relationship. GPIO ratio=300/12=25.0x Ib=300/100=3.00 mA Rb=(3.3-0.7)/0.003=867 ohm PMOSFET=(0.300)²(0.022)=1.98 mW ADC thresholds: 30°C→372, 28°C→347, gap=25 counts
- 3
Substitute the chapter fixture. Set fan current to 300. The page ledger gives gpio overload ratio as 25.00 times.
- 4
Read the result. Keep times beside the value. Use it only inside the technical boundary on this page.
Predict, then change fan current
Try Predict the direction of gpio overload ratio. Move one control, calculate, then check your prediction.
Observe The control varies the power path while preserving the sensing contract, making clear which values belong to load selection and which belong to temperature measurement. Reset the control to 300 and compare gpio overload ratio.
Explain Only fan current moves here. The other chapter fixtures remain fixed.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
1. Start with the physical story
The GPIO supplies information and a small drive current. The transistor controls a separate path that carries fan current. A BJT needs base drive; a MOSFET dissipates channel loss. Separately, the ADC turns LM35 voltage into the counts that command on/off thresholds.
2. Name every algebra move
Compare current limitsDivide load current by 12 mA.
Estimate BJT driveIb=Ic/β, then Rb=(3.3−0.7)/Ib.
Estimate MOSFET heatP=I²RDS(on).
Cross-check relay currentI=12 V/400 Ω.
Map temperature to codesUse 10 mV/°C and a 12-bit 3.3 V ADC.
3. Reproduce the chapter case
Ib=300/100=3.00 mA
Rb=(3.3−0.7)/0.003=867 Ω
PMOSFET=(0.300)²(0.022)=1.98 mW
ADC thresholds: 30°C→372, 28°C→347, gap=25 counts
The calculations explain the chapter's approximate 820 Ω standard BJT resistor and tiny nominal MOSFET conduction loss, but neither number alone selects the switch.
4. Try one real input
TryMove fan current from light load toward stall and predict drive and heat.
ObserveLoad ratio and base current rise linearly; the base-resistor estimate falls; MOSFET conduction loss rises with current squared. ADC thresholds stay fixed.
ExplainThe control varies the power path while preserving the sensing contract, making clear which values belong to load selection and which belong to temperature measurement.
This ledger uses nominal DC values and a forced-gain estimate, not a transistor qualification.
- Switch
- Check stall/inrush, SOA, VGS drive, saturation, gain spread, switching loss, and thermal derating.
- Load path
- Supply sag, wiring, flyback protection, EMI, connector, and fuse ratings matter.
- Sensing
- ADC calibration, attenuation, reference error, LM35 accuracy, noise, and hysteresis timing matter.
Correct, not complete: this ledger does not qualify a transistor, relay, fan path, or temperature controller.
5. Use the result in the design
Design for stall current and switching transients, choose a logic-level switch with thermal margin and protection, then calibrate the LM35/ADC path and verify hysteresis under noise.
6. Record the evidence state
Record fan running/stall current, supply sag, GPIO drive, switch part/temperature/loss, protection waveform, ADC calibration, sensor error/noise, threshold counts, and measured switching behaviour.
7. Check yourself
Why is the 300 mA fan not a direct GPIO load?
Why does MOSFET loss rise faster than current?
Does the 867 Ω estimate qualify a 2N2222?
The arithmetic reproduces the chapter's 300 mA fan, β=100, 22 mΩ MOSFET, 400 Ω relay, and 30°C/28°C ADC examples.
- Switch
- Check stall/inrush, SOA, VGS drive, saturation, gain spread, switching loss, and thermal derating.
- Load path
- Supply sag, wiring, flyback protection, EMI, connector, and fuse ratings matter.
- Sensing
- ADC calibration, attenuation, reference error, LM35 accuracy, noise, and hysteresis timing matter.
Correct, not complete: this ledger does not qualify a transistor, relay, fan path, or temperature controller.
Eddie guides