The SNAIL : an Esp32-powered Sensory Neurofeedback Acoustic (MIDI) Instrument (The L Is Silent)
by alyssagsmi in Workshop > 3D Printing
394 Views, 4 Favorites, 0 Comments
The SNAIL : an Esp32-powered Sensory Neurofeedback Acoustic (MIDI) Instrument (The L Is Silent)
This project came to me when I saw this contest...4 weeks ago. Blending a sophisticated cello/guitar hybrid with as many otherworldly instrument designs as possible, I was inspired by logarithmic and nautilus spirals, snails, and the possibility to bring many concepts into a 'smart' instrument system. Developed as a deep dive into embedded systems, mechanical torque, and cognitive flow states, my 'Cathedral Snail' features a rotating "Picker Disc," a 144-LED reactive light array, and an integrated 'musical flow states' system featuring different midi/mp3 sounds and effects. I was really blown away by 'feature creep' and by all the work that was required from my ideas...I feel like a mad scientist! This was 100% late night brainstorming sessions, drawings, and extensive use of Autodesk Tinkercad—probably ill advised for this project, but I like the UI. Future iterations will be made, from synth integration(Mozzi synth library) to adding 4 strings that can be manipulated by the joystick, potentiometers and the whammy bar(another potentiometer) as well as funky presets that can be loaded onto the esp32.
Downloads
Supplies
Core Processing & Control
- ESP32-S3 Development Board: Features a Xtensa LX7 32-bit dual-core processor (240MHz) with 8MB internal PSRAM and 16MB external SPI Flash (N16R8).
- 4 neodymium magnets (salvaged from dead hard drives)
- 4 6mm buttons (for the dpad)
- 3 Potentiometers
- Piezo pickup module
- Instrument input jack
- Flatwound Nickel plated(Magnetic) Electric Guitar Strings
- 500mm Carbon Fiber rod for support
- 3D Printed/Custom Chassis
- A 3d printer with Lots of Clear PETG filament (or any of your choosing)
- An xbox one controller, preferably broken
- Several 'Arduino/Esp32 Electronics starter kits'
- A soldering iron
- Wire stripper
- Digital Calipers
- Multimeter
- Screwdriver + Allen keys
- Heat set inserts
- Heat shrink
- Electrical Tape
- Small speaker
- Usbc breakout board
- ADS1115 ADC Module
- PCS8574 Expansion Module
- DFplayer mini Mp3 Module
- Xbox Rumble Motor, also salvaged
- S8050 NPN Transistor
- 1N4001 Flyback Diode
- Lots of female-to female jumper wires
- 3.7v lithium battery
- 3-5v booster module
- Addressable WS2812B LED Strip
- Epoxy, Super Glue, Hot Glue and Other Fasteners
- Patience
The Inspiration
The SNAIL with SnailOS is a "Hybrid Chordophone" that draws from several distinct mechanical lineages:
- The Hurdy-Gurdy (Mechanical Friction): The intention was to replace the hand-cranked resin wheel with an automated, high-torque motor system.
- The Circle Guitar (Rotary Strumming): A cool new instrument invention is the Circle Guitar, which uses a motorized ring of small pick nodes to 'strum' the guitar at many speeds for rhythmic variation as well as replacing the strumming hand's job entirely. My instrument uses a spinning Picker Disc to achieve "inhuman" strumming speeds (tremolo) as well as neodymium magnets for a creepy 'warble' effect.
- 'Music-Shaped Objects': I went on a mission to research any and every kind of acoustic or electronic instrument—from the violin and cello to handmade midi instruments, my research sent me to far away lands and designs I didn't know existed. Research into the Hurdy-Gurdy and retro 'synth guitars' informed the "Snail-Vox" and "Synth" states—focusing on drone-based, haunting, and dissonant frequencies rather than standard musical scales.
I initially drew a snail that would have a back-horn speaker effect echoing through the body; but as the thing evolved I realized there's be no room for all the electronics I intended, so I designed something akin to a headless double bass mixed with a les paul the size of a baritone ukulele.
Bringing a Design Into Reality
Tinkercad and I go way back. I have learned several engineering-grade CAD softwares, but this one just feels the most intuitive. I am studying cognitive science, so my interest in cognitive load was the basis of my work—how could I make an instrument that took 'thinking' and chord shapes/progressions away from the user's cognitive load, and replaced them with tactile, haptic and visual feedback? The neck is an adaptation of a really cool Printables instrument I also took inspiration from for the scale. I added a rounded nut to accommodate a specialized fretboard: it uses a compound radius like a violin or cello that flattens to a guitar radius, with no frets—the intention is to 'feel' your way around until it's natural muscle memory. To make the body, I took my Frankenstein's monster drawing, made a .png into an .svg and extruded it. I'm really impressed I was able to make the body from a drawing and some shapes. I added a Dpad, a joystick and traditional tone and volume knobs.
Hardware and Software
The Processor: ESP32-S3 (Xtensa LX7, 240MHz). Crucial for handling the "parallelism" of the UI, motor timing, and I2C/SPI communication.
The Display: 2.8” IPS TFT (ILI9341V). Optimized with lowered 27MHz SPI speed and explicit inversion to prevent ghosting during high-speed UI transitions.
The Logic Expansion: ADS1115 16-bit ADC. Used to bypass the ESP32’s noisy internal ADC for "Studio Grade" joystick precision.
Power Isolation: S8050 NPN Transistor & 1N4001 Flyback Diode. This is the "Power Muscle," allowing the logic pins to control the high-current salvaged Xbox rumble motor.
Visual Feedback: 144 Pixels/m WS2812B Strip. A high-density array used for "Data Visualization" of the music.
Learning Platform.io: I had never used it before this. It's a bit daunting; but against all odds it's very respectable for programming and testing microcontrollers. It has a large library of project examples as well as templates for over 1500 boards.
I also scavenged and took apart any and all electronics I could find to learn about smd level components, motors, pcbs and microsoldering. I thought about adding a vape 'puff sensor' for a flute-like experience—but that's a bit unwieldy on this instrument, so I'm going to make another one(stay tuned).
I had an especially good time picking out ESP32 components and modules that allowed me to expand the use cases—I'm thinking about an IR sensor-enabled pickup and a gyroscope that oscillates the sound like a theremin. There's so many kinds of sensors availible I have multiple instrument ideas in mind that are distinctively unique—and 'weird synth junkie'-esque.
SnailOS and Midi Music Controller
The Theory: Reducing "Cognitive Load"
In music psychology, a "Flow State" is interrupted when a performer has to stop and think about trained muscle memory, chord progressions, finger placement or technology. My UI solves this through:
- Visual Pacing: The 144-LED strip changes hue and "flow speed" based on the selected instrument, giving the user an extrasensory cue of their current state without needing to look at the screen.
- Haptics and tactile feedback through the vibration of the speaker and motor, whammy bar, joystick and lights that change color depending on what setting or instrument state you're using.
- The States:
- 'Guitarviol': A droning electric guitar-software assisted electric guitar or viola.
- SYNTH: Drone-based oscillators on a touch screen 'kaos pad'.
- DRUMS: Drum Pad with customizable presets.
- SNAIL-VOX: A granular synthesis approach to vocal timbres controlled by touch and the joystick.
- BASS: Sub-harmonic frequencies designed to vibrate the physical chassis like a larger instrument with sub-octave shifting.
Downloads
What I (and My Ai Assistant) Learned
I used Gemini as a backboard for brainstorming, help with wiring things I didn't yet understand, mechanics research and a lot of the code work. I learned a whole lot; I don't think I would have otherwise—the AI was able to sense the directions I was taking myself and offer extensively complex mechanical and electrical techniques (that went over my head) that I used to make step-by-step instructions and guides for myself to push on. There was obviously a lot of frustration using ai as a lab partner—namely that it 'forgets' and 'hallucinates' information--about 6 times I threw up my hands as it completely broke my script—but all in all I think the future of AI rests in the hands of a human creator's brain, ingenuity and creativity; and now there are no boundaries keeping me from taking on an enormous challenge.
Technical Lessons Learned:
Building the Cyber-Snail was a masterclass in the difference between a Tinkercad simulation, a silly idea and physical hardware implementation. Below are the three most significant technical hurdles I cleared.
1. High-Current Load Management (The Motor)
The Failure: Initially, I attempted to drive the salvaged Xbox rumble motor directly from an ESP32 GPIO pin. The motor wouldn't budge, and the ESP32 began to heat up. I built and rebuilt the picker disc but had trouble getting the torque needed to really 'spin' the disc at a playable level as it was heavy with the magnets. I definitely think recycling was more fun, but in the future I would use the appropriate components for a stable and easier build. I learned that Microcontrollers are "brains," not "muscles." An ESP32 pin can only provide ~40mA, but a stalled DC motor can demand upwards of 500mA. The Fix: I implemented an S8050 NPN Transistor switching circuit. This allowed the ESP32 to act as a gatekeeper, using a tiny signal to "unleash" the full current of the 5V power hub directly to the motor. Thanks, Ai.
2. Protecting Logic from Back-EMF
The Failure: Every time the motor turned off, the ESP32 would mysteriously reset or the ILI9341 screen would flicker and freeze. It took ages for me to get a stable build and upload(using Platform.io and several arduino libraries) I learned of "Flyback Voltage." When a motor's magnetic field collapses, it sends a high-voltage spike back into the circuit. Certain configurations would dim the lights and silence the speaker if I pulled too much current. The Fix: I added a 1N4001 Diode in parallel with the motor. This "Flyback Diode" provides a safe path for that energy to dissipate, acting as a one-way valve that protects my sensitive logic components. I bit off way more than I could chew in my understanding of what connects to where, and how many things can go wrong in between. I'm just happy I didn't short anything!
3. I2C Bus Stability & Precision
The Failure: The joystick values were "jittery," causing the Snail OS to scroll randomly between instruments (Piano, Synth, etc.). The touch screen also took forever to code correctly; Platformio insisted my PSRAM didn't exist, breaking things repeatedly as I tested hardware. I didn't expect the Xbox joystick to work at all, but it did, and I was able to get at least working feedback that the joystick was sensed by the system.
The Lesson: The ESP32’s internal ADC (Analog-to-Digital Converter) is notoriously noisy, especially when WiFi and Bluetooth are active. I needed converters and shielding as well as careful multimeter continuity and voltage testing components one by one to build a working and static-free prototype for audio production.
The Fix: I integrated a dedicated ADS1115 16-bit ADC via the I2C bus. By offloading the analog reading to a specialized chip, I achieved 16-bit precision, which I then refined with a software deadzone to ensure the UI only moves when I intend it to. The touchscreen is now 'native' and natural, and you can swipe between different 'states' like an iphone glued to a guitar.
All in all I've had a ton of fun, and was able to make this in 4 short weeks. I will continue building upon my design in future iterations and am excited to get to playing every instrument under the sun on one device.