Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

ADC on Intel Galileo gen 2

  1. Sep 15, 2015 #1

    cnh1995

    User Avatar
    Homework Helper

    I am working on a little project with intel galileo gen 2 which involves successive analog voltage readings of a sinusoidal waveform. I am using analogRead() function in Arduino IDE for that purpose. But the on-board ADC is extremely slow.The sampling rate I am getting is terribly small which is 500 samples per second. The clock frequency of the processor is 400MHz, so expected rate is around 1 million samples per second but I am getting nowhere near it. Is there any way to achieve that rate,like by changing the ADC's clock frequency? Arduino uno R3 shield is compatible with the board. Will that help?
     
  2. jcsd
  3. Sep 15, 2015 #2

    berkeman

    User Avatar

    Staff: Mentor

    Is the on-board ADC high resolution? Is that why it is slow?

    What resolution and sampling frequency do you want to have? As you say, there are probably shields that would have faster (lower resolution) ADCs on them...
     
  4. Sep 15, 2015 #3

    cnh1995

    User Avatar
    Homework Helper

    Any resolution up to 16 bit is available.We can set it via analogReadResolution(x) command where x is the resolution in bits. I am using 10 bit resolution which is sufficient for me but the sampling rate should be much higher than 500 samples per second. The expected rate is around 1 million samples per second. Its a Texas Instruments ADC.
    Should I try lower resolution for on-board ADC or go for any shield?
     
  5. Sep 15, 2015 #4

    analogdesign

    User Avatar
    Science Advisor

    You're almost certainly limited by the software latency in the analogRead(x) command. Are there any low-level drivers you can access or any block read functions?

    The analogReadResolution(x) function won't necessarily make it faster if it just truncates the output word of the ADC.
     
  6. Sep 15, 2015 #5

    cnh1995

    User Avatar
    Homework Helper

    Then what is the standard procedure to use this ADC? I am not familiar with low level drivers or any block read functions. Where should I find them? Could you please elaborate?
     
  7. Sep 16, 2015 #6

    nsaspook

    User Avatar
    Science Advisor

    The Gen 2 board seems to be using this device: http://www.ti.com/lit/ds/symlink/adc108s102.pdf
    So the bare hardware is capable of 1 MSPS but it's also unlikely to be that fast without a SPI controller driver using DMA to buffer the data. A quick search has the max 'sketch' speed at about 500Hz which seems to be very slow due to the way they handle gpio access. The Linux speed will be faster using the spidev user driver but it seems even then the hardware and software is not optimized for wire speed SP transfers.

    https://communities.intel.com/message/257595
     
  8. Sep 16, 2015 #7

    cnh1995

    User Avatar
    Homework Helper

    How much faster will it be in Linux? I am using windows 8.1 now but I could run it on ubuntu.. Is there any shield which will be galileo compatible and get me higher sampling rate??
     
  9. Sep 16, 2015 #8

    nsaspook

    User Avatar
    Science Advisor

    With Linux you should be able to have much faster speeds but using the device with the Arduino IDE might be faster if accessed in blocks.
    https://communities.intel.com/message/231977
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: ADC on Intel Galileo gen 2
  1. ADC and DAC (Replies: 4)

  2. Current ADC (Replies: 5)

  3. Intel Galileo & IOT (Replies: 6)

  4. Intel Galileo gen2 (Replies: 4)

Loading...