Mapping Caves with Photogrammetry and Raspberry Pi

Phil Underwood has spent twenty years mapping underground caves. His work has produced a series of open hardware devices that increase the speed and accuracy of surveys. The journey starts with tools based on 8-bit microcontrollers and arrives at a complete photogrammetry system. Each generation solved a specific problem, improving the design incrementally.

The first version, presented in 2008, used an accelerometer and a magnetometer to determine direction and angle. Distance, however, was still measured manually. The heart of the system was a PIC18LF2550, an 8-bit microcontroller. This approach proved that part of the survey could be automated, but human intervention was still needed for linear measurements.

Electronic survey device housed in an off-the-shelf enclosure
Phil Underwood’s first-generation survey device.

The turning point came in 2020. Phil added a laser rangefinder and a 32-bit microcontroller. This allowed the device to calculate distances autonomously and handle more complex operations. Data collection also became faster and less error-prone. The move from 8 to 32 bits made it possible to process more information directly in the field.

Improved design and community

In 2023 the project received special attention. The enclosure was 3D-printed, with silicone buttons resistant to water and dust. The firmware moved to CircuitPython, a language that makes community contributions easier. Many makers were able to modify the code without deep electronics knowledge. This accelerated development and made the project more open.

Choosing CircuitPython made the code more readable and easier to maintain. 3D printing also allowed custom enclosures for each environment. The modular design made it simple to replace damaged components. As a result, the device became a reliable tool for cavers.

  • 2008: accelerometer, magnetometer, PIC18LF2550 8-bit
  • 2020: laser rangefinder and 32-bit microcontroller
  • 2023: 3D-printed enclosure and CircuitPython firmware

Latest version: Raspberry Pi 5 Compute Module and photogrammetry

The latest generation represents a technological leap. The system uses a Raspberry Pi 5 Compute Module and two low-light cameras. The cameras capture images of the cave interior, then the software processes them to create textured 3D models. This approach eliminates the need to measure every point manually. The result is a detailed and realistic map.

For those wanting to experiment with similar sensors, a 9-axis module with accelerometer, gyroscope, and magnetometer combines in one unit the two measurements that supported the 2008 version. For processing, a Raspberry Pi 5 with 4 GB of RAM handles photogrammetry without strain, and a 5-megapixel camera for Raspberry Pi is the cheapest way to try dual capture.

Phil Underwood’s project shows a methodical approach to hardware design. Every choice, from materials to computing power, was guided by the real needs of cavers. The lessons learned apply to any rugged instrumentation. In particular, modularity and ease of maintenance are essential in extreme environments.

Lessons for makers

The story of this project teaches that incremental evolution works. You start with a simple prototype, test it in the field, then improve it. Each generation solved a concrete problem. Moreover, openness to the community accelerated the process. Documentation and code are available for anyone who wants to contribute.

Cave mapping with photogrammetry is just the latest milestone. The complete system, with Raspberry Pi 5 Compute Module, is an example of how open source hardware can tackle complex challenges. The device is called Shetland Attack Pony, and the sixth generation (SAP6) is fully documented: schematics, component list, and CircuitPython code are public.

Source: https://stic.readthedocs.io/

Similar Posts