Analog Electret Mic ADC, Manipulate, DAC, out.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
VRDE_4728046
Level 1
Level 1

Hi!

I hope i am in the correct subforum and i apologize if i did something wrong.

So i have a little project, it involves the PSoc 6 and a few electret mics and speakers.

I want to connect analog electret microphones, amplify them via the psoc, convert them into a digital signal i can route to my raspberry pi, make an equalizer there, then go back from the Pi into the psoc, amplify the signal and go out to speakers.

As you probably have guessed i am very new to the whole electronics thing. I hope i can get some help here.

Thank you very much in advance.

0 Likes
6 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

vrde,

You should consider system architecture first. Technically, all can be done inside the PSoC6 w/o using Pi, which will simplify project. On the other side, the DAC output capabilities of PSoC6 are limited, you will get better quality from the Pi sound board directly. I would start with one microphone. I believe that Cypress has PSoC6 example project with digital MEMS microphone.

/odissey1

Thank you very much for your answer!

Attached is an idea of the system architecture. i probably forgot a few things but maybe this goes in the right direction. any help would be highly appreciated.

thank you very much in advance

IMG_BBC6CE28812D-1.jpeg

0 Likes

VRDE,

On your sketchup there are 3 24-bit ADCs, but

PSoC62 has only one 12-bit ADC.

It also shows three DACs (bit resolution is not shown, but sound devices usually use 24-bit DACs). Unfortunately, PSoC62 has only one 12-bit DAC.

So, as shown, PSoC resources seem to be inadequate.

PSOC62 has PDM and I2S interfaces to connect digital microphone to external computer through USB. I would check it first.

/odissey1

0 Likes

that's okay for now. if i get one mic, through a 12 bit ADC, through the pi and back to the psoc to a 12bit DAC that would be fine for now.

0 Likes
VRDE_4728046
Level 1
Level 1

alright so i slimmed down the project to a simple electret microphone in to a i2s data output.

i made a electret circuit (using a transistor as an amp) with a single channel output. its noisy but that's fine for now.

i managed to get that signal into the psoc and display the voltage values via uart and reading them in putty via serial connection. it seems to work, i have a range between 0.6v and 3v

i went from circuit to the Scan_ADC (set it to single ended with averaging, which doesn't seem to do much). Then output it to uart and i can read the voltages in my terminal. so far so good. now i'm trying to hook it up to a i2s so i can connect it to a raspberry pi so i can read the digital output in python there.

unfortunately i'm completely overwhelmed by the i2s, i tried dragging one into the schematic and connect the sdone output from the adc to my i2s, but that doesn't work so i'm guessing i'm missing an important part here.

could someone kindly direct me to a possible solution?

EDIT:

12 bit is fine for now. i dont really care about bitrates or anything, that comes later. for now i'd be really happy if i just get a digital signal out to the raspberry pi. no matter the format.

0 Likes

Hello,

Please refer to the "CE220762 – PSoC 6 MCU PDM to I2S" example project. This code example shows how to record a short audio sample from a microphone to SRAM, then play it on a speaker or headphone.

Also, please refer to the "PSoC 6 MCU Inter-IC Sound (I2S)" Example project. This example demonstrates how to use the I2S hardware block in PSoC 6 to interface with an audio codec.

Thanks,
P Yugandhar.

0 Likes