Author Topic: Storing high speed data  (Read 1889 times)

0 Members and 1 Guest are viewing this topic.

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Storing high speed data
« on: September 03, 2023, 12:10:30 am »
Good day everyone

About me
I've been an industrial electrician specializing in construction and troubleshooting motor controls, plc, sensing arrays and networking of production line equipment.(percision mixers, injection molding, welders, quality control appratus) for 3 decades. Im experienced c programmer, and physics student who is currently obsessed with chemical engineering (not making chemicals but making stuff to make and test compounds).

I am an intermediate/amateur in building custom pcb's and arduino level projects to run different gadgets and gizmos i dream up. Ive made 70-80 pcb projects over the last 10 years with a DIY cnc

Currently I am using a cheap second hand 50mhz bandwidth spectrum analyzer to recreate a project demonstrated by the youtube channel applied science. Needless to say, my success is limited by my technology
The video in trying to reproduce can be seen here
I wish to recreate some of the functionality of his scope, without the multi thousand dollar price tag. My first idea is to record the data points, then send them to a pc, where I can process the results in software. Eventually I would like to be able to generate a frequency spectrum for use as NMR spectroscopy.

developing and constructing analog front-end at this level is a new step for me and I am not experienced in designing high speed systems. But have been studying layout and timing considerations associated with these systems, and learning the basic of ddr memory. Learned enough to know I need to use an MIG from the manufacturer.

This board will be beyond my abilities to print as the bga layout is to small for my equipment, so I will finally have an excuse to order a custom board from a manufacturer.

I am looking for information regarding the best way to construct a system to read and store data from a high speed adc (200MHz).

My specifications which are written in pencil

Ive been looking into the ADS4128 12bit 200MSPS ADC with +12db adjustable gain
The front end circuit built around the LMH2832 DVGA Amplifier with +60db gain
30 seconds of recording capability(12Gbytes of storage)

What have I done to approach the problem
Research, research, more research.
Brainstorm design with pro/con analysis.

I have come up with 2 possible solutions.
1)Streaming the adc into a ring buffer system, while streaming the buffer to a pc simultaneously. By using math to compair the input/output rates, the buffer can be sized to hold the difference.
Pro
    smaller on board memory requirements,
    storage requirements are moved to a pc,
    Ethernet standards have datarates exceeding the input rate
Con
    slow transfer speeds will not shrink the memory requirments.
    Ive never build a board with High speed ethernet which would meet the datarates needed
    I lose the ability to process the data within the fpga

2) Go all out, store the raw data and perform data processing on board.
Pro
  Everything could be in one box and portable for field use
Con
   Im dreaming, never done anything this intergrated before

This is a learning project for me. I want to learn verilog and FPGA
I want to be able to make a useful low cost nmr open source project just because I believe I can.

After a lot of searching, I came across this article discussing a FIFO with gigabyte depth.
http://xillybus.com/tutorials/deep-virtual-fifo-download-source

This seams perfect for my needs. As it could act as a drop in buffer, its not a ring buffer, but a FIFO which would fit my needs quite well.

For the professionals who have made it this far, first off, thank you for reading as your time is precious,

Is this a reasonable approach?
How would you approach this situation?
"You can't do that" - challenge accepted
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 1854
  • Country: au
Re: Storing high speed data
« Reply #1 on: September 03, 2023, 07:18:28 am »
A ring buffer can be used as a FIFO buffer so no problem there. FPGA is definitely the way to go and if you want to get data onto a PC, a high speed or super speed connection is the most direct method with FTDI and Cypress/Infineon making a number of possible chips.
 
The following users thanked this post: Rainwater

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6783
  • Country: nl
Re: Storing high speed data
« Reply #2 on: September 03, 2023, 10:42:18 am »
Can't you just bash the coil with a kV squarewave and then measure the nuclear resonance with the coil as a non-resonant pickup into a transimpedance amplifier? (Still need to isolate the transimpedance amplifier during excitation obviously.)
 

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Re: Storing high speed data
« Reply #3 on: September 03, 2023, 01:31:35 pm »
Thank you for your responses.
Im looking at the EZ-USB™ FX3 USB 5 Gbps Peripheral Controller
CYUSB3014-BZXIT
It has an ARM9 mcu build in, 49GPIO, which would be nice, too bad the dev boards are no longer available
Do to precision timing of the different stages of the process, having it all controlled from 1 location would be great.

