The purpose of this paper is twofold. The first purpose is to detect M-peaks from raw photoplethysmography (PPG) signals with no preprocessing method applied to the signals. The second purpose is to estimate heart rate variability (HRV) by finding the peaks in the PPG signal. HRV is a measure of the fluctuation of the time interval between heartbeats and is calculated based on time series between strokes derived from electrocardiogram (ECG), arterial pressure (AP), or PPG signals, separately. PPG is a method widely used to measure blood volume of tissue on the basis of blood volume change in every heartbeat. In the estimation of the HRV signal from the PPG signal, HRV is calculated by measuring the time intervals between the peak values in the PPG signal. In the present paper, a novel peak detection algorithm was developed for PPG signals. Finding peak values correctly from PPG signals, the HRV signal can be estimated. This peak detection algorithm has been called an adaptive segmentation method (ASM). In this method, the PPG signals are first separated into segments with sample sizes and then the peak points in these signals are detected by comparing with maximum points in these segments. To evaluate the estimated pulse rate and HRV signals from PPG, Poincare plots and time domain features including minimum, maximum, mean, mode, standard deviation, variance, skewness, and kurtosis values were used. Our experimental results demonstrated that ASM could be even used both in the estimation of HRV signals and to detect the peaks from raw and noisy PPG signals without a pre-processing method.