Audio input when using a GY-PCM1502 DAC module?

Hello,

I just finished a compact Zynthinan build using a GY-PCM1502 DAC module and it’s working great! Now I want to add a stereo audio input and wonder if anyone has done this before or has suggestions for hardware. I can always just switch over to using a HiFiBerry DAC+ADC but I’d like to know first if there is an ADC that can be easily used with the 5102. I hope to make this self-contained and not use an external USB sound card.

Excuse me if this has already been addressed but I wasn’t able find anything in a search. Thanks for any suggestions.

Hi @soundscape! Welcome to ZynthianLand. I think you will find the inhabitants mostly harmless.

The PCM1502 is a DAC, i.e. audio output only. Zynthian uses Jack Audio Connection Kit (JACK) for its audio interface layer. JACK depends on a single audio interface for its timing. Adding a separate ADC would not work (well) with JACK as there would be two, unsynchronised audio interfaces and JACK would be configured for just one of them. It is technically possible to use a JACK extension to add more audio interfaces but this adds processing overhead because JACK needs to samplerate convert for the other interfaces. (Zynthian headphone output is done this way.) I too started with a similar DAC and worked for some time without audio input but then got a Zynthian with input and output and haven’t looked back! I would recommend connecting an audio interface / soundcard that provides the quantity of inputs and outputs you require. That can be via the I2S interface, e.g. HifiBerry or via USB, e.g. UCM1820. (Note that I give the Behringer example because I have one and it adds lots of inputs and outputs.)

1 Like

Hi @riban ! Thanks for the quick reaction. I was afraid that would be the case. Since I want to make it all work inside the box that I’m building, I’ll try the HiFiBerry route. The UCM1820 is great, but I only need one stereo input/output and want to make this compact. I did consider using the Behringer UCA222 but that has too much undesireable latency. Thanks for saving me hours (days, months) of time screwing around with something that I would probably never get to work well!

You mentioned a “compact” Zynthian, for a minimal cost and size design I have used the “Audio Injector Zero” which uses an 8731 portable consumer product Codec with builtin headphone driver (There is a Zynthian driver for it) , while not studio grade the 24 bit snd specs look OK. The standard size Injector has RCA connectors and 2 potentiometers mounted on board, the zero has external connectors providing more flexible mounting options. (They have a crystal so jitter may not be too bad)
https://www.audioinjector.net/

Waveshare has a similar board with a chip that driver speakers, on Amazon for $21.90, (I can’t say if Zynthian knows it) seems to be Alexa box oriented, It has a pair of microphones, and perhaps lacking input connectors,.

Hi @maxmaxis ! Thanks for your help. I considered the Zero Soundcard as an altenative and placed an order for one earlier this week but don’t know how long it will take to arrive in the US. It will be nice if it works becasue it is so compact. The one on Amazon looks like it will be more work than I want to get into. I don’t see any way to inject the audio short of intercepting the traces to the microphones and dealing with a probable impedance mismatch. Then the outputs will need to be attenuated. Can possibly work, but it’s not an easy solution. I think it may be best to just order the HiFiBerry for $50 and be done with it! Amazon.com
I really do appreciate your help!

@MaxMaxis I also came across this project GitHub - skiselev/i2s_audio_phat: I2S Audio pHAT but it is really hard to find a source for the 8731 chip, since it’s been discontinued. I did have some a while back, but lost track of where they are.

Hi @soundscape

Have a look at this:

1 Like

@le51 Thanks for this. It’s great to know that I’m not the only one on a quest to solve this challenge!

I bought this in Mar 14, 2019 for 1,8€:

and this this in Jan 26, 2021 for 2,31€
https://www.aliexpress.com/item/33001714060.html

I’ve made a test a while ago but I didn’t get it to work together as expected (input interface was not seen). These two boards don’t come with any built in crystal so it could have been some clock sync problem.

Side note:

:loudspeaker: :loudspeaker: :loudspeaker:

  • Pcm 1808 ($0.5519/p) , pcm5102a ($2.8343/p),
  • wm8731 ($6.2081/p),
  • pcm3168 ($6.3322/p) and pcm5242 ($11.97/p) for building a high end Open Source ZynADAC

all these chips are in stock today at jlcpbc
:partying_face: :shushing_face: :wink:

You’re right !

this is also an inspiring project build around a Teensy, a wm8731, a guitar pream stage and HW midi interface. With a nice documentation

Haha! It’s tempting to think about building this, but my family would never forgive me for the time it would take :slight_smile: … When you add in freight, time spent and frustration, the HiFiBerry seems like the most cost effective solution!

The Teensy guitar shield looks like a cool device that I can put on my bucket list to try.

I’ve tested out the Electrosmith Daisy Seed Daisy Seed — Electro-Smith and wasn’t able to get it to do much but probably deserves more time to play with.

My last reference to the Daisy Seed has me wondering if that module can be used for IO. Hmmm.

This DaisySeed board looks very good.
I’m impressed, the wiki is so huge !

I would say yes with libDaisy (reference manual here -313 pages-) and some good programming skills:

Features

  • Configurable Audio Callback
  • MIDI Drivers
  • USB Communication (Audio, MIDI, Serial, etc.)
  • Peripheral Device Drivers (SPI, I2S, I2C, etc.)

And all their work is under the MIT license. :heart_eyes:

Yes, the Daisy does have considerable resource, but much of it is beyond my programming skills. I have been able to load up some of their examples and make small mods, but programming anything from scratch on it is above my pay grade! I even built a [PedalPCB] Terrarium interface (Terrarium - PedalPCB.com) but got lost trying to program some of the controls. Lots of potential.

If your still short of Raspberry Pi’s, here’s a guy with several music projects, using small processors, mostly the ESP32. (The Daisy mentioned below)

Synthesizer library (organ) on 6 different platforms:
Pi Pico XIAO DaisySeed ESP32 ESP8266 Teensy4.1

Github Code
Arduino polyphonic synthesizer project (not a Moog) for ESP32 - STM32 - Teensy and more

ml_synth_pwm_osc_example (Update)

Perhaps a bit early Casio sounding, he is getting a lot pf polophony from little boards.
His 24 Github posts

1 Like