-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about PulsedNMR #503
Comments
Thank you for your interest in my NMR application for Red Pitaya. I started this project to help a group from an university with their pulsed NMR setup. My version of this code is still in a state of a basic prototype that lacks some important features (for example, generation of the B pulses). The missing features can be added relatively easily and I know that someone has successfully built a pulsed NMR system for student use based on my prototype.
Yes, the external ADC clock can be used for the FPGA logic and for the DAC.
I didn't know that the phase coherence was a requirement. In the current version of my code the phases of the TX and RX signals aren't synchronized. |
Thanks very much for answering these questions. This is for a student project at the Univ. of Colorado where I teach. Red-Pitaya is the only board I have found that is inexpensive enough for such a project, so it is good news what you say about the clocks. In simple NMR transceivers like the one we are considering the Tx oscillator is usually the same as the Rx local oscillator except maybe at a different phase. The CPU might just gate the waveform from the DDS to create the Tx pulse, rather than providing the complete RF waveform. In more sophisticated high-field NMR systems there is usually an arbitrary waveform generator to create "shaped pulses", which is more similar to what you have done. But in those systems there is also a programmable sequencer that can trigger the RF pulses at definite times and at definite phase relative to the Rx local oscillator. I will definitely get one of these boards and try to get more familiar with the tools. Thanks again for your help! |
That looks really neat! Are you going to post the updated code? We have not made any progress on our project but I started playing with the RP board. |
Hi Pavel (and sorry to John for adding to a thread rather than starting my own) I am new to RedPitaya and FPGA synthesis methods. However, I have designed NMR spectrometers over the years. The RedPitaya and your fantastic software and instructional resource is wonderful and I am learning a lot. I have got as far as working out how the blocks are wired together. I can see how you have changed to a pulse generator and DDS on the tx side (John's suggestion above). I can determine how this works and what instructions I need to feed to it to make the pulses you show above. What I can't work out yet and can't see from your 'server' code is how the tx side FIFO works? It appears that you have done-away with the tx-data-counter so how does the pulse generator 'know' how many words are in the FIFO (or does it matter). Clearly the 'pulse-nmr.c' code is for the original method of arbitrary generation. I can see how to change it but I don't know if the FIFO works in the same way as the rx side or if it is different? As far as I can see the FPGA is very nearly exactly what I need. There are only one or two things I would like to implement to 'ice the cake' as it were. One thing would be to remove the sync from every tx pulse so that the pulses are coherent thoughout the sequence (if required). I was going to use an unused upper bit from pinc to gate it perhaps. However, I am getting well ahead of where I am now. If you are interested I will send you a photograph of two large circuit boards of discrete logic chips which are 30 years old and were used to implement a pulse sequence controller for an NMR imaging system! Thank you again. Paul |
Hi Paul, Thank you for checking the new pulse generator. You're right. The server code isn't in sync with the FPGA configuration. I've just committed to the devel branch the code that I used to generate the three pulses shown in my previous comment. The values written to the TX FIFO buffer are on the lines 129-142: The server code is unfinished because I don't have any idea of how to implement a user interface for the new pulse generator. Your ideas are very welcome. The pulse generator knows the state of the TX FIFO buffer via the s_axis_tvalid wire. This wire is connected to the non-empty signal of the TX FIFO buffer. Here is a link to the code reading the data from the TX FIFO buffer: The sync signal can be controlled by the last unused bit from the phase offset register. This way it can be configured independently for each pulse. Actually, I don't know if the sync signal is required at all. Best regards, Pavel |
Dear Pavel Thank you for the very speedy response. I can now see exactly how the tx FIFO server side works so that is very helpful. I was going to try and guess at something along those lines - but I have to admit that I would have got the write word order wrong (at least to start with). The sync facility isn't really needed during a sequence of pulses, but only for the very first pulse if at all. It might be desirable in some circumstances to be able to synchronise the tx and rx DDS devices if the frequencies were exactly the same. Another point I was going to make was that the Rx acquisition block should be timed from the tx pulse generator as well - almost as if it were a pulse in itself. This is vital for coherence of the signal so that data averaging can take place (always happens in NMR!). I was wondering how this might be done but now I see that there is an 'enable' line originating in the server code and going to the rx fifo. I was going to investigate the possibility of driving this from the pulse generator in the tx chain. However, I need to get on with the day job and will have to pursue this later. I just wanted to say thank you for responding to my question. I certainly have some ideas about how one might create a flexible and usable interface once I understand how the FPGA code and server works. Paul |
Sorry, forgot to say that the x-axis on the graph is milliseconds. |
Thanks for sharing these results! I'm glad that the new pulser starts to be usable. I agree that gating the RX path isn't trivial. That's why I prefer to keep it running continuously. The only application where I restart the RX modules is VNA. It's required for the phase measurements. To avoid the effects of the restarting, I just skip the first 200 microseconds. Maybe something similar could be done in the pulsed NMR application. BTW. I didn't know that the NMR applications require the phase measurement. I thought that only the amplitude is measured. |
Hello Thomas, Thanks for the pictures. It's great that your project is progressing well. The license for the code running on the Red Pitaya board is MIT license: Since the GUI client code is based on the Qt library it has to be under the GPLv3 license: It would be great if you could link my Red Pitaya notes (http://pavel-demin.github.io/red-pitaya-notes) from your project. Best regards, Pavel |
Hello Pavel, thank you for the very fast response. We will likely go with the MIT license as well for the HDL side of things. We can either fork your project, or contribute to your github. Either is fine with me in principle. We will link to your red-pitaya-notes in all published works and websites. Thomas |
Hi Guys, Here is one of the last being commissioned in 1992 (about 24 were made) and I have used it for decades for my published research. Pi/2 into a 5mm water sample is less than 3 us. I am just retiring it now with the advent of these Red Petaya based spectrometers. I have worked with Altera FPGAs for many years, and I am afraid getting to grips with the Xilinx firmware in the Red Pitaya is taking longer than I would like. Here is the new low-noise receiver, about 60 dB gain (variable), mounted on the Red Pitaya. And here are the Receiver, Transmitter and Pulse Programmer GUI frontpanels (with fairly arbitrary settings), followed by a single-shot CP/MG echo train, using my prototype linear transmitter board. But I am very limited in how much power I can apply, the transmitter module needs a proper box to work well. Pi/2 into a 5mm water sample is currently 15 us , Pi is 30 us . I am just starting to update my company instrumentation web page, but feel free to have a browse, there is quite a bit of older stuff on it too : http://www.lab-tools.com/instrumentation/ I am busy documenting things at the moment, so I hope to have more here and on the above web-site soon. |
Hi NMR Experts, I want to build a permanent magnet NMR. Yes, its a weird hobby project, but I'm an organic chemist by training, and I now have some FPGA experience. My goal is about a 0.5 tesla device. Working from Pavel's base, I would like to extend extend the project, and use the pynq framework to interface the PL. Basically VHDL for the fast stuff, and Python for the rest. Can I get some input on what features to add? My current list includes:
Any suggestions would be great. |
Just to be quite clear, the pulsed low-field NMR spectrometers that I am developing, around the Red Pitaya, using Pavel’s firmware, is primarily a relaxation spectrometer.
I.e. adding a chemical shift resolution capability would be a second stage.
I am hoping they will be ready in the Autumn.
I am already employing the prototype of the receiver in my NMR Cryoporometer.
Any input re simple 0.5 T permanent magnets is appreciated.
Cheers, Beau
|
A pre-Christmas update on the NMR system : A Red Pitaya with a ~60 dB gain pre-amp I have designed, plus Pavel Demin’s firmware, is working well, I am using the Apl language I talked about previously, but now working with Micro-Apl’s AplX : I also have two NMR transmitter modules – for the high-power NMR digital transmitter, the prototype worked well, and the V4 boards are back from etching and assembly, but the machine shops are taking forever with the finishing stages of the 3D printed boxes. I also have a lower-power NMR linear amplifier, that amplifies Ch1 output from the Red Pitaya, as generated by Pavel's code. Final boards away for etching and assembly, as are the 3D printed boxes. I talked about these at an NMR conference in Florida, last February, and have now published a paper :
I still have to have the EU certification done, but hope to be selling Version 1 NMR Spectrometers within about 6 months. Cheers, |
Hi Beau and Pavel, happy new year!! This is extremely exciting news. Congratulations on the publication! It's exciting to see progress. We are proceeding slowly as this a small side project for me... I'll start blogging soon on my github page, so people will see progress....Pavel, you got the new SDR redpitaya? I tried contacting redpitaya about it, but I'm not getting much information at this point... |
I have a prototype of the new board. It looks exactly like the board shown on the Red Pitaya web site (https://www.redpitaya.com/n86/new-stemlab-sdr). Unfortunately, this prototype has a problem in the TX part. So, I can't test the TX functionality at the moment. |
Okay, sorry to hear about that. Since I'm not doing SDR, I'm not too excited about the 122.88 MHz clock. Of course, I can make the NMR/MRI stuff work with that as well, but a 125 MHz clock would be way more convenient... |
Hi Thomas,
Good to hear from you.
Linear Transmitter making progress, was getting good NMR signals with test system before Christmas. Now have the boards back and first prototype box to test it in, so hopefully will be firing it up properly over the next week or so.
Box machining my major delays at the moment.
Cheers, Beau
|
Hi Beau, |
Hi Thomas,
Yes I have the receiver with low noise pre-amp, connected to the Red Pitaya RF input, that is now my main receiver in my NMR Cryoporometer. But is still waiting for a well screened box, my next design project, hopefully some time in January.
And a digital transmitter, waiting for the final machining on the box (solid box essential). Plus ideally SATA drive from the Red Pitaya, but currently drive from my own FPGA modules.
Plus the linear transmitter I just spoke about, takes drive from the Red Pitaya RF out and digital Gate (from the receiver board).
So I am hoping I will have some prototype NMR spectrometers for sale within a few months, all going well.
cheers,
Beau
|
Hi Guys,
OK, My new Red Pitaya FPGA based NMR spectrometer is as of today now working well.
A good clean signal, much better signal to noise than one would expect, given that the receiver is not yet boxed. This is using the linear transmitter, with more than sufficient power for liquids work – about 25 μs - now down to 6 us - for a 90° pulse into a 5mm OD water sample.
Good clean single-shot NMR signal, noise barely visible, with 113mg water sample - sample and NMR coil much too large for this magnet, only some effectively giving a signal.
Next, complete design for the receiver box.
Then complete testing of digital transmitter, which is needed for measurements on ice and similar.
Then get certification.
Also start assembling the Cryoporometer temperature controlled probe – still awaiting a machined ceramic component.
Cheers,
Beau
New all-in-one desktop computer, Red Pitaya, with my low-noise receiver plugged in as yet unboxed, my newly completed linear transmitter (gold-flashed box), old tuning box (zinc die-cast box) and old probe, new 24 MHz NMR magnet :
![p1060847 - cryop-3 - spectrometer running fine_cc_en_med](https://user-images.githubusercontent.com/4470231/52261642-ea1dec80-2921-11e9-8cec-c4a19dda0596.jpg)
Top graph : single shot Free Induction Decay and echo.
Bottom graph : 20 averages, echo peak polynomial fitted.
![2019-02-04 - a-b-echo 23 9106mhz nmr ss av echo fit_sml](https://user-images.githubusercontent.com/4470231/52261693-0faaf600-2922-11e9-856c-0e9528103356.png)
|
Hello guys, Is there any news about the 16bit redpitaya? I have been trying to get info by emailing them, but can never get the real story. Do they ship? Do they work? |
Not heard anything yet - Beau
|
Yes my 16 bit Red Pitaya came today. |
I am pleased to say my NMR Spectrometer has passed its Accreditation and EU testing with flying colours. |
For information. I've created a new GitHub repository and a new set of notes on the new STEMlab 122.88-16 SDR board. Here are the links: https://github.com/pavel-demin/stemlab-sdr-notes |
Thanks, Pavel, much appreciated. Hopefully, I get my boards soon as well. |
Hmm, no joy firing up the 16 bit Red Pitaya - using the supplied SD card. But it works fine with Pavel's Alpine distribution : |
The Lab-Tools NMR Relaxation Spectrometer is now ready. Here is the Free Induction Decay of Fluorine in PTFE; This is part of an experiment to determine the crystalline / amorphous polymer ratio : And here is a measurement of the Gaussian T2 of solid brittle ice, as a function of temperature; This gives information on the dynamics / mobility of the ice molecules : |
Hello Beau,
Looks very nice, congratulations!!
Thomas
|
Pavel, thank you very much for all of this helpful information. I am thinking about a project similar to your PulsedNMR, but I am not sure if the Red-Pitaya hardware is suitable or not. All of my previous experience is with Altera boards. It might save me a lot of time if you could answer two questions:
My project requires a very stable external clock. I see that the Red-Pitaya board has a jumper for an external clock that goes directly to the ADC. If I supply this external clock can the same clock be used for the FPGA logic and for the DAC? I need to have the ADC, the FPGA logic, and the DAC all synchronous.
In your PulsedNMR project it looks like the Tx signal is written out by the CPU. Is the Tx signal phase coherent with the Rx local oscillator? If not, won't the NMR data be at a different phase for every pulse?
Thanks very much for any help you are able to give.
John
The text was updated successfully, but these errors were encountered: