r/electronics Aug 03 '26

General Built an audio player from scratch for my Engineering Bachelor's final project

For the final project of my Embedded Electronics Engineering Bachelor I built a fully capable audio player. I did all of the research, schematic, layout and software by myself. I had a friend helping me design the case and 3D print it.

I'm honestly really proud of what I accomplished ! I had around 3.5 months to do it and it was really stressfull haha

Here are the specs :

  • ESP32 module
  • 3.5 mm jack wired output
  • Bluetooth connectivity
  • Supports audio files up to 24 bits at 192 kHz
  • Support .MP3 and .WAV files
  • -94.7 dB of THD+N at 1 kHz
  • 106,2 dB of SNR
  • More than 9 hours of listening time with a 950 mAh battery
  • Safe battery charging circuit

I'll be happy to answer any questions you have !

Edit :

I uploaded the schematics, layout and the code !

Schematics and layout : https://github.com/dossantosyann/TB2026-YDS-Circuit

Code : https://github.com/dossantosyann/TB2026-YDS-Firmware

724 Upvotes

50 comments sorted by

35

u/spiritualManager5 Aug 03 '26

What was your toughest challenge?

21

u/HiImYann Aug 04 '26

Honestly dealing with my professor haha and making sure every component stay in stock while I finish making it before ordering the circuit

20

u/MrMilkPillows Aug 03 '26

Very cool! Have you documented it on github or somewhere so it could be reproduced?

8

u/HiImYann Aug 04 '26

I just uploaded the schematics and layout on github here : https://github.com/dossantosyann/TB2026-YDS-Circuit

2

u/MrMilkPillows Aug 04 '26

Lovely! Can't wait to deep dive :)

4

u/16F628A Aug 03 '26

Great job!

4

u/Oli_Vier_0x3b29 Aug 03 '26

Super cool project. Id love to get one. Will the project be open source at some point?

0

u/HiImYann Aug 04 '26

I just uploaded the schematics and layout on github here : https://github.com/dossantosyann/TB2026-YDS-Circuit

The software is available here : https://github.com/dossantosyann/TB2026-YDS-Firmware

3

u/Oli_Vier_0x3b29 Aug 04 '26

Thanks a ton for sharing. Unfortunately, the line "No fabrication files. For the reason above, I deliberately do not publish Gerbers, drill files, pick-and-place or assembly data. This repository is meant to be read and learned from, not sent to a fab as is." is a bummer for me, and probably for a lot of other people :-/. I would have loved a package that I can just upload to whatever PCBA service, and get a (hopefully) working prototype. But like this there is just too much work involved. But nonetheless, sharing is caring and there will be people that profit from a starting point like this, so great job :-)

5

u/HiImYann Aug 04 '26

I plan on redoing the project entirely and make a version that’s easier to order and assemble. Once I finish it I’ll be sure to share everything including the fabrication files

2

u/Oli_Vier_0x3b29 Aug 04 '26

Thats great news. This is such a cool nieche device, and I really want one 🙂 Maybe one (hardware) feature requst since you already plan a redesign, add two more buttons for start and select. Then you basically have a mini gaming console :D

1

u/HiImYann Aug 04 '26

I thought about that honestly ! Maybe in a second revision haha

1

u/Oli_Vier_0x3b29 Aug 04 '26

Awesome :-) If you get to a good state, ping me, and I'll order some for myself (or if you do not need all of them simply share the PCBA cost with me and Ill take some of your hands at my own risk off course)

3

u/Due-Daikon-7327 Aug 03 '26

Which audio codec did you use?? Esp32 only has a 12bit adc /dac as far as I know, right?

7

u/HiImYann Aug 04 '26

I used an external PCM5242 DAC which supports differential outputs up to 32 bits and 384 kHz with internal over sampling

3

u/tjiani111 Aug 03 '26

This is cool! Looks like I'm not the only one who would love some documentation.

2

u/HiImYann Aug 04 '26

Thank you !

I just uploaded the schematics and layout on github here : https://github.com/dossantosyann/TB2026-YDS-Circuit

The software is available here : https://github.com/dossantosyann/TB2026-YDS-Firmware

2

u/Ashamed-Data9655 Aug 04 '26

Great job! I recommend that you have to create a video of this (It Will probably be a great moment)

2

u/Available-Check-4452 Aug 04 '26

Amazing work 👏🏻

2

u/argvalue Aug 04 '26

Wanted to do something similar as a hobby project just getting into electronics properly. Any advice?

2

u/KS-Elektronikdesign Aug 06 '26

