This paper proposes a computerized heartbeat detection method in single-channel electrocardiograms (ECGs). First, the well-known Pan-Tompkins technique was implemented, and next, a channel-dependent version was developed, by adjusting threshold values and reducing false QRS detections. The algorithms were tested with the MIT-BIH Arrhythmia Database (original algorithm), and with the St. Petersburg Database (modified version). When validating the performances of the original Pan-Tompkins algorithm, we have achieved a sensitivity of Se = 99.81, at a positive predictivity (P+) = 99.85%. The F-Score was 0.9587, and the RMS RR Interval Error (RMSRRIE) resulted to be 4,480.46 ms. When analysing the performance of the modified algorithm, results provided an average value of Se = 99.92%, P+ = 99.98%, F-Score = 0.9718, and a mean value of 111.05 ms. for the RMSRRIE. In conclusion, the improved Pan-Tompkins algorithm provides higher values for sensitivity and positive predictivity, increased F-Score, and it significantly reduces the temporal error when estimating the positions of QRS complexes. Thus, it could be used as a starting point to detect heartbeat positions in more sophisticated computerized detection systems.