Hello diyAudio, this is my first post here. I have some experience programming in C on embedded systems (mostly on a TI ARM micro-controller). I have been learning KiCAD and about PCB design, since I want to design and manufacture my own 60% keyboard PCB. I am almost nearing completion of my CNC Milling machine to make metal cases for custom mechanical keyboards. However, I had the somewhat crazy (and possibly stupid, who knows) idea of integrating a DAC and headphone amplifier into a keyboard PCB (or daughter board if possible in the cases I plan on designing). I understand at a basic level of what a DAC does along with ADCs, along with what an Amp is supposed to do. Since this would be for a keyboard that is communicating via USB, I have read that I should use I2S in asynchronous mode between the micro-controller and the DAC. I am thinking of using an STM32F411RET micro-controller which seems to have a decent amount of grunt along with what seems to be a good enough I2S interface and it is already compatible with the popular open-source firmware for custom mechanical keyboards, QMK.
This is pretty much where my knowledge ends. I have looked at pictures of some of the DAC designs featured in this forum, and there appears to be a lot more to a proper DAC than just sending my I2S signal to a DAC IC and then feeding that signal through a few capacitors to an amp and calling it good. I am still learning about the theory when it comes to properly designing circuits. I am a computer science student, and not an electrical engineer. There is also probably a lot of domain knowledge when it comes to audio and music too for designing circuits for this purpose. The most I've seen of DIY kits for DACs is on AMB's website, but I don't understand their designs due to my ignorance. I would appreciate any advice you guys are willing to give, especially in learning the fundamentals of designing a decent DAC circuit controlled by a micro-controller which is talking to a computer over USB. I also have to figure out the headphone amplifier, but I believe this part of the forum is dedicated for DAC stuff and things similar to that. Just keep in mind that I am still trying to learn a lot of the terminology involved, such as reading about FIFO's which is more of data structure concept for queues in my head vs whatever is being used to build a DAC in hardware.
This is pretty much where my knowledge ends. I have looked at pictures of some of the DAC designs featured in this forum, and there appears to be a lot more to a proper DAC than just sending my I2S signal to a DAC IC and then feeding that signal through a few capacitors to an amp and calling it good. I am still learning about the theory when it comes to properly designing circuits. I am a computer science student, and not an electrical engineer. There is also probably a lot of domain knowledge when it comes to audio and music too for designing circuits for this purpose. The most I've seen of DIY kits for DACs is on AMB's website, but I don't understand their designs due to my ignorance. I would appreciate any advice you guys are willing to give, especially in learning the fundamentals of designing a decent DAC circuit controlled by a micro-controller which is talking to a computer over USB. I also have to figure out the headphone amplifier, but I believe this part of the forum is dedicated for DAC stuff and things similar to that. Just keep in mind that I am still trying to learn a lot of the terminology involved, such as reading about FIFO's which is more of data structure concept for queues in my head vs whatever is being used to build a DAC in hardware.
It's not a stupid idea but it might be crazy IMHO. That's a lot of moving parts for a project with a lot of opportunity for troubleshooting (read: failure modes).Hello diyAudio, this is my first post here. I have some experience programming in C on embedded systems (mostly on a TI ARM micro-controller). I have been learning KiCAD and about PCB design, since I want to design and manufacture my own 60% keyboard PCB. I am almost nearing completion of my CNC Milling machine to make metal cases for custom mechanical keyboards. However, I had the somewhat crazy (and possibly stupid, who knows) idea of integrating a DAC and headphone amplifier into a keyboard PCB (or daughter board if possible in the cases I plan on designing). I understand at a basic level of what a DAC does along with ADCs, along with what an Amp is supposed to do. Since this would be for a keyboard that is communicating via USB, I have read that I should use I2S in asynchronous mode between the micro-controller and the DAC. I am thinking of using an STM32F411RET micro-controller which seems to have a decent amount of grunt along with what seems to be a good enough I2S interface and it is already compatible with the popular open-source firmware for custom mechanical keyboards, QMK.
This is pretty much where my knowledge ends. I have looked at pictures of some of the DAC designs featured in this forum, and there appears to be a lot more to a proper DAC than just sending my I2S signal to a DAC IC and then feeding that signal through a few capacitors to an amp and calling it good. I am still learning about the theory when it comes to properly designing circuits. I am a computer science student, and not an electrical engineer. There is also probably a lot of domain knowledge when it comes to audio and music too for designing circuits for this purpose. The most I've seen of DIY kits for DACs is on AMB's website, but I don't understand their designs due to my ignorance. I would appreciate any advice you guys are willing to give, especially in learning the fundamentals of designing a decent DAC circuit controlled by a micro-controller which is talking to a computer over USB. I also have to figure out the headphone amplifier, but I believe this part of the forum is dedicated for DAC stuff and things similar to that. Just keep in mind that I am still trying to learn a lot of the terminology involved, such as reading about FIFO's which is more of data structure concept for queues in my head vs whatever is being used to build a DAC in hardware.
My advice would be to prioritize your goals, organize around those goals, make a plan that tackles them one at a time, and execute. After you've accomplished each part individually, put that experience to use.
Note that that I'm not trying to discourage you from the project. It's certainly doable but requires a lot of skill sets that need to work independently before they can come together.
Get an old BIG keyboard, and start by converting the out to digital, and then start playing with different modes and so on.
That means first storing or sending digital files, maybe to a card or cell phone.
Then you can do the manipulation.
On old tablet should work, copy the analog music (maybe as earphone out), then take to digital.
A to D converters as PCB are another way to start, so are micro computers like Raspberry Pi and Arduino.
Many possibilities, depends on the environments and languages you are familiar with...
Then you can do the manipulation.
On old tablet should work, copy the analog music (maybe as earphone out), then take to digital.
A to D converters as PCB are another way to start, so are micro computers like Raspberry Pi and Arduino.
Many possibilities, depends on the environments and languages you are familiar with...
Might be possible to take one of the really small USB dacs and repackage it into a keyboard. A few small ones among those available at: https://www.amazon.com/Best-Sellers-External-Sound-Cards/zgbs/pc/3015427011
As far a designing a dac and an HPA of your own, you have to decide on what you want. Pick any two: Good sound, low cost, small size.
As far a designing a dac and an HPA of your own, you have to decide on what you want. Pick any two: Good sound, low cost, small size.
Down the line I'll be trying to go with the "Good Sound, Small Size" option lol.Might be possible to take one of the really small USB dacs and repackage it into a keyboard. A few small ones among those available at: https://www.amazon.com/Best-Sellers-External-Sound-Cards/zgbs/pc/3015427011
As far a designing a dac and an HPA of your own, you have to decide on what you want. Pick any two: Good sound, low cost, small size.
Yes, you are definitely correct. Right now I have been focusing on getting my milling machine working again (I'm getting close, but I'm also waiting on electrical work for the room the Mill is in so that I will have 240V power to run the spindle motor). Here is a somewhat older video of the machine homing:It's not a stupid idea but it might be crazy IMHO. That's a lot of moving parts for a project with a lot of opportunity for troubleshooting (read: failure modes).
My advice would be to prioritize your goals, organize around those goals, make a plan that tackles them one at a time, and execute. After you've accomplished each part individually, put that experience to use.
Note that that I'm not trying to discourage you from the project. It's certainly doable but requires a lot of skill sets that need to work independently before they can come together.
I'm familiar with C, C++, and python. I run Linux 24/7 as well. Right now I'm mostly interested in the process of getting a micro-controller to expose a USB audio device to the computer it is connected to over USB, sending digital sound data, and then sending that data to an external DAC over I2S. I can probably figure out the software side of sending digital data over I2S to a DAC myself, but I am not familiar with the Audio interface over USB to the microcontroller or how to design the physical circuit properly (I2S signal lines to the DAC, what components are needed to support the DAC and make sure that the output is clean to the AMP, etc). I have a large Corsair mechanical keyboard that I can probably experiment with, but nothing too old on hand.That means first storing or sending digital files, maybe to a card or cell phone.
Then you can do the manipulation.
On old tablet should work, copy the analog music (maybe as earphone out), then take to digital.
A to D converters as PCB are another way to start, so are micro computers like Raspberry Pi and Arduino.
Many possibilities, depends on the environments and languages you are familiar with...