A cable includes an electrical connector at one end and a sensor at the other end. The connector includes a terminal module having a plurality of contacts embedded within an insulator wherein each contact has a resilient contacting section exposed upon to an exterior in a first vertical direction, and a soldering section exposed in a second vertical direction to be connected to the corresponding wires of the cable and selectively further to a resistor. The sensor includes a case enclosing an LED (Light Emitting Diode) and a PD (Photo Diode both of which are respectively connected to the corresponding contacts respectively soldered to the corresponding wires.