freeDSP V2.0 (ADAU1452) developement thread

Pitrsek

Member
2004-11-19 4:46 pm
CZ
If you don't feel like searching the thread..

PiDSP is on GitHub:
Sourcefiles[/QUOTE]

There is also manual:
PiDSP manual

Final(hopefully :D) version is under way. You can watch the progress in development branch in Git repo.

I'm also pondering about having a batch of PiDSP boards profesionality made.
If you are interested, drop me a PM.


----------------------------------------------------------
----------------------------------------------------------
Hello everybody :),
few weeks ago I've discovered the freedsp project and found it to be very interesting... but the ADAU1452 seems so much more potent dsp.
So I got in touch with the creators and joined the team with focus on new version with ADAU1452. I've been pondering about it for some time now, reading datasheets, researching, playing with possibilities etc.
Now it's time to open development thread and ask you about your opinion, feedback, and ideas, so we can make the next version as good as we can.


Flood of questions and ideas follows..

The general idea:
DSP, DAC, PSU - each on its own separate board, connected via wires, maybe backplane. ADC is not in my scope at this moment
PCB width 100mm - enclosures available, length 80mm(half eurocard) or 100mm, we will see.
Smaller builds could fit into extruded enclosure (hammond,fischer), bigger in rack

PSU board:
talema 70000K +- 15v for opamps and 48V(via voltage doubler) for phantom - no reason not to add it. will be useful with possible ADC board
Another transformer for digital part, maybe with double secondary - second winding for analog circuitry - PLL, DAC ref. etc.
I haven't made my mind about it yet. Any suggestions?

DAC
Stacked TRS 6,3mm - only way to fit 8ch to 100mm wide PCB, 8ch - why not 4x2ch? Big, expensive, I'd like the project to be accessible, and I like KISS principle. I've narrowed down DAC choices to following:
PCM1690 - cheap, available, even got samples somewhere...
AK4358 - comparable with PCM, number-wise
dual AK4413EQ, higher performing pin compatible alternative available AK4414EQ - really nice spec.
AK4458 - new part, isn't available yet, would be nice to use new stuff in the design though. I'll try to get samples.
Opinions (and experiences) about/with DAC chips highly welcomed. My life is too short to try everyone of them, so in the end I'll just pick one and go with it,If you have something to say about them, please do.

Why no ESS stuff? I'd like you to be able to buy all necessary parts at usual outfits (digikey,farnell,mouser...).
Yes, you can buy Sabre in single qty, no problem, but the shipping is prohibitive. And world is full of sabre dacs.

DSP board.
All IO should be brought out. Clocks on UFL connectors, others on 2.54 headers, signal/ground, signal/ground... SPDIF on BNC.
We could add MCLK input, its just a few additional parts and might be useful for some.
Number of I2s lines is limited, 4in, 4out more channels is accessible via TDM. I'm considering providing isolation on I2S lines, so you could use the board directly with BBB as a source.
Would be nice if one could plug BBB directly into the board - you even could program the dsp with it.


I believe it's enough for a first post. Opinions, advices, questions?

At this point it's just bunch of ideas, in the end it could be single board with XLR outputs.... Nothing is set yet... well probably DSP, oscillator, and LDO for PLL are set :D ... What I meant is if you think that single board(or XLR, or DAC XYZ) solution is better, say it and add why you think so ;)

Thanks for reading

Pitrsek


P.S.:please feel free to notify my about my spelling/grammar mistakes via PM.TY.
 
Last edited:
Since everybody have their own DAC preference, I'll suggest to split the boards into two (or three with ADC input), then you can have different DAC options and even do boards with XLR connectors for those with 1U 19" cases....

And I could do an expensive discrete R-2R DAC board to fit :)

I'm a little interested in the ADAU1452, even go an AD eval board, although I'm not convinced that it's the best fit for the really highend....
 

Pitrsek

Member
2004-11-19 4:46 pm
CZ
At the moment I'm inclined to modular approach. One board for dac, one for psu, one for DSP.
"Best fit for the really highend" - let's say that the aim of the project is to be as good as possible, within some reasonable bounds - money and complexity/accessibility wise. That is one of the point of using SigmaDSP - the "programing" doesn't seems hard at all. I haven't heard it yet, so I'll take your word for it. Thank you for the input :). Btw. congratz on your DAC:cheers:

Today I've looked a bit into ways how to connect boards.
Stacking board one on another would be nice, but board distance of 1U is quite a gap to cross... 2.54mm headers are too far apart for my liking, and for this distance are not readily available, nor cheap. Additionally, stacking would create stubs.
Backplane - if ti was for one particular build, I'd be inclined to go with it. But creating one universal - how big it should be? What if you want to build it into 1u rack side by side? In order not to create stubs, you would need some kind of jumpers/switches. I'm not sure that ordinary 2l board (1,5mm thick) will give you better ground return path than for example shielded or twisted ribbon cable. It's just assumption, I haven't measured it. One more board to design, and to pay for.
Cables - poit to point - no stubs. As universal as it gets. If you go with something that is readily available its reasonably cheap too.
Ribbon cables - it works with them, but sockets are big. Other two options are Sata cables and RJ45. Cheap, with grounding/screening for each wire. Also stacked connectors exists. And you can end the other side of STP cable with whatever connector you please. I like the last two options the most.

That's all for today.
Pitrsek
 
It would be nice if the ADC and DAC modules used the "diyinhk" connector pinout, see this XMOS USB to I2S PCB for it:

XMOS DSD DXD 384kHz high-quality USB to I2S/DSD PCB - DIYINHK

Using the same pinout one could build new converter modules (also using TDM interface) that could be used with above USB module and this freeDSP 2. In case someone wants to build a CODEC board then use the "P8" labelled pin next to MUTE for bringing in the ADC data.

Instead of BBB I would use Olimex LIME2 (but that's not important). Simple solution would be to use MSP430 (Energy IDE) or some Arduino board (like on Elektor). Maybe an I2C or SPI connector would be enough. There is no standard pinout though, I2C requires just clock, data and ground. Don't forget EEPROM as once programmed nothing else is needed. Bring also the Aux ADC inputs to some header because that way a simple volume control could be implemented in DSP (in digital domain).

Separate PSU module for the DSP is overkill, I think it's better to have just something like a microUSB connector and some LDO's or buck regulators.
 
Last edited:

Pitrsek

Member
2004-11-19 4:46 pm
CZ
Cable measurements

Hi everybody,
due to my curiosity regarding cable performance, I've stayed a little later in my day-job today. For a quick comparison I've created improvised test fixtures for SATA cable, UTP/LAN cable(Didn have STP on hand) and ribbon cable. I've calibrated VNA(3Ghz made by RS) with through measurement, then plugged one port in cable, second port into the other cable and measured S21.
Sata Cable - only two wires used, all shielding connected to ground
UTP cable - only two pairs used, half of other pairs connected to ground
Ribbon - only two wires used, every other wire connected to ground. G,S,G,S,G,F,G,F,G - F= left to float

First graph is comparison with the other end of cables left open, second is sata cable with various termination - both cables terminated, only one (S21 and S12 were practically the same). The termination was of questionable quality - two 0207 tht 100R resistors in parallel, soldered to the end of cable.

That's all I've been able to measure today, Ribbon and UTP with termination some other time. Sorry for overlapping markers/quality of graphs, I'll try to do better next time.

Unfortunately AD does not state edge rise time in the datasheet for adua1452, nor do they provide IBIS model :(.

2Sokeris: Do you have means to measure rise times on your ADUA evalboard?
I'll contact AD about rise times, but I like to have another solution for backup if the AD decide not to respond.

If I decide to go with ribbon cable, I'll will consider the same pin-out - thank you for the suggestion:).

I'll try to provide all pins from DSP - ADC and MP included.

Strong point of BBB is it's capability to sync to external clock, I've wrote to the author of BBB I2S driver, and it should be possible to use BBB in TDM mode, so it would not occupy all of the inputs. Does LIME2 support I2S output as a slave to external clock? We could support RPiB+ too - clock management in DSP is quite flexible, so we can provide bitclock to which RPiB+ can slave it's output. AFAIK the driver with slave support is not ready.
Do you know somebody with capability to modify current RPI I2S driver?

Yes, since limited number of MP pins on DSP, I2C would be preferable com. bus solution. One drawback is that we loose compatibility with eval board. FreeDSP V1 uses arduino to upload firmfare to EEPROM. You could program the EEPROM with BBB or RPI too

Since we will have opamps on DAC board, USB connector and external supply won't cut it. Well, not without SMPS... So we will have a separate psu board with 115/230 inputs. The board will provide 15V and 48v for opamps and for phantom, additionally it will provide power for DSP. It could be single 5V - with separate regulators for oscillator,PLL and digital. With analog part of DAC fed either form same rail, or from +15. Or it could be dual output, one rail for digital, the other for sensitive stuff - pll, dac, etc. Do you know of 115/230 low power toroid with single output and with small mag. field?

Pitrsek
 

Attachments

  • fixtures.jpg
    fixtures.jpg
    430.7 KB · Views: 4,725
  • OpenComparison.png
    OpenComparison.png
    35.5 KB · Views: 4,508
  • ribonVsata.png
    ribonVsata.png
    40.6 KB · Views: 4,443
Strong point of BBB is it's capability to sync to external clock, I've wrote to the author of BBB I2S driver, and it should be possible to use BBB in TDM mode, so it would not occupy all of the inputs. Does LIME2 support I2S output as a slave to external clock?

Pitrsek

LIME2 and Cubietrack (uses the same Allwinner A20 SoC) can run the I2S in slave mode, yes (one example here: http://www.cubieforums.com/index.php/topic,1081.60.html). LIME2 has all of the I2S pins on the 0.05" header (adapter to 0.1" header available), Cubietruck needs some soldering of resistors. There are many A20 boards available but almost all fail in some details with the I2S (like on my Phoenix A20 the second I2S data out is used as GPIO to control USB OTG host/device mode - difficult to mod for multichannel I2s but works as stereo in/out). Anyway, you could build Linux crossover using just the LIME2 (which got 8 output channels on the I2S header pins, not supported on ALSA drivers yet though).
 
... We could support RPiB+ too - clock management in DSP is quite flexible, so we can provide bitclock to which RPiB+ can slave it's output. AFAIK the driver with slave support is not ready.
Do you know somebody with capability to modify current RPI I2S driver?

AFAIK, in RPi SoC driver you first do everything like it is done now, I mean set the RPi clock like in master mode. Then you just disable the PCM clock (MODE_A Register, bit CLK_DIS), set the clock mode to codec clock master (CLKM) to external, set the FS to slave mode (FSM) and at last enable the PCM clock. In addition the signal mode in bcm2835_i2s_dev has to be set RPi slave / actually codec clock & frame master (bit SND_SOC_DAIFMT_CBM_CFM set masked by SND_SOC_DAIFMT_MASTER_MASK). On physical level the question is how to handle the change from output in input (low impedance source to high impedance). If you connect the extral outputs to other outputs (though usually via small resistors are used) is there a danger that the converter/DSP clock output ports will be burn when driven to Vcc or GND.

I don't know how the clock mode should be changed in ALSA Soc in a managed way though. I would propably implement it so that the master mode is a fallback mode when external clock is lost.

Btw. there is a comment in drivers (bcm2835-i2s.c) about slave mode problem:

/*
* Toggle the SYNC flag. After 2 PCM clock cycles it can be read back
* FIXME: This does not seem to work for slave mode!
*/

Last but not least a new machine driver is needed. It can be copy of any existing one like eg. https://github.com/raspberrypi/linux/blob/rpi-3.18.y/sound/soc/bcm/hifiberry_dac.c but with the SND_SOC_DAIFMT_CBM_CFM bit set in dai_fmt . I guess the dummy codec driver could be used with it (unless you want to implement the ADAU1452 I2C control to RPi, would be useful for something simple like volume control).
 
Last edited:

Pitrsek

Member
2004-11-19 4:46 pm
CZ
Cable measurements, take two

Last night it occurred to me that leaving other end of cables open might not have been good idea(if for nothing else, it's not realistic). So I tied ground on the other end together on small copper plane and retested everything. I've attached results for one wire terminated, other left floating. Results worsened when I terminated both ends. I suspect this has something to do with ground/return sharing between the two wires. I measured both wires at the same end, all wires were cca. 47cm long(length of SATA cable).

I got even more curious and decided to test cables for crosstalk in time domain. Set generator for 50Ohm output, 12MHz and output voltage 3.3V(which means half of it at 50Ohm load). You can see the well behaved trace in attachment (connected to 50R input of scope). Rise time is 6.5ns. I connected generator to one cable and 350MHz scope to the other wire and measured RMS voltage over few periods. Please note that bandwidth was severely limited compared to to VNA measurement, also the cable is probably unrealistically long for my application.

Results:

Sata:
ends of both wires open - 16mV
50R termination on wire connected to the signal generator - 12mV
Scope connected to the other end of cable - so generator is on one side and scope on the other - 10mV

Ribbon:
ends of both wires open - 7.7mV
50R termination on wire connected to the signal generator - 7.7mV
I did not bothered with connecting scope to the other end, It was late and I wanted to go home. Anyway, I already knew everything I needed to know.

So... If you misuse SATA cable for single ended connection it ain't that bad. It will work OK. If you decide to use it properly with LVDS drivers, you will get probably way better performance (I haven't measured it - I got access only to 2 port VNA and no suitable blaun at hand). LVDS drivers aren't that expensive, but it will add up in the end and you will slowly start to loose benefits SATA - price, simplicity, elegance.Twice the connectors, cables + drives... but you could use rally long calbes :D

By using ribbon cables we could provide also I2C and digital power on the same connector -> less cabling, big connectors. Stubs on I2C bus would be probably quite big.

I'd like to start working on schematics next week and close the cable issue before it. I'll sit down and crunch some money numbers for various connection schemes. In a meantime, you can voice your opinion on cable choice - sata, ribbon, LVDS sata. Or something completely different.

Thank you mhelin for your input on RPi. We could provide simple logic buffer with enable connected to GPIO of RPi. So buffer/clock input would be enabled by RPi only after setting up I2S for slave operation.

I'd love to implement volume control via I2C, I'm afraid that is beyond my possibilities at the moment - time wise. If there is someone with skills and interest, I'm more than happy to provide pcbs for this project in exchange for the driver.
 

Attachments

  • S21R501X.png
    S21R501X.png
    25.4 KB · Views: 4,347
  • testsetup.png
    testsetup.png
    28 KB · Views: 4,312
  • sataTerminated.png
    sataTerminated.png
    31.2 KB · Views: 339
  • ribbonTerminated.png
    ribbonTerminated.png
    31.6 KB · Views: 287
SATA cable might be nice a I2S interconnection between devices like USB to I2S converter and a DAC. However, when a usual ribbon cable is used it is meant to be as short as possible, shorter than 10 cm anyway, and used only as for the board-to-board connection. Also it is important the each other signal is the (return) ground. I2S lines also usually have a series 22 -47 ohm resistors, no termination except the input impedance of that of the converters or DSP. If you can get the boards fit physically close enough to each other you could just use angled headers (source -eg. DSP) and receptacles (sink - DAC etc). In case boards fitted with usual headers should be connected together also a small PCB (length of 50mm or less) with receptacles could be fine.
 

Pitrsek

Member
2004-11-19 4:46 pm
CZ
Back to ribbon

I was considering using SATA due to its size and the possibility to use stacked connectors to save space. As it turned out, stacked SATA connector is "unobtanium". I've used ribbon cables in my last serous build (a team project built for a student competition, I've attached picture of it). I did not grow fond of ribbon cables and connectors, alas there is nothing better(price,space,performance). So back to ribbon cable.... Due to size of connector, last in/out channel will not be placed at the pcb edge. I've started to work on schematics and libraries, but progress is quite slow.
 

Attachments

  • _DSC3766.jpg
    _DSC3766.jpg
    911.3 KB · Views: 1,316
  • idea2.PNG
    idea2.PNG
    67.7 KB · Views: 1,250
  • idea1.PNG
    idea1.PNG
    76.1 KB · Views: 1,265

Pitrsek

Member
2004-11-19 4:46 pm
CZ
power supplies,I2C

Hello Charlie, yes, there is some progress. I've been busy researching power voltage regulators. I've settled on single supply for all - separation between noisy and sensitive circuitry will be facilitated by separate regulators. My selection:
1.2V and 3.3V for logic - LM3370SD-3021
3.3V for PLL and Aux ADC - LP5907

Hopefully I'll be able to make pcb universal, either for single clock crystal - connected to ADAU, or with two NDK oscillators, clock selection and ADM7150(for oscillators). So one can choose whether need/want high quality clock or prefers to save some money. We will see if it's possible when I'll start to design the pcb, but I'd really like to do it.

As for opamp power supply, it seems to be either TPS7A3301 and TPS7A4701 or jung regulator. When you use quality voltage reference and opamp, you are not that far away from price of TPS. I have en eval board for TPS on the way, so I'll know more when it arrives.

I've decided to go with i2c - mainly to save GPIOs. The drawback is that total delay time is limited to 800ms for 48kHz(If you go with SPI you can attach additional memory for longer delay times), but I believe this would be enough for any loudspeaker xover.

Input/output IDC connectors will contain I2S,I2C, 5V and maybe 3V3. Connection made(I2S,I2C, clock selection, reset..) to RPi header will be provided on additional IDC connectors, so you can connect any MCU/SBC you wish. There will be an I2C switch, so you can choose to which(slave/master) I2C line you want to talk to, additionally I2C lines going to Input/output IDC connectors will be buffered.

I have ADAU1452 with me, if I can find suitable thin coax, I'll measure its package capacity.

As always, I'm open to suggestions and critique.
 

Pitrsek

Member
2004-11-19 4:46 pm
CZ
Just a small update...

Tps eval board has arrived, haven't played with it yet.
I've spent quite some time on I2S/Output connectors. I ended with the configuration in attachment(it does not represent pin-out, just which signals are presented).

With this arrangement, you have a choice between 1x4 or 2x2 or 4x1 - inputs and outputs. OUT3/IN3 connector will be shared with RPI. You can connect 8ch usb streamer, or 8ch BBB, or rpi and wolfson SPDIF and still have some inputs left. Or 8ch BB and wolfson SPDIF(if you decrease Fs of BBB)... this is the most versatile arrangement of the connector I've been able to come up with.

I've stumbled upon an interesting IC - TPS65131. If I use it(with post regulation), I could power whole thing from a single 5v adapter. A smaller, more streamlined design.

I'm thinking about using toslink instead of BNC. Why? If you are interested in audio, chances are that you are already using USB to I2S, or using clock sync, so vanilla SPDIF is not really interesting for you. On the other hand, it seems that everything has toslink nowdays - cheap pc motherboards, gaming consoles, even some laptops...

Comments are welcome.
 

Attachments

  • conn.PNG
    conn.PNG
    7.1 KB · Views: 1,132

Pitrsek

Member
2004-11-19 4:46 pm
CZ
Hi, I've managed to destroy TPS during impedance measurement - probably too strong signal from VNA. Some of schematic sheets are complete, some are still missing few bits. I started with PCB layout, it seems that the board will be a bit longer than 120mm. The progress is kinda slow, but at least it is quite steady.

I'm having difficulties getting my hands on new 8ch DAC from AKM, I still got quite some time before I need it, so hopefully it will be available at that time.

I hope that I'll be able to share the schematic and some ""work in progress" layout next time.
 

Pitrsek

Member
2004-11-19 4:46 pm
CZ
4layer board

If you sum up all of the expenses(and the time!) for a project with ADAU1452, you will see that difference between 2L and 4L, compared to the rest, is really small. You will route 2L board longer and will have to make a lot of layout compromises. Your ground-plane will look like an emmental cheese. I'm not saying it is not possible(especially for application with somehow limited IOs), just that I don't believe layer count is good place to save $. Heat is the least problem - you can always slam heatsink on/under it.

Price difference between 2 and 4 layer board is around 30$. Surprisingly, it is same with local fab house and with popular online batch services as well. You can pick if you want 10pcs and wait... or are in a hurry and need one fast.

On related note, going from 4layer to 6layer is only 15$... which translates to something like 10 beers in a pub. Yes, we have a cheap beer...

If you decide to have a shot at it, I can send you my design files(Altium Designer).
 

Pitrsek

Member
2004-11-19 4:46 pm
CZ
Long overdue update

Nice board doctormord :)

Thank you basreflex for heads up on new ldo from LT, I wasn't able to find a place where you can buy one, lets wait and see. I'm a bit skeptical about the price.

At the moment, power supply for XO is provided by ADM7150, and for PLL by LP5907(this is shared with Aux ADC supply). Another LP5907 powers optical receiver.

About the board:
This will be a first and not the final version of the board. The aim is to test and evaluate the stuff. So there is a lot of connectors, jumpers, etc.
Generally the idea is to make this board as universal as possible (within reasonable bounds). This will change with next version, which will be more streamlined and polished. This brings me to another point - ATM BBB is quasi supported. What does it mean? I've connected I2s 3 header after buffer for RPI.So connection is buffered and can be disabled. Unoftrunatelly, I don't know weather BBB uses bclk and lrck as inputs or outputs.
Since my primariy interest is RPi(yay for quad core Pi :) ), I don't file like searching 100+ long thread to discover the connection.
If there is someone interested in running ADAU1452 with BBB please check wather my connection is right or wrong. Thank You.
At the moment, I2c from MCU header is not isolated, so for safe operation with BBB one would need to add I2C buffer with enable - so rise your hands who is interested in this feature :).
If there's a PCB space, I might add the buffer(and change the other one to model which supports daisychaining).


About I2C
There are two I2c busses, on first bus there is:
DSP as a slave
I2C buffer to bridge two busses, with automatic reset of DSP - this is mainly for developement purpose, so I can talk to EEProm and DAC directly.
Port expander with open drain - to facilitate reset, enable, mclk switch, enable to I2S to RPi - on startup states on RPi GPIO are not guaranteed, so I've opted to use I2c expander
LM3370SD - you can enable spread spectrum
Master is connected either via RPI connector or USBi/BBB/MCU connector

Second I2S bus contains DSP as a master and AD/DA converters as a slave, and the bridge. I've decided not to include I2C fan-out buffers for AD/DA converters

I've included screenshot of work done on PCB and schematics. Neither is complete(both are rough drafts), and there are probably some mistakes. It's work in progress on all fronts, but now you have a better idea about the project. I hope You like it.
 

Attachments

  • wip.PNG
    wip.PNG
    431.2 KB · Views: 983
  • SchematicsA.pdf
    328.9 KB · Views: 325
  • SchematicsB.pdf
    194.4 KB · Views: 234