This paper presents an R peak detection algorithm for ECG signals based on the second derivative. Such R peak detection techniques offer low average time error and are computationally inexpensive. However, previously proposed methods based on the second derivatives suffer from low sensitivity and positive predictivity. In this study, we introduce a new mechanism at the peaks detector stage to resolve the aforementioned issues. We compared our proposed algorithm to an existing one that is also based on second derivative. The obtained results show an improvement in terms of sensitivity and positive predictivity, while maintaining a low average time error.