Hi,
This is my first message to this forum so I hope I have landed in the correct place.
The below shot is of a cleaned up signal coming out of my motorbike crank shaft. this signal is made up of 23 pulses with a gap between each group of 23. The centre of that gap signifies when the piston connected to the shaft has reached the top of its stroke. The pulse width is determined by the current RPM of the engine. in the picture this was around 1700. The engine can rev up to above 10000 so pulse widths would be significantly shorter at these speeds. I would like to use a microcontroller such as an STM32 to be able to determine this TDC condition.
I would appreciate any suggestions to techniques of how to achieve this.
regards.

This is my first message to this forum so I hope I have landed in the correct place.
The below shot is of a cleaned up signal coming out of my motorbike crank shaft. this signal is made up of 23 pulses with a gap between each group of 23. The centre of that gap signifies when the piston connected to the shaft has reached the top of its stroke. The pulse width is determined by the current RPM of the engine. in the picture this was around 1700. The engine can rev up to above 10000 so pulse widths would be significantly shorter at these speeds. I would like to use a microcontroller such as an STM32 to be able to determine this TDC condition.
I would appreciate any suggestions to techniques of how to achieve this.
regards.

