Why is there a gap in the SD card data?

Note that this article applies both to sensors running without a WiFi connection as well as sensors that have a WiFi connection, but cannot communicate with PurpleAir systems

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:

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

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.