magic sandbox

A magic sandbox I made for my 3 y.o. son’s birthday. Detailed BOM and source code included.

The result

And the recipient at work !

If you want to stay updated with future news/developments about the project, just click here

Still pretty neat in daylight conditions ! (untreated pic)

The principle of the magic sandbox is as follow: A kinect sensor checks the level of the sand, send it to a laptop then the laptop control the output of a projector hanging over the sand to project colors depending on the height.

This project is adapted from the SArndbox project developed at UC Davis which has additional explanations on the Kinect/Projector assembly and advices. Check it out here:

Fish in the sand

I also made a little game where you can play with fish in the sandbox. The player can help them to reach their mothers by digging rivers in the sand or building mountains.

Binaries compiled for Windows and OSX can be found here

The code is free to modify and improve. It is here:

The Magic Sand code is an adaptation of the SArndbox project developped at UC Davis:
Magic Sand was adapted to be a framework for developing games/applications and I put explanation in the github repo on how to use it for building other applications.
Please feel free to do so and ask me if you need more informations !
One idea I have is to add city dynamically building on the shores (in a Simcity or Populus way).


Basically, we need a standard home projector, a kinect sensor for Xbox 360, some wood, L-angles, bolts and nuts.

Apart from the home projector (about $300), the sandbox was really cheap to build. I spent about $50 I guess since I was able to reuse some spare wood. If you have nothing but a home projector, you can expect to get all the materials for less than $100.
I put a detailed Bill of Material with some detailed references here:
There are also additional information in the BOM (things to remember, characteristics to check out) so be sure to check it out ! And here is a SketchUp of the whole thing (Now I got you covered)


We need about 2-3 gallons of sand, i.e. about 25 lbs (12 kg).
I started with regular sand that I had left and tried later two brands of inside play sands: “kinetic sand” and “sand alive”.
Kinetic sand is really great for this application I think.
Sand alive is whiter and behaves very differently from real sand. It is also nice but IMO a little less fitted for a sandbox.

They are both about $50 for 11 lbs so it adds some overhead to the price of the sandbox. But I found that it really improves the user's parents' experience by keeping the sand inside the box 😉


The sandbox will be secured on top of an Ikea LÄTT children's table in such a way that it can be removed. This children's table is just the right height for a sandbox and its small width will keep the projector not too high above the table top.

We need a Kinect V1 (the old round kinect for Xbox 360).

It is safer if you can get the original 1414 Kinect as the later versions (1473, 1517 i.e. Kinect for Windows) may not work on Mac OSX if they have been plugged to an Xbox (more details here:–1414-1473-etc-or-kinect4windows-devices-that-have-been-plugged-into-an-xbox-will-not-work-with-ofxkinect-on–mac-osx).

The first step was to prepare the kinect sensor since the one I got had no USB AC Adapter.
I soldered an old 12V 2A power supply previously used for a broken hard drive. It is all explained here:

If you are afraid of soldering, you can also grab an AC USB adapter like this one:


You can use about any home projector that you like as long as it is sufficiently bright (>1000 lumens is better I think) and its throw ratio is less than 3 (otherwise the projector ends up really high above the table).

I used an Acer P1185 which has a throw ratio of 2 and a brightness of 3200. The projector weighs only 2 kg, is not very loud and is also quite cheap, around $300.


My very basic set of tools…
Distance check

Roughly checking the distance between the projector and the table top.
Theory confirmed

The Ikea table is 2 feet wide and the projector's throw ratio is 2 so we need to set the projector about 4 feet high (122 cm). Theory checks out !
Wood work

Time to start the wood work.
We need four walls for the box, two 2' long boards and two 1.5' boards. My main wood board was 7" wide and 1" thick which was just fine. (see the BOM above for details on the wood)

These boards will support the weight of the projector above our toddlers so we want the assembly to be quite solid. I took some strong steel L-angle (3.5"x3.5") and M8 bolts. I also had hard wood, don't use poplar for that.
Son is in the area

There is an old saying in DIY that if you do something with your kid around, you will end up doing it again. I drilled 4 holes instead of 2.
Four walls

We have our four walls ready, time to prepare the projector pole.
Projector pillars

We nail a platform on two 50” long pillars. (see the BOM)
A strong platform
Box assembly

Let's assemble the box
There it is all square and fine. Actually this DIY is all about making a wood box.
No sharp edges please

I used some carriage bolts and cap nuts to avoid any sharp edges.
In my case 16 M8 bolt 30 mm long but it depend on the thickness of your wood of course.
Everything get together

Time to fix the projector pole. The pillars extend below the sandbox walls so we can use them as end stops in the horizontal direction. The pillar are secured by 4 M8 bolt that are 70 mm long.
On the table

It fits rather nicely on the children's table.

We add end stops on the other sides of the box to secure the sandbox in the horizontal plane. The weight of the wood boards and the 25lbs of sand is sufficient to keep the assembly from tilting over in my case (I was quite surprised by the overall stability of the sandbox) but you should probably secure the pillars to a wall if you don't plan to be always next to your kids.
Fine adjustements

Now we can set up the projector on the pole. We need to find the precise location of the holes on the platform to secure the projector.
Three holes to rule them all

My projector has three gray M4 threaded holes.
I placed a match dipped in wet paint in each threaded hole and placed the projector on the platform to mark the location of the holes.
Fixing the projector

Then I drilled the three holes. I ended up using only two of the three holes to fix the projector in order to adjust the angle of the projector more easily (the ACER P1183 is quite light so it is okay). I used 2 M4 screw (30 mm and 40 mm) + 2 washers
Tilting the projector

The projector has to be slightly tilted as it projects its image a bit upward.
Final alignement

Aligning the projector to get the projected image to fit nicely in the sandbox
Kinect holder

Now it is time to build a structure for holding the kinect. I made a 12"x9" U-shape in light wood with two steel angles for securing to the projector pillars. The kinect is quite light so you can use a light wood (plus you want to keep your center of gravity as low as possible).
The kinect holder

We confirm that the kinect holder doesn't block the projector image. It is secured with 4 small wood screws.
The kinect cannot measure a distance less than about 1.5 feet from its sensor and we want at least 1 feet of vertical space to play in so the kinect holder has to be set higher than about 2.5 feet from the tabletop.
3 feet from the table

In my case, the kinect holder is about 3 feet from the table top (94 cm). You can put it higher or lower if you want. You probably don't want to fix too high as it reduce the resolution and don't want to fix it too low to be able to sens the high mountains as mentioned above.
Tapping the kinect

Taping the kinect to the holder (what a beauty !). All that's missing is the sand now !
Sandproof lining

I cut a tablecloth according to the correct dimensions and added some eyelets for a bungee cord. In my case the original tablecloth was 60"x60".
It makes a nice water and sand proof lining inside the sandbox.
Ready to start

If I was to do it again, I would take a darker tablecloth to get a better contrast.

Now it is time to start working on the software. That part should be rather quick….

Final stage

(4 months later) … and there it is 🙂 (untreated image again !)
Source : Thomjazz from Reddit