Eliminating noise

6 years 6 months ago #1091 by BowDown
Eliminating noise was created by BowDown
In my quest to eliminate noise i took my pedalshield to a local hackerspace and did measurements with the FFT feature of an oscilloscope.

A lot of noise was 188kHz and 193 kHz. These can be cut with a filter but i dont think its important since these frequencies are not audible.

It also contained frequencies in 18-20kHz. These can be cut. They are audible.

But also 700Hz-4.6k. I cannot cut these since i will cut my guitar signal. So using a filter is out of the question. What causes the noise in pedalshield? The DUE's ADCs or DACs? Can i use an external chip with good resolution to either feed my arduino clean digital signal or convert to good analog output?

Please Log in to join the conversation.

6 years 6 months ago #1098 by Ray
Replied by Ray on topic Eliminating noise
Thanks for your works, they are much appreciated.

The shield has filters to attenuate noise over 5k, I totally agree with you that the noise in the 700 - 4.6KHz region is the most dangerous.

The most important sources of noise in the shield are:

1- The power supply, If you use a linear or better USB power supply the FFT will improve.
2 - The ADC, search in this forum about ADC Noise and you will find some topics regarding this issue.

I reckon that the DAC is pretty good, if you just play a sinewave, you will see that tge FFT is pretty good.

Please Log in to join the conversation.

6 years 6 months ago #1099 by BowDown
Replied by BowDown on topic Eliminating noise
Ok Ray, i am willing to work on this but i want some help...

1. The power supply. I tried powering on from both usb and the power jack. The noise was the same. I didn't understand what do you mean linear power supply?
2. The ADC. I will buy some external SPI ADC so that the DUE is fed clean digital information. Though i am not aware what to buy.... I know the Due's ADCs are 12 bits... What is the optimal number of bits? This will not change the code a lot, since the main array of the program will be filler more quickly, but a big enough array will work. Also what is the optimal sampling frequency? Should i use the Niquist theorem based on the max hearing frequency. Generally, whaty should i get?

The sinewave generator means the DACs are fine and dont introduce no noise, correct?

Please reply to this so i can get ADCs and start coding asap! Thanks a lot!

Please Log in to join the conversation.

6 years 5 months ago #1102 by Ray
Replied by Ray on topic Eliminating noise
Sorry for my late reply, I am currenty abroad and my internet connection is limited.
1. Regarding the power supply, have a look at this:
www.electrosmash.com/forum/hardware-peda...powering-arduino-due

When I talked about linear power supply, I was mentioning wall adapter like the Boss PSA series that are linear ( transformer + lm7805 oposed to the use of switch mode power supplies, noisier), I also have at have a Line 6 adapter at home that is also linear, I am not 100% if the polarity of this adapters (negative and positive pins are the same as Arduino uses).

2. We use mcp3202 spi adcs in the pedal-pi, have a look at it, cheap and documented. Any number of bits from 12 to 16 would do, samplig freq? the highest the better, 40 ksps or higher ideally.

The sinewave generator means the DACs are fine and dont introduce no noise, correct?
YES.

Have a look to the arduino forums and check if there is any better audio quality spi adc available ... and keep us updated with your progress!

Please Log in to join the conversation.

6 years 5 months ago #1115 by BowDown
Replied by BowDown on topic Eliminating noise
I think of using an external audio codec to do the conversion and not use ADCs.
I have found a library to "talk" to the codec (ArduinoDueHiFi)
but many questions exist:

The wiring is unclear
How do i use one channel like a regular guitar amp
What is the period of sampling (all i want is data to go into my uint16_t array)

If this works, maybe i will use external RAM to store tha values, as 16 bits are quite a lot for DUEs RAM. But each step at a time

Please Log in to join the conversation.

6 years 5 months ago #1117 by BowDown
Replied by BowDown on topic Eliminating noise
Also, MCP3202 is a 12bit ADC, not 16 bit. So is there a point to use it? Since the resolution is the same as arduinos.

Please Log in to join the conversation.

6 years 5 months ago #1118 by Ray
Replied by Ray on topic Eliminating noise

I have found a library to "talk" to the codec (ArduinoDueHiFi)
but many questions exist:

Yes, I remember bumping into that project some time ago, but as far as I remember you are right, the info is vague, the wiring and software is not 100%, clear. I cannot give you much help on that topic, seems interesting but needs time to get through all the info and try to build it.

MCP3202 is a 12bit ADC, not 16 bit. So is there a point to use it? Since the resolution is the same as arduinos.

It would be ideal to find a 16 bits ADC, but I dont remember finding a through hole 16bits ADC with audio sampling rate, maybe there are new parts out there (or some old part that I missed)
The arduinos ADCs are not ideal for audio, they always add some noise, if you check in google you can find more info about this subject. Maybe using an external 12 bits ADC with a clean power supply may sound better that the Arduinos.

Please Log in to join the conversation.

6 years 5 months ago #1120 by BowDown
Replied by BowDown on topic Eliminating noise
Wait! So you meant to say that it is NOT the bit order that is the problem?
I thought the problem was that 12 bits was too little to quantize the audio, and thus quiantization error was itroduced!

But you say i can get away with only 12 bits instead of 16?
So the problem is not the 12 bits, it is the DUE's ADCs specifically?

Because if this is the case, then that's great! I will order the MCP3202 asap and start coding when it arrives!
You just made my day!

In the rasp-pi pedal, how well does MCP3202 behave? Is noise introduced?
I searched the net for MCP3202 audio and found nothing

Please Log in to join the conversation.

6 years 5 months ago #1121 by Ray
Replied by Ray on topic Eliminating noise

Wait! So you meant to say that it is NOT the bit order that is the problem?
I thought the problem was that 12 bits was too little to quantize the audio, and thus quiantization error was itroduced!

:lol: Its a complex subject, with ADCs it is not only quantity (of bits) but also quality. As a rule of thumb the ADCs the higher number of bits the better but sometimes other factors like jitter, power supply noise, etc also count.
I will try to find a good 16bits audio ADC if you want to make sure that it will be a fine sounding system, but I am not sure about the circuit you want to build (though-hole? smd? software complexity?). A 12 bits ADC could be a good trade off in terms of software and hardware complexity (this is why we use it in pedal-pi)

Check this article about 12 bits ADC noise in Arduino, I am sure that it will shed some light:
www.djerickson.com/arduino/due_adc.html

Please Log in to join the conversation.

6 years 5 months ago #1124 by BowDown
Replied by BowDown on topic Eliminating noise
I have come to think that maybe it is not the ADCs which contribute to noise after all...
The ADCs are 12 bits, but 12 bits are the DACs too. And the DACs do not produce any quantization noise - we know thanks to our sinewave generator.
Maybe it is bad decoupling. I will begin by investigating part-part.

First we got the charge pump IC. I read the datasheet. I will use 3AAAs batteries to produce -4.5V and feed that where the Vout pin is. We will see then what's going with the noise. Does that sound good to you? Do you see any problems that could arise with this method?

Please Log in to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio