Introduction: The Magic-Sand Slicer

About: I am a curious scientist and dedicated teacher, supported by two loving little assistants.

The Magic-Sand Slicer (MSS) is an education project conceived as a STEM activity to learn some exciting science using microcontrollers, 3D printers and image processing. More important, It is also a collaboration between a father and his son Leonardo. Leonardo helped me in evaluating the device acting as a perfect STEM student. We have learned a lot together, and we want to share the results of this long journey with you.

This project aims to create a device that automatically makes sections of a cylinder made of easy-to-cut colored material. The image of the sections can be used for 3D image reconstruction of the colored blogs hidden in the column. As material, we have used for this project the Magic-Sand, also known with other trademarks names.

What is the point of making automatic pictures of thin layers of sand and then reconstructing it digitally?

There are plenty of education activity that can be design with this device. The MSS can be an interesting Rube Goldberg type project to learn additive manufacturing using 3D printers, the use microcontrollers, servos and sensors in an engineering class. However, it is also a project to learn the principle of 3D reconstruction of the internal structure of materials from serial sections. Three-dimensional reconstruction from parallel cross-sections is an important computer graphics approach used for detailed three-dimensional modelling of surfaces or entire objects. The area of applications comprises medicine diagnostics (TAC, NMR, ultrasounds), Earth science (stratigraphy), paleontology (fossil reconstruction), food science (food texture), and cellular biology (microscopy). Therefore, students in medicine, biology, earth science, food science or palaeontology can be trained in 3D image reconstruction of the coloured blobs hidden in the column from serial sections. It could be used for research, for example a geologist interested in sedimentary material plasticity to study rock and the secrets it beholds, or to a process, engineering to emulate the packing of fine granular materials. Finally, an artist can make a fantastic program of unraveling magic forms generated by packing colored sand.

The project is available for all and can easily be adapted to your wish with no bother at all.

What is the purpose of Sand Slicer? It is left to your imagination to decide how to use it!

How it works

The MSS device consists of a 12 ml plastic syringe cut to the tip to load the sand, fixed to 3D printed support. The piston is connected with a long screw shaft to a 5V 28-BYJ-48 stepper motor, whose rotation pushes at constant speed the sand out of the syringe tube. A rotating plastic blade controlled by a servo motor cut the extruded sand and a brush cleans the sand surface. In front of the sand extruder, a smartphone camera controlled by a Bluetooth shutter is used to make a picture of the clean sliced surface. An Arduino nano is used to control the stepper motors, the servos, and an IR sensor is used to stop the piston from going out of the syringe at the end of the run.

Supplies

For this project you need:

HARDWARE

1. For a base, we used three connecting joint plates made of heavy-duty steel sheet metal frames. Two with size 100x200x2.5 mm and one 100x300x2.5 mm. The plates were provided with four printed legs to create separate platforms. The holes in the plates were used to anchor the 3D printed part for the extruder using pegs that fitted into the holes of the base. As these plates can come in different sizes, OpenScad script files are provided to adapt the 3D anchored parts of the project.

2. 3D printer. The extruder, slicer, supporting frames and anchoring plate for the electronic boards are 3D printed using PLA filaments. We have successfully used low resolution (up to 0.36 mm) to speed up the printing with good results. However, more fine detail is required to print parts such as the blade, still, 0.2 mm should be okay. The STL files of all parts are provided.

3. Plastic syringe. For the extruder tube, we have used a plastic syringe of 12 ml of capacity. The tip part has been cut away with a retractable knife. Care should be taken to make the cut perpendicular to the cylinder axis and also to avoid cutting your finger!

4. One machine screws M4 x 80 with two nuts. We have used a cheese head screw type but a hex head one would be better to fit in the stepper connector. A nut screwed til the head and glued is used to improve the fitting to the stepper connector.

ELECTRONICS

1. One Arduino Nano + Expansion board. The brain of the project is an Arduino microcontroller.

2. Three SG90 9G Micro Servo Motor. The servos are used to move the blade, the brush and to push the button of the Bluetooth shutter for taking the photo using a smartphone.

3. One 28-BYJ-48 DC 5V, 5 Wire Stepping Motor with the ULN 2003 Driver Board. The stepper motor is used for the extruder.

4. An IR proximity sensor. The sensor is used to check if the piston is at the end of his run in the syringe to avoid that it damages the blade in an attended run of the device.

