An electronic device includes one or more light sources for emitting light toward a body part of a user and one or more optical sensors for capturing light samples while each light source is turned on and for capturing dark samples while the light source(s) are turned off. A signal produced by the one or more optical sensors is filtered and demodulated produce multiple demodulated signals each associated with a light source. Each signal associated with the light source(s) is analyzed to estimate or determine a physiological parameter of the user.