Can't you just bash the coil with a kV squarewave
Yes and No. That statement made in the video is not entirely correct, at least with my experiments, my testing shows It is true that the Work done is = Power * Time, with a rf pulse, but this relationship is not truly linear with a  squarewave pulse. Square wave returns much less of an echo, my guess is the square wave is spreading its energy across the spectrum, leaving little energy in the effective bandwidth for the test sample.

This is really a seperate topic as it took me weeks to get a square wave to work at all snd required -90c temperature. The results where disappointing. And on one occasion, did not discharge properly, jumped an optiocoupler and cooked my control board. (15kv)

"You can't do that" - challenge accepted
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6783
  • Country: nl
Re: Storing high speed data
« Reply #4 on: September 03, 2023, 02:08:18 pm »
Using square wave allows you to get rid of all resonance components though. No more need to ring up the tank to high field strength, just bash it harder (higher voltage bridge). Which also means the tank won't need to ring down before you can measure anything, because there is no tank. Just switch off excitation at zero current and you can stop it almost on a dime. Since resonance falls off fast after excitation, being able to start measuring far faster afterwards can probably get you a lot of sensitivity.

Most of the old academic devices weren't designed in the age of SiC/GAN, I suspect the old circuits stick around more out of momentum than good reason.

Regardless of excitation, you don't really need a fast ADC BTW. A quadrature lock in amplifier can detect the resonance (which the NanoVNA could probably be with some programming) since you just need a single frequency per measurement.

« Last Edit: September 03, 2023, 02:10:33 pm by Marco »
 

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Re: Storing high speed data
« Reply #5 on: September 03, 2023, 02:48:05 pm »
Using square wave allows you to get rid of all resonance components though..... Which also means the tank won't need to ring down before you can measure anything, because there is no tank...... Since resonance falls off fast after excitation, being able to start measuring far faster afterwards can probably get you a lot of sensitivity.
Those a really good points. I think im going to revisit working with pulse excitation.
I really dont know if my current reciver or my excitation is the issue anyway.

The high MSPS in my specs is for a versatile appratus, as this project evolves, I may want to increase the magnetic field strength by a order of magnitude to increase resolution, which will increase the frequency. From my studys, as the nyquist frequency is approached, phasing differences between molecules become more difficult to distinguish

By not only measuring the magnitude of the resonance frequency, but also phase shifts within the same spectrum, a corrective stationary field can be calibrated to produce a more homogeneous magnetic field for the test sample.
Please see this video as a referance
Im using a square electromagnetic i made to vary the resonance frequency, but at the cost of signal duration.
My theory is by monitoring the phase differences in the recived signal, i can tweak the magnetic field to produce more in phase resonance and a stronger signal
"You can't do that" - challenge accepted
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 1854
  • Country: au
Re: Storing high speed data
« Reply #6 on: September 05, 2023, 12:10:01 am »
There are a number of Software Defined Radio projects (SDR) on github which involve high speed ADCs, USB etc. which might be of interest. I have included one link as just an example:
https://github.com/greatscottgadgets/hackrf/tree/master

and a block diagram:

https://github.com/greatscottgadgets/hackrf/blob/master/docs/images/block-diagram.png
 

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Re: Storing high speed data
« Reply #7 on: September 05, 2023, 02:46:22 am »
Thats a nice design. I've seen grest scotts videos about it, but they use down sampling ( im probley using the wrong term).This results in a lose of information. With strong signals, and modulations in the 100+ cycles or more, this isnt an issue. The signals im getting are very short, 16-22μS, maybe 100 cycles. (My magnet is terrible, but strong). Its stuck in my head that the more data points I have, the more techniques I can use to extract data from a sample.
I also have no intention of limiting this to NQR, thats just a stepping stone to H-1 NMR, then C-13 NMR, and carbon dating.
Ya, I have big dreams.

I found this sweet library for controlling ddr3
https://www.eevblog.com/forum/fpga/brianhg_ddr3_controller-open-source-ddr3-controller/

Been reading it for a few hours, i cant even pretend to understand whats inside some of these modules but the UI looks very promising
piecing some software concepts together one by one before I even start selecting hardware

Phil's lab has a great review of the process, but the design software he demonstrates is expensive.
I'm wanting to keep that kind of cost out of this project.

Some of the fpga's have the same problem, their IDE are subscription services. So these are immediately out of consideration.

In a perfect world, i would be able to find a dev board I could connect my dac to and be done with the hardware and jump stright into the software.

