This site is optimized for computer screens.
This page is about building a kinetic sand table linear arm. I suggest you read through the entire page and examine the photographs before starting to build anything. While the narrative leads you through the build, it's not a step-by-step tutorial. Think of it more of an IKEA project.
Building a linear arm is not very difficult if you have a 3D printer. For most of the components, I used carbon fiber filament because I wanted them to be strong, but you can probably get away with normal PLA if you are careful with construction. Bending can be a problem with the magnet holder and it is lessened with carbon fiber. Carbon fiber filament has a higher nozzle and bed temperature (I use 270 and 70 degrees.) Take note of this when you put the .stl files into your slicing software (I use Cura) - it's free and excellent. I try to use 0.15 thickness for layers, although this takes more time, it also results in a better product. Also, I use solid fill because I want the strongest parts.
3D Printed Components - Dowload .STL files
Stepper Holder Mount | End Mount | Spacers |
Opto Holder | Magnet Spacer | Magnet Holder |
Components
(1) Optical Switch | (1) GT2 tensioner |
(1) Magnet 3/4"x3/4" round N52 axial polarization | (3) bolt M5 x 40 mm |
(1) 20 tooth gear with 5mm bore with hex screws | (12) bolt M5 x 10 mm |
(3) 20 tooth idler gear with 5mm bore | (8) T-nuts for 2040 extruded aluminum |
(1.5m) 5mm GT2 belt | (6) nuts M5 (included with bolt kit) |
(1) Carriage | (4) bolt M3 x 8mm for stepper motor |
(630mm) 2040 extruded aluminum rail | (1) JB Weld |
(2) Small Zip Tie 4" |
Some of these links aim you at larger item quantities than you need. For example, the 2040 link gives you (4) 1000mm 2040 rails when you only need one cut to your length. The optical switch link gives you a package of 10 optical switches, you only need one. Shop around. I like to buy in bulk because sooner or later I am going to need more, or for electronics, something is going to burn out. For bolts, it's always good to have a nice selection of sizes. One word of caution: the 5mm GT2 belt usually shows about a month lead time since it comes from China. Mine arrived in two weeks even though it said 4 weeks. You can use 6mm GT2 which is easily available, but the 5mm fits inside a 2040 rail slot with no binding. The 6mm can bind on the top rail, but, this design holds the belt above the rail, not in it like some linear rail designs do. Feel free to substitute without ramifications, but I still like the 5mm much better.
After you have ordered or found all your components, it's time to 3D print. This is straight-forward but the end pieces will take about 6 hours each to print so start early! I use carbon fiber as I said before, but for the spacers and opto holder I used yellow PLA, just looks nicer. For the magnet spacer - use dark PLA or carbon fiber. It has a prong that sticks down to break the optical switch's IR beam. I made one from yellow PLA and the optical switch saw right through it. Some black sharpie fixed that, but if you don't have to, then don't.
The first thing to do is mount the stepper motor with 20-tooth gear as shown in the photos with m3 bolts. There are holes that allow a long hex key to tighten the bolts. Center the 20 tooth gear and tighten its set screws. Mount the idler pulley using spacers and the long M5 bolt as shown. Do not tighten the bolt all the way since that will distort the housing and squoosh the spacers to not allow the idler gear to roll freely. Double nut the bolt since it is not tightened all the way. Do the same with two idler pulleys in the other end holder. Note their positions: the middle pulley guides the belt to go through the center of the 2040 track and the top one guides it to go above the track.
Now connect the passive end holder onto the end of the track. Position it so the upper gear is close, but not touching the track. Be careful to not over-tighten the bolts since the 3D print has some thin spots where the bolt heads are and you risk breaking it. You may want to use washers, I didn't and the bolt heads do dig into the plastic. Slide the carriage onto the track and adjust the two nutted carriage legs so the carriage is tight, but not so tight that it doesn't move. Any slop will allow the magnet holder to not be as rigid as you want.
Put the belt through the center of the track, over the pulleys and attach that end to the carriage using a small zip tie as shown. Then connect the stepper motor holder to the end of the track and position it so the top pulley just clears the track. Guide the belt around the gears and mount the end to the other side of the carriage. Make it taught, and attach with zip ties. Later, if need be, you can further adjust tension by moving the ends on the track. Finally, put a belt tensioner on the belt, on the side of the stepper motor, with the tensioner coil down as shown in the photo.
.
.
Mount the optical switch on the opto holder using M3 bolts and mount that onto the track as shown. You can adjust it later if need be, but I put mine all the way touching the end mount. Mount the spacer and magnet holder as shown using M5 bolts. The magnet holder should be facing the direction shown - away from the motor. Be careful the bolts are not too long or they will go through the carriage and contact the track thus not allowing for movment (yes, learned that from experience.)
.
Download track_test2 .ino file
Once the arm is together, it's time to run it though the paces. Download the track_test2.ino file and load into your arduino. I connected the track to an Arduino Mega (any Arduino will do expect the Giga), Stepperonline DM320T stepper driver I had lying around, and 24V power supply. If you use a DM320T Stepperonline Driver make sure you connect the Opto connection to 5V on the Arduino (yes, I learned that the hard way too.) If the motor runs in the "wrong" direction (starts out moving away from the optical sensor) because you mounted the stepper motor on "left" side (closer to you in photo), switch the A+ and A- stepper motor leads on your driver. That should reverse the direction. Or you could switch the motor to the other side, but that is a pain.

The carriage should move towards the opto switch, hit the switch and "bounce" in the opposite direction moving towards the track center. After moving fLpos steps, it should stop and repeat its motion moving towards the switch, hitting it, then reverse. You can modify FLpos depending on the length of your track. This might be a good time to estimate the linear range by setting fLpos so the magnet center moves to the center of the track. Since you don't know exactly where the center will be because the track is not mounted on the gear yet, this will be just an estimate. I like to let the track run for awhile, it's quite hypnotic. You can also play with various speeds to get a feel for that variable.
Since the stepper has a 20 tooth gear and the driver is set to 1600 steps per revolution and gt2 belt has 2mm spacing, one motor revolution ends up with 40 mm of linear movement. If you want the carriage to move 400mm, then the motor must spin 10 times or 16,000 steps. I set the program to initally have 5000 step movement since I don't know how long your track will be and didn't want it to overshoot. In another world you could put an extra optical switch on the stepper motor side as a safety switch and attach an interupt to stop its motion. But, I have never had that problem other than in initial set-up. I did that in my first two tables but it was more trouble than worth and it was never used after a few years of operation. You can also play with the driver and change the steps per revolution settings. I found 1600 to be optimal, but maybe you think differently. If you do change this setting for the actual table, you will need to reflect that in any code you download from me.
Let me know if you build this arm and any suggestions for improvements you might have. Feel free to contact me if you have any questions. Thank you, I appreciate it.
Enjoy!