Located on the front timing cover next to the intake and exhaust cam VANOS solenoids, not to be confused with the crankshaft position sensor located on the bottom of the engine near the bell housing, they look similar but are not interchangeable
1 Series M, 128i, 135i, 135is, 325i, 325xi, 328i, & more