Nova Maker Faire – June 2, 2019

Magic Sandbox goes to Nova Maker Faire!


Magic AR Sandbox Sign

Our Magic Sandbox version of an AR sandbox will be at the

Nova Maker Faire on Sunday, June 2, 2019.

What:   Nova Maker Faire
Where: George Mason University
4400 University Drive
Fairfax, VA 22030
Building location: The Hub
When: From 11 a.m. to 5 p.m. on Sunday June 2, 2019

George Mason University Campus Map

Campus Map GMU-The Hub

Sand in your keyboard? Make an AR Sandbox Button Box!

Elena Bachman, Sharon Dempsey, and Nick Carter made the Magic Sandbox, an Augmented Reality game, as a 2018 Maker Faire exhibit for Nova Labs in Reston, Virginia. We will show this again at the 2019 Maker Faire at George Mason University.

1. Nov 27 2017 Test Sandbox

See here for a description of the origins of the AR Sandbox.

Magic Sandbox

Nick explains how to make a button box for the Magic Sandbox

Because some of the games require keyboard manipulation to start the games or change the parameters, I was concerned about sandy fingers getting onto my laptop and into the keyboard. So I decided I needed a way to provide game choices with a separate control that players can access safely. The game software has single keystroke control to allow game selections and reset, so I set out to build a box whose buttons sent these keyboard characters to the laptop as if coming from a keyboard. I suppose I could have used a separate keyboard but I thought buttons and lights were more fun.

