David_
Advanced Member level 2
Hello.
I am using a arduino Due(SAM3X8E) with its 12bit ADC to read a sine wave, the reference voltage is 3V and the sine wave swings approximatly between 0 and 3V. I have writen a program to use DMA(Direct Memory Access) on the SAM3X8E µC to store the ADC results and then I send them over serial to matlab and plot the results. But I always come up with this type of plot, this is a 1kHz sine wave:
Does any one know what the trouble is?
I have verified that the sine wave is a sine wave and the signal source is a low impedance.
No matter if I try a 100Hz wave or a 100kHz wave the plot is very strange, but I have very little experience with this sort of things and thought there might be some aspect I am not aware of.
The voltage reference is very stable, but I'm thinking that maybe the results are errorus because of the speed I use the ADC. Using PDC/DMA I should get 1MSPS which I have found a person on internet that has verified that but he has not verified whether or not that 1MSPS gives correct readings or not.
Next I am thinking that I should trigger the ADC from a timer and slow down the conversion rate and see if that changes anything.
I am using a arduino Due(SAM3X8E) with its 12bit ADC to read a sine wave, the reference voltage is 3V and the sine wave swings approximatly between 0 and 3V. I have writen a program to use DMA(Direct Memory Access) on the SAM3X8E µC to store the ADC results and then I send them over serial to matlab and plot the results. But I always come up with this type of plot, this is a 1kHz sine wave:
Does any one know what the trouble is?
I have verified that the sine wave is a sine wave and the signal source is a low impedance.
No matter if I try a 100Hz wave or a 100kHz wave the plot is very strange, but I have very little experience with this sort of things and thought there might be some aspect I am not aware of.
The voltage reference is very stable, but I'm thinking that maybe the results are errorus because of the speed I use the ADC. Using PDC/DMA I should get 1MSPS which I have found a person on internet that has verified that but he has not verified whether or not that 1MSPS gives correct readings or not.
Next I am thinking that I should trigger the ADC from a timer and slow down the conversion rate and see if that changes anything.
Last edited: