Detecting Atmospheric Tides Using Arduino

by AlbertoVillalobos in Teachers > 9

192 Views, 3 Favorites, 0 Comments

Detecting Atmospheric Tides Using Arduino

Presion vs Tiempo Portada.jpg
Resumen.png
The Atmosphere's Tides

There are variations in the environmental conditions of our surroundings to which we are very accustomed, such as the cycles of light and darkness caused by the rotation of the earth, which we know as day and night; the seasonal changes in temperature and vegetation around us due to our planet's movement in its orbit around the sun; or the rise and fall of sea levels due to the tide effect caused mainly by the gravitational pull of the sun and the moon.

These natural cycles are not beyond our perception, as they strongly impact our senses.

However, there are many other natural cycles whose effects are barely noticed and thus go practically unnoticed by most people.

This is the case of atmospheric tides, which are periodic variations in air pressure that occur every day, similar to the tides of the sea, but in the atmosphere, and are mainly due to daily solar heating, mainly in the troposphere and stratosphere due to the absorption of solar radiation (water vapor, ozone), and to a lesser extent to the gravitational pull of the moon.

Atmospheric tides can be classified as migratory and non-migratory. Migratory tides move westward following the position of the Sun, like a ripple that travels through the atmosphere around the planet. Non-migratory tides, on the other hand, remain almost fixed in certain regions and depend on factors such as the distribution of continents, oceans, and clouds.

These tides can be diurnal or semidiurnal and are composed of different harmonics, that is, secondary frequencies resulting from how the atmosphere responds to solar heating and other stimuli.

As these waves rise to higher layers, such as the mesosphere and thermosphere, the amplitude of the tides increases due to the decrease in air density; therefore, their effects are more noticeable at higher altitudes.

Although the tidal atmospheric pressure changes are small, they have significant effects. They regulate wind patterns, temperature, and global circulation. They also influence the propagation of atmospheric waves and the stability of the climate at different levels of the atmosphere.

Its influence can even extend to biology: many organisms sensitive to environmental pressures and rhythms, such as migratory birds or insects, use these cycles as indirect signals that help coordinate seasonal movements.

The present Instructable is about measuring these changes in atmospheric pressure using digital barometric pressure measurements with the aim of highlighting this natural cycle that occurs around us and goes almost unnoticed by our senses.

Supplies

Arduino MKR Wifi 1010.jpg
Sensor de presion BMP180.jpg
DHT11-Sensor de humedad y temperatura.jpg
Male Male jumpers.png
Cleear Breadboard.jpg

Hardware:

  1. 1 Arduino MKR WiFi 1010 with micro USB cable
  2. 1 BMP180 Bosch barometric pressure/temperature sensor
  3. 1 DHT11 Relative Humidity Sensor Module (AOSONG)
  4. 1 Clear breadboard (8.3 x 5.5 cm)
  5. 4 Male/Male jumpers wire
  6. 1 Laptop with Windows operating system


Sofware:

  1. Arduino IDE (Integrated Development Environment) version 1.8.2
  2. Arduino library for BMP180 Bosch barometric pressure/temperature sensors
  3. Arduino Library for DHT11 Sensor Module
  4. Processing version 2.2.1
  5. GUI design library for Processing G4PTool V2.5
  6. GUI desing library for Processing G4P V3.5.2
  7. Java 7 or higher


Data Analysis Software:

  1. Past 5.0.2


Pro Tip 1: The hardware setup shown is for measuring atmospheric pressure, temperature, and relative humidity, but since the only thing of interest to measure in this Instructable is atmospheric pressure, the relative humidity sensor and all its connections can be omitted without affecting the capture of atmospheric pressure data from the application created in Processing (EnvCondLog_2025), as long as the code for programming the Arduino MKR WiFi 1010 (Step 1) remains unchanged.

Arduino Connections and Code

