Electronic – arduino – the quickest way to read an analogue signal – Arduino / Raspberry Pi + ADC / Arduino + ADC

adcarduinoraspberry pispi

I need to sample 50Hz voltage signals from four CT current sensors and compare the waveforms to a voltage signal from the mains (stepped-down and offset for ADC) to accurately measure power consumption of four devices.

I would like to get at least 360 samples for each waveform per period, meaning 1800 total samples per second. Since the signal frequency is 50Hz, this means a reading speed of 90kHz.

I have an MCP3008 10-bit ADC available which uses an SPI interface, an Arduino Uno board, and a Raspberry Pi 2.

The MCP3008 has a max sampling rate of 200ksps (datasheet).

The Arduino Uno analogue input pins can be read at 10kHz (official docs).

The Raspberry Pi can work with SPI interfaces at 20kHz using the standard Linux driver, as mentioned here, although by bypassing the standard Linux driver it can supposedly work faster (I don't know how much faster – there are a lot of different numbers being thrown around online).

The Arduino Uno can work with SPI interfaces at much higher speeds than the Raspberry Pi.

From what I can gather, there are three setups to choose from:

  1. Reading the 5 values directly using analogueRead() of the Arduino (clearly won't work)
  2. Using the MCP3008 ADC with the Raspberry Pi (is it possible to make it fast enough with some modifications?)
  3. Using the MCP3008 ADC with the Arduino

Can the required speed be achieved using any of the above-mentioned setups? If not, what would likely be the maximum speed that can be achieved?

Best Answer

If you can get the scaled signal voltage swing within 1Vpp you probably can just use the sound card of your computer. Three USB sound cards that each supports 192kHz sampling rate and you are good to go.

Related Topic