# FFT results back to ADC voltage?

Say you have an N-bit ADC with reference voltage of +/- 0.5V, it provides you 2's complement formatted binary values. You perform an M-point FFT upon the samples and extract the spectrum results. All of the bins are completely 0 except for one (I know this is unrealistic, but just for the sake of math).

What are the correct steps/functions to convert the complex value of that bin back into the amplitude, in volts, of the original sinusoid as sampled by the ADC. This assumes that it was known that a pure sinewave of constant frequency and amplitude was input into the ADC.

• This 'bin' is completely irrelevant here. Number is number regardless of representation. The "correct steps" are called "IFFT". Jul 25, 2016 at 13:59
• I assumed there would be an "easier" formula as opposed to doing a full IFFT based on the fact that only one bin had energy in it. Jul 25, 2016 at 14:24
• Of course it will reduce to a simple solution as you have the delta function as your transform, meaning your original signal is a simple sine with the given frequency. But you want a general solution, don't you? Jul 25, 2016 at 14:27
• No, I wanted the "simple sine with given frequency" version. Jul 25, 2016 at 14:29
• This is going to depend on the exact library you're using for the FFT, and whether the FFT has been scaled by the sample rate. IIRC, some packages my also include or leave out a 2*pi scale factor. More importantly, the FFT routine is going to want a particular data type for input, unless its polymorphic, and will provide output of a particular data type as well. I recommend showing code, or at least telling us more about the libraries you are using. For the most part, this is standard programming involving type conversions. Jul 25, 2016 at 14:36

The most common "regular" FFT will actually never produce the result you suggested, as the basis waveforms are complex, and your input is real valued. For instance, the waveform: (1/8) * cos(2*pi*x*4/16) for x=0..15 (a cosine with exactly 4 cycles in 16 samples), will have an FFT of [0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0]. On the other hand the real FFT will have the result: [0,0,0,0,1,0,0,0,0] (only 9 elements).
The general form is that an N point RFFT with a '1' in index F represents an ADC waveform: (2/N) * cos(2*pi*F*x/N).