Will I lost signal integrity at 200MSPS using short jumper wires?
Im very sure I will. Thats a lot of inductance getting tossed in, but the ribbon cable connecting my tang nano 9k to the hdmi screen seams able to cope with this.
"You can't do that" - challenge accepted
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 1854
  • Country: au
Re: Storing high speed data
« Reply #8 on: September 05, 2023, 03:09:32 am »
Using DDR3 RAM instead of SRAM ? How much RAM do you think you will need? I guess even SuperSpeed USB data rates would be marginal for handling your ADC sampling rates.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6783
  • Country: nl
Re: Storing high speed data
« Reply #9 on: September 05, 2023, 07:56:52 am »
There's a real interesting method for NQR which seems almost unreplicated academically, where they simply excite the sample with white noise (actually a pseudorandom digital sequence) for a relatively short time and then measure the response, at high repetition rates with averaging. The paper even says it worked experimentally, but if this works why are people still messing around with 100W range narrowband excitation?

https://pubs.acs.org/doi/10.1021/jp952097v

I don't think the cross correlation they do is really necessary if you are taking the Fourier transform any way. You can see a pretty FID in the time domain, after averaging, but for Fourier a sum of shifted FIDs has pretty much the same magnitude response AFAICS.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6783
  • Country: nl
Re: Storing high speed data
« Reply #10 on: September 05, 2023, 10:41:24 am »
In a perfect world, i would be able to find a dev board I could connect my dac to and be done with the hardware and jump stright into the software.
How about Eclypse Z7? It has 2 zmod connectors for adc/dac and you can probably do the processing on the ARM core.
 

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Re: Storing high speed data
« Reply #11 on: September 05, 2023, 03:06:41 pm »
That is a great fit for my project, have to rethink how to do a few things, but will likely work out better.
pricy but built by professionals often is, and theirs no way I would make anything as good as the Eclypse for the price

dual core mcu, fpga,
1gig ddr3
ready made adc front-end 14bit 125MSPS and 60mhz bandwidth
Ethernet
High speed microsd slot

That alone will provide large recording storage, if it can support uhs-i interface, which is over the speed I need. Ill have to dig into that

I wanted the 16gb ram was for storage, using 1gig to buffer and streaming to an sd card will simplify data collection and processing.

85K logic cells,  220 dps slices dont know if thats alot for doing FFT

This will deffenetly get my toes wet. Will be an education just figuring out how to upload code to it.
Thank you for the suggestion Marco
"You can't do that" - challenge accepted
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4516
  • Country: dk
Re: Storing high speed data
« Reply #12 on: September 05, 2023, 03:24:40 pm »
since you need to use and FPGA anyway just do a complex down conversion and down sampling to a much lower sample frequency, using the same DCO used to do the Tx pulse as IF

and for a not super homogeneous magnet you might want to look at a CPMG pulse sequence, it also  relaxes the turn around time
from Tx to Rx
 

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Re: Storing high speed data
« Reply #13 on: September 05, 2023, 07:19:46 pm »
It might be time to change the name of this post. We kinda got off topic.

To me DPS has always seamed like one of those fancy cars you always dream about driving but know its just not gonna happen.

Bare with me please, you got me fliping through textbooks to see how downconverting would effect the data extracted from a recording. Mathematically there is no losses. All my rf experience is analog, i expect rf mixers to produce chop due to dead zones and other non linear behaviors. This results in lost of data. Better explained as a malformed output signal.

Is this downconverting something like in fm radios, where you shift to an if frequency, them build a filter network around the if before demodulating?
"You can't do that" - challenge accepted
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4516
  • Country: dk
Re: Storing high speed data
« Reply #14 on: September 05, 2023, 07:43:53 pm »
It might be time to change the name of this post. We kinda got off topic.

To me DPS has always seamed like one of those fancy cars you always dream about driving but know its just not gonna happen.

Bare with me please, you got me fliping through textbooks to see how downconverting would effect the data extracted from a recording. Mathematically there is no losses. All my rf experience is analog, i expect rf mixers to produce chop due to dead zones and other non linear behaviors. This results in lost of data. Better explained as a malformed output signal.

Is this downconverting something like in fm radios, where you shift to an if frequency, them build a filter network around the if before demodulating?

yes, but you might as well mix it down to DC then the filter becomes a lowpass and then combine the filter with downsampling

and since you have a fast ADC and an FPGA is it can all be done digitally with none of the analog issues

https://en.wikipedia.org/wiki/Digital_down_converter#/media/File:DDC.svg
 
The following users thanked this post: Someone

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1173
  • Country: nz
