1
\$\begingroup\$

I am doing a project using a PIC18F25K80 to stream live audio through ZigBee. I used the PIC audio development board (Microchip) as my reference circuit. In this circuit the in-built ADC of the PIC is used for Analog-to-Digital conversion and in-built PWM is used for Digital-to-Analog conversion.

In this circuit, sampling rate is 8kHz, ADC resolution is 10-bit and PWM frequency is 25kHz. The circuit is affected by severe noise while in playback and the signal strength is very low. How can I solve this issue?

PIC18F25K80 audio playback schematic

\$\endgroup\$
  • 1
    \$\begingroup\$ Did the same code work OK with the reference board? For a question like this we'll really need a schematic of what you built and for a noise problem including details on the layout would help as well. \$\endgroup\$ – PeterJ Dec 18 '13 at 7:03
  • \$\begingroup\$ I have uploaded the schematic. Please check it \$\endgroup\$ – Linu Das Dec 18 '13 at 7:24
  • \$\begingroup\$ Is it noisy with no analogue input to the PIC? What analogue input are you using? What's the ADC circuit look like? \$\endgroup\$ – Andy aka Dec 18 '13 at 8:05
  • \$\begingroup\$ We are using eccp1 ADC channel. If there s no input to ADC(PIC ADC), the output seems to be slightly noisy...not that much...but when we apply a signal then the output becomes harsh infact we can hear the output signal but much distorted....do u need our circuit for reference? \$\endgroup\$ – Linu Das Dec 18 '13 at 8:23
1
\$\begingroup\$

sampling rate is 8kHz, ADC resolution is 10-bit and PWM frequency is 25kHz

Are you trying to output 25kHz PWM but changing the PWM value every 8kHz cycle? That will be extremely choppy and the source of your noise.

To diagnose whether it's the input or the output that's the problem, try to capture a chunk of samples and export them to a PC for listening. If that's not too noisy, then you need to fix the output.

I suggest either increasing the PWM frequency a lot (250kHz at the least, ideally more like 1MHz), or changing to delta-sigma DAC, or R-2R, or (for best quality) an external DAC which you control over SPI or similar (example: http://www.analog.com/en/digital-to-analog-converters/da-converters/ad5611/products/product.html will cost you about $1).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.