We have performed an experiment in which a conical sandpile was built by slowly dropping sand onto a circular disk through a funnel with a small outlet. Avalanches (sand dropping off the disk) occurred, the size and the number of which were observed. It was seen that the behavior of avalanches (frequency-size distribution) was determined solely by the ratio of grain size to disk size, which is consistent with earlier studies. We categorize the behavior into three types: (1) the self-organized criticality (SOC) type (obeying Gutenberg-Richter's law), (2) the characteristic earthquake (CE) type where only large avalanches are almost periodically generated, and (3) the transition type. The transition from SOC to CE type drastically occurs when the ratio of grain diameter to disk radius is reduced to about 0.02. The underlying mechanism to cause the transition is considered. Results of simulation by cellular automaton models, an experimental result showing that a conical pile has a stress dip near its center, and a two-dimensional simulation building up a conical pile, all suggest that the transition occurs due to a change in stress profile inside and near the surface of the pile. Although we are unfortunately not able to understand the detailed mechanism at the present stage, it seems very important to further investigate the underlying physics of the transition because it presumably provides us a clue to understand the mechanism of the periodicity of large characteristic earthquakes and may open a way for earthquake prediction.