hamster

CMOD A7 Audio board...

Recommended Posts

I've just sent a PCB away from manufacture - it will have four stereo ADCs and four stereo DACs for the CMOD A7.

Once I have one built I'll have to find a use for it!

i2s.jpg

Share this post


Link to post
Share on other sites
1 hour ago, hamster said:

Once I have one built I'll have to find a use for it!

I've long thought that it makes more sense to design a PCB that addresses the needs of a project rather than the other way round... but since it's you making the comment I have total faith that I'll see a result. The picture illustrates why modules like the CMOD and DE0 Nano are so nifty for experimenters... no wordy explanation needed. I've done more than a few dozen such PCBs over the years and more than a few FPGA modules are semi-permanently ( I always use sockets ) wed to one of them as a component. With a bit of technical know-how, some PCB tool effort ( and likely hair-pulling frustration ), and a minor expense investment almost anything is possible. 

I think that I know the answer but why did you choose separate audio DACs and ADCs rather than CODECs? Is this a manifestation of being bitten by the Hilbert bug?

 

Share this post


Link to post
Share on other sites

I've got a few project ideas around a digital crossover for bi-amped speakers...

I had the DACs left over from building a few stereo I2S boards with PMOD interfaces, but found using many of them at once was getting impractical - if I had to tidy my desk I would waste a lot of time connecting things up again when I got back to playing with them.

The other reason for these chips is they are really, really dumb and simple to use. No preamp or signal routing to configure, no I2C management needed - just send the correct clocks and they send back the correct data.

Dumb parts are also cheap parts - the DACs were $0.50, the ADCs are ~$1.00, the sockets are $0.40, making this around a $20 project...

I've just had that pang of "I've sent the board away too early".

On thing I should have done is added a few extra pads to allow for strapping resistors on the ADCs to configure them, but is is unclear to me how they will interact with the FPGA's pin's default state while the FPGA is being configured.

I should have also have added a 24.576 MHz Oscillator too,... so I could run at 48kHz, not the 46.875KHz I'll be running at from the on-board 12MHz clock.

Oh, and then...

... maybe I should have added a version number on the PCB too!

Share this post


Link to post
Share on other sites

Well my thought was totally wrong. It won't help but sometimes my best ideas pop up an hour after ordering boards... and I always reserve time trying to think of anything that I missed.. and I always sleep on what I have for at least one night before pressing the send button... if engineers would write sad country ballads that anyone else could identify with they'd be famous. Coming up with catchy lyrics that rhyme with oscillator is though... but there's a lot of potential with hertz...

I'll be fun to see what's next.

Share this post


Link to post
Share on other sites

Phew... not putting a space for "the perfect frequency" clock isn't a worry anymore, as 12MHz * 64 / 31.25 = 25.576MHz, the required for 48kHz sample rate and this is just within the range of the MMCM block.

Most likely has less-than-ideal jitter and noise specs for hi-fi buffs, but should be perfectly adequate for my needs.

Share this post


Link to post
Share on other sites

So a long time between updates.

Board has arrived, has been built and tested - I left off some RF filtering caps on the output.. In 16-bit audio pass-through went well.

The CMOD-A7 is quite noisy - there is quite a lot of high frequency spikes and ringing from the FPGA. Event when I split the power supply so the CMOD is powered by a linear bench supply. Turns out a lot of the noise was through the air, not via the PCB or power trace, and due to the high impedance scope.probe. I could probe straight on the ground clip and still see the noise. 

However, on listening tests it is fine - even at high volumes there is minimal hiss. Move to using 24-bit I2S mode at 48kHz, and it too works well. 

Last night I wrote written a simple SDRAM memory controller for the CMOD-A7, and it is now storing samples into RAM and playing it back. I might play with some filters over the next few days.

I am hHappy enough that I am doing a second version of the board, that has a nicer layout, better grounding and uses electrolytic caps (because that is what audio nerds are supposed to use!)

It is quite a fun project to tinker with. All I need is more time alone at home to play the HiFi really loud!

board.jpg

board2.jpg

Share this post


Link to post
Share on other sites

Nice that it works.

>> I could probe straight on the ground clip and still see the noise. 

The first thought would be a separate analog ground but I suspect that's hard with a 2-layer board.

>> and uses electrolytic caps (because that is what audio nerds are supposed to use!)

Note, there are abysmally bad electrolytic caps out there. Check the data sheet (frequency response, ESR). Also they exhibit electro-chemical effects (the oxide layer changes thickness with voltage), causing low frequency noise. Not sure if I'd use them anywhere near a signal path.

You could try to set a "SLEW=QUIET" constraint for digital outputs (might be worth a try even if it shows mostly in the MHz range)

Share this post


Link to post
Share on other sites

Oh, found the source of some of the noise, and it wasn't the FPGA (phew). I had inadvertently bodged the output RF filtering capacitor to the wrong side of the output resistor causing it to pull lots of current when switching. A bit more bodging to the correct side and it is now a lot better.  

Now if I short out the inductors on the DAC's power supply I now see the FPGA noise, and when I remove the short the noise goes away.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now