CrunchLabs Sand Garden: Build, Sweep, and Draw
The Sand Garden promises a calm, meditative result, but the path to getting there is more technical than it appears. Unlike earlier Hack Pack builds, this kit introduces few new electronic components and focuses instead on a single mechanical idea: a simple polar gantry that sweeps a steel ball through sand. It is an interesting mechanism to assemble, but the real challenge shows up later in the code, where even basic movement requires mathematics well beyond any of the kits so far.
This article explores the journey of building the CrunchLabs Sand Garden. Although not the strongest entry in the lineup, the Sand Garden still offers a clear window into how polar coordinate systems. Along the way, we will look at the components inside the kit, the mechanics behind the polar gantry, and the programming techniques used to control it.
💡
CrunchLabs has updated the order in which Hack Pack robots are shipped, placing several fan favorites into the first year. This part of an on-going effort to optimize how builders learn and progress. That said, Technodabbler will continue to refer to this as the fourth robot in the series, but new members may receive their Hack Pack projects in a different order. Thanks to Hack Pack Hackers for pointing out the changes in the lineup.
What is a Sand Garden?
Japanese dry gardens, often associated with Zen temples, use raked sand, gravel, and carefully placed stones to evoke natural landscapes such as rivers, waves, or islands. The patterns are intentionally temporary. Raking is part of the practice, not just the outcome, encouraging focus, repetition, and reflection rather than permanence. Meaning comes from restraint and simplicity, where small changes in pattern can alter how the space feels.
Photo by Kari Shea / Unsplash - Dry garden create landscapes through careful arrangements of natural feature and raking of sand.
Mechanical sand gardens build on that same idea, but replace the rake with motors and code. Instead of a person guiding the motion, a programmed mechanism moves a steel ball through sand to create flowing paths and geometric forms. While the medium and intent remain similar, the process shifts from mindful hand movement to precise, repeatable control. This transformation makes sand gardens an interesting bridge between traditional design principles and modern mechanical systems.
Inside the Box
The Sand Garden introduces fewer new electronic components than earlier Hack Pack projects. Builders will recognize the Arduino Nano clone, the joystick, the stepper drivers, and the breadboard layout. What sets this kit apart is the mechanical assembly hidden under the tray. This project uses a polar gantry, a structure designed to move a magnet by controlling angle and distance from the center rather than horizontal and vertical axes. The gantry gives the Sand Garden its distinct character and represents the main engineering idea behind the build.
The different components of a Sand Garden.
At the heart of the polar gantry are two stepper motors mounted on a circular base. Each motor drives a small pulley connected to a larger one by a bead chain. One motor rotates a central shaft attached to a narrow wooden arm. As the arm turns, it sets the angular position of the magnet that pulls the steel ball across the sand. The second motor turns a pinion gear that slides a rack in or out along the arm. This motion changes the radius at which the magnet sits. Together, these two motions define the position of the magnet in polar coordinates. The design is not complex at first glance, but it introduces constraints that are not present in the simpler linear or rotational movements seen in the earlier Hack Packs.
The polar gantry under the garden. The first motor control the rotation, and the second moves the arm forward or backwards.
The rest of the kit forms a compact controller that supports the motion system. The Nano clone provides the main processing, while the two stepper drivers supply the regulated signals needed to run each motor. The joystick handles all menu navigation and manual control. Above it, an RGB LED bar indicates modes and displays pattern numbers through a basic binary system. None of these parts are fundamentally new, but arranged together they create a small control surface that feels more integrated than the ones in previous projects. It is straightforward, functional, and well suited to a robot designed to run slow, continuous patterns rather than short bursts of activity.
Polar Coordinates
Most of the earlier Hack Pack robots relied on motion that could be described naturally in horizontal and vertical directions. The Domino Robot followed a line by adjusting its left and right wheels. The Label Maker plotted characters by moving in straight, perpendicular axes. The Sand Garden switches to a different framework. Instead of describing positions as X and Y values, it uses polar coordinates. In this system, any point is defined by two numbers. The first is an angle measured from a reference direction. The second is a radius that indicates how far the point is from the center.
By Monsterman222 - Own work, CC BY-SA 3.0, Link : In polar coordinates, a point in space is defined by the distance from the center (radius) and an angle.
This model is not unique to the Sand Garden. Many machines that rotate around a fixed point work more naturally with polar coordinates. Radar antennas measure the angle at which a signal is detected and how far it is from the dish. Robotic arms often calculate their reach and rotation in similar terms before converting the result to Cartesian motion. For the Sand Garden, the choice is not only practical, it matches the mechanics directly. The robot rotates an arm to set the angle of the magnet that moves the steel ball. It then slides a rack in or out to set the radius. These two movements describe the position of the magnet relative to the center of the tray without the need for an intermediate coordinate system.
By Mets501, CC BY-SA 3.0, Link : Given the robotic arms of the sand gardens, its easier to represent the position of the ball in a polar grid.
In the build, both values are stored as motor steps rather than physical units. The angular axis counts how many stepper increments have occurred since startup. One full rotation is mapped to a fixed number of steps, which allows the program to convert target angles into step counts. The radial axis works the same way. Moving the rack inward or outward is expressed as a number between zero and a defined maximum, representing the inner and outer limits of the tray. When the robot draws a pattern, it generates a sequence of angle and radius values. Each pair identifies a precise location where the magnet should move next.
In the end, using polar coordinates simplifies the internal logic of the Sand Garden, since the mechanics already move in angle and radius. The software can describe positions in terms that match the behaviour of the gantry rather than converting between coordinate systems.
Building a Sand Garden
Constructing the Sand Garden involves three separate assemblies. The tray provides the drawing surface, the polar mechanism handles motion, and the controller brings the electronics together into a structured interface.
The first component to assemble is the Sand Garden itself.
The tray comes first. Foam and wood semicircles form the outer ring, and a flexible silicone sheet stretches across the bolts to create the membrane that supports the sand. The sheet needs even tension to remain flat. Any slack or uneven pull affects how smoothly the steel ball moves, which could become noticeable once patterns start forming.
The first part of the gantry, it controls the rotation of the arm.
The polar mechanism comes next. It includes the rotating arm that sets the angle and the rack that moves in and out to set the radius. Two stepper motors power these motions through small pulleys and bead chains. One motor turns the arm, while the other drives a pinion that slides the rack along its path. The parts need reasonable alignment, and the bead chains must be tight enough not to slip. The design is more involved than the mechanical systems in earlier Hack Pack kits, but once everything is in place it produces smooth and predictable movement.
The second part of the gantry adds the arms and the motor that moves the arm forward or backwards.
The controller is the final major assembly. The Arduino Nano clone, two stepper drivers, joystick, and LED bar mount on a compact plywood frame with a small breadboard at its center. This part of the build uses a series of very small plastic screws to secure components to the standoffs. The use of plastic in this case is unfortunately, as magnetic screwdrivers are very useful when manipulating tiny screws.
The last part of the assembly is the controller, which includes the Arduino Nano, an led strip and the joystick for manual controls.
With all three assemblies complete, the Sand Garden comes together as a layered system. The tray mounts above the motion platform, the magnet sits just beneath the silicone surface, and the controller provides the inputs that guide the robot’s behaviour.
The Code
The Sand Garden relies on familiar input handling. The joystick is sampled in the main loop, and a small state machine manages mode selection and transitions. Builders who explored the Label Maker will recognize this structure.
This is the first build where the control unit is seperate from the "robot" itself.
Before drawing, the Sand Garden needs to know where the magnet is. The angular axis has no fixed limit, so the code treats the current orientation at startup as angle zero. The radial axis is different. Its position must be measured from the center of the tray. To achieve this, the code performs a crash homing sequence. It drives the rack inward until it reaches the mechanical stop at the center. Once the stop is detected, the firmware records this as radius zero. From this point forward, every radial movement is expressed as a step count away from this known reference. Without this step, the robot would have no reliable way to locate future pattern points.
The challenge part of the code is translating the motion of the ball into "steps" for the motor.
The next challenge is the mechanical dependency between the axes. Rotating the arm not only changes the angle but also shifts the rack slightly, which alters the effective radius. The code accounts for this by calculating how much unintended radial movement will occur whenever the arm turns. It then instructs the radial motor to compensate by moving in the opposite direction. Both motors run together so that the final motion matches the intended target. This compensation is necessary for drawing clean circles and other shapes that depend on a stable radius.
Positions pattern_SimpleSpiral(Positions current, bool restartPattern = false) {
// This is where we'll store the value of the next target position.
Positions target;
// Going to divide a full revolution into 100ths. "const" because
// this never changes.
const float angleDivisions = 100.0;
// Going to divide the radial axis into 1000ths. Try changing the 10
// to a different number, like 20.
const int radialDivisions = 10 * (int)angleDivisions;
// Calculate how many degrees we'll move over in the angular axis
// for the next step.
const int angleStep = convertDegreesToSteps(360.0 / angleDivisions);
//Calculate how far along we'll move the radial axis for the next step.
// The "static" keyword means that this variable is defined once when
// the function is run for the first time. This is different than "const"
// because this is a variable, not a constant, so we can still change the
// value. If the following line were to omit the "static" keyword, this
// variable would be reset to its initial value every time the function
// is called, meaning that we couldn't change it between positive and
// negative to make the spiral grow inward or outward.
static int radialStep = MAX_R_STEPS / radialDivisions;
// Set the angular position of the new point to move to (target position)
target.angular = current.angular + angleStep;
// Set the radial target position as the current radial position plus
// the radialStep
target.radial = current.radial + radialStep;
// Logic to see if the targeted radial position is out of bounds of the
// radial axis
if (target.radial > MAX_R_STEPS || target.radial < 0) {
// If we're out of bounds, switch the sign of the radialStep
// (now we move in the opposite direction)
radialStep *= -1;
// We were already out of bounds, so we undo that by moving 2
// radialSteps in the new direction.
target.radial += 2 * radialStep;
}
// Return the target position so that the motion control functions can
// move to it.
return target;
}
The simplest pattern included in the stock code, SimpleSpiral will create a simple spiral in the sand.
Each of the Sand Garden’s patterns is implemented as a function that generates a series of angle and radius targets. Some functions produce simple growth patterns, such as spirals that expand or contract over time. Others compute polygon points or more complex shapes. Once a pattern function computes the next target, the motion code translates that into coordinated motor steps and handles the compensation described above. The separation between pattern generation and motion control keeps the code readable, although understanding how the magnet reaches each point still requires some comfort with stepper math and the behaviour of the polar mechanism.
Markbot played a practical role in understanding the math behind the Sand Garden. The assistant is a limited LLM trained specifically on the Hack Pack code and supported by guidance from the CrunchLabs team. It can explain how the polar system works, break down compensation logic, and clarify the step calculations that drive the gantry. Its tone can drift toward the playful side, which is consistent with its intended audience, and it is tightly restricted to questions about the project. Within those boundaries, it is effective. For a kit that relies on trigonometry and coordinated stepper motion, Markbot provides enough context to help builders follow sections of the code that would otherwise be difficult to interpret.
In Conclusion
The Sand Garden is one of the more unusual builds in the Hack Pack lineup, but it also feels like the weakest. The build itself is enjoyable and the polar gantry is a clever mechanical idea, yet the project does not introduce much that is new. Electronically it reuses familiar parts, and mechanically, it adds only a single new concept. Where it stumbles is in the depth of math required to truly understand or extend it. The trigonometry, compensation logic, and step-to-coordinate conversions sit well beyond the typical 14-to-16-year-old builder. That makes meaningful innovation harder, since experimenting with the project demands a comfort with math that most beginners simply don’t have. It is still fun to assemble and mesmerizing to watch, but as a teaching tool, it doesn’t reach the clarity or accessibility of the stronger kits in the series.
Do you enjoy experimenting with mechanisms, motion control, or small workshop projects? Share what you are building in the comments below. For a peek into the space where these projects come together, take a look at the Electronic Workbench.
Learn more
Discussion in the ATmosphere