Hi Everybody :)
I am new to the motoroladsp yahoogroup.
I have an annoying problem with the ADC of the DSP56f807.
I use the DSP to control an asynchronous motor, so I use the PWM module to control the IGBT transistors and the ADC to measure the current through the motor, the temperature etc.
I have encountered the following problem: the average values of the ADC measured signals differ with respect to whether the PWM signals are present on the PWM pins or not. When I measure the signals, but the control algorithm is not running (the PWM signals are not present on the PWM pins), the average value of any measured signal differs from the average value of the same signal, when the algorithm is running (PWM signals are on the PWM pins). At the same time, there is no difference in the voltage levels of the signals measured by the ADC!!!
The control algorithm is not the reason for this difference because when I run it with disabled pwm signals (the PWMs are calculated but not present on the PWM pins) the average values of any signal measured prior to starting the control algorithm and after starting it do not differ.
Whether the PWM signals control the IGBT transistors or they do not have any load has no effect on the situation.
By the way, I run the ADC synchroniously to the PWM module.
If anyone has encountered such a problem or just has any ideas what I should do, please respond!
10x in advance :)
Mysterious ADC problem ! (DSP56f807)
It seems clear that the PWM is corrupting your ADC readings. The question is "How?". Do the PWM traces run next to the ADC traces? If they do and their edges are sharp, there could be some noise induced into the ADC traces. Rounding off the edges with a capacitive load or series resitance would help.
Maybe there are some current spikes on your board when the motor is running, and these spikes are affecting the ground of the ADC circuitry. A good way to test that would be to run the PWMs without the motor hooked up and see if the problem goes away.
VREF should be as noise free as possible, and the dedicated power supply pins for the ADC also. .01 uF and 1000 pF ceramic capacitors are better at filtering high frequency noise than 0.1 uF caps because their impedance is lower at high frequencies. 0.1uF caps are a hangover from the time when 1 MHz was considered a high frequency.
You say there is no load on the PWM pins, but if they are driving the gate of a small FET there could easily be 20 or 30 mA current spikes on the pin, and that could be inducing some noise internal to the chip. (I am using an Atmel microcontroller with an ADC, and they recommend that no I/O pins switch while ADC measurements are being made.) Series resistance would fix that, too.
My 2 cents worth,