A common sensor used in automatic dispensers is an infrared (IR) proximity sensor, which detects the presence of an object to trigger the dispensing mechanism.