The pH varies in different tissues and organelles and also changes during some diseases. In this regard, the application of molecular switches that use a competition-based aptamer switch design in biological systems requires studying the thermodynamics of such systems at different pH values. In this work, we studied the binding of the classical ATP aptamer to ATP and competition strands under different pH and ionic conditions using fluorescent melting curve analysis. We have developed an original approach to processing source data from a PCR thermal cycler. It is based on constructing a thermodynamic model of the melting profile and the subsequent fit of experimental curves within this model. We have shown that this approach enables us to narrow the temperature region under study to the width of the melting region without a significant loss in the quality of the result. This impressively expands the application area of this approach compared to frequently used techniques that require mandatory measurement of the signal outside the melting region. The results obtained by the method showed that the thermodynamic parameters of the ATP aptamer and its duplexes with competition strands change depending on pH. Therefore, molecular switches that use a competition strand to the ATP aptamer may have a pH-dependent sensitivity that has not been previously considered. This should be taken into account for future rational design of similar systems. © 2024 Elsevier B.V.