SAADC on nRF7002 DK: limits for frequency and amplitude

Hello, 

I am working with the analog-to-digital converter on the nRF7002 DK and I am trying to feed it with some signals (sinusoidal, triangular, etc) using a function generator. My quesntion is, which are the limits for frequency and amplitude that the board can support? 

Thank you and have a nice day!

Kind regards, 

Raluca

  • Hi Raluca,

    The nRF7002 DK has a nRF5340 SoC, and thi shad an SAADC. The maximum amplitude is VDD, provided that the gain is configured for it. The maximum sampling rate of the SAADC is 200 kHz (using short aquisition time and sampling by a timer via PPI or using the internal timer). You can read the details about it in the product specification

  • Hi, Einar

    Thank you a lot for answering me. 

    I do have another questions and I would need your help, please. 

    Is it possible to plot the values that I am getting? I am not sure which libraries does Zephyr supports for plotting. 

    If I can`t plot the signals, do you know any way of putting the values in a .txt file? I tried with the usual libraries for creating files and there are not supported by Zephyr. 

    Also, which are the output pins for connecting an oscilloscope on the nRF7002 DK board? I don`t seem to find this information in the product specification or rather I am not sure of the answer. 

    Thank you again and have a productive day!

  • Hi,

    For plottign you would need a screen, and while certainly possible, I am not sure tha tis wha tyou are after? If you just want to get the data to a computer, I suggest loggign via UART or RTT, and plotting on the PC side (I prefer using GNU Octave, but you can use any tool you are comfortable with).

    Raluca said:
    Also, which are the output pins for connecting an oscilloscope on the nRF7002 DK board?

    I thought you were going to sample signal from a signal generator? But regarding an scillioscope, that depends on what want to measure? If you are masuring signals generated by a peripheral, then connect to the pin configured for that signal. Most GPIO pins can have most functions, though for analog pins there are only 8. You can refer to the pin assignments for the nRF5340 and look at the nRF7002 DK harware files for details on the board.

  • Yes, I am trying to convert a signal from a function genererator to a digital signal with the ADC. I would like to plot that signal just to see if the conversion is being succesfull. This would be possible either on my PC with the code that I wrote (that does not have the plotting function yet) or connecting an oscilloscope. 

    • The plotting option: once I have a txt file, I am comfortable using Octave, Python, C, Matlab, but I don`t know how to create the txt file with the values. I tried to use the usual fopen, fprintf, etc funcitons and they don`t work with my code in C on VSCode. The code is similar to the one from the Lesson 6, ex 2 from the NRF Connect SDK Intermediate. For example, if I want to get into a txt the voltages that I get from a battery (this is the application of that exercise), how would I do that?
    • The oscilloscope option: I am trying to use an oscilloscope for visualizing the signals from the Function Generator. Once I create the signals with the function generator, I would like to see if the ADC does the conversion and to see the output signal on an oscilloscope. I found the pins for measuring output currents, but not a general signal output pin. 
  • Hi,

    Raluca said:
    but I don`t know how to create the txt file with the values. I

    As this is a simple embedded device and this is for testing or similar, I would not try to make a text file on the nRF side. Just log the data (using printk, LOG_INF or similar), and configure the terminal on your PC side to log everythign to file. Exactly how you use that depend on which terminal software you use, but any decent terminal software (like PuTTY) should support it.

    Raluca said:
    For example, if I want to get into a txt the voltages that I get from a battery (this is the application of that exercise), how would I do that?

    You can loook at some SAADC samples. Most will write the samples values to the terminal. The SDK includes a sample that for reading the battery voltage: Battery Voltage Measurement.

    Raluca said:
    The oscilloscope option: I am trying to use an oscilloscope for visualizing the signals from the Function Generator.

    I see. But then you just want to measure the signal generator, and not the nRF. There is no reason to (and no way) to input this signal on one pin on the nRF and output the same signal on another.

Related