Cluster synchronization (ADC + DAC) + Continuous Sampling

Discussions about active development projects
Post Reply
tknopp
Posts: 26
Joined: Thu Feb 09, 2017 1:13 pm

Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by tknopp » Mon Oct 02, 2017 8:54 pm

Hi All,

based on the awesome work of Jean Minet (https://www.koheron.com/blog/2016/11/29 ... ya-cluster) and Pavel Denim (http://pavel-demin.github.io/red-pitaya-notes/) we have build a project at:

https://github.com/tknopp/RedPitayaDAQServer

that allows to
- Synchronize the fast ADC and DAC of a cluster of Red Pitayas.
- Sample the data with up to 15.625 MSamples / s into the main memory of each Red Pitaya. From there it can be send over the network to a client computer

The synchronization is done using the daisy chain connectors (SATA) but it requires some soldering. Since the synchronization of the clocks is not sufficient we additionally use the DIO to broadcast a trigger to all Red Pitayas starting both the DAC and the ADC at exactly the same sample.

This project is not fully documented and our application (we name it daq_server) is specific for our own use case. However, with just some C and network programming skills (similar to the RedPitaya C API) it should be possible to adapt the project to your own needs.

Contributions are welcome. Especially it would be great to develop a more general server application and some Matlab/Python clients that realize fully synchronous sampling.

Best regards,

Tobias Knopp and Jonas Beuke

P.S.: Some initial documentation can be found here: https://github.com/tknopp/RedPitayaDAQServer/wiki

tknopp
Posts: 26
Joined: Thu Feb 09, 2017 1:13 pm

Re: Cluster synchronization (ADC + DAC) + Continuous Samplin

Post by tknopp » Wed Oct 04, 2017 9:51 am

(and sorry Pavel that I misspelled your last name, its not Demin not Denim)

JB
Posts: 17
Joined: Tue Jul 12, 2016 10:34 am

Re: Cluster synchronization (ADC + DAC) + Continuous Samplin

Post by JB » Fri Nov 17, 2017 10:30 am

Short update: We now have a SCPI server for configuring the acquisition and downloading the data from the ring buffer. A MATLAB client has been added to make use of the SCPI server. We now plan to port this client to Python. Suggestions are welcome!

fbalakirev
Posts: 72
Joined: Thu Sep 03, 2015 6:56 pm

Re: Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by fbalakirev » Tue Dec 18, 2018 7:23 pm

Very nice project!

Could you please elaborate on ADC synchronization implementation? Koheron blog only mentions DAC side unfortunately.

JB
Posts: 17
Joined: Tue Jul 12, 2016 10:34 am

Re: Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by JB » Thu Dec 20, 2018 2:11 pm

Well, in the end it is exactly the same. The clock is shared via the SATA cable and the slave RP just uses this clock. For synchronization we added a trigger that is shared with all boards via a jumper wire. The master can set this trigger and all write pointers start at the same time. This might result in some phase difference but the wavelength at 125 MHz should be 2.4 m if I am not mistaken and therefore the wire length should make not so much of a difference. And since we can only sample at 125/8 MHz, this is assumed to be no issue at all.

fbalakirev
Posts: 72
Joined: Thu Sep 03, 2015 6:56 pm

Re: Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by fbalakirev » Tue Jan 08, 2019 8:21 pm

JB,

Thanks for the details!

Do you think it would be possible to export ADC clock from one Red Pitaya to another Red Pitaya directly? For example: on master RP, copy 125MHz ADC clock to one of the pairs of the extension connector E1 in programmable logic; on slave RP, move R25,R26 to location R23,R24 to clock through extension connector E2;then, connect master E1 pairto slave E2 pair directly?

JB
Posts: 17
Joined: Tue Jul 12, 2016 10:34 am

Re: Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by JB » Fri Jan 11, 2019 7:23 am

Well, I guess it should be possible. The question is: why? At least with two jumper wires you might get problems with signal degradation. SATA cables are a good choice because they are used for LVDS in their original use case.

gerardpc
Posts: 9
Joined: Tue Oct 09, 2018 5:01 pm

Re: Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by gerardpc » Tue Jan 29, 2019 11:04 pm

Hi! Very nice project. I just wanted to ask a couple of details regarding the continous sampling: for how long can you measure without problems? What is the limit there? If I understand correctly, you say that data is saved in a file in the redpitaya and later it can be transferred (for instance via scp) to the client computer. Is that so? Where and in what format the data is stored? As bit, as text?

tknopp
Posts: 26
Joined: Thu Feb 09, 2017 1:13 pm

Re: Cluster synchronization (ADC + DAC) + Continuous Sampling

Post by tknopp » Thu Feb 21, 2019 11:23 am

The data is stored in a 256 MB ring buffer on the RP main memory. Our architecture requires that you have some period length (e.g. 1000 samples) and we then always measure multiples of that. Hence its not exactly 256 MB but a little bit less. The advantage of this architecture is that we can measure indefinitely long and never lose the phase relation.

The data can be gathered from the RP ring buffer using TCP. We have some Python and Matlab scripts available where you can see this in action: https://github.com/tknopp/RedPitayaDAQS ... ADC.py#L50
I am using a more sophisticated client written in Julia https://github.com/tknopp/RedPitayaDAQServer.jl

From my experience it is possible to sample continuously for decimation 16 (125Hz / 16). Decimation 8 should also work but I don't know how reliable that is.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 7 guests