cancel
Showing results for 
Search instead for 
Did you mean: 

ADC to DAC using DMA

Raymond Buck
Senior

If I set my sine wave generator to 1.5 Vpk-pk the DAC outputs a nice clean sine wave. If I increase the ADC input above that level, I start to see clipping of the sine wave. The negative part of the wave begins clipping before the positive part. Is the clipping cause because the DAC doesn't need the full 3 volt pk-pk input internally from the DMA to output a 3 volt pk-pk signal?

My ultimate goal is to transfer the sine wave signal to the Ethernet engine for transmission over the network. When I do that I assume I will need to input a 3 Vpk-pk signal to take full advantage of the ADC conversion. Is that correct?

I have two STM32F4 Discovery boards that I will be using for this project. I have the ADC to DAC working on one of them. My next step is to set both boards up and get them to communicate over the network with each other. Once that is done I will input the sine wave into ADC1 on board one and send it out over the network. Board two will then receive the data and pass it on to its DAC module (hopefully).

3 REPLIES 3
Ozone
Lead II

> If I increase the ADC input above that level, I start to see clipping of the sine wave. The negative part of the wave begins clipping before the positive part. Is the clipping cause because the DAC doesn't need the full 3 volt pk-pk input internally from the DMA to output a 3 volt pk-pk signal?

Have you checked the actual values passed around by DMA, i.e. the ADC converter results ?

> My ultimate goal is to transfer the sine wave signal to the Ethernet engine for transmission over the network.

Not sure what exactly do you mean. I suppose you want to transfer an arbitrary waveform.

For a plain sinus, you would need only a singular data triple (frequency, amplitude, and start time) instead of every sampling point.

> When I do that I assume I will need to input a 3 Vpk-pk signal to take full advantage of the ADC conversion. Is that correct?

That depends on the ADC reference voltage.

And what do you mean with "Vpk-pk " ?

The STM32 ADC does not allow or process negative voltages (below Vss).

For a symmetrical signal, you need a level-shifting buffer amplifier, and a 1.5V sinus signal would result in a 0...3V signal at the ADC input.

Raymond Buck
Senior

>Have you checked the actual values passed around by DMA

I am watching the signal on my oscilloscope.

>Not sure what exactly do you mean. I suppose....

I am just using a sine wave for my testing. The actual signal to be transmitted will be voice or music.

>And what do you mean with "Vpk-pk " ?

Vpk-pk is the level from top to bottom of the sine wave. The bottom of the sine wave is actually at ground level since the sine wave comes from an external AWG. So the STM32 is seeing a 1.5 volt peak signal with reference to ground.

Raymond Buck
Senior

>I am watching the signal on my oscilloscope.

The signal level out of the DAC is 2.98 Vpk-pk with 1.5 Vpl-pk into the DAC. The sine wave out of the DAC is clean unless I exceed 1.5 Vpk-pk into the ADC.