Esquema_Arduino_Final_1.jpg
Arduino y conexiones.jpg
Configuracion Arduino y App para Laptop 2.jpg

The configuration of the measuring device is very simple since it only consists of the BMP180 atmospheric pressure sensor, which is the property we are interested in measuring, and the Arduino microcontroller, which will capture the data and transmit it to the laptop via a USB cable connection.

The data is then graphed and saved to a text file for later analysis, using an application written in Processing V2.2.1 and the G4PTool V2.5 and G4P V3.5.2 tools (EnvCondLog_2025).

This application was created to be used as a weather station, so it is designed to receive data from the Arduino on atmospheric pressure, temperature, relative humidity, and altitude.

However, for the purposes of this Instructable, we will focus only on atmospheric pressure data.

Attached to this Step are the connection diagram of the Arduino – BMP180 - DHT11 sensor system, as well as the code used to program the Arduino (Registro_Meteorologico_2025.ino).

/*
* Registro_Meteorologico_2025
* Versión 1.1
* Arduino IDE 1.8.19
* 16/11/2025
* Pressure, temperature, and relative humidity logger designed to send data
* to an environmental data capture application built in Processing
* Alberto Villalobos
*/

#include <SFE_BMP180.h>
#include <dht.h>

#define dht_apin A1 // Analog Pin sensor is connected to

dht DHT;

SFE_BMP180 bmp180;

double PresionNivelMar=1013.25; //pressure at sea level in mbar

double CT = 0; // Correction of temperature compared with reference thermometer
double CP = 0; // Correction of barometric pressure compared to reference barometer
double CHR = 0; // Correction of relative humidity compared with reference hygrometer

void setup()
{
Serial.begin(9600);
bmp180.begin();
}

void loop()
{
DHT.read11(dht_apin);
char status;
double T,P,A;

status = bmp180.startTemperature();// Start of temperature reading
if (status != 0)
{
delay(status); // Pause to allow the reading to finish
status = bmp180.getTemperature(T); // Get the temperature
if (status != 0)
{
status = bmp180.startPressure(3);// Start pressure reading
if (status != 0)
{
delay(status);// Pause to allow the reading to finish
status = bmp180.getPressure(P,T);// We get the pressure
if (status != 0)
{

// -------Altitude calculation--------

A= bmp180.altitude(P,PresionNivelMar);

Serial.print(T + CT);Serial.print(",");Serial.print(P + CP);Serial.print(",");Serial.print(DHT.humidity + CHR);Serial.print(",");Serial.println(A);

}
}
}
}
delay(60010);// 1000 is 60 data per minute, 20000 is 3 data per minute, 60010 is one data per minute
}

Digital Logbook to Record Measurements

Figura_1_Captura de Datos_3.png
Ejemplo de formato de datos salvados.jpg

In order to distinguish the variation in atmospheric pressure caused by the atmospheric tide from random changes caused by weather variations, it was decided to carry out continuous barometric pressure measurements for five consecutive days at a capture rate of one data point per minute, for a total of approximately 7200 data points.

To facilitate capture and viewing while this large amount of data were being captured, a PC application was used, programmed for this purpose using Processing version 2.2.1 and the GUI creation libraries G4PTool V2.5 and G4P V3.5.2. (EnvCondLog_2025).

The application receives the data measured by the Arduino via USB cable, at a capture rate determined from the Arduino programming by changing the value of delay() in the line at the end of the code (Step 1), so this value must be adjusted before starting the experiment.

}
delay(60010);// 1000 is 60 data per minute, 20000 is 3 data per minute, 60010 is one data per minute

The application can store up to 15,000 data points, so at a rate of one data point per minute, it can record for 10.4 continuous days.

The application interface, shown in this Step, is designed to receive measurements of atmospheric pressure, temperature, relative humidity, and altitude (which is calculated from barometric pressure), so a barometric pressure sensor (which also measures temperature) and a relative humidity sensor are required.

