An optical-encoded force sensor is disclosed. The optical-encoded force
sensor includes a cantilever probe having a probe tip, a set of
reflective phase gratings and multiple nano-photonic displacement
sensors. The reflective phase gratings are mechanically coupled to the
cantilever probe, and the nano-photonic displacement sensors are
mechanically coupled to the reflective phase gratings. In response to a
load being applied to the probe tip, the reflective phase gratings can be
compressed such that a diffraction order of the reflective phase gratings
changes according to the force of the applied load.