A Sun sensor measures the direction of the Sun relative to the spacecraft — from crude "is it sunlit?" cells to precise two-axis detectors. Cheap, rugged and unambiguous, it anchors safe modes and initial attitude acquisition on virtually every satellite flown.
Understanding Sun Sensor
From photocell to imaging mask
Coarse sensors are geometry: cosine cells singly or in pyramids, sometimes just the solar arrays themselves read as sensors. Fine sensors project sunlight through a precisely etched mask onto a line or area detector; the illuminated pattern's position encodes two angles, with centroiding delivering the precision. Between them sit mid-grade quadrant sensors — four cells behind one aperture — balancing simplicity and accuracy for CubeSat budgets.
The safe-mode covenant
Spacecraft fault protection is designed around a promise: whatever fails, the vehicle can reach a power-positive, thermally safe, ground-contactable state using only its most primitive equipment. Sun sensors are that promise's cornerstone — the safe-mode loop reads them directly, torques the vehicle Sun-ward, and waits. Many a mission owes its continued existence to a few unpowered photocells doing exactly this while cleverer systems rebooted.