Hello everyone. I am having an issue with the amplitude of my output appearing smaller than my input signal. These are the specifications I worked with:
First signal: 2sin(2pi * 100Hz * t)
Second signal: 2sin(2pi * 100Hz * t)+1
Third signal: 2sin(2pi * 2000Hz * t)+1
Sampling frequency: 1000 S/s
ADC conversion formula: volt = data_point / 1023 * 5
I know for the first signal, Arduino will clip the negative values of the input signal because it's full scale range is 0-5V. However, I still expected to see the signal reaching to +1V in amplitude for the portion of the signal that was not clipped. My output signal only reaches about 0.6V.
Additionally, the other two signals have the same issue. They should reach a peak-to-peak value of 2V, but only achieve about 1.5V peak-to-peak.
I was wondering if this is a common consequence of using Arduino or if there's something else funky going on with my data. Thanks!
There is a good chance that you will destroy the ADC input by presenting it with negative voltages. For an AC signal, block the DC using a capacitor and add an offset, as follows:
Thank you for your response. I understand that Arduino cannot process negative voltages. However, my question is moreso focused on the amplitudes of the signal. If your response is that inputting negative values somehow fried my signal, why does the same amplitude issue occur with the signals I input that are offset?
You have apparently not yet fried the ADC input. But that will happen if you don't use the offset circuit.
You forgot to mention anything about the source of the signal, or posted a wiring diagram. Please add that information. Also mention how you measured the actual input signal amplitude.
A good suggestion. Also tell us what processor you're using.
What's your sample rate, approximately?
If your signal source isn't low-impedance, you may just need to sample each channel twice in succession, discarding the first sample. Of course, that doubles your sample time, which may not be desirable.
I can discern your sample rate in the charts, actually. You may need to try a lower frequency signal while you sort out what the source of the attenuation is using double-sampling.