5. A joystick module. The joystick is used as the input device for controlling the Arduino program.

6. One 16x2 1602 LCD display + I2C serial interface. It is used as the output device for the Arduino program.

7. A Bluetooth shutter. A simple one-button shutter to control the camera on the camera smartphone.

8. A smartphone for taking photos. We have used an iPhone 8.

Step 1: Preparing the Metal Platform

The first step consists of assembly the heavy platform used to anchor the frames for the device. We used heavy-duty perforated steel plates available in hardware shops. We used three of them (see Figure I); two 100x200 mm ones for the control unit for the electronic boards (the platform I) and one for the photo unit with the smartphone (The platform II). A longer 100x300 mm one for the extruder and slicer units. We 3D printed four cylindrical legs for each plate and fir them with screws (see Figures).

One OpenScad file is for 3D printing the legs. It can be adapted to metal plates with holes of different sizes. The second OpenScad file is for the plastic plate used to joint Platform II and III.

Step 2: 3D Print Support for the Electronics, Extruder, Slicer and Sensors

Now we need to 3D print the following supports:

1) Electronic boards support for the attached and isolation on the control platform I (see Figure). An OpenScad script is provided for the generation of the supports. For using it, set the flag at the beginning of the file to one for each support and then generate the STL file (see Figure).

2) The support for the iPhone on Platform II (see Figures in Step 1). Also in this case an OpenScad script is provided to adapt to the metal plates that you have found.

3) The supports for the extruder, the slicer, and the brush units on Platform II (see drawing). An OpenScad script is also in this case provided. The supports are drawn using two openScad modules called supportExtruder (in blue) and supportSlicer (in red), respectively. The supportSlicer is also used for supporting the brush unit (in orange).

Step 3: 3D Printing and Assembly of the Extruder

1) The STL file of the extruder and the syringe block is provided. The drawing shows the montage on the support and the attachment of the stepper motor.

2) The plastic 12 ml syringe is prepared by removing the bottom using a sharp knife (see Figure).

3) The STL files of the piston and the connector to the stepper motor are provided. The printed part is connected to the M4 80 mm screw as shown in the figures. Use glue to fix the screw to the printed part if necessary.

4) The syringe will be inserted in the extruded as shown in the last picture. The block is then inserted to secure the syringe to the extruder.

Step 4: 3D Printing and Assembly of the Slicer

1) The STL file of the slicer and the blade is provided. The drawing shows the montage on the support, of the attachment of the servo motor, and of the blade.

2) Mount the Sg90 servo. The servo mounts very tightly and then the use of a file or abrasive paper might need to be inserted.

3) Mount the blade that should adhere as much as possible to the surface of the slicer support for a clean cut.

4) The guide on the slicer support is used to improve the contact of the blade with the surface.

5) The initial position of the blade is shown in the last figure. The orientation can be slightly adjusted to ensure that the blade cuts through the protruding sand ensuring a net cut.

Step 5: 3D Printing and Mounting of the Brush

The cut made by the plastic blade is not clean as sand grains tend to remain attached to it, and the fresh-cut surface is in the form of grumps that ruin the picture of the section. We tried to implement different solutions such as increasing the number of blade swipes or changing the blade material and shapes but with unsatisfactory results.

We finally decided to add a brush that clean the surface after cutting. The brush is mounted on the orange support and uses another SG90 servo to move a brush build.

The first STL file contains the assembly arrangement of the brush support and the servo support models.

The cleaning brush was made by cutting and repurposing a part of the brush of an old letterbox cover (see Photo).

Step 6: Support for the Bluetooth Shutter

We have used a cheap Bluetooth shutter to activate the smartphone camera by Arduino using a Bluetooth shutter. This idea has found practical and reliable use in several projects, and therefore it was a straightforward choice also for this one.

The attached STL file contains the 3D model of the shutter and SG-90 servo support.

The position of the shutter inside the box should be adjusted to make sure that the button is pressed by the servo arm. A screw is used to fix the shutter in position.

Step 7: Assembly the Electronic Board on the Platform I and Adding the Stop Sensor

The electronic boards are arranged on the platform plate using 3D printed PLA supports. An example of arrangement is shown in the figure.

The attached diagram (made using the program Frizing) shows how to connect the board to the expansion board of Arduino nano.

The stop sensor is an IR proximity sensor and it detected the presence of the piston shalf in the syringe cylinder.

