Why is there a gap in the SD card data?

This article is for small gaps in the timestamps of SD data and serial data that can regularly occur once every 20 minutes. For situations where SD data appears to be missing, see the Reviewing SD Data section of our SD Card Logging and Troubleshooting article.

If your sensor can’t connect to PurpleAir, you may notice an interesting behavior in the timestamps of the data. The normal interval between data points is 2 minutes. However, once every 10 data points, the interval between samples will be slightly different (usually around 1:51). See the example below:

Count UTCDateTime (timestamp)
1 2022/10/03T00:05:40z
2 2022/10/03T00:07:40z
3 2022/10/03T00:09:40z
4 2022/10/03T00:11:40z
5 2022/10/03T00:13:40z
6 2022/10/03T00:15:40z
7 2022/10/03T00:17:40z
8 2022/10/03T00:19:40z
9 2022/10/03T00:21:40z
10 2022/10/03T00:23:40z
11 2022/10/03T00:25:31z
12 2022/10/03T00:27:31z
13 2022/10/03T00:29:31z
14 2022/10/03T00:31:31z
15 2022/10/03T00:33:31z
16 2022/10/03T00:35:31z
17 2022/10/03T00:37:31z
18 2022/10/03T00:39:31z
19 2022/10/03T00:41:31z
20 2022/10/03T00:43:31z
21 2022/10/03T00:45:22z

In this example, you can see the standard 2-minute intervals. Additionally, you can see that after the tenth and twentieth data points, there is a deviation where the interval is 1:51 rather than 2:00.

Why does this occur?

When a sensor can’t connect to PurpleAir, it will undergo a brief reboot every 20 minutes (after 10 data points). Thus, there is a slight change in the interval.

The periodic reboot is a “soft reboot” where the device’s operating system is reloaded. This is done to ensure stability and recovery for connecting to WiFi. There is no actual power cycling of the components, and thus no need to worry about this impacting the lifetime of the device.

The soft reboot will regularly occur for both sensors not connected to WiFi and sensors that have a WiFi connection but can’t communicate with PurpleAir systems.

Learn More

SD Card Logging and Troubleshooting
SD Card File Headers
WiFi Troubleshooting

2 Likes