Showing posts with label recording. Show all posts
Showing posts with label recording. Show all posts

Monday

AutoAnalogAudio Library - nRF52 Now supports Successive Approximation Analog-to-Digital Converter for Audio Input

 AutoAnalogAudio Library - nRF52 Now supports SAADC

Support for Successive Approximation Analog-to-Digital Converter for Audio Input

I've been doing a lot of work on my AAAudio library lately in regards to nRF52 devices like the XIAO BLE SENSE 52840 or the Feather Express 52840, and just added support for the onboard SAADC. This allows users to capture input audio from a regular analog microphone instead of requiring I2S or PDM. 

After having developed support for PDM, PWM and I2S, this wasn't too complicated. I've grown to understand the nRF52 interface, which is really nice and user friendly, and the documentation is great.



To use the SAADC interface start up analog audio by calling the following:

aaAudio.dinPin = 1; //Where 1 represents the AIN0, 2 represents AIN1, etc...
aaAudio.begin(3, 1); // Where 3 represents enabling of SAADC, 1 is for PWM output



All in all the SAADC seems to work very well! I am still doing initial testing & code review, but the changes have been pushed to GitHub as usual. Users can install from ZIP to test out the new code, or wait until the next release.

Tuesday

Auto Analog Audio & NRF52840: Now working on non-Mbed cores

 Auto Analog Audio & NRF52840: Now working on non-Mbed cores

Playing around with the AAAudio library

So I finally decided to make the necessary purchase and get myself a relatively cheap oscilloscope, and with that play around more with the AAAudio library. Even with the added view into the output signal and what is going on using the scope, I still haven't been able to figure out what I'm doing wrong with the I2S interface, so for now the audio is not of the highest quality, which is relatively good for voice, but not so good for higher frequency audio signals.

I have, however, made progress on using the non-MBED core for both input and output of audio using the PDM (microphone) and PWM (amp/speaker) interfaces, which opens up more of the capabilities of this device! In the end, once I actually quit working with the I2S interface, it wasn't that difficult getting the non-MBED core to work. This means that AAAudio should work on other devices like the Feather 52840 Express etc, but it hasn't been fully tested yet. The PWM interface can handle ~10-bit audio at 16Khz, and lower at higher sample rates.

It also allows users to adjust between 20khz and 16khz PDM samples now as well!

Users can specify which pins to use for PWM by editing the library src/NRF52840/AutoAnalogAudio.cpp file and specifying the GPIO pin and port numbers, else it defaults to GPIO #5, port 0 for output.

As of this writing, users would need to download and install the library from ZIP directly from here because I will not do a new release for a while. (Still testing and potentially updating the new capabilities)

Saturday

AutoAnalogAudio Arduino Library: Updated with recording support for XIAO Sense via PDM

 AutoAnalogAudio Arduino Library

Updated with recording support for XIAO BLE SENSE - NRF52840 via PDM microphone

Its been a while since I received my first NRF52840 device, and I finally got around to publishing what I have so far with the AAAudio libray. The XIAO Sense board that I have has a built in PDM microphone, so I managed to get it working with AAAudio. The results are pretty good, I tested it as a wireless microphone and it seems to hold up well. This is all kind of preliminary, full functionality isn't quite there yet, but it does function.

I've struggled with getting I2S output to work so far, but eventually I should be able to figure it out. There seems to be some sort of problem with it, I would like to blame the board and say it just won't work properly, but there is probably something I'm missing in the code.

In any case, the library has been updated, but it will probably be a while before I do an official release, so users will have to get the source code directly from GitHub.

https://github.com/TMRh20/AutoAnalogAudio/archive/refs/heads/master.zip



Thursday

RF24Audio Library Released:
 Wireless Digital Audio Streaming and more with Arduino and NRF24L01 modules


  Its been a little while in the making, but I am finally releasing my RF24Audio library. The library offers a number of features, mainly the ability to wirelessly stream realtime data or audio captured from an analog input to one or more other devices. 'Other devices' can include Arduinos, PCs, or any other device capable of reading the data stream.
  Since the library utilizes the core RF24 radio library, advanced usage and customization can be configured, and allows interaction with audio devices in a number of different ways. The TMRpcm audio library (WAV audio from SD card) has been updated to support the RF24Audio library as well, being capable of multicasting audio to a number of devices. A demonstration of this interaction is shown in the following video:



  The library is designed to be very easy to setup and configure, just connect a radio module, microphone and speaker. External buttons are optional, and are managed internally by the library. This can be disabled to allow further customization via keypads, etc. Users can also utilize the core RF24 library to interact with the audio devices in a number of ways, including capturing audio streams and feeding the data to a PC.

Features:
  • User friendly setup and configuration: For beginners too: Just connect a radio module, microphone, and speaker. The library handles the rest.
  • Recording and broadcasting of audio to multiple devices using only Arduino, RF24 modules and input/output devices (speaker,microphone)
  • Multicast: Enables broadcasting to all nodes, single nodes, or partial groups of nodes
  • External controls: Use external buttons or code to control audio streaming
  • Volume control: Use external buttons or code to control audio volume on receiving devices.
  • Remote control: Start recording remotely via radio commands (Currently cannot stop remote recording)
  • LED Indicator/Visualization: Indicates audio playback and amplitude.
  • Customization: Using the underlying RF24 core library allows custom interaction with audio devices running this library. Receive audio data and stream it to a PC over USB, create and broadcast computer generated audio in realtime, and more! See the USB_Audio example for more info.
  • Create additional node groups: Allows nodes to join private broadcast groups, and multicast only within their group as desired

Pin Assignments:
  • Speakers: Arduino Uno,Nano,etc: pins 9,10 Arduino Mega: 11,12 (Timer pins cannot be changed, but can use 1 pin and ground)
  • pin A0: Microphone/Input pin
  • pin A1: Transmission/Recording Start pin
  • pin A2: Volume Up
  • pin A3: Volume Down
  • pin A4: Trigger remote recording (Only working with dual devices)
  • Cannot be changed: LED Pin: Uno,Nano,etc: pin 6 Mega 2560: pin 13 (main LED pin)

Links:
Library Documentation
Download

Source Code:
RF24Audio Library
RF24 Radio Library
TMRpcm Audio Library



RF24Ethernet w/lwIP - Reaching a Point of Long Term Stability

  RF24Ethernet w/lwIP - Reaching a Point of Long Term Stability Stable & Secure Communications with the RF24 Communication Stack  Since ...