The sensor is mounted between the extruder and the slicer using a 3D printed support.

Step 8: Programming Arduino Nano

The attached program for Arduino controls the Magic-Sand Slicer device that extrudes and slices a cylinder of Magic Sand out of a syringe. Each sand section is automatically photographed by an iPhone controlled by a Bluetooth shutter. The device is commanded and controlled by an Arduino nano using this program. The joystick module is used to drive a menu on an LCD 16x2, set up the parameters used by the Slicer, and run the slicing sequence.

MENU CONTROL

The Y-position of the joystick is used to select the menu option, the joystick button to select/confirm and the X-positions to assign values to the different menu options.

LCD MENU DESCRIPTION:

1. # slides: This option assigns the number of slides (default 1). If a negative value is given the slicer will run until it is stopped manually by pressing the joystick button.

2. # rotations: This option sets up the number of full rotations of the extruder step motor. Slide thickness: It gives the approximate thickness calculated using the thickness converter parameter (variable rot2tick) set into the program code. By setting a negative number of rotations, the server will rotate in the opposite direction.

3. # blade cuts: It set the number of time the blade will slide up/down. By repeating the slicing cuts, it can help to make flatter the section surface by removing no uniform regions.

4. # brush swipes: It set the number of time the brush will swipe the cut surface of the sand to clean by cutting residues

5. Run it! Run the slicing sequence. Pressing the joystick during the sequence will stop/go the sequence. Pressing up after the sequence is stopped will bring it back to the menu.

6. Test blade: Test the blade movement.

7. Test brush: Test brush movement.

8. Test extruder: Test the extruder movement.

9. Adjust sensor: It is used to test and adjust the position of the end of the run IR sensor.

10. Reset: Set to zero the counter of the number of slices.

Step 9: Preparing the MS Slicer

1) The piston screw must be screwed inside the piston until it reaches its end as shown in the figure.

2) Load the syringe with sand. The sands should contain different types of colored sand mixed to create 3D areas of uniform colors hidden inside the cylinder of material.

3) As shown in the figures, insert the loaded syringe in the extruder and connect the open end of the cylinder into the slicer circular opening.

4) Make sure that the wall of the syringe cylinder does not protrude from the opposite surface of the slicer as it can stop the blade motion or even damage it.

5) Fix the syringe using the printed block, as shown in Figure 4.

6) Power Arduino expansion board on Platform I.

7) Synchronize the Bluetooth shutter with the smartphone.

8) Place the smartphone in the support on Platform III.

9) Open the camera and adjust the camera zoom as in the last Figure.

Step 10: Setup the Menu Options

Figure 1 shows an example of a setup.

1. The number of slices can be set to a specific value or as -1, in this case, the device will continue to slice until it is stopped by the user or by the sensor.

2. The slice thickness is evaluated by the number of rotations made by the stepper before the blade is activated.

3. The B. cuts is the number of cuts the blade made before the brush is activated. Three are more than enough.

4. The number 4 indicate the number of swipe the brush made to clean the surface from sand residues.

Before the run, you can test the extruder motor, the blade and brush servos using the option 6,7,8.

Th option 9 allows you to test the sensor position but you can also look to the LED in the sensor board.

Step 11: RUN THE SLICER AND ANALYSIS OF THE IMAGE

Pressing the joystick at the menu option 5 activates the slicing sequence, collecting the image on the smartphone. Pressing the button when the slicer is run stops the sequence as well as when the piston shaft overcomes the proximity sensor.

The collected image can be analyzed using ImageJ as an image stack.

As they are aligned, using the circle selection tool and the option of clean outside, a stacked set of sand slice images is obtained.

Adjusting the Z thickness of the stack taking into account the actual thickness of the slices, it is possible to obtain a 3D volumetric representation of the sand cylinder with the color indicating the different regions of different sand colors. The volume viewer can be used for the visualization of the 3D sand cylinder as shown in the Figure.

Step 12: CONCLUSION

I will conclude our first Instructable using the final remark by my son Leonardo:

The sand slicer is a wonderful machine. This is because it can be used for so many projects this is a helpful tool to have. With some modifications, it can: reveal thin slices of the internal composition of a rock, explore the tunnels of woodboring larvae of beetles inside sticks, even slice open insects and reconstruct them on a computer and so much more. The purpose of the Sand Slicer is to enlighten people of the secrets that lie within objects and ultimately bring them to light.