Simple beat detection algorithm for microcontroller
I did one very simple bpm calculation in matlab and maybe it can help you!

source

Steps:


Decompose the signal in six frequency bands (six level) using DWT
Extrac the Envelope from all sub-bands


To make the Envelope Calculation do you need:

Apply Full Wave Rectification
Apply Low Pass Filter
Apply Downsample
Apply Mean Removal


Autocorrelation