Part of the Jackal project, this project implements a Teensy 4.0-based controller board that controls the Jackal system and acts as I2C Controller for the other modules.
- MCU: Teensy 4.0
- Display: 3.2" ILI9341 IPS LCD
- Audio: Teensy audio board
Teensy 4.0 Pin | Audio Board | LCD | Bluetooth Module | I2C Controller | Other Connections | Description |
---|---|---|---|---|---|---|
G | GND | Ground | ||||
0 | CS | Chip Select | ||||
1 | MISO | Using SPI port 1 | ||||
2 | Backlight LED | PWM Output | ||||
3 | I2S LRCK | Left/Right Clock | ||||
4 | I2S BCK | Bit Clock | ||||
5 | DATA | Data Line | ||||
6 | CS | Chip Select (memory) | ||||
7 | DIN | Audio Input | ||||
8 | DOUT | Audio Output | ||||
9 | D/C | Data/Command | ||||
10 | SDCS | Chip Select (SD card) | ||||
11 | MOSI | Using SPI port 0 | ||||
12 | MISO | Using SPI port 0 | ||||
13 | SCK | Using SPI port 0 | ||||
14 | VU Meter | PWM Output | ||||
15 | Vol pot. | Volume Potentiometer | ||||
16 | SCL | Clock Line, with 4.7k pull-up to 3v3 | ||||
17 | SDA | Data Line, with 4.7k pull-up to 3v3 | ||||
18 | SDA | Audio Control Data | ||||
19 | SCL | Audio Control Clock | ||||
20 | LRCLK | Audio Left/Right Clock | ||||
21 | BCLK | Audio Bit Clock | ||||
22 | Unused | |||||
23 | MCLK | Audio Master Clock | ||||
3V | RST | Reset | ||||
G | GND | GND | Ground | |||
5V | VCC | 5V Power | ||||
24 | Unused | |||||
25 | Unused | |||||
26 | MOSI | Using SPI port 1 | ||||
27 | SCK | Using SPI port 1 | ||||
28 - 39 | Unused |
The Micro USB port is used for powering the Teensy 4.0 from a battery (or computer when programming / debugging).
- For the pinout of the other microcontrollers in the project, see io-board README, and bluetooth-sink README
- All I2C lines (SDA/SCL) require 4.7k Ω pull-up resistors to 3.3V
- The Bluetooth module uses a separate I2S interface as well as I2C as target
- LCD uses a separate SPI bus due to SD noise issues
Manages the audio processing pipeline using the Teensy Audio Library. Handles:
- Audio mixing
- FFT analysis
- Volume control
- EQ bands
- Audio routing between different inputs/outputs
Controls the 3.2" ILI9341 IPS LCD to show:
- Current mode
- Metadata (song info, radio station, etc)
- Time
- Status information
- FFT visualization is handled separately (in
FFT
)
Handles communication with:
- IO expansion board (buttons, encoders)
- Bluetooth module (metadata, controls)
- FM radio module
- Other I2C peripherals
The system implements different audio modes through a set of controller classes that inherit from AudioModeController
, each with its own color scheme for the display:
-
Bluetooth Mode (
AudioModeControllerBluetooth
)- Streams audio from Bluetooth devices
- Displays device name and track metadata
- Supports EQ adjustment
-
FM Radio Mode (
AudioModeControllerRadio
)- Controls the RDA5807 FM tuner
- Displays frequency and RDS information
- Supports station seeking and favoriting
-
SD Playback Mode (
AudioModeControllerSDPlayer
)- Plays WAV files from SD card
- Shows file metadata (recording time and date)
- Supports file navigation and deletion
-
SD Recording Mode (
AudioModeControllerSDRecorder
)- Records audio to WAV files
- Shows recording levels
- Manages file creation/naming
-
NFC Playlist Mode (
AudioModeControllerNFCPlayer
)- Triggers playlists based on NFC tags
- Manages playlist browsing
- Shows track info
-
Time Setup Mode (
AudioModeControllerTimeSetup
)- Not really an audio mode :)
- Sets the time of the Teensy 4.0 RTC
- Will block other modes until setup is complete
This project uses PlatformIO for development. Key files:
platformio.ini
: Project configurationsrc/main.cpp
: Main program logicinclude/
: Header fileslib/
: Custom libraries and dependencies
- Install PlatformIO
- Clone this repository
- Open in PlatformIO IDE
- Build and upload to Teensy 4.0
This project could not be built without the contributions of many talented people. The main-board has the following dependencies.
PlatformIO loads the following in libdeps:
- alex6679's teensy-4-async-inputs
- KurtE's MTP_Teensy
- KurtE's ILI9341_t3n
- Paul Stoffregen's Wire
- Paul Stoffregen's SPI
- Paul Stoffregen's Time
The platformio.ini runs a script to remove some example directories from the libdeps folder that otherwise break the build.
Additionally, a couple of libraries are copied directly in the lib:
- Ricardo Lima Caratti's RDA5807
- Some classes from JayShoe's esp32_T4_bt_music_receiver
The UI uses the Neuropolitical font converted with the ILI9341 Font Editor by Wojciech Sura.