However, as mentioned in Step 1, since what interests us in this Instructable is only atmospheric pressure, it could be possible not to install the relative humidity sensor, which would not affect the functioning of data transmission, as long as the Arduino code remains unchanged.

Having made the previous clarification, we can see that the application interface consists of four main sections.

In the top left corner are the controls for:

Start: to start the application from scratch

Reboot: to restart it without exiting the application

Save: to save the captured data file

and

Exit: to permanently exit the application,

as well as a space to enter the name under which the data is to be saved (Name to Save File).

The data is stored in an Excel-type text file (see attached image).

At this point, it should be noted that in the lower left corner there are two parameters that must be selected before starting the application:

Port: which is the port available on the PC for data acquisition, in my case it is 2, but it depends on the peripherals connected to the PC

and

Baud rate Arduino: which is the selected data transmission speed from the Arduino to the PC, which must be the same as the one set in the Arduino code (Serial.begin(9600) ) (Step 1).

void setup()
{
Serial.begin(9600);
bmp180.begin();

The rest of the controls shown at the bottom of the application are related to the dimensions, layout, and type of data that are displayed in the central part of the application screen.

In this way:

Polarity: indicates whether the graph will display the data from lowest to highest or vice versa

Grid (On Off): whether the grid is shown on the graphing screen or not

Zero: move the graphs of atmospheric pressure, temperature, and relative humidity together in the vertical direction

Horiz.Displacement: move the previous graphs in the horizontal direction

Horiz.Expansion: expand the previous graphs in the horizontal direction

Reset: return to the original position and expansion values

Atm.Pres, Temp., Rel.Humid. (On Off): whether the graphs of atmospheric pressure, temperature, and relative humidity are visible or not

Sep.Graphs.(AP, T, RH): moves the graphs of atmospheric pressure, temperature, and relative humidity independently in the vertical direction

Scale (AP, T, RH): expands the graphs of atmospheric pressure, temperature, and relative humidity independently

A yellow cursor can also be seen over the graphing area, which, when dragged over the graphs, provides the values of date (day/month/year), time (hour:minutes:seconds), and the specific measurements of atmospheric pressure, temperature, and relative humidity. These data can be viewed in the lower right corner, at the edge of the measurement area.

Finally, in the upper right corner, the measured values for atmospheric pressure, temperature, relative humidity, and altitude appear, as well as the amount of data captured (N° Data (k)), the time elapsed since the capture started (Time Capturing (min)), the sampling rate (Data/min (Rc)), and a field to indicate the number of minutes you want to measure (Final Capture Time (TF)), a time which, once reached, triggers the saving of the data (600 minutes by default) with the name assigned to the file. If no name is assigned, the file will be saved with the name “Unnamed File”.

In the following link, you can download not only the .exe executable file for the described application but also the source code (EnvCondLog_2025).


Pro Tip 2: To determine which port to select in the application, it is recommended to do the initial tests by selecting a delay(100) in the Arduino code to quickly see the app's response without having to wait for the originally programmed one-minute data interval (delay(60010)).

Measurements and Data Analysis

Presion vs Tiempo Past_2_Final.jpg
Periodograma_2.jpg
Rango de variacion de presion.jpg
Presion vs Tiempo Dias Separdos_Final_2.jpg

Barometric pressure measurements (mBar) were continuously taken between November 17 and November 22, 2025, at an approximate altitude of 1220 m in a mountainous region of inland Costa Rica known as the Valle Central, near 9.904° latitude and -84.007° longitude.

The data capture rate was one reading per minute, totaling 7,450 readings from 11:47 AM on the first day to 4:08 PM on the last day and the measuring equipment was placed in a non-air-conditioned room.

The variation in atmospheric pressure during this period of time can be seen in the first graph attached to this Step (Variation of Atmospheric Pressure Over Time), where daytime measurements are shown in blue (6:00 AM – 6:00 PM) and nighttime measurements in red (6:00 PM – 6:00 AM) (Plot>Graphs Past 5.0.2).

Note: The data used to generate the previous graph and the next two can be found in the following file in Past format: Figures Data_Past_5_0_0 Format.dat.

The first thing observed from this graph is that there is a periodic variation in barometric pressure in an approximately sinusoidal pattern, with a maximum and a minimum during the daytime hours as well as a maximum and a minimum during the nighttime hours.

If observed in more detail, it can be seen that the graph is not smooth but has small peaks and valleys that are distributed unevenly along the main sinusoidal graph, which could suggest that there may be other cyclic processes with different periods in the phenomenon being studied.

To clarify the above, a mathematical tool known as a Periodogram (Timeseries>Spectral analysis>Simple periodogram Past 5.0.2) is used, which allows identifying patterns or regular fluctuations in time series data.

In this way, if we look at the following figure in this Step (Periodogram For Temporal Measurements Of Atmospheric Pressure), we can see how atmospheric pressure indeed shows several well-defined cycles with the following periodicity:

  1. Main cycle: 11.9 hrs
  2. Secondary cycles: 24.87 hrs and 33.16 hrs
  3. Broad secondary cycle: 90.43 hrs

in addition to at least three additional cycles of very small amplitude.

It is also observed in the first figure that there is a trend for the overall curve to decrease the intensity of these maxima and minima over time.

In the third figure (Variation Of Atmospheric Pressure In Relation To The Best-Fit Linear Regression Curve), the previously mentioned temporal variation has been compensated using the values obtained by applying the least squares regression curve equation (Model>Linear>Bivariate regression Past 5.0.2) to the measurement time values (Plot Residuals).

This way, it is clearly observed that the daytime highs and lows are, in general terms, more pronounced than the nighttime ones, with the maximum range of atmospheric pressure variation being ± 2.5 mBar.

In the fourth figure (Comparison Of Atmospheric Pressure Variation Over Five Consecutive Days), it can be observed that the maxima and minima, both during the day and at night, occur at approximately the same time ranges for all the measured days.

Note: The data used to generate the previous graph can be found in the following file in Excel format: Atmospheric pressure measurements_5 days.xlsx.

Day:

  1. Maximum: around 8:40 AM
  2. Minimum: around 2:50 PM

Night:

  1. Maximum: around 9:00 PM
  2. Minimum: around 3:00 AM


Conclusions

ChatGPT Image 6 dic 2025, 05_38_47 p.m..png

Continuous barometric pressure measurements conducted over five days in the Central Valley of Costa Rica reveal a clearly periodic behavior of atmospheric pressure on a local scale.

The initial analysis shows an almost sinusoidal oscillation with well-defined highs and lows both during the day and at night, indicating the presence of recurring atmospheric cycles.

However, the presence of small irregularities on the main curve suggests that multiple processes with different time scales simultaneously influence the measured pressure.

The use of the periodogram confirms this complexity: in addition to a dominant cycle close to 12 hours, other significant cycles emerge —approximately 24.9, 33.2, and 90.4 hours— along with minor oscillations barely detectable.

This multi-component structure aligns with the known nature of atmospheric tides, where thermal and dynamic interactions generate overlapping harmonics.

The application of a linear regression allowed for correcting a downward trend in the amplitude of the oscillations, revealing that diurnal variations are systematically more intense than nocturnal ones, reaching an overall amplitude close to ±2.5 mBar.

Furthermore, the comparison between successive days shows remarkable temporal stability: the pressure peaks and troughs repeat almost at the same time each day, with maxima around 8:40 AM and 9:00 PM, and minima around 2:50 PM and 3:00 AM.

Overall, the results confirm that atmospheric pressure during this period is modulated by several well-defined periodic cycles, dominated by semidiurnal and diurnal oscillations, whose temporal coherence and amplitude provide strong evidence of the presence of the phenomenon known as the atmospheric tide.