Analog summing possible?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi there,

I'd like to process analog signs with high speed as it shown on the illustration. I need 16 analog input, and 6 analog output altogether. There are some of them which depth is adjusted by another signal source. or reverse its phase, then sum these signals and sends it to a DAC. In some cases the value of the ADC is sent to the DAC. (through DMA?) The reason I need to digitalize all the signals, is because I'd like to save and recall these values. The processor has to maintain other tasks as well, like SPI, UART, buttons, shift registers.
 

The parameters of the signal processing are: 16 channels ADC and 6 channels DAC, 12 bit,  requires the highest sampling rate, because at some extreme cases the signal can be about 10-16kHz on the input. It can occur on the next inputs (as it shown on the illustration): AD0, AD2, AD4, AD6, AD8, AD11. The signal processing of the rest of the input values can be slower, because those will use for potentiometers. That's the point where I need some help... what type of processor should I use for the task? Is the ATxmega128 can possibly enough, or it requires to use a higher performance 32bit ATSAM?

Is it necessary for the processor to contain Floating Point Unit (FPU) and feature DSP instructions? Is there anybody who could help me  programming this code? Are there any libraries can be used to solve the problem  of summing analog signals? Atmel is a complete new world for me, up to now I was working with PIC micro controllers...

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many microcontrollers have only one adc but a number of multiplexed inputs. If you add up all the inputs where you want 32000 or higher sample rates, you get a value that is beyond many microcontrollers. In fact, your task probably needs a number of adc chips and a fpga due simply to the amount of data you need to process.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If all you want to do is sum the ADC readings and set the DAC, you could be able to do that on XMEGA without the need for a DSP or an FPU. It's some additions and a single division, right? Or have I misunderstood?

 

As Kartman says, the issue is that the inputs are not sampled simultaniously. At 16KHz it probably won't be too much of a problem I think.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

adamfactory wrote:
requires the highest sampling rate
You specified the signal rate at 10-16kHz.

What is the sample rate you need on those?

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Beware. If you need 44KHz sampling (to handle 16KHz max signal frequency) and you have 16 multiplexed analog inputs to a single ADC, the required MINIMUM effective sample rate is 44KHz x 16 = 704KHz. That is pretty fast for an ADC in a micro.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
That is pretty fast for an ADC in a micro.

Well, we are in the Xmega forum.  The bigger models have twin ADCs.  (OP's query "is Xmega128 good enough" doesn't give enough information about which series is being considered; the "128" is just the flash size)

 

z Two Analog to Digital Converters (ADCs)
z 12-bit resolution
z Up to two million samples per second
̶ Two inputs can be sampled simultaneously using ADC and 1x gain stage
̶ Four inputs can be sampled within 1.5µs
̶ Down to 2.5µs conversion time with 8-bit resolution
̶ Down to 3.5µs conversion time with 12-bit resolution
z Differential and single-ended input
̶ Up to 16 single-ended inputs
̶ 16x4 differential inputs without gain
̶ 8x4 differential input with gain
z Built-in differential gain stage
̶ 1/2x, 1x, 2x, 4x, 8x, 16x, 32x, and 64x gain options
z Single, continuous and scan conversion options
 

