![Image 1 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/rsla2edximbh1.jpg?width=5712&format=pjpg&auto=webp&s=ad4321801b2f5b2e737f04f72cc16db9aa405400)
![Image 2 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/cggafj1mimbh1.png?width=1300&format=png&auto=webp&s=dce7fb3b0c6e57b9f0bd0a416b6d5099236106b4)
![Image 3 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/kn0yegnqimbh1.jpg?width=4032&format=pjpg&auto=webp&s=353e2effc058c586d31bcb5eb2ae4a5218c60cd4)
![Image 4 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/iio8wwqoimbh1.jpg?width=5712&format=pjpg&auto=webp&s=6890a83c3f9699e2c64f3e98bf5488289d76967b)
![Image 5 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/3odjy6utimbh1.jpg?width=4112&format=pjpg&auto=webp&s=47ebc86c24ac87e2e154d6d1bfbe9968b2b10de0)
![Image 6 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/l6593kmvimbh1.jpg?width=5033&format=pjpg&auto=webp&s=af10d95eb45ded8ba36217c6bf4a3547d636b4d1)
![Image 7 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/sxt7yajyimbh1.jpg?width=5712&format=pjpg&auto=webp&s=6f5e0b2443593a866765611448d20006a4460847)
![Image 8 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/tevsjplzimbh1.jpg?width=4505&format=pjpg&auto=webp&s=d8e9efddd54beeea1b8eb4bad12380a071de592f)
![Image 9 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/w0y7azb7jmbh1.jpg?width=4284&format=pjpg&auto=webp&s=21e3b3f2fea7448e051afc0bbc09082d308e74d1)
![Image 10 — I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]](https://preview.redd.it/v62oacs8jmbh1.png?width=768&format=png&auto=webp&s=0bc8bf91758e116e3938834044ef4b7b288b6c04)
I designed a magnetic voice-coil style actuator with a custom 98% efficient driver for ESP32s, and wrote an Arduino library to control it using just a single pin (10 Prototypes Later). [Project files included]
I am in my final year of a Math, Physics, and CS triple major, and I wanted to combine all three of my fields into a single, physical project built entirely from first principles.
I spent the last month and a half designing an open-source, highly efficient dual purpose actuator and voice-coil-style surface exciter (tactile transducer) from scratch. My goal was to build a system that can magnetically couple to household metal objects (like tin cans, pots, or even a toaster) to use them as acoustic resonators, keeping power waste close to zero. While being easily compatible and modular with microcontrollers like Arduino and ESP32.
I've also written libraries for the Arduino IDE, which can be used to easily drive the magnetic actuator, or to create a musical instrument.
***
💻 The Arduino Library & API :
Actuator Library
To make the hardware as accessible as possible, the custom library abstracts the timing and high-frequency switching under the hood. You can initialize the transducer and simply call strike() and retract(), or vibrateAtFrequency() and endMovment().
Library Link: ARAM Toggle Actuator Library
Repetitive Strike Example
//import ARAM Toggle Actuator Library
#include "ARAM_Toggle_Actuator.h";
//declare a toggle actuator
ARAM_TOGGLE_ACTUATOR a1;
void setup() {
//initialize a toggle actuator
a1 = ARAM_TOGGLE_ACTUATOR(1);
//declare as a standard actuator (as opposed to vibrator)
a1.setActuatorMode(ARAM_TOGGLE_ACTUATOR_Actuator);
//lets strike the actuator
a1.strike();
//wait 75 ms
delay(75);
//retract the actuator
a1.retract();
delay(75);
a1.strike();
}
Playing Frequency Example
#include "ARAM_Toggle_Actuator.h";
int pinNum = 1;
int defualtFrequency = 800;
int playingFrequency = 1000;
ARAM_TOGGLE_ACTUATOR a1;
void setup() {
a1 = ARAM_TOGGLE_ACTUATOR(pinNum,defualtFreq);
a1.vibrateAtFrequency(playingFrequency);
}
Orchestra Library
In order to make an instrument out of multiple of these, I have provided another library called ARAM_Metal_Orchestra which allows adding up to 6 actuators simultaneously. The library is made to be directly compatible with MIDI commands, and there is example code to produce a Bluetooth Controlled MIDI Instrument out of household metals.
Library Link: ARAM Metal Orchestra
***
🛠️ Technical Specifications:
- Single-Pin Control Hack: Standard H-bridges (like the L298N) require 2 to 4 microcontroller pins for direction and enable lines, which wastes GPIO pins. To solve this, I integrated custom toggle control logic so you can safely cycle polarities in both directions using just a single GPIO pin or a physical button. It is fully compatible with both 3.3V (ESP32/STM32) and 5V (Uno/Nano) logic levels, (Technically 1.8V logical as well, but reduced effiecnkey in that case).
- The Driver Board: A custom-designed discrete MOSFET H-bridge that achieves 98% efficiency. This completely eliminates the severe thermal dissipation and voltage drop issues common with older, inefficient ICs like the L298N.
- The Transducer / Actuator: A dual-purpose voice-coil system that acts as both a linear actuator and a tactile surface exciter. It features integrated neodymium magnetic feet to temporarily couple to flat or curved metal surfaces. Because the surface acts as the speaker cone, the material dictates the resonant harmonics and sound signature.
***
🎓 Educational Content in the Video (5 mins):
If you are interested in the physics and electrical engineering behind the build, the linked video is designed as an educational guide covering:
- The "Potential Hill" Concept: A visual, animated breakdown of how permanent magnets behave like rolling balls on a magnetic potential slope when interacting magnetic fields.
- Acoustic Resonance: How mechanical vibrations translate into audible sound waves depending on the resonant frequencies of different materials.
- See the Transducer in Action: View a number of orchestra setups with household objects and hear the music they make.
It's the second in a series on electromagnetism, the previous one covers:
- Electromagnetic Physics: A microscopic look at how moving electrons create circular magnetic fields, and how winding them into solenoids concentrates that field.
- Driver Efficiency and Operation: Animation showing the qualitative difference in how much energy is wasted by various drivers, and their operating principles.
Video:
***
📂 Open-Source Files
I’ve made all the project files free and open. You can find the BOM, STL files, and CAD project files linked in the YouTube video description above:
***
Any feedback on the discrete H-bridge, the single-pin logic layout, or the either of the two Arduino library's structure is highly appreciated! I'm hoping to one day do this full time when I'm out of school so feedback is very helpful. I'll be in the comments answering any questions about the build.
Ps. The actuator library has some unused code that will be removed, I ended up with a bunch of unnecessary checks in my state machine tracking down an issue that ended up not having anything to do with the state machine. I'll be cleaning the library over the next couple weeks.