First I needed to learn how to simulate buttons on a USB port. It turns out that some (but not all) Arduino microcontroller boards can emulate a device USB interface, and I would be able to write a program interface to buttons and lights and send characters to the laptop. I also found that other people had implemented a similar function. See this single button on a box at:  I also found there was a library function called not surprisingly, “keyboard.h” This needs to be “included” at the start of the Arduino program. (i.e., type #include “keyboard.h” at the top of your program).

Hardware for a Button Box

The Arduino Leonardo has the USB functionality and looked like a good fit as I did not need a really small board because I expected the buttons to be fairly big. Then I needed a box. I decided to buy rather than 3D print one, and I found a nice plastic electrical box at Lowe’s (something like this one) that was approximately a 4 inch cube.

The characters I wanted to emulate were the M, the F and the R. These would pick 2 games involving animated “fish” and “bunnies” (projected onto the sand) that you could guide by manipulating water and land heights to help them reach their goals; and R was the game reset.

I found 3 short momentary (push to contact) pushbuttons with separately controlled LEDs and 3 small panel mounting LEDs at Mammoth Electronics (see this link for examples) which fit nicely across the width of the box in rows of 3. 2 Mounted buttons
Next, I marked and drilled the box lid and started the assembly. I had some ribbon cable so I decided to use this to keep the wiring neat. I laid in a bus bar for the power for the LEDs and wired in the voltage dropping resistors – to the button and lamp LED terminals, and wired in the switch ground wires. I wired the switches so that when pushed they connected the Arduino input to ground, and planned to use the Arduino internal pin pullup resistor to ensure that when the button was not pushed the inputs were held high.
Then I was able to position the ribbon cable and separate the individual wires and trim them to the length to reach their individual destinations.
After that I prepared the other end of the ribbon cable and power wiring for plugging into the Arduino board, by soldering the wires onto header pin strips that fit the Arduino and using heat shrink sleeves over the joints. 4 Arduino wiring
I was able to locate the Arduino on the bottom of the box, raised up on a foam core board backing, and I drilled a side hole in the box to accommodate the USB connector. Then I attached the backing and Arduino board with double sided sticky tape, and plugged in the header wires.
While this is not a complex project, I wanted to make sure the hardware worked before I wrote the full software. The first thing I did in testing was to verify the LED lights and the Switch LEDs operated and the brightness was appropriate and that the Arduino could read the switches and control the LEDs.
At that point, I found the white LEDs on the switches were way too bright especially since the Sandbox is used in dim lighting, so I changed the resistors for those LEDs to a higher value. I could have programmed the Arduino to dim the LEDs by using pulse width modulation but I did not think of that at the time.
I wanted to have the operation designed in a way that would discourage “button mashing” so I did several things to discourage that. First, I used the LED on the Switch to indicate that the game was changing states by flashing the white switch LED on and off until the game had changed state (also trying to discourage more button pushing). Second, I used the red LEDs to indicate what game state the program was in, and only light that LED once the game was in that state, and third, once a button push was detected, I waited so see if it was a sufficiently long push to be intentional, then ignored further pushes until the game had changed state.
The red game state LED was positioned above the switch that caused that state. Since the box was emulating a keyboard, I did not get information on game state from the laptop so I waited for a suitable delay instead while the game state was changing. I basically used brute force programming for speed, testing for each button sequentially within the execution loop and did not try to minimize the code.
In testing, I found that because the code sent keyboard characters back, if a program error caused characters to be sent without button pushes, or if buttons were pushed when the program window was active, the characters would embed themselves into the code or open window – so I needed to be careful to open the Monitor window or have a different window active to accept the characters once the code was uploaded and running.
5. Completed box Then I labelled the button/status combinations for the games.This button box was used successfully for several public occasions until last time, one button stuck in, surely due to a sand grain getting into it. Subsequently I pried the button back out with knife but in future I will cover the switches with plastic wrap when in use to prevent further sand ingress.

More information can be found a:

Magic Sandbox sign in dark

Catbird by Gary Leavens

Inside the Box

AR Sandbox – What’s in the Box?

The AR Sandbox at Nova Labs maker space presents an augmented reality display by means of:

  • a Kinect depth-sensing camera
  • a digital projector and
  • a laptop computer


Kinect XBOX360
Model 1473 Camera

Infrared depth-sensing camera


iDGLAX Model iDG-787W

Brightness: Claims range from 1500 lumens to 300 lumens (probably the lesser); LED lamp
Dimensions: 8 x 6 x 3 inches


Dell Inspiron 3542 laptop (2014)
CPU Intel Pentium 3558U
(1.7GHz) 2 core
4GB RAM, integrated graphics
(not very fast but adequate for the Magic Sand software)


The Kinect camera and the projector are mounted approximately 3 to 4 feet above the sandbox. For our first exhibit at Nova Labs, we mounted the Kinect and the projector on a tripod. Later a metal support was attached to the sandbox frame.

Tripod board

Tripod and Mount

Tripod – Promaster 6400
(extends to 70 inches)

Mounting Board

The mounting board is a piece of plywood, 3/8-inch thick and 12 inches square. The projector is attached to the mounting board with Velcro straps. The Kinect is screwed onto a small 4-inch square plate.

Mounting Board Kinect camera and iDGLAX projector on board
On the back of the mounting board, a U-shaped metal plate is attached to the tripod. back of mount board

The Nova Labs AR Sandbox is a modification of the designs presented by Oliver Kreylos at University of California Davis, USA, and Thom Wolf / Rasmus Paulsen in Europe. Our sandbox is portable and inexpensive. We were able to construct it at a cost of less than $175. The Nova Labs AR Sandbox uses Windows software authored by Wolf and Paulsen. We found it easier to work with than the Linux-based programs from UC Davis.

Instructions for building an AR Sandbox can be found:


Photoshopped Nova Labs Signage

Nova Labs is a maker-space in Reston, Virginia, outside of Washington DC. In the summer of 2017 a group of makers decided to make an Augmented Reality Sandbox. We succeeded (finally) and exhibited our AR Sandbox on December 2, 2017 at the Nova Labs Maker Market.

How we made the sandbox we’ll explain later, but first…

What Is an Augmented Reality Sandbox?

An Augmented Reality Sandbox consists of a container of sand, a Kinect depth-sensor camera, a projector, a computer and software.

AR Sandbox components

The Kinect infrared camera and a digital projector are mounted above the sandbox, and both camera and projector are connected to the computer via cables (HDMI cable for the projector and USB cable for the Kinect).

When someone moves the sand in the sandbox, the Kinect camera calculates the height of the sand (distance from the camera) and sends this information to the computer. Meanwhile, software is projecting colors, topographic map lines and images onto the sandbox. As you move the sand around, the colors change and so do the map lines and images.

Elevated sand (mountains) is red; valleys range from green to blue (water). Depending on your software, if there is a game there will be other images projected on the sand also.

Sand colors in AR Sandbox

Who invented the AR Sandbox?

Oliver Kreylos created a virtual reality software called VRUI (Virtual Reality User Interface) which is the basis for the sandbox. The original AR Sandbox was developed by Kreylos at the University of California Davis. The UC Davis AR Sandbox website has complete instructions and software download for building an AR Sandbox running on a Linux or Apple operating system.

There are now AR sandboxes all over the world, with various modifications. Here is a photo of our Nova Labs AR Sandbox in Reston, Virginia. It actually uses a Windows version adapted from the UC Davis software, made by Thomas Wolf in The Netherlands with some games written by Wolf and Rasmus R. Paulsen. Instructions for Wolf’s “Magic Sand” AR sandbox are here and the Magic Sand Github page is here.

Nova Labs AR Sandbox