Skip to content

goofy2k/TTGO-TAudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTGO-TAudio (draft in progress)

Got shipped a TTGO TAudio 9 V1.6, manufactured by Lilygo. When powered, the device runs a lightshow on the LED array.

In the Lilygo Github repo the documentation on software is quite "thin". Yet, there is information on the hardware layout, connections, PINS, schematic etc. In the issues section of the supplier's repo some leads can be found.

This repo is meant to kind of repair this lack of documentation on this board and it's applications. Any suggestions and/or contributions are welcome!

This repo is NOT meant to develop applications or software. This will be done in other projects.


Here I describe ongiong tests of the board's features and discovery of relevant code examples and libraries. In the end, a set of libraries should be available for the on board hardware (functional chips):

  • WM8978 audio codec
  • MPU9250 motion processing unit including DMP
  • WS2812 LED string
  • SD card reader/writer
  • WiFI
  • BT/BLE
  • battery / charging
  • microphone
  • headset output
  • speakers outputs

Features of the board

Tested

  • Serial port & Hello World COM10
  • Play sound WM8978 over headphone jack TTGO_TAudio_arifshanji.ino (play mp3 stream from web)
  • WiFi TTGO_TAudio_arifshanji.ino
  • Play synthesized sound espTuto.ino from Faust project (ESP32 part) , C++ code also available
  • LED array WS2812 / Adafruit_NeoPixel TTGO_TAudio_RGB_LED.ino (original light show firmware erased)
  • Motion processing unit MPU9250 with accelerometer, magnetometer, gyroscope TTGO_TAudio_MPU9250.ino (added gyroscope test)
    • I start a new project on Calibration and Physics of the accelerometer, magnetometer and gryroscope (uese Arduino)

check presence in repo of all code files

To be tested

  • Play sound WM8978
    • over headphone control volume (main, L/R channels?) DONE use TTGO_TAudio_arifshanji.ino
    • over board speakers, control volume (main, L/R channels?), requires proper hardware
    • equalizer extendTTGO_TAudio_arifshanji.ino
  • MPU gyroscope, DONE extend TTGO_TAudio_MPU9250.ino
  • Microphone , control volume? DONE
  • Recording function microphone?, line in?, i2S in ?
  • SD card
    • read / write
  • Battery
    • charging function?
  • On/off switch
  • Push buttons (4x)
  • Audio in over BT ?
  • Audio out over BT ? (this feature is not specific for this board, REMARK)

REMARK: is it possible to stream / synthesize sound on a board without a WM8978 and send it over BT to a wireless speaker?

Tooling for C, C++

Learn about code conversion. How to use C++ snippets or non-CMake C snippets in ESP-IDF:

Sources of examples

Examples in Arduino libraries

Audio WM8978 (datasheet is in repo)

Motion processing unit MPU9250

LEDS

SD card reader

General

https://www.reddit.com/r/esp32/comments/93xwx8/ttgo_taudio/ and https://github.com/whyengineer/esp32_snow

New links (not yet evaluated)

https://github.com/hpsaturn/ttgotaudio https://blog.georgmill.de/2018/06/06/esp32-audio-experiments-or-make-a-very-small-low-cost-and-portable-webradio/

Learning experiences during trials to upload some demos

  • The docs on the Github page suggests a demo on playing mp3 sound from an SD card. Burning this firmware and running did not succeed.
  • Erased the shipped firmware. Apparently that was driving the lightshow on the LED's.
  • The info on the Github page https://github.com/LilyGO/TTGO-TAudio is pretty thin, so I am looking for examples on the web
  • Found a demo in the issues (nr 12): Example Code - WM8978 Arduino playing Icecast streams
    • Because of updates in the Audio.h library you need to use the code in a response by arifshanji (file available in repo)
    • You need to download the correct Audio.h: https://github.com/schreibfaul1/ESP32-audioI2S. This is NOT available from the Arduino IDE
  • Need a special USB driver (CH341SER) before serial interface can be used for firmware uploads.

From WM8978 datasheet (available in repo)

The WM8978 is a low power stereo codec with integrated pre-amps for stereo differential mics and includes drivers for speakers, headphone and differential or stereo line output. External component requirements are reduced as no separate microphone or headphone amplifiers are required. Advanced on-chip digital signal processing includes a five-band equalizer, a mixed-signal automatic level control for the microphone or line input through the A/D converter, as well as a purely digital limiter function for record or playback. Additional digital filtering options are available in the ADC path to provide application filtering such as ‘wind noise reduction.’ The WM8978 codec can operate as a main or secondary device. An internal PLL can generate all required audio clocks for the codec from common reference clock frequencies, such as 12 and 13 MHz. Individual sections of the chip can also be powered down under software control.

Creating firmware with ESP-IDF (idf.py route)

Need to make an overview of relevant examples and libraries. Need to translate example on other hardware to the TTGO TAudio T9 V1.6

Overview per hardware component and code platform

Often, examples depend on more than one hardware component. To prevent double entries in the tables, the examples are numbered such that cross references can be made. Also cross-references are not made double. They are only given for more supportive modalities, such as WiFi, BT, SD card reader.

👍 in Q means: working example available, these will be placed in the repo.

A. WM8978 audio codec 👍

# Platform Board Libraries Remarks Xrefs Q Reference
1 Arduino this see: TTGO_TAudio_arifshanji.ino plays mp3 from web E 👍 sketch derived from arifshanji in follow-up on issue on Lilygo repo
2 this plays mp3 from SD D ◼️ github.com/climufat
3 Arduino this WM8978.h, FaustSawtooth.h Faust_esp32Tuto in this repo play synthesized audio D 👍 Faust for ESP32
4 lots of audio tools github.com/pschatzmann
5 M5Stack WM8978.h github.com/CelliesProjects
6 Audio.h I2S work github.com/schreibfaul1
7 uses equalizer function WM8978 docs
8 C unknown WM8978.h microphone in, data strored in SPIFFS E github.com/donny681

B. MPU9250 motion processing unit (incl. DMP) 👍

# Platform Board Libraries Remarks Xrefs Q Reference
1 Arduino this MPU9250_asukiaaa.h mag, accel,I added gyro 👍 github.com/asukiaaa/MPU9250
2 lots of documentation and examples github.com/kriswiner
3 nice article seeedstudio.com
4 Arduino SparkFun 9DoF IMU Breakout specific info on DMP github.com/sparkfun

C. WS2812 12bits LED string driver

# Platform Board Libraries Remarks Xrefs Q Reference
1 Arduino this Adafruit NeoPixel.h is less buitiful than the original firmware 👍 github.com/LilyGO
2 --- ---

D. SD card reader/writer 👍

cross-references:

# Platform Board Libraries Remarks Xrefs Q Reference
1 C++ this card.h ?? reported to be working according to discussion in Lilygo issues, to be checked github.com/MisterRager
2 C ESP32 sdmmc_host, sdmmc_cmd reported to be working according to discussion in Lilygo issues, to be checked 👍 github.com/espressif

E. WiFi 👍

cross-references: A1,A2,A8

# Platform Board Libraries Remarks Xrefs Q Reference

F. Bluetooth

cross-references:

# Platform Board Libraries Remarks Xrefs Q Reference

F. Microphone

cross-references: A8

# Platform Board Libraries Remarks Xrefs Q Reference

FIND EMOJIS on https://www.webfx.com/tools/emoji-cheat-sheet/ 👍 🔴 ⚫ ✅

=======

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published