The RasPi MilliTome: a Manual Sand Slicer for 3D Reconstruction
by DaniloR29 in Teachers > University+
3587 Views, 11 Favorites, 0 Comments
The RasPi MilliTome: a Manual Sand Slicer for 3D Reconstruction
My first Instructables project was the Magic Sand Slicer, a Rube Goldberg machine–style device that automatically slices a cylinder of kinetic sand to reveal its internal three-dimensional texture. This structure is created by mixing coloured sand blobs, forming patterns similar to those observed in tomographic 3D reconstruction.
In this project, I present a simpler manual version of the device that is easier to build and operate. It includes a support tower for a Raspberry Pi camera module, adapted from another of my previous projects called Rapendula. This project is particularly well-suited for STEM education, as it combines 3D printing, basic mechanics, computer interfacing, image acquisition, and programming. Beyond the technological aspects, it provides an intuitive way to understand how three-dimensional structures can be reconstructed from a sequence of two-dimensional slices.
From a historical perspective, this device reproduces—at a macroscopic and accessible level—a technique widely used by early microscopists, paleontologists, and naturalists to investigate the internal structure of complex biological and geological specimens. Before the advent of modern imaging technologies, serial sectioning was one of the primary methods used to reconstruct three-dimensional structures from two-dimensional slices. In this sense, the present device can be seen as a modern, low-cost reinterpretation of these classical experimental approaches.
This principle is still widely used across many areas of science today. For example, in paleontology, serial sectioning can be used to reconstruct fossils embedded in rock. In microscopy techniques such as confocal or light-sheet imaging, it enables the 3D visualization of transparent specimens. More broadly, medical imaging methods such as X-ray tomography and MRI rely on the same fundamental idea to reconstruct the internal structure of the human body.
Supplies
- One rectangular perforated metal plate, approximately 60 × 200 mm
- 6 M4 screws, 20 mm in length
- 2 M4 butterfly bolts
- 4 M4 bolts
- 2 M4 screws, 10-20 mm in length.
- 6 Small screw for the extruder assembly
- 2 small screw to fix the Pi camera to the holder.
- 1 M7 Screw 75 mm long
- 2 M2 screw
- One 40 cm aluminium ruler
- A 3D printer. For 3D printing, I have used a Creality Ender Pro with 1.4 mm PLA filament. For the slicer, I have used PrusaSlicer and Cura. As the printing can take time, I used a 0.28 mm slice thickness without affecting the accuracy of the device.
- Superglue
- A 32 mm Chisel
- Two sets of kinetic sand with two contrasting colours.
- Raspberry Pi Zero W2 + Pi camera (see my Project Rapendula for other information)
Device Base
The device was assembled on a perforated metallic plate as outlined in the project Rapendula. This dual-plate base provides added weight and stability.
After 3D printing the supporting base for the Pi Camera, Raspberry Pi, and Ring LED, along with the extruder (Extrud_Base.stl file), they’re secured to the platform using M4 screws and bolts (see Figure). For quicker disassembly, butterfly bolts are used for the photographic tower.
A 30 cm metallic ruler is inserted into the slot in the support and secured with an lateral M2 screw.
PiCamera, Raspberry Pi and Led Ring Support Platfrom
3D print the other STL file for the other components.
1) Secure the Camera+RaspPiSupport section to the ruler using an M4 10-20mm bolt (see Figure 1).
2) Assemble the LED ring case. We’ve repurposed the LED and control electronics from a cheap smartphone self-portrait clip (see Figure 2-3). Insert and secure these parts into the case and enclose the electronics with the lid using two small screws (see Figure 4-6).
3) Ensure the LED ring case slides smoothly on the horizontal shelf of the camera support.
4) Attach the 3D-printed Pi camera holder to the camera using two small screws. Mount the Raspberry Pi and Pi camera on the support. Insert the cylindrical part of the camera holder into the slot on the horizontal shaft (see Figure 7).
5) Complete the camera mounting system by attaching the LCD and RGB LED to the Raspberry Pi case (see the last Figure). The instructions and STL files for this section are included in my project Rapendula.
Extruder Cylinder With Support
3D print all the required STL files for the components.
- Insert the M7 screw into the 3D-printed wheel and secure the head to the wheel using glue (see Figures 1 and 2).
- Insert the M7 bolt into its housing. A vice can be used to press-fit it into the 3D-printed part.
- Place the bolt housing into the hexagonal opening and glue it in position (see Figure 4).
- Insert the cylinder ring into the cylinder block on the side of the bolt housing (see Figure 4).
- Mount the cylinder into the support legs (see Figure 5) and secure it with three screws (see Figure 6).
- Engage the M7 screw with the bolt into the extruder cylinder (see Figure 6).
- Insert the piston into the rectangular cavity of the cylinder as shown in Figures 7 and 8.
- Position the cylindrical end of the extruder assembly into the corresponding support base socket.
- Secure it with three small screws, as shown in Figure 6.
Adding the Platfrom
3D print the necessary STL files for the components.
Place the platform on top of the cylinder and secure the Blade guide to it using two M2 screws as shown in Figure 1. Insert the sand-collecting bin into the platform hole as shown in Figure 2. The final configuration is illustrated in the last figure (the loading with sand is explained later).
Python Program to Control the Photo Collections Using Raspberry Pi
This Python program controls the image acquisition process and provides a live preview of the slicing experiment using a Raspberry Pi setup. It is designed to work with a Pi Camera module and a small display, allowing the user to monitor and capture images of each sand slice in real time.
The main purpose of the program is to:
- display a live camera feed,
- allow the user to trigger image capture,
- store the captured images in sequence,
- provide visual feedback during the slicing process.
How it works
The script initializes the camera and display, then enters a continuous loop where it:
- Captures live images from the camera
- The Pi Camera continuously streams frames, which are shown on the screen. This helps align the sand cylinder and ensure consistent framing.
- Displays a real-time preview
- The live feed is resized to fit the display and updated continuously, giving immediate visual feedback during operation.
- Waits for user input
- A button (or key input, depending on your setup) is used to trigger image acquisition. This allows you to manually control when each slice is recorded.
- Captures and saves images
- When triggered, the program saves a high-resolution image to disk. The images are stored sequentially, forming a stack that represents the internal structure of the sand.
- Provides visual feedback
- After each capture, the program may briefly indicate that the image has been saved (for example, by updating the display or printing a message).
Output
The result of this process is a series of images:
These images correspond to consecutive physical slices of the sand cylinder and can later be used for:
- image segmentation
- 3D reconstruction
- volumetric visualization
Preparing the Kinetic Sand
3D print the sand mould parts. These moulds create a rectangular block of sand that fits into the cylinder opening. The procedure below explains how to make a simple coloured spherical shape inside this uniform block.
A) Fill the mold with a uniform colour of kinetic sand, and use the sand pusher to compact it
B) Use a craft knife to split the sand block into two parts. Then open the mould to reveal the two sand sections. Impress the solid object onto one side to create the mould. In this case, a marble was used.
C) Therefore, align and push together the other half of the sand block until the two faces match again. This will deform the block, and the sand pusher is needed to compact the sand around it.
D) Using a small rotation movement and the blade, separate the two parts again. Removing the object reveals the hollow space left by its imprint.
E) Carefully refill the hollow space in the two mould halves with contrasting coloured kinetic sand. A wax carver tool will be useful for this.
Once the two parts are filled and compacted, you can reassemble the sand blocks using the form. Align the form with the square hole on the extruder’s top and slide the sand block into the cylinder using the sand pusher. To do this, remove either the camera on top of the extruder or the extruder block from the base (refer to the last three figures). Finally, use the pushed sand to gently press down and compact it into the cylinder.
System Setup, Calibration, and Image Acquisition
Start the Raspberry Pi and upload the Python program to it. Create a folder called photos, then run the script.
Figure 1 shows the program interface as it appears on your computer screen. Adjust the camera settings to improve image quality. Capture a test image of the first slice and check that the high-resolution image is correctly saved in the ./photosfolder.
Once you are satisfied with the settings, use the Save button (not visible in the figures) to store the parameters. These will be automatically reloaded the next time the program starts.
The LCD display should show the same view as the currently exposed section of the sand (Figure 2). Note that the image in Figure 2 differs from Figure 1 because it was taken at a different stage of the experiment.
You can now begin data collection. Pressing the capture button will trigger the acquisition of an image. A green LED will briefly illuminate to indicate that the image has been saved. At the same time, the terminal window will display the file name and image number (see Figure 3).
After each image is captured, rotate the screw wheel anticlockwise to push the sand upwards. The screw used in this project has a pitch of approximately 1.2 mm, meaning that one full rotation produces a slice of this thickness. A half rotation can be used to obtain thinner slices, effectively increasing the resolution of the 3D reconstruction along the slicing axis.
A 3.2 mm chisel is used to slice the sand. It should be passed firmly across the surface of the platform to produce a clean, uniform slice. The removed material can be collected in the sand container located on top of the platform.
3D IMAGE RECONSTRUCTION
The 3D reconstruction of the green sand sphere was performed using ImageJ, following the workflow described in my previous Magic Sand Slicer project and demonstrated at the end of the accompanying video.
The figure shows the STL model obtained from the segmented volume. The resolution of the reconstruction is relatively low, as the slices were acquired using a full rotation of the screw mechanism. Higher resolution can be achieved by reducing the step size (e.g., using half rotations). Additionally, one side of the reconstructed object appears truncated due to the loss of the final slices during the acquisition process.
Nevertheless, the results clearly demonstrate the capability of this device as a didactic tool for teaching the fundamental principles of 3D image reconstruction from serial sections.
In parallel, a Python-based pipeline for segmentation and volumetric reconstruction is under development (see Figures 2 and 3). This provides a programmable framework that complements established tools such as ImageJ and enables a more detailed exploration of the reconstruction procedure.
I hope you enjoyed this project and are inspired to reproduce it and explore the principles of 3D reconstruction through your own experiments.