I recently ported my data-over-sound library called "ggwave" to run on microcontrollers and I though it might be of
interest for people working on various IoT project. Below are some technical details and if you just want a quick demo,
you can watch this short demonstration:
The library is written in C++, but to make it work on embedded devices I had to avoid using the standard library and
reduce the memory usage and memory allocations to a minimum. As a result, I am now considering porting it to plain C,
since I don't gain much from C++ at this point.
The communication protocols are based on frequency-shift keying (FSK) modulation. The library has built-in forward error
correction using Reed-Solomon codes and optionally supports Direct Sequence Spread which seems to improve the robustness
of the transmission. The protocols that are suitable for microcontrollers provide data rate speeds of about 5-10
B/second and the transmission is reliable withinh 0.5 - 1.0 m. They operate in the [1.0kHz - 2.5kHz] range, so your
device has to support a sample rate of at least 6000 Hz in order to be able to receive sound data.
I have tested the library using an Arduino RP2040 Connect board which has a built-in microphone. Also, I did tests using
an ESP32 microcontroller with external analog microphone. The ESP32 has a 12-bit ADC that can be used to process the
analog input from the microphone in real-time. Both devices are demonstrated in the video above.
The library also allows the microcontrollers to transmit data - you just need to attach a buzzer or a speaker to one of
the digital output pins and use a suitable mono-tone "ggwave" transmission protocol as demonstrated in the examples.
The project is open-source and available on Github [0] and provides many different examples. I am looking forward to
some interesting ideas of using this type of communication on low-end microcontrollers, so if you have one - definitely
let me know!
I recently ported my data-over-sound library called "ggwave" to run on microcontrollers and I though it might be of interest for people working on various IoT project. Below are some technical details and if you just want a quick demo, you can watch this short demonstration:
https://youtu.be/aj_GLBtU3Vw
The library is written in C++, but to make it work on embedded devices I had to avoid using the standard library and reduce the memory usage and memory allocations to a minimum. As a result, I am now considering porting it to plain C, since I don't gain much from C++ at this point.
The communication protocols are based on frequency-shift keying (FSK) modulation. The library has built-in forward error correction using Reed-Solomon codes and optionally supports Direct Sequence Spread which seems to improve the robustness of the transmission. The protocols that are suitable for microcontrollers provide data rate speeds of about 5-10 B/second and the transmission is reliable withinh 0.5 - 1.0 m. They operate in the [1.0kHz - 2.5kHz] range, so your device has to support a sample rate of at least 6000 Hz in order to be able to receive sound data.
I have tested the library using an Arduino RP2040 Connect board which has a built-in microphone. Also, I did tests using an ESP32 microcontroller with external analog microphone. The ESP32 has a 12-bit ADC that can be used to process the analog input from the microphone in real-time. Both devices are demonstrated in the video above.
The library also allows the microcontrollers to transmit data - you just need to attach a buzzer or a speaker to one of the digital output pins and use a suitable mono-tone "ggwave" transmission protocol as demonstrated in the examples.
The project is open-source and available on Github [0] and provides many different examples. I am looking forward to some interesting ideas of using this type of communication on low-end microcontrollers, so if you have one - definitely let me know!
[0] - https://github.com/ggerganov/ggwave