Sending Data Using Sound with Chirp and Arduino
Chirp started off as a mobile application, a platform for exchanging data using sound. Give the app a link, a piece of text, or an image, and it will “chirp” a sound, which can be decoded by anyone else using the app and points to the data on Chirp’s servers.
“Chirp enables data to be transferred via sound, using a device’s existing speaker and microphone. It can use audible or ultrasonic frequencies, works in the most challenging acoustic environments, and does not need a network connection.”
While Chirp support for Arduino first arrived back in 2015, in more recent times it’s been somewhat unclear as to the state of Chirp’s Arduino GitHub repo, or support for the platform. More recent SDK releases seem to have shipped as binary blobs, and there has been no mention of Arduino support on the Chirp developer site.
But that all changed earlier today with the announcement of a partnership between the data-over-sound company and Arduino, with full Chirp support for the new Arduino Nano 33 BLE Sense.
The new SDK supports the Arduino MKR Zero, MKR Fox 1200, MKR WiFi 1010, MKR Vidor 4000, along with the Arduino Zero, allowing the boards to send Chirps—much like the original SDK from back in 2015.
“To make it possible to run the Chirp SDK on these lower end devices, we have spent some time over the last few months refactoring our code base to operate with fixed-point arithmetic. By doing so, we have reduced the execution time by nearly ×10 on embedded devices that don’t have a floating point unit.”
However the new Arduino Nano 33 BLE Sense joins the Microsoft MXChip, and the Espressif ESP32, as one of only three micro-controller boards that is supported by the SDK to receive Chirps as well as send them—as receiving Chirp messages needs a powerful enough onboard FPU to allow the board to decode the incoming Chirp.
Built around a u-blox NINA B306 module, the Nano 33 BLE Sense has a large set of sensors including a 9-axis IMU, and pressure, humidity, temperature, and light sensors, as well as a gesture sensor. However, it also comes with an onboard embedded microphone, which means it can receive Chirps without additional hardware.
Right now, the Chirp SDK is restricted to using Chirps audible to human hearing, although that this is due to change soon.
“The first iteration of the Chirp SDK for Arduino operates only in the audible range. Over the coming months, we will also be working on an inaudible version that will work at near ultrasonic frequencies. With this you will be able to send data at frequencies that humans cannot hear, so you will also be able to embed the Chirp data inside existing audio such as songs or videos to trigger actions.”
More information about the newly released SDK can be found in the project’s GitHub repo. Meanwhile, a full walkthrough showing you how to get started, along with more background information on how Chirp works, is available on Chirp’s Hackster.io pages.