0
\$\begingroup\$

I'm trying to collect data from the circuit I built using an SPI interface off the raspberry Pi. I would like to measure the current and the voltage of my circuit. and the signal I would like to measure has a maximum frequency of 1khz and is a square wave.

Would it be necessary to use two separate SPI interfaces to try and collect data simultaneously to calculate the current (Voltage across a resistor), or would using a single SPI interface with two slaves be sufficient? I was thinking that the clock frequency for my SPI interface is much greater than 1k so it would not really matter. Is that thinking correct?

\$\endgroup\$
5
  • \$\begingroup\$ This depends on what you want your sampling rate to be, how many ADC's there are, how many channels per ADC, what your allowable "jitter" is (since RPi doesn't run an RTOS unless you specifically compile a kernel for it), etc. \$\endgroup\$
    – Ron Beyer
    Feb 3 '20 at 15:23
  • \$\begingroup\$ I have two ADC's , 1 channel per ADC. As long as I can get both data simultaneously or very close, I don't mind the delay in reading the data and operating on it. \$\endgroup\$
    – George
    Feb 3 '20 at 15:32
  • \$\begingroup\$ I haven't chosen the ADC's yet either \$\endgroup\$
    – George
    Feb 3 '20 at 15:32
  • \$\begingroup\$ Why not 1 ADC with 2 channels? What is "simultaneously"? 1ms? 1ns? How often do you want to read it? 10hz, 10khz? 10msps? \$\endgroup\$
    – Ron Beyer
    Feb 3 '20 at 15:38
  • \$\begingroup\$ I honestly don't know what's the best yet. 1 ADC with 2 channels might be the best. Regarding the sampling frequency, Maybe 50khz? I want to plot the data collected being the most accurate \$\endgroup\$
    – George
    Feb 3 '20 at 15:45
0
\$\begingroup\$

Would it be necessary to use two separate SPI interfaces to try and collect data simultaneously to calculate the current (Voltage across a resistor), or would using a single SPI interface with two slaves be sufficient?

If you want simultaneous sampling then you can cascade several ADCs so that you have a single SPI interface and a single start convert line. The implication of this is that you read all of the connected ADCs as one serial line.

I have used the AD7988-5 with 16 of them daisy chained like this: -

enter image description here

So, if you still haven't decided on the ADC, maybe consider the above.

\$\endgroup\$
7
  • \$\begingroup\$ Great. I will look at this one. Thank you! \$\endgroup\$
    – George
    Feb 3 '20 at 16:35
  • \$\begingroup\$ Hmm.. I need one that goes up to 10V! \$\endgroup\$
    – George
    Feb 3 '20 at 16:37
  • \$\begingroup\$ Have you tried the analog devices website yet? \$\endgroup\$
    – Andy aka
    Feb 3 '20 at 16:58
  • \$\begingroup\$ I'm looking there now! \$\endgroup\$
    – George
    Feb 3 '20 at 17:14
  • \$\begingroup\$ IT looks like I'll have to condition my signal to drop it down to the desired vref. But if you may, what was the frequency you were using? I couldn't find a operating mode of frequency for the clock for this device. \$\endgroup\$
    – George
    Feb 3 '20 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.