FPGA as Digital Multichannel Analyzer

Hello,

I came across the MKRVideo4000, and noticed the FPGA.

When reading web-tutorials and typical applications of FPGAs I came across the possibilty to build a Digital Multichannel Analyzer. Could this really work? And could the MKRVidor4000 be the product I am searching for when I do want to build a Multichannel Analyzer for pulse-height analysis?

Background: I would like to analyse up to several thousands of peaks per seconde and generate a histogramm (channel is defined by the maximum voltage of the peak, 12 bits would be fine to me). If this works, I would like to read the content of the channels once a second or maybe after 10 seconds.

When reading the technical specifications I noticed, that the FPGA itself does not contain any pins for analog-read. Is this normal for FPGAs? Would there be a possibility to use one of the analog pins (up to 12 bit) of the processor?
Would you know another FPGA, that could be useful for my project?

Thank you very much for your help!

Hi,
FPGAs don't typically integrate ADCs but there are some exceptions. In any case you should probably add some detail on the sampling frequency you expect you need as it really changes everything. If you need low sampling frequency maybe you don't even need a FPGA, whereas if you need GHz rates then you need almost for sure an external ADC with a FPGA...

Good morning,

thank you for your reply!

At the moment I do expect at maximum up to 50000-100000 Peaks per second. That's why (using the Nyquist theorem) I would at least need to sample 1MHz.

Addon: My digital oscilloscope samples up to 100MHz, that's definitely enough for my purpose and here I can even distinguish (partly) overlaping peaks.

Thank you for your hints!

Hello again,

meanwhile I searched the web and found out, that someone could use an external ADCs to read analog signals: How to Connect an ADC to an FPGA - Surf-VHDL.

Does this hold true (especially with the comparable high speed of the measurements)?

And does this work with the MKRVideo4000?

Thank you very much for your help!

Good evening,

meanwhile I found out, that external ADC are not unusual for FPGAs: EEVblog #496 - What Is An FPGA? - YouTube

Do you know a suitable and well working ADC I could use? On the web I found different models like ADS5520 data sheet, product information and support | TI.com, http://www.ti.com/lit/ds/symlink/ads5295.pdf or http://www.ti.com/lit/ds/symlink/ads5295.pdf, however I am not sure if they would work fine within a multichannel analyzer.
As far as I understood I will have to search for a ADC with two-wire-interface (because of the high number of measurements)?

Thank you again!

FYI, an arduino DUE can sample one of its 12 ADC channels up to 1 Msps, with a window feature to trigger an interrupt on a high or low threshold if necessary. As the uc can sample with a DMA, the uc can parse previous samples while the ADC peripheral continuousely samples.

Hi,
if you are looking for 1MSPS sample rate on n channels you will need an ADC which is at least n MSPS. i'm saying at least because you have to consider that channel switching introduces some delay so you can't sample at max ADC rate when switching between channels.
bottom line is that you will likely need a parallel interface ADC in order to achieve, say a bandwidth of 10 MSPS in case you want to sample 10 channels at 1 MSPS. this is because if it was transmitted as serial stream and you have say 12 bits per sample it would amount to a net data rate of 120 Mbits...

in any case... FPGA is able to receive to any signal that is below something like 300 Mhz, maybe even more in some cases, however achieving those speeds is not easy neither in FPGA nor externally.

This part is 25 MSPS per channel (4 channels) ADC. Output is LVDS, 1 or 2 pairs per ADC.

That page has also good tool to select ADC parts with paramets.

I think you can do base board with that converter and use mini pci-e connector. Is mini pci-e ldvs lines length matchet in Vidor card. Some frontend circuit is needed for that ADC.

hi, pins on mini PCIe are 3.3V and don't support LVDS. the only LVDS inputs we have are on the MIPI camera interface where we have 2x lanes + 1 clock, plus eventually you can also use the micro HDMI signals which can also be used as inputs and carry 4 more LVDS pairs (but note that these are AC decoupled via 100nF capacitors). unfortunately you have to connect there through a FFC but this can be easily done using the same connector we have on Vidor and using an off the shelf cable.
note that the ADC is using DDR sampling so it's very easy to create a deserializer for that. the only caveat is that you have to use also the frame sync to qualify the point at which the deserializer outputs data.
LVDS inputs are supported up to 630 MBit so with a 12 bit deserialization rate you should be able to achieve up to over 50 MHz...
of course LVDS lines from camera and HDMI are length matched.

I was hoping that there was voltage select resistor for vccio to "pcie" pins.

No, unfortunately there's not. Actually PCIe connector pins come from various banks and are meant mainly for lvttl expansions. We do have 3 pairs which are input only but are still on 3.3v banks.

Hello,

first of all thank you very much for your help!

Unfortunately I am physicist, that's why I do have to google your abbreviations and ideas before I am able to evaluate your approach.

@ard_newbie: Thank you for the idea to use a "normal" microcrontroller. I recently found a project like that using an Arduino Nano: GitHub - chimmymew/MCA: Arduino Multi Channel Analyzer & VB6. However I ordered a "DUE" to give it a try (because of the DMA, which should make the difference to a Nano?).

@limba & DarioPennisi: As far as I understood, I am running into troubles if I do not find a way to transfer all the data an ADC samples. That's why I do have to use LVDS (low voltage differential signaling), that can send at about 200MBit/s. The FPGA at the Vidor4000 itself seems to be capable to do this job, but there is no way to connect an external ADC (that has high-grade properties) to receive the data that has to be analyzed.
I have ordered an other FPGA at Ebay in parallel (https://www.ebay.de/itm/272547446602), since I do not have any experience with these high-speed-applications mikrocontrollers are not able to deal with.

Are there instructions to the world of FPGA you would recommend for someone starting with these devices and who would try to do a multichannel-analysator with PHA?

Thank you for your help!!

If you want to learn basics of FPGA then I recommend to take free online course from Intel FPGA (Altera) or Xilinx

From catalog select fundamentals courses and after that maybe DSP if you want realtime data processing.
It seems that all online courses are free. If it's virtual classroom then you have to pay.

This was only what I found form Xilinx

Hi,

i am also playing around with a MCA. There exists an application ready solution from Pavel demin on the red pitaya board (Xilinx), which also has some fast adcs and dacs
If you want to get really fast into handling this stuff... i would recommand going with a existing solution.
Or buying some hardware: Oscilloscope and interface it for example with labview. A cheap home version is avaiable.

if you really starting at 0 zero, you have several months of learning:

  • fpga programming
  • proper circuit layout and testing
  • debugging...