Tomography is a process where high-energy electromagnetic radiation (usually X-rays) penetrates an object, and sensors on the other side capture a cross-section of it. These slices are then built up to create a 3D model of the object, complete with its interior.

If this sounds familiar, it might be because you’ve had a CAT scan at some point in your life. It’s fairly standard medical technology, and these days you can control them with just a Raspberry Pi.

This article first appeared in The MagPi 79. Subscribe to The MagPi print magazine and get a free Raspberry Pi.

Emma Osbiston was entrusted by Diamond Light Source, a facility housing a synchrotron, with creating a way of demonstrating a Pi controlling such a device, albeit safely without a particle accelerator shooting out beams of radiation.

The technical project name is: R03: A Raspberry Pi Tomography Beamline Controlled Through Twitter

Using a Pi allows for the design to be reproducible

The Twitter account, @DiamondRPi, is still active

The project was created during a three-month summer placement

The Twitter and robot arm components aren’t required to recreate it

“Essentially, I was tasked with developing a ‘mini-beamline’, using a Raspberry Pi running Diamond’s Data Acquisition software,” reveals Emma. “The most significant difference between [this] and a real tomography beamline at Diamond was that instead of high-energy X-ray light, I was tasked to use visible light as my beamline, which meant that instead of an expensive, highly specialised detector, I was able to just use a Raspberry Pi Camera Module as my detector.”

A light scan

While a lot of 3D capture rigs use multiple camera setups to take numerous photos at once, this setup uses a turntable to rotate the object, with the Pi Camera Module taking a ‘reading’ (photos) of the object under the visible light beamline. Using the software, a 3D model is then constructed from the data.

“The idea of the project was to create something that could be useful for outreach and explanation of Diamond’s beamlines,” explains Emma, “as well as showing off GDA – Diamond’s ‘Generic Data Acquisition’ software for synchrotrons – by demonstrating its flexibility by running it on a Raspberry Pi!”

Tomography Beamline: 3D with friends

A big part of the project was that it would be operated using Twitter requests, with users tweeting to @DiamondRPi with a number between 1 and 10. A robot arm would then select the sample and put it on the scanning turntable. The scan would then be sent back to the original user.

“I would have liked to improve the Twitter response of [this project],” Emma admits. “For example, providing better-quality images or even GIFs, and a progress report from the Pi Camera showing the sample being scanned – this in particular is something being continued at Diamond now!”

The project was completed to the original specifications at least, Emma tells us: “By the end of the summer we had a successfully working ‘beamline’ that filled all of the initial starting goals and some more – the robot arm had been intended as more of a stretch goal if the project went well, but by the end we had that successfully working too! Essentially, a user could tweet @DiamondRPi with a request, and get scan data back.”

See also:

Trading Card Scanner/Organiser

3D Body Scanner: 27 Pi Zero W boards used in full body scanning project

Fabscan Pi project – 3D scanning for all

Monitoring a lab with Raspberry Pi