Wednesday, June 8, 2016

Waveform generator outputs

Using the following setup where the yellow wire is the waveform generator and is connected to Vin of the max11205 chip, and the black wire is ground.

The waveform generator is sending a constant signal of 3.6 volts. The output is 32767 decimal.

However, I noticed that the value for the decimal  is the same for signals above 2.5 V. After looking at the datasheet (highlighted below), it is possible that the 2.5V is the maximum voltage for the chip. 


Then the following outputs would make sense.

2.5 V    ->        32767
1.25  V      ->           16489
0.625 V       ->            8323
0        ->           160

I don't understand why zero volts outputs 160 but if you add this value to the rest of the outputs, as you go down the list which is taking half of the previous voltage, then the output is halved as well. 

This is also why the following line of code from menu.c includes the number 2500mV:

printf("%d of %d samples = %d decimal.  (%d mV)\r\n",i+1,unNumberSamplesToCapture,nAdcValue,((nAdcValue * 2500)/32768));

This is just converting the read bit value to a voltage in mV. This is done by simply multiplying by 2500mV and dividing by 32768 just as you would when solving a proportion.


No comments:

Post a Comment