Platform
Flash size requirements
The codec2 library needs about 87KB, while the RadioLib needs about 10KB. Then, there's also the base Arduino libraries. And we still need to add our own code. To be on the safe side, a device with at least 256KB of flash will be needed.
ESP32
Test application built, based on Arduino codec2 library, but it crashed. This has been solved with esp32-codec2.
Some presumably also got it to work before I did, but they are unwilling to share their source code:
STM32
STM32F4Discovery
- 168MHz
- lora-codec2
- STM32F407G-DISC1 (< €19)
- analog IO already on board
- supported by PlatformIO
- using exotic audio DAC
- rather large (66x97mm), might make integration more difficult.
Rowetel/Dragino Tech SM1000
- Github
- Implements codec2 on a STM32F405 (custom board design)
- audio : analog IO directly from STM32
NUCLEO-L432KC
Runs only on 80MHz, might be an option to shrink size.
More info on STM32 development
nRF52
64MHz
github : Implements codec2 on a Adafruit Feather nRF52 Bluefruit LE.
Codec2 has been modified so that it can be built using Arduino framework. I doubt this implementation is working correctly.
- Adafruit ItsyBitsy nRF52840 Express - Bluetooth LE (Mouser & Digikey):
- small & cheap (€15), breadboard & IC-socket compatible
- support for Circuitpython & PlatformIO
- debug connection, but no integrated debugger
- as always from Adafruit : well documented
- Application to demonstrate PWM audio functionality on nRF52
Audio IO
I²S
On ESP32, using I²S is definitely advantageous because it can use DMA, which off-loads the reading and writing audio data from the processor.
As we're only processing low quality 8kHz speech here, a high-end audio codec like the SGTL5000 is not necessary, but it might be a good choice after all:
- open source support (pjrc)
- I²S sink & source in a single device.
- High quality audio might be useful for other projects and designs.
- Extra features:
- Input: Programmable MIC gain, Auto input volume control
- Output: 98dB SNR output, digital volume
- Development board price is acceptable.
A cheaper alternative is the Waveshare WM8960 Audio HAT (technical info).
PWM-DAC & ADC
The SM1000 and NucleoTNC contain the analog circuitry we need.
Adafruit Voice Changer also features some form of audio pass-through
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.