Making a PAX counter

PAX counter and plastic pig

PAX is an abbreviation for “passenger”. A PAX counter is a device that counts passengers, although you could use it to count people in lots of other situations too. One way to count people is to detect the devices they are carrying. I’ve built the PAX device above from the code here. It’s based on the Heltec WiFi Lora device and I’ve printed a rather neat little case for it too.

It listens to Bluetooth and WiFi. It doesn’t eavesdrop on anyone, or log data packets, it just counts the number of different device addresses that it sees and then sends the totals over LoRa to an application.

If you want to build it my strong advice is to use Visual Studio Code running under Windows 10 and with the PlatformIO framework installed. I used this and followed the instructions carefully and the program built and deployed without much fuss. I did get one warning about a missing configuration for the LMIC but this doesn’t seem to matter. The device works fine and I’ve even managed to send control commands back into the device over LoRa.

If you want to get a rough idea of passenger traffic at a particular location then I can see it being a very useful device. I’m a bit worried about privacy issues though, in that while it would be very hard to go from the MAC addresses of my devices to actually identify me directly, it would be trivial to detect that the same person has been to a particular place multiple times. This might be considered an encroachment onto privacy.

Whether or not you use the data like this is really down to self-discipline as an individual programmer, but then again they are already doing this kind of thing in shopping centres…