1
\$\begingroup\$

I need to use an ADC to convert analog signals from pressure and temperature sensors to a microcontroller (Teensy 4.0). I'm confused if I should use an ADC with Parallel or SPI interface. I'm currently designing the data processing unit for a rocket and I am worried that if I need 8 inputs from an ADC, It'll take 8 clock cycles to read from 8 registers, but if I read from an ADC with a parallel interface then I can read all the values at the same time. I am confused about how to go about this.

ADC I am thinking of using with SPI interface: http://www.ti.com/lit/ds/symlink/ads8168.pdf?HQS=TI-null-null-mousermode-df-pf-null-wwe&DCM=yes&ref_url=https%3A%2F%2Fwww.mouser.com%2F

This is the ADC with a parallel interface: https://www.mouser.com/datasheet/2/256/MAX11047-MAX11059-1514141.pdf

Edit: More on the application, I need to read the inputs from pressure transducers and temperature sensors in the rocket fuel pipeline. Using the information from the sensors I need to send an output from the MCU to MOSFET relays which will then open the solenoid valves on the pipeline.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ You are absolutely right about "time on the wire" for serial interfaces, but that is just one downside , it will depend on your proposed throughout and sample rate to determine if this matters. You should provide more details on your application, for instance if you have 1000samples per second the 8micro seconds for spi transfer of 8bits at 1Mhz is irellevant. And with most modern mcus that transfer can be done without CPU cycles (using peripheral) so you can run other code at the same time and wait for internal interrupt that brings all data. Anyway, please provide more info \$\endgroup\$
    – crasic
    Sep 15 '19 at 20:50
  • \$\begingroup\$ depending on how clean your wish your measurements, the serial transfer may eat up a lot of time and the ADC never has QUIET TIME for an accurate conversion. Similarly, the Parallel Transfer will cause a big charge movement to update the output wires, and if the internal analog comparator needs to make a decision during that charge movement, your newest output code may have a big glitch. The use of Ground planes, bypass capacitors, series resistors in the output data lines, and TIMING --- all are tools you can design. \$\endgroup\$ Sep 15 '19 at 21:53
  • \$\begingroup\$ The ADC you have reference is 14/16 bits, not 8. How fast do you need to get your data? \$\endgroup\$ Sep 15 '19 at 21:53
  • \$\begingroup\$ @StainlessSteelRat I just gave an example of 8 cycles, but I need a minimum of 16 bits \$\endgroup\$ Sep 15 '19 at 21:58
  • 1
    \$\begingroup\$ Thanks for the application info, but specifically. How often do you intend to retrieve new temperature data, or conversely what is the fastest rate of change you expect and what is the minimum change in temperature you need to respond to. It all comes down to samples per second and throughput. \$\endgroup\$
    – crasic
    Sep 16 '19 at 0:49
2
\$\begingroup\$

In your application it doesn't matter much, whether it's serial or parallel. Your bottleneck is going to be solenoid/physical movement of the fuel anyway (order of magnitude ms for solenoids, even less for fuel itself). That would put your attitude determination frequency in range of couple kHz max. 8 clock cycles at 600MHz is much less than that, I would worry about your control software implementation more. Just go with whatever is easier to implement, I suggest using SPI over DMA - just set it up to read all your ADC channel values sequentially, process them once all have arrived.

\$\endgroup\$
1
\$\begingroup\$

The design tradeoffs for SPI vs parallel bus ADCs are as follows.

NUMBER OF WIRES

A SPI bus uses only 4 wires.

1) few wires.
a) The ADC chip will probably have fewer pins, and will therefore probably be physically smaller.
b) Easier routing on PCB which means fewer layers or smaller size.
c) Both a and b may lead to lower size weight and cost.

2) Fewer solder joints. Less chance of failure.
3) Very few processor pins. Small cheap processors may be used.

A parallel bus for 16-bit data probably has at least 18 wires.

1) The large number of wires results in a more complex PCB layout.
a) The ADC chip will need to have lots of pins, and will therefore probably be physically larger.
b) The extra routing could mean a bigger board or more layers.
c) Both a and b may add to size weight and cost.

2) There are also more solder joints that could fail during manufacturing or use.
3) Parallel busses also use lots of IO on your processor. The High IO useage might mean that you have to pick a bigger more expensive processor.

SPEED
A parallel bus can grab one sample in 1 or 2 clock cycles. If you need many millions of samples per second, this may be your only option.

A SPI bus will typically take at least 16 clock cycles + 1 cycle of chip select high time for 16-bit data.

1) Typical SPI busses can run in the low MHz range (10MHz to 50MHz is pretty common).
2) SPI based ADCs typically don't go beyond a few million samples per second.

The ADS8628 specifically
The ADS8618 has 8 channels that are multiplexed. The internal ADC can read one channel every 1us.

Figure 57 shows that register writes take 24 clock cycles (plus 1 cycle of CS high).

Page 11 shows that the SPI clock can be up to 20MHz when driven by the microcontroller/processor.

So in this mode a read/write would take about 1.25us.

This means that you can get samples at up to 100k samples per second on each channel using the regular SPI modes.

The MAX11047-MAX11059-1514141 specifically
These chips can simultaneously sample eight channels at 250Ksps. This means 2 million samples per second overall.
It looks like 1 bus cycle takes T9 + T11 =30ns + 10ns = 40ns. So you could read all 8 channels in 320ns.
Therefore its likely you could get the full 2 millons reads per second out of the device.

Your application

I am skeptical that any type of pressure or temperature transducer would need to be sampled that fast.

There should be very little temperature or pressure change in the course of 10us.

Therefore I would suggest using the SPI bus rather than a parallel bus.

\$\endgroup\$
0
\$\begingroup\$

I need to read the inputs from pressure transducers and temperature sensors in the rocket fuel pipeline. Using the information from the sensors I need to send an output from the MCU to MOSFET relays which will then open the solenoid valves on the pipeline.

An SPI communication should be plenty fast for your A/D. A few hundreds of samples per second should be adequate for sampling pressures. Temperatures usually change even more slowly than pressure.

\$\endgroup\$

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.