An electric soap dispenser (10, 10A, 10B) comprising: a housing (12, 12A, 12B); a power supply (60, 60A, 60B) supported by the housing (12, 12A, 12B); a reservoir (16, 16A, 16B) configured to store liquid soap, the reservoir (16, 16A, 16B) being supported by the housing (12, 12A, 12B); a pump (18, 18A, 18B) disposed in the housing (12, 12A, 12B), the pump (18, 18A, 18B) having an inlet connected to the outlet of the reservoir (16, 16A, 16B); an electric motor (34, 34A, 34B) supported by the housing (12, 12A, 12B) and driving the pump (18, 18A, 18B), the electric motor (34, 34A, 34B) being powered by the power supply (60, 60A, 60B); a soap discharge nozzle (28, 28A, 28B) connected to the pump (18, 18A, 18B) with a soap conduit and disposed in the housing (12, 12A, 12B); a sensor device (32, 32B) comprising a light emitting portion and a light receiving portion, the sensor device (32, 32B) configured to detect the presence of an object based on light from the light emitting portion that the object reflects back to the light receiving portion, the sensor device (32, 32B) further configured to detect, with the light receiving portion, an amount of ambient light; and an electronic control unit (46, 46B) connected to the sensor device (32, 32B) and to the electric motor (34, 34A, 34B), the electronic control unit (46, 46B) comprising an ambient light read module configured to read ambient light values when the object is not near the sensor device (32, 32B) and to store the values corresponding to the ambient light detected by the sensor device as calibration values, the light read module comprising a routine that compares the calibration values to detected light reflection values received from the sensor device (32, 32B) for light reflected back from the object to decrease the occurrence of false triggers; wherein the electronic control unit (46, 46B) is configured to actuate the electric motor (34, 34A, 34B) upon receiving a signal from the sensor device (32, 32B) and determining that the detected light reflection values are more intense than the calibration values, the actuation of the electric motor (34, 34A, 34B) driving the pump (18, 18A, 18B) to dispense a predetermined amount of liquid soap from the nozzle (28, 28A, 28B). a housing (12, 12A, 12B); a power supply (60, 60A, 60B) supported by the housing (12, 12A, 12B); a reservoir (16, 16A, 16B) configured to store liquid soap, the reservoir (16, 16A, 16B) being supported by the housing (12, 12A, 12B); a pump (18, 18A, 18B) disposed in the housing (12, 12A, 12B), the pump (18, 18A, 18B) having an inlet connected to the outlet of the reservoir (16, 16A, 16B); an electric motor (34, 34A, 34B) supported by the housing (12, 12A, 12B) and driving the pump (18, 18A, 18B), the electric motor (34, 34A, 34B) being powered by the power supply (60, 60A, 60B); a soap discharge nozzle (28, 28A, 28B) connected to the pump (18, 18A, 18B) with a soap conduit and disposed in the housing (12, 12A, 12B); a sensor device (32, 32B) comprising a light emitting portion and a light receiving portion, the sensor device (32, 32B) configured to detect the presence of an object based on light from the light emitting portion that the object reflects back to the light receiving portion, the sensor device (32, 32B) further configured to detect, with the light receiving portion, an amount of ambient light; and an electronic control unit (46, 46B) connected to the sensor device (32, 32B) and to the electric motor (34, 34A, 34B), the electronic control unit (46, 46B) comprising an ambient light read module configured to read ambient light values when the object is not near the sensor device (32, 32B) and to store the values corresponding to the ambient light detected by the sensor device as calibration values, the light read module comprising a routine that compares the calibration values to detected light reflection values received from the sensor device (32, 32B) for light reflected back from the object to decrease the occurrence of false triggers; wherein the electronic control unit (46, 46B) is configured to actuate the electric motor (34, 34A, 34B) upon receiving a signal from the sensor device (32, 32B) and determining that the detected light reflection values are more intense than the calibration values, the actuation of the electric motor (34, 34A, 34B) driving the pump (18, 18A, 18B) to dispense a predetermined amount of liquid soap from the nozzle (28, 28A, 28B).