Re: Storing high speed data
« Reply #15 on: September 05, 2023, 09:59:57 pm »
Sounds interesting!

Random comment: don’t forget about the sample clock! Sample time jitter (especially at higher input frequencies will impair ADC performance.

Would something like the ADC3543 from TI (14b 65 MSamples/sec) work as a ‘starter’ digitiser? Get you started without needing to crack into a chunky FPGA project?

This ADC (and Analog Devices make some I think) has a Digital Down Converter and down-sampling filter inside. This means that you can have a fast ADC sample rate and a much slower output rate.

On the plus side, you might get the data rate down enough to capture with a microcontroller or one of those Cypress USB FIFO chips (FX something… FX2? FX3?)

On the minus side, downsampling will reduce the instantaneous bandwidth which won’t be great for short signals.

https://www.ti.com/lit/ds/symlink/adc3541.pdf?ts=1693349469821
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6783
  • Country: nl
Re: Storing high speed data
« Reply #16 on: September 07, 2023, 08:29:19 am »
Those a really good points. I think im going to revisit working with pulse excitation.
Since the thread is dying down, I'd like to puzzle about this a bit more. Doing some thought experiments I'm starting to see why things are often resonant.

For "lossless" driving of an inductive load without narrowband resonant matching you'd need a close equivalent of a class DE amplifier, but the inductance combined with switch capacitance is way too huge to do the edges in say 5 ns (need the high frequency content). At low power just throwing switch output capacitance energy away each transition is less of an issue, but high power seems very hard with wideband driving.

There might be some clever topologies I'm missing though.
 

Offline RainwaterTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: us
Re: Storing high speed data
« Reply #17 on: September 07, 2023, 10:57:45 am »
Dont laugh,
Yall about to see how redneck things can get,
but in my defense, it works. Not very well, here we go
Theme music

i could not get some IXTH1N450HV salvaged from an xray machine to fire quickly enough. 30ns delay, and no clean edges. So i went with a physical switch

I have a vacuum chamber(deep 5gal ss pot with rtv sealent applied to the lid) containing a 15000 rpm motor(old vacuum motor, bsd style). To it i have attached #2 Ir plated contacts salvaged from a 13kv gen appembily about 6mm wide, each connected to a seperate gear

There are 6 shunts, spaced vertically on the shaft, electricly isolated from each other. To provide 5 pulses, the 1st one tells me when im at zero angle, and rpms

Each shunt can have its angle adjusted by turning the gear it is connected to by hand

Adjusting the angle is a pain in the !@@, i use a jig with a 12in rod as a protractor to set the angles.once the appratus is up to speed, another linear actuator lifts the motor into firing position for about 1 rotation

Using a speed controller and the angle Im able adjust the firing of each pulse, to get very fast clean edges at 12v on my oscilloscope.

Transformer, full bridge rectifier, 5 channels, each with diodes for isolation, feeding almost 1nF of 15KV caps in parrallel.
Air is removed, co2 in inserted, repeat twice then drop the pressureas low as i can go, i get way back and fire.

I have a 4in×4in square electro magnet, i have been using a flux viewing plastic sheet to try to get the interior as stright as possible.
22awg magnetic copper wire. I've tried about 6 different ways to lay the coils. Best results are top to bottom, 1 continuous strand.

Sample chamber had 3 coils, much smaller, wrapped in the x, y, and z axis, and controled with 3 different bench top power supply

Reciver coil is 45 turns around a test tube. Connected to a capacitor bank, each cap is 50pf, 15kv and is connected in parallel by a removable pin. Basicly a big adjustable cap.

Attenuator is a high speed comparator controlling a IXTH1N450HV, post attenuator are cross linked diodes connected to ground. Burned up many leds getting this thing to work. Have to turn on the mosfet on at around 250v, by the time its conductive, voltages are below 40v for the diodes to drop it to 0.6v. Need better diodes, they conduct after the voltage falls below .6, about 5nS

Like I said before, it took weeks to get the dc pulse to work. Got a lot of magic smoke working out the timing.

I should add, i dont have a vector analyzor. Just an LCR meter and some determination.

Edit: preview/post button error

Currently waiting for youtuber fezz to finish his class e amp project so I can shamefully copy, verify his work

Now im using a oil cooled 300w transistor as a class a amp because I suck as biasing class ab circuits. Using an arduino board wave form generator as my feedstock
« Last Edit: September 07, 2023, 11:08:42 am by Rainwater »
"You can't do that" - challenge accepted
 
The following users thanked this post: Someone


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf