Inspiration
Using a flat 2D mouse and keyboard to work with 3D models on a laptop screen has always felt awkward. Even with VR or hand tracking, when you reach out to touch something in mid air, your hand just goes right through empty space. Real haptic arms that let you feel 3D objects cost thousands of dollars, so we wanted to see if we could build a cheap handheld 3D wand that lets you reach into your screen, move stuff around in 3D, and actually feel when you hit a virtual surface.
What it does
AirTouch is a 3D printed handheld wand that connects to a 3D web studio in the browser.
We put a bright LED inside a diffuser at the tip so the laptop webcam can track where your hand moves in 3D space (X, Y, Z). Inside the wand, an MPU-6050 gyro and accelerometer tracks how you tilt and twist your wrist. When your 3D cursor touches an object on screen, the browser sends serial signals back to the wand to trigger the vibrator motor so you can feel collisions and textures in your hand. In the web app, you can sculpt 3D shapes in mid air, test out different virtual surface textures, slice through CAD models by tilting your wrist, and spawn objects with voice commands.
How we built it
We designed the two piece wand shell from scratch in OpenSCAD and 3D printed it at the makerspace. For the electronics inside, we wired an Arduino Nano to an MPU-6050 IMU on A4 and A5, a pushbutton on D2, a vibrator motor on D3, and a front tracking LED on 5V, with all the ground wires spliced together into one shared ground. We used arduino-cli to compile and flash the C++ code, streaming sensor data over serial at 115200 baud.
On the software side, we built the web app with React, TypeScript, and Three.js. We used the Web Serial API so Chrome could talk directly to the Arduino, and built an HTML5 Canvas tracker to follow the glowing LED tip at 60 FPS.
Challenges we ran into
At first we thought about tracking 3D position just from the accelerometer, but double integrating acceleration makes the cursor drift off the screen in two seconds. Splitting the tracking up so the webcam handles X, Y, Z position and the IMU only handles rotation fixed the drift completely.
We also had a few headaches with the 3D print and hardware fit. On our early shell prints, the alignment pins were way too weak because their bases didn't fully touch the curved wall and kept snapping off. We went back into OpenSCAD, made the walls 3.2mm thick, and used 6 wider pins with conical bases so they wouldn't break.
Later on, the hardware lab ran out of the tiny Seeed XIAO boards we originally designed the shell around, so we had to switch to our own Arduino Nano. Because the Nano is twice as long and we forgot to leave extra room in CAD for all the soldered wires and our 4 into 1 ground splice, the inside got super packed. We couldn't get the lid to close all the way over the wires, so we ended up taping the shell together to keep everything tight.
Accomplishments that we're proud of
We are really proud that we turned a scratch OpenSCAD design and a bunch of parts into a working handheld controller instead of just waving a breadboard around. Getting the webcam tracking, gyro rotation, and vibration feedback working together smoothly in Chrome with zero extra drivers felt great, especially after surviving the board swap and super tight wiring.
What we learned
We learned a lot about 3D printing tolerances the hard way, especially how much wall thickness and infill matter for small pins. Most importantly, we learned to always include extra space for wiring in CAD, because soldered wires take up way more room than you think when you actually try to close the lid.
What's next for AirTouch
Next we want to redesign the shell with proper channels for the wires and Arduino Nano so it snaps shut cleanly without tape. After that, we want to swap in a smaller wireless board with a tiny LiPo battery so it runs over Bluetooth without a USB cable, and support two wands at once using two different LED colors so you can use both hands.