Foundations to Frontier
Tests
A. Mathematical Foundations › A13 Physics for Robotics and AI

Basic Electricity and Magnetism for Motors and Sensors

Robots and spacecraft run on electricity: batteries feed motors, and sensors turn the physical world into voltages. This topic covers charge, Coulomb's law, electric fields and potential, current, Ohm's law and power, resistor networks and voltage dividers, capacitors and RC time constants, magnetic forces on currents, induction (Faraday's law), and how these become DC motors (τ = K i, back-EMF = K ω) and sensors (Hall effect, strain-gauge bridges, magnetometers). In the research exercise you model a robot-joint DC motor's electrical and mechanical dynamics and show that maximum power comes at half the no-load speed, with only 50% efficiency.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Pushing charges around

Electric charge comes in two kinds, positive and negative; opposites attract. A battery pushes charges around a loop of wire: the push is the voltage (volts), the flow is the current (amperes), and anything that resists the flow has resistance (ohms). Moving charges also make magnetism. Put a current-carrying wire in a magnet’s field and it gets pushed sideways. That push is what spins every electric motor.

Inside a robot's DC motor: torque, speed, power and efficiency
speed (rad/s) →torque (solid)mechanical power (dashed)τ_m = 9.6 msspin-up from rest (time) →
speed 192 rad/s (1833 rpm) · current 2.00 A · mechanical power 19.2 W of 24.0 W drawn · efficiency 80% · max power 30.0 W at 120 rad/s
Current makes torque (τ = K i), and spinning makes a back-voltage (K ω) that opposes the supply. At stall there is no back-EMF, so the current is huge and the motor just heats up. With no load it spins until back-EMF almost equals the supply. Halfway between, it delivers the most power but wastes half as heat; robots run motors well above that speed (through gearboxes) for efficiency. A Hall-effect sensor or encoder measures the speed for control.
Why engineers care

Every robot joint, drone propeller and rover wheel is driven by an electric motor. Every IMU, magnetometer, encoder and force sensor turns physics into a voltage. Sizing batteries and wires, protecting electronics from current spikes, and choosing motors and gearboxes all need these basics. Spacecraft also use magnetic torquers that push against Earth’s magnetic field.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Current is measured in…
  2. 2. A current-carrying wire in a magnetic field feels…
  3. 3. Opposite charges…

Level 1: Beginner

★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.

Charges, fields and potential

  • Coulomb’s law: F=kq1q2/r2F = kq_1q_2/r^2, with k≈8.99×109k\approx8.99\times10^9 N·m²/C². Two 1 µC charges 10 cm apart push with 0.90 N.
  • The electric field is force per unit charge, E=F/q\mathbf E = \mathbf F/q. The potential (voltage) is energy per unit charge, so 1 V = 1 J/C.

Circuits

  • Ohm’s law: V=IRV = IR. Power: P=VI=I2R=V2/RP = VI = I^2R = V^2/R.
  • Resistors in series add: R=R1+R2R = R_1 + R_2. In parallel, 1/R=1/R1+1/R21/R = 1/R_1 + 1/R_2.
  • A voltage divider gives Vout=VinR2/(R1+R2)V_{\text{out}} = V_{\text{in}}R_2/(R_1 + R_2). That’s how many sensors’ resistance changes become voltages.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Current through 4 Ω across 12 V:
  2. 2. 6 Ω in parallel with 3 Ω:
  3. 3. Power drawn at 12 V and 3 A:

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.

Capacitors and time constants

A capacitor stores charge: Q=CVQ = CV. Charging through a resistor follows v(t)=V(1−e−t/RC)v(t) = V(1 - e^{-t/RC}), reaching 63% after one time constant τ = RC and essentially full after 5τ. RC circuits filter sensor noise (a10-5) and set timing.

Magnetism and induction

  • Force on a current: F=IL×B\mathbf F = I\mathbf L\times\mathbf B; for a perpendicular wire, F = BIL. Lorentz force: F=q(E+v×B)\mathbf F = q(\mathbf E + \mathbf v\times\mathbf B).
  • Faraday’s law: a changing magnetic flux induces a voltage, E=−dΦ/dt\mathcal E = -d\Phi/dt. This drives generators, transformers and a motor’s back-EMF.

The DC motor

A brushed DC motor has torque τ=Ki\tau = Ki and back-EMF e=Kωe = K\omega (the same K in SI units). Its equations are

Ldidt=V−Ri−Kω,Jdωdt=Ki−bω−τload.L\frac{di}{dt} = V - Ri - K\omega,\qquad J\frac{d\omega}{dt} = Ki - b\omega - \tau_{\text{load}}.
  • Stall torque is KV/RKV/R and no-load speed is V/KV/K. Torque falls linearly with speed between the two.
  • The electrical time constant is L/R and the mechanical one is JR/K2JR/K^2. The current responds first; the speed follows.

Sensors

  • Strain gauges change resistance in proportion to strain (gauge factor ≈ 2). A Wheatstone bridge turns that into a few millivolts.
  • Hall sensors measure magnetic field, used in encoders, current sensing and compasses. Magnetometers measure Earth’s field for heading and for spacecraft attitude.
🐍 Exercise 1: circuits and sensors
Implement series and parallel resistance, a voltage divider, RC charging (formula and simulation), a quarter Wheatstone bridge for a strain gauge, and Coulomb's law. Check the 63% time-constant rule and the bridge's millivolt output.
📝 Quick check (Level 2)
0/3 answered
  1. 1. RC time constant of 1 kΩ and 10 µF:
  2. 2. A DC motor's back-EMF is proportional to…
  3. 3. At stall, a DC motor's current is…

Level 3: Advanced

★★★★☆ Advanced⏱ 35 minGraduate level, with full derivations and proofs.

Steady-state motor speed

Set the derivatives to zero: V=Ri+KωV = Ri + K\omega and Ki=bω+τKi = b\omega + \tau. Eliminating i gives ω=(KV−Rτ)/(K2+Rb)\omega = (KV - R\tau)/(K^2 + Rb). ∎ With b = 0 this is the linear torque–speed line.

Maximum power

With τ=K(V−Kω)/R\tau = K(V - K\omega)/R, the power is P=τω=(K/R)(Vω−Kω2)P = \tau\omega = (K/R)(V\omega - K\omega^2). It peaks where V=2KωV = 2K\omega, at half the no-load speed, with Pmax⁡=V2/(4R)P_{\max} = V^2/(4R). There, Pelec=VI=V2/(2R)P_{\text{elec}} = VI = V^2/(2R), so efficiency is 50%. ∎

RC charging

Cv˙=(V−v)/RC\dot v = (V - v)/R has solution v=V(1−e−t/RC)v = V(1 - e^{-t/RC}): separable, first order (a9-1). ∎

📝 Quick check (Level 3)
0/3 answered
  1. 1. Where does an ideal DC motor deliver maximum mechanical power?
  2. 2. Efficiency at maximum power:
  3. 3. The mechanical time constant of a DC motor is…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

A robot-joint motor, simulated

The motor has R = 1.2 Ω, L = 0.5 mH, K = 0.05 N·m/A and J = 2 × 10⁻⁵ kg·m². At 12 V:

  • Spin-up: it settles at 239 rad/s (2281 rpm). Current spikes to 9.0 A (near the stall value V/R = 10 A) and falls to 0.05 A at speed.
  • Time constants: τ_e = 0.42 ms is much shorter than τ_m = 9.6 ms. The simulated speed reaches 63% at 9.6 ms.
  • Torque and power: stall torque is 0.50 N·m. Maximum mechanical power is 30.0 W at 120 rad/s, where efficiency is 50%. A 0.2 N·m load slows the motor to the speed predicted by the torque–speed line.

Real robot designs gear down a fast, efficient motor to get torque at the joint, limit inrush current electronically, and model winding heating, which limits continuous torque far below stall (Hughes and Drury, 2019).

🐍 Exercise 2 (research): DC motor dynamics
Simulate a DC motor's coupled electrical and mechanical equations. Check the steady speed, the two time constants and the inrush current, then map the torque–speed, power and efficiency curves and verify maximum power at half the no-load speed.

Electromagnetism in AI, robotics and aerospace

  • Actuation: brushed, brushless (BLDC) and stepper motors; field-oriented control; current loops at tens of kHz inside every servo.
  • Sensing: encoders, Hall sensors, strain-gauge force/torque sensors, magnetometers; noise and filtering (a10-5).
  • Spacecraft: magnetorquers for momentum dumping (a13-7), solar-array power, and harnesses designed to minimize magnetic disturbance.
  • Energy: battery internal resistance and I²R losses set drone endurance and peak power.

References

  1. D. Halliday, R. Resnick, J. Walker (2018). Fundamentals of Physics, 11th ed. Wiley.
  2. A. Hughes, B. Drury (2019). Electric Motors and Drives, 5th ed. Newnes.
  3. P. Horowitz, W. Hill (2015). The Art of Electronics, 3rd ed. Cambridge.
  4. J. Fraden (2016). Handbook of Modern Sensors, 5th ed. Springer.