[I'm not an Xmega expert but] A scan sequence can be set up to have continual results available with no further CPU intervention.  Now, how fast does the loop need to be closed and the DACs updates?  [and how much resolution is needed on the samples]

 

AFAIK the Xmega only has two DAC channels.  The update time for external DACs may be significant.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Since the inputs and outputs are analog, couldn't this be done in the analog domain with a few opamps?  This looks like a sound mixing board?

 

Jim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ki0bk wrote:

Since the inputs and outputs are analog, couldn't this be done in the analog domain with a few opamps?  This looks like a sound mixing board?

 

Jim

 

 

I was going to say the same, but then the OP says the values for all channels need to be saved. That's a huge amount of data, saved where?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe just use opamps & pots to do the summing/gain adjustments...read THAT into the adc & then spit out on the dac...you could save THOSE values. (somewhere?)..puts a lot less stress on the system...the nice thing about the opamp is that it has 4783 bit resolution (infinite), if you ignore noise effects. 

 

With strong sources, two resistors alone make a 2 channel summer that is faster & quieter,  than most ADC's & somewhat less expensive (cost of two 0603 parts).

 

More than likely, since you start & end up with integer values, Floating point is just a thorn in your side (avoid).

 

When in the dark remember-the future looks brighter than ever.

Last Edited: Thu. Aug 17, 2017 - 12:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

 

A thought or two:

 

If you select the correct Xmega A series it should have two actual ADC modules, IIRC.

Be careful, not all of the Xmegas have this.

 

If the task is a bit much for one micro, then you might consider having one (or more) micro do the signal processing, while a dedicated additional micro is just obtaining the samples and storing them, either on an SD card, or shipping them up to a PC, etc.  Are your signal processing needs somewhat fixed, or do they need to be variable, and can you simply re-create them (easily!) on a PC if you have the original input signals?

 

If the signal processing is well defined, and "fixed", then as mentioned you might do gain, 180 degrees phase reversal, summing, etc., externally, with op-amps.

Then just feed the pre-processed signals into the micro's ADC channels.

Or feed partially processed signals in, and sample the signals you need for the current processing desired.

The fact that you have "extra" partially processed signals of various combinations going to other ADC inputs doesn't matter.

 

Finally, many on the Forum prefer single processor designs, and simply bump up to an ARM (or whatever) if they need some Digital Signal Processing that the AVR's just can't handle.

With your PIC experience you are probably already aware of the DSP Pics.

 

Another approach, however, is to divide and conquer.

The Xmega's (some of them, anyway), have two DAC outputs.

You could use a few spare I/O pins and route the signals to some analog multiplexers and essentially have a time division multiplexed 6 output system.

Or

You could use three Xmegas for the signal processing.

Each of the micros generates two of the required signals.

Consider the micro just another chip / block in the signal processing chain.

This would lessen the load, computationally, on each of the micros as an added benefit.

 

So, consider pre-processing your analog input signals into either the signals you require, or into any intermediate signals that would simplify the micro's signal processing task.

Then route those signals to three Xmega's to generate your output signals.

 

And consider an additional signal channel for sampling and routing the input signals to the storage device, perhaps in parallel and separate from the signal processing pathways.

 

JC 

 

Edit: Typos

Last Edited: Thu. Aug 17, 2017 - 01:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys,
 

Thank you for all your responses, it helped a great deal, to think over the job….
First thing I did, I calculated the maximum amount of signal, and re-drew the schematic with XMEGA processor. Good news, it's not necessary to process all the 16 analog signal.
The first 4 input of the ADCA (o, 1, 2, 3,) work as  source selector, and only 1 of them need to be read at once, And then the ADCA 4, 5, 6, 7 inputs need to be read as well. It's 5 altogether.
In the meantime the inputs o, 1, 2, 3, of the ADCB have to be read.
The input 3 of the ADCB is extended by an external multiplexer which is connected to potentiometers. Only one  input of the multiplexer has to be read in a sample loop. The next input of the multiplexer is read in the next sample loop, because reading of the potentiometers doesn't require high speed.
In this case 9 inputs with 2 pcs of ADC on 44,1 or 96kHz altogether, needs to be read and processed as well without completely draining the capacity of the processor :) Also the refreshment of the internal and external DACs has to be 44.1 or 96 kHz.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Depending on whether you need all pots active at once, you could use just one (or an optical encoder) & then some selector switches (or 4x4 keypad) to chose the parameter to adjust...the pot reading would just set the chosen variable . 

Of course with separate pots, you can label them all on the control panel with various numbers (which then becomes a calibration issue to consider).

When in the dark remember-the future looks brighter than ever.