A crankshaft is a shaft in an internal combustion engine that converts linear motion into rotary motion. It is connected to the pistons in the engine and turns as the pistons move up and down. The crankshaft is connected to the flywheel and the harmonic balancer, which help to smooth out the engine’s power pulses and reduce vibrations. The crankshaft position sensor, also known as a CPS sensor, is used to monitor the position and rotation speed of the crankshaft, and send that information to the engine control module (ECM) so it can adjust the ignition timing and fuel injection accordingly.