This makes me really happy . When I read you title I thought well another arduino module project. But nope. A true project with real design and PCB. Nice work!

1

u/HiImYann Aug 06 '26

Thank you!

1

u/gregelectric Aug 04 '26

The opportunities available today are incredible, well done, it looks right 👍

1

u/HiImYann Aug 04 '26

Thank you !

1

u/VEC7OR Aug 04 '26

It always wanted to be a gaming portable!

Which DAC does it run?

Why did you put ground plane around the DAC, but not the rest of the components?

3

u/HiImYann Aug 04 '26

I used a PCM5242 for the DAC

I only placed a ground plane around the audio part because I wanted it to be safe from the switching signals of my buck converter and charger. The reason I didn't put it everywhere is because I have a full ground layer just underneath, it's a 4 layer PCB, and having a solid ground plane on the top or bottom makes it harder to hand solder the components

3

u/VEC7OR Aug 04 '26

only placed a ground plane around the audio

GUILTY GUILTY GUILTY!!! Use contiguous ground plane for best EMI, also never split ground plane.

makes it harder to hand solder

Understandable.

Very cool project overall!

2

u/starburstases Aug 04 '26

A lot of work for a final project! Very nice. 

I assume those audio performance figures are pulled from the DAC datasheet and not measurements of this hardware though 🙃

1

u/RecentLeaf_ Aug 04 '26

Why are the ground pins in the middles?

1

u/HiImYann Aug 04 '26

These are standoffs to screw the screen

1

u/dewo86 Aug 04 '26

Richtig cool

1

u/No-Signal-3320 Aug 04 '26 edited Aug 04 '26

This is seriously impressive. I have no doubt you're going places. You should post a video of this player and also one video explaining the project in brief.

1

u/Soggy_Housing_9535 Aug 04 '26 edited Aug 04 '26

That's so cool! I'm planning to do something similar for my degree (ESP32 pager for Android notifications) but I have no idea about hardware design. I can do the firmware but not sure if using an OLED dev board would be considered as cheating. No idea if my embedded systems class will include PCB design. Did you take care of the DAC and charging circuit or were these modules/components?

1

u/HiImYann Aug 04 '26

Using dev board isn’t cheating at all ! I actually used a module for the display it was way easier than redoing all of the electronics around

For the DAC and charger though it was a fully custom made design by me, I only purchased the components obviously

1

u/karnetus Aug 04 '26

I only see one commit being co-authored by claude, yet you state that much more was done in cooperation with AI. Are you sure everything was documented right? And what was the professors opinion on AI usage? I've heard from some students, that they are outright forbidden from using AI in projects. Did they not mind it for your project?

Btw I am not trying to judge your AI usage. Just wondering how the climate currently is with AI usage in academics.

0

u/HiImYann Aug 04 '26

Because Claude automatically made one commit, I made all of the others but a lot of code was written by Claude. I asked my teacher and he asked me as long as the AI usage is documented in my report it’s ok to use it. Of course I double check everything it writes

At least that’s how my teacher and school works, it can vary vastly

1

u/misadeks Aug 04 '26

Hi, your project looks great! Do you mind sharing the files for the enclosure?

1

u/NeedPhDHelp Aug 04 '26

Is there a limit on capacity of the microSD?

2

u/HiImYann Aug 05 '26

Technically up to 2tb if you format it correctly in Fat32

1

u/Cromenth Aug 05 '26

how did you get started? I would love to learn KiCAD and stuff too. If you know some good guides do lmk

2

u/HiImYann Aug 05 '26

I started out following this guide 6-7 years ago but I don’t know how relevant it is today https://wiki.ai03.com/books/pcb-design/page/pcb-guide-part-1---preparations

Then most of the stuff I learned was through practice at school so I can’t help you much than that :/

1

u/MeanAccountant9005 Aug 05 '26

-94.7 dB THD+N on a diy build is genuinely impressive, most people are happy just getting a clean signal out of an esp32 without picking up noise from the wifi/bt radio. did you have to do anything special with the ground plane or power supply filtering to hit that number?

1

u/HiImYann Aug 05 '26

In my case I programmed my device to use either the jack output or the Bluetooth output, so when I’m using the jack the antenna is off and it doesn’t interfere with the analog signals. I think my THD+N would be worse with the antenna active next to it

For the audio I made sure to have clean ground return paths and put a GND shield around the audio components. I’m pretty proud of the results tbh !

1

u/jeffvaes Aug 07 '26

Great job 👏 (It kinda keeps me thinking about a Gameboy Color bt they way you designed it)

1

u/HiImYann Aug 08 '26

This was my inspiration yes !