ESP32-Powered Tabletop Kinetic Sand Drawing Robot
Intro: ESP32-Powered Tabletop Kinetic Sand Drawing Robot
In 2020, back when I had just started my sophomore year of high school, I built a very basic sand plotter robot that drew patterns in sand. Three years later, I wanted to use the skills that I have taught myself to revisit the design in order to be able to take it to college with me to Purdue in a couple of weeks! You can read more about the original robot here
The original inspiration came when I saw an Instagram ad for the SANDSARA Indiegogo campaign back in late 2019/early 2020.
This redesign has been in the making for the past six months. I recently wrote it up on my main blog here, however it was more of a showcase. I will attempt to explain in detail how to construct it, but feel free to leave a comment or contact me if you would like any more information :)
STEP 1: Fusion 360
I designed this kinetic sand robot to be extremely slim, and with everything printed, it is under 3in tall! There are a lot of overlapping parts, mostly around where the large theta gear attaches to the base plate. The entire robot was designed from scratch in Fusion 360, and I've shared them online through Fusion Team (here)
Yes, Fusion 360 does say that this is version 55 of the mechanism... I spent longer than I want to admit during this phase of design :)
I started by sketching the rough shape of the enclosure, and then split it up along the large overhang to ensure printability. I then built the robot baseplate, modeled the lazy susan bearing, and the central gear stackup.
I've attached both a cutaway view and an exploded view of the robot assembly for more detail into how it goes together.
STEP 2: 3D Printing!
I printed everything in black Polymaker ABS using 30-50% gyroid infill depending on the part. Usually, the internal components got 50%, and I just printed the enclosure with enough shells to make it solid. I'd estimate that I used almost all of the 3kgs of filament I bought for this project. I did a few printer upgrades during this project as well :p
PLA would've fared better in terms of less warping, however I wanted the structural properties of ABS.
I've attached a photo of me test-fitting the linear axis and it's guide rails.
STEP 3: Robot Assembly
I added 4-pin JST connectors to the stepper motors, a 5-pin connector to the TSL2561 light sensor, and 3-pins to both magnetic endstops and the LED strip.
I then installed the theta stepper motor with countersunk M3 screws to the robot base plate. Then, I put the GT2 pulley on the motor, and screwed the lazy susan bearing into both the large central theta gear and the lower base plate using M3 screws. The bearing snaps right into place and shouldn't wobble. In the Fusion assembly, there is an optional spacer that can be used if it does. The linear axis and guide rails screws directly into the top of the theta gear with some heat-set inserts.
STEP 4: PCB Design
I designed a very basic breakout board for all of the components using the standard version of EasyEDA and had it manufactured with a black soldermask.
I actually ended up changing the name to "Tranquil" when I was writing the web interface, I just never really wanted to re-order the boards just for some text.
The design is available here
STEP 5: PCB Assembly
I simply soldered down the motor drivers, ESP32, and the JST connectors. I added an optional SD card slot that is compatible with MPN#47352-1001 (Mouser) I hand-soldered the connector with a fine point tip and some no-clean flux.
STEP 6: Connect It All Up
I installed one of the magnetic endstop sensors right into the tiny hole offset from the center to sense when the theta gear arrived at a known position
The fully assembled robot base plate simply slides into the center of bottom half of the enclosure.
STEP 7: Assemble Enclosure
Place top half of enclosure on bottom half. Screw down with heat set inserts & 12 10mm M3 screws.
STEP 8: Add Sand
I took some generic craft felt I had at home and spray glued it to the bottom of the sand bed to make it super quiet. Then, I just dumped some Home Depot sand and spread it around with a butter knife.
STEP 9: Lights! Camera? No, Just Lights..
I stuck the LED strip on the sides of the sand bed with some double sided foam tape, and ran the 3 wires (5V data and ground) through the tiny slit on the side, down to the main control board.
STEP 10: Compiling the Web Interface
The web interface was written from scratch with a mix of TypeScript and Vue 3. State management is done with Pinia and data fetching is done with a set of Axios request interceptors.
The GitHub repository is here.
Simply clone and build the project to continue,
You can build the project on a *nix machine by running (change command for equivalent on Windows machine)
yarn && yarn build
Save the generated build files that are output in the ./dist directory.
STEP 11: Compiling the Device Firmware
The firmware has been re-written from almost the ground up and has been in the works for at least a year now. It's a normal PlatformIO project and can be downloaded from here. Drag the built web assets to this directory and PlatformIO will automatically move them to the ESP32's SPIFFS partition.
The patterns featured are not provided and can be downloaded from the open internet. The web interface simply lists what patterns are installed on the device.
STEP 12: Configuring Device
Once the firmware is installed, the device will setup it's own access point named "Tranquil" where all initial configuration is done. You can connect it to your Wi-Fi, setup OTA updates, and even (in my case) set it up as a WireGuard client. (see next step)
STEP 13: Wireguard Client
You can go to the settings tab of the device and insert the relevant keypair and endpoint information for the robot to join a remote WireGuard subnet.
I make use of this as the college that I will be attending in the fall implements client isolation on their network, and without this, I would have no way to control the robot.
STEP 14: Enjoy!
Thank you so much for reading! If you want to build your own, but are stuck somewhere, please let me know in the comments and I will definitely try my best to help!
I've now built two sand drawing robots and have gained so much experience in designing for printability and ensuring that the firmware that I write is stable!
You can see more of my projects on my blog: https://vigue.me, or follow me on GitHub @acvigue
44 Comments
Jonnie Cache 4 weeks ago
I've gotten to the point where everything seems to run initially. I'm able to connect to the Tranquil WiFi AP and get the initial screen. The problem I'm running into is that once I put in my home's WiFi credentials, it doesn't let me access the web interface any longer. In the monitor, I can see that it grabs an IP address (192.168.1.90), but I can't seem to access that address. Has anyone gotten past this?
Jonnie Cache 2 months ago
Hi! I'm working on building this project and have a few questions.
I noticed that there is a buck converter on the board, but there is no information about it. Does anyone know what buck converter should be used?
What is the USB-C connector for? I can't figure out where it connects internally. The dev board uses a micro USB, so I'm not sure. Is it meant to be external access for the ESP's USB connection?
What is the DV input voltage / amperage needed?
Jonnie Cache 2 months ago
For other makers' benefit, the buck converter is a 24V to 5V stepdown to power ESP32 & leds. The USB-C is just a panel mount USB C and there's a USBC to Micro USB adapter dongle inside to connect it to esp32 - it's just the programming port made accessible. Power supply is 24V 6A.
DeejayO1 3 months ago
Hi, great project! Iwould likr to realize. Where I can find stl files for print?
Thanks in advance
DeejayO1 2 months ago
Hi, I've try to download and open the project in fusion but i've problem to export the part in stl. If for you is not a problem you can send me a zip at deejayombra @ gmail . com
tnx in advance!
Jonnie Cache 2 months ago
The Fusion 360 files are provided here. You can use Fusion to open them and export to STL. If you need help, I can make STLs for you if you let me know how to get them to you.
gmagyar6 6 months ago
I would like to do it, but I'm stuck there because I can't find the stl files of the 3D parts to be printed in the description.
There is a Fusion360 share, but as I can see, it also includes the non-printable parts.
Could you share the parts to print?
Thanks in advance!
C0ld1 7 months ago
Medh 8 months ago
Also, is it possible to put the .thr files on the sd card without using the TranquilAPI server.
faltdorr 8 months ago
Medh 8 months ago
Dont worry about English, its Ok. I have already tried this. I disabled the 'window.authInProgress'. I was able to draw patterns stored in the SD card. However, there were no thumbnails (and other information), as the frontend tries to get these from the TranquilAPI server (has to be hosted on Cloudflare).
You will need to store the .thr files in the root of sd card and put the relevant information in the manifest.json file, so that the device can detect these files.
I want to test the table with full functionalities, that is why I set up the TranquilAPI server (looks like not the correct way).
Let me know if you figure out setting up the server, it will be of immense help.
Medh 8 months ago
However, on connection, I do not see anything. Page shows an error "ERR_CONTENT_DECODING_FAILED". I am stuck at this point for a few days. I have not made any changes to the Firmware and the Web-Interface. It will be really kind of you if you can help me in solving this issue. Attached are the images of the Setup and the PCB board.
scott_12345 10 months ago
aidenvigue 10 months ago
scott_12345 10 months ago
ive ordered the same board you used anyway but
I build TranquilVue, put all the files from "dist" output into a folder at the root of TranquilFirmware called "data", upload filesystem, upload.
I've tried the other way upload, upload filesystem, same results
seems to be uploading both fine, is there something im doing wrong?
upload filesystem image log:
pastebin.com/jzf9gPiq
upload log:
pastebin.com/WXdraRgb
serial monitor:
pastebin.com/vRVpLDYm
Medh 8 months ago
I am facing the same issue.
Although I have the full pcb board with all the components mounted.
SD card also seems to work fine, I can see the manifest.json file being created on it after the programming.
aidenvigue 10 months ago
hackintoshlover12 9 months ago
Did you get a chance to go through the issue?
The webpage does not open, too may redirects.
scott_12345 10 months ago
KevinS493 9 months ago