High Speed data collection (DAC and ADC)

Non-technical related questions should go here.
User avatar
jrogers
Member
Posts: 13
Joined: Mon Apr 19, 2010 4:02 pm

High Speed data collection (DAC and ADC)

Postby jrogers » Thu Apr 22, 2010 6:22 pm

I have owned a XS1-G kit for a long time, and I just purchased the XS1-L1 USB HS Audio 2.0 kit, and I have been "lurking" in the forums on and off for a while...

I bought XS1-G shortly after it came out because I found this technology to very interesting!!!! But I ended up having to use another board (www.tern.com) because I was familiar with it and I had a deadline to meet.

The USB HS Audio kit is of even greater interest to me, because I have several audio projects in mind and this could be an ideal solution...

I have read many of the threads here and it seems that things have come a long way in the past year or so, but it still seems that the learning curve is a bit steep...

That being said... I am ready do dive in and I am hoping that I can get some help in building up some momentum with XMOS technology! Since I have seen several suggestions for more "getting started" types of documents, I would be glad to document my process.

OK - I find that the best way to learn a technology is to use a "real" problem, so I would like to implement the project that I had originally wanted to implement with XMOS.

It is a fairly simple application:

1 I/O output - to signal an external device
1 I/O input - from the external device to tell me to grab an analog value
ADC conversion of a value in less then 3 micro seconds

repeat this for a "few" times (could be as few as 10 or 20 but no more than a few hundred)

do some simple averaging and other simple processing.
DAC output the new analog value.

I also use a serial or ethernet connection to send commands and get responses and status from this device.

This is a control application. The algorithm described above is "correcting" some settings periodically, so even though I need to be able to grab the data fast (about 200khz), I only need to do it for short bursts, and I only need to do it "occasionally" (maybe a few times a minute).

So on the surface this seems like a really good match for XMOS...

The tern.com board that I am currently using is an "AMD186" chip. The technology is old and the processor only runs at 40mhz... However, Tern does have a nice selection of peripheral boards and associated software libraries.

Why should I fix what is not broken.... well I have pushed this board to its limit to achieve the speed requirements described above, so I would like to move to XMOS so that I can do this processing more "comfortably" and more importantly, be ready for even more demanding applications.

Since I have to admit that I do not really know where to begin in using XMOS for this, I am asking for your thoughts and suggestions on how to proceed?

Some questions that I do have:

- How to handle ADC and DAC... I am currently using a 16 bit 1 mhz ADC (AD7655), and 16 bit DAC (LTC2600)

- Should I use a "soft" ADC?

- If not is there peripheral boards that have ADC/DAC that can be easily used the the XMOS kits?

- Is the serial and ethernet code in "good" shape? (by "good shape" I mean is it pretty much usable "as is")

Thanks!!!! - John
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Postby Andy » Thu Apr 22, 2010 7:24 pm

Hi John,

XMOS don't currently have a peripheral board to do ADC/DAC, so I recommend you manufacture a small PCB if you want to hook up your chips (if they're surface mount). What interface do your current chips use? There are a number of interfaces already implemented in XC that you can drop in, including SPI and I2C.

I'm not sure what you mean by 'soft' ADC. Did you a mean a soft DAC? If so, XMOS have written an excellent PWM DAC that can achieve good results entirely in software.

The serial UART has recently been rewritten and looks very easy to use. As far as I know, the ethernet example code was written for the XC-2 board, so this code might take a bit more time to port to your application if not using an XC-2.

Hope that helps.
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Postby leon_heller » Thu Apr 22, 2010 7:34 pm

Both those chips have SPI interfaces, designing a PCB for them would be quite easy.
User avatar
jrogers
Member
Posts: 13
Joined: Mon Apr 19, 2010 4:02 pm

Postby jrogers » Thu Apr 22, 2010 8:14 pm

Andy wrote: ...
I'm not sure what you mean by 'soft' ADC. Did you a mean a soft DAC? If so, XMOS have written an excellent PWM DAC that can achieve good results entirely in software.
...
Hope that helps.
Thanks Andy! Very helpful!

By soft ADC, I was wondering if, like the soft PWM DAC, there was a soft version of a digital to analog conversion component that could sample data at 200khz... If one does not exist already is this reasonable? Or is this beyond the capability of a "soft" component.
John
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Postby leon_heller » Thu Apr 22, 2010 8:17 pm

An ADC can be implemented like that, but you need to put the components(a couple of resistors and a capacitor) close to the chip, which could be difficult.
User avatar
jrogers
Member
Posts: 13
Joined: Mon Apr 19, 2010 4:02 pm

Postby jrogers » Thu Apr 22, 2010 8:31 pm

leon_heller wrote:Both those chips have SPI interfaces, designing a PCB for them would be quite easy.
Thank you for the encouraging and good news!

Many of my undergrad course were in EE, but I switched to the (then brand new) Computer Science program, and I have spent the last 25 years in the software and firmware side of things... Lately I have been doing more and more embedded stuff and not being able to whip up a circuit/PCB is feeling more and more like a handicap...

I have been taking some steps to fill this "gap"... but I am currently not sure how to build such a circuit/PCB. I might be able to do it, but I am worried that I will miss some "details".

I will keep working to fill this gap in my knowledge/capability, but in the meantime can you recommend someone or some service that could do this sort of thing at a reasonable cost?

- I am not "married" to the ADC/DAC chips that I mentioned, so I would be open to an existing board (or a new board with different chips) as long as it met the speed requirements.

- Do you think that there is a general enough need to make this a "project"?

Thanks again! - John
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Postby leon_heller » Thu Apr 22, 2010 9:14 pm

If the peripheral board for the old AMD system does what you want, it might be easier and cheaper to interface that to the XS1-G via a simple adapter PCB.
User avatar
lilltroll
XCore Expert
Posts: 955
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Postby lilltroll » Thu Apr 22, 2010 9:28 pm

I have been using the LTC2600 as well, but with TI-DSP.
What about signal conditioning?

Do you need anti-alias filters, and do you need balanced inputs and or a PGA (Programmable Gain Amplifier) ?
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
jrogers
Member
Posts: 13
Joined: Mon Apr 19, 2010 4:02 pm

Postby jrogers » Thu Apr 22, 2010 10:17 pm

leon_heller wrote:If the peripheral board for the old AMD system does what you want, it might be easier and cheaper to interface that to the XS1-G via a simple adapter PCB.
Possibly... As is the ADC and DAC are mounted on the "main" board, but they do have peripheral boards that also support these chips... These boards are fairly customized for their main boards, but it is still a possibility... I will look into that... In fact the folks at Tern are very helpful and may even be interested in the idea in general...

Thanks for pointing this out!
User avatar
jrogers
Member
Posts: 13
Joined: Mon Apr 19, 2010 4:02 pm

Postby jrogers » Thu Apr 22, 2010 10:46 pm

lilltroll wrote:I have been using the LTC2600 as well, but with TI-DSP.
What about signal conditioning?

Do you need anti-alias filters, and do you need balanced inputs and or a PGA (Programmable Gain Amplifier) ?
Exactly! Those are the sorts of "details" that come up! Did you handle all of the conditions that you listed? Did you create the circuit/PCB or did you find something off the shelf?

To answer your question... I am not exactly sure what I need (re: signal conditioning, filters, etc) ... I have been using the boards from Tern. They have been doing this for 15 years. They are very friendly and helpful, but their designs are proprietary and I have to believe that they have refined these designs during all that time... probably including many/all of the topics that you mentioned...

So I might as well state what I "really" want....

I know that there will never be one "end all" board that satisfies every situation....
but... in the interest of not re-inventing the wheel, I would like to believe that there is someone/some company that has a lot of knowledge and experience with AD/DA conversion and has (or could make) a board or even a family of boards, that take care of many of the common issues associated with data acquisition and analog-digital data issues in general.

It would be great to have a board that had both high speed ADC and DAC.

Also it would be nice if there were components on board that would allow for large range of voltages - both in and out. For example many DAC/ADCs can only use ranges related to Vcc etc - this usually means 5 v max. In my application I need to measure and set voltages in the 0-10 range. So it would be nice to have a fairly wide range of input and output voltages.

I have done some searching for this sort of thing, and I have been surprised that I can't find it...

-John

Who is online

Users browsing this forum: No registered users and 1 guest