The gun use a rp2040 to modulate an ultrasonic carrier with an audio signal received from a bluetooth module to create a focused sound beam.
Instead of spreading sound in all directions like a normal speaker, it projects audio in a narrow, targeted beam.
Files
Schematic_Sound-Gun.pdf
Adobe Portable Document Format -
163.76 kB -
03/17/2026 at 22:55
After deciding on all the components I needed for the circuit, I used Easy Eda to draw up the circuit diagram:
To power our circuit, I planned to use some 11.1V 3s LiPo batteries I had on hand; these provide more than enough power for our project and are a reasonable size, which is ideal for the of our gun size goal.
The 12V from the battery will pass through two voltage converters: a buck converter and a boost converter. This way from this 12 V supply, we will obtain 5 V to power the electronic components (the microcontroller, the operational amplifier, the Bluetooth module) and 18 V to power the amplifier that will drive the transducers.
Now let's take a look at the circuit
First, the MH-M18 module receives the audio signal from a Bluetooth device; we combine the two stereo channels of this signal into a single channel using two 1 kΩ resistors, and then the combined audio signal is fed to a potentiometer that allows us to control the amplitude (volume) of the audio signal before it moves on to the next stage.
The audio signal then passes through the preamplifier stage, which performs two functions. First, it shifts the signal to 1.65 V. Since an audio signal alternates between negative and positive voltages, we set the offset to half of 3.3 V in order to preserve most of the audio signal, as the RP2040’s ADC can only read values between 0 and 3.3 V.
The second thing it does is amplify the signal by a factor of 2x (20 k / 10 k = 2); since the MH-M18 can only produce a maximum line level of 1 V RMS, we want to amplify it to achieve a wider volume range.
The next step involves the microcontroller (uC): here, the polarized and amplified signal is digitized and sampled via an ADC pin on the RP2040. The RP2040 then modulates a 40 kHz PWM waveform from the audio signal and transmits this modulated waveform via another pin.
Finally, the 40 kHz modulated waveform generated by the microcontroller is then amplified by the IXDN614PI to drive the transducer array. The IXDN614PI is actually a MOSFET/IGBT gate driver designed to amplify pulses to a higher voltage in order to control the gate of these components, but it can be used here as an amplifier since our modulated wave is technically made up of pulses (PWM)
I also built a simpler version of the circuit: this one has no Bluetooth module or preamp stage. The audio signal is routed through a standard jack, and the signal bias is adjusted using a voltage divider. The problem is that since the signal hasn’t been amplified beforehand, it will need to be amplified digitally, which will work but produce significantly more noise. However, this is a valid alternative if you’re looking for a simpler circuit.
First, I would like to thank YouTuberr Mean Gene Hacks because it was thanks to his video that I discovered this concept (watch the video!) :
Even my implementation is only a slightly improved version of his, as I used his functional diagram and circuit as a basis for creating my own.
Here is the block diagram :
We receive the audio signal from a Bluetooth module, which we amplify and connect to an ADC pin on the RP2040. Then, using code, we modulate this signal and finally amplify the modulated signal to drive the transducer array.
- Audio signal: using an MH-M18 bluetooth module makes the device more convenient to use than a conventional stereo jack.
- Preamplifier: I chose the MCP6022, an overall better operational amplifier for better audio quality (rail-to-rail means we will have much less audio clipping, and it also produces less noise than the LM358).
- uC: the RP2040 has a faster clock speed than the STM32F103C8T6, which allows for a higher sampling rate and better audio resolution, as it is possible to achieve higher resolution for a 40 kHz PWM thanks to the faster clock, but this is primarily a personal choice. using the rp2040-zero is much more practical in my opinion.
-Amplifier: The IXDN614PI has a much higher peak current and supply voltage than the TC4427A, which means we can drive more transducers at a much higher volume.
-Transducer: The TCT40-16T is sufficient for our application.
Overall, I am trying to achieve better performance with the same configuration as in the video.