Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Eliminating noise

Eliminating noise 2 years 1 month ago #1091

  • BowDown
  • BowDown's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 55
  • Thank you received: 6
  • Karma: 2
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?
The administrator has disabled public write access.

Eliminating noise 2 years 1 month ago #1098

  • Ray
  • Ray's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 695
  • Thank you received: 146
  • Karma: 41
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.
The administrator has disabled public write access.

Eliminating noise 2 years 1 month ago #1099

  • BowDown
  • BowDown's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 55
  • Thank you received: 6
  • Karma: 2
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!
The administrator has disabled public write access.

Eliminating noise 2 years 4 weeks ago #1102

  • Ray
  • Ray's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 695
  • Thank you received: 146
  • Karma: 41
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!
The administrator has disabled public write access.

Eliminating noise 2 years 2 weeks ago #1115

  • BowDown
  • BowDown's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 55
  • Thank you received: 6
  • Karma: 2
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
The administrator has disabled public write access.

Eliminating noise 2 years 2 weeks ago #1117

  • BowDown
  • BowDown's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 55
  • Thank you received: 6
  • Karma: 2
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.
The administrator has disabled public write access.

Eliminating noise 2 years 2 weeks ago #1118

  • Ray
  • Ray's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 695
  • Thank you received: 146
  • Karma: 41
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.
The administrator has disabled public write access.

Eliminating noise 2 years 2 weeks ago #1120

  • BowDown
  • BowDown's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 55
  • Thank you received: 6
  • Karma: 2
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
The administrator has disabled public write access.

Eliminating noise 2 years 2 weeks ago #1121

  • Ray
  • Ray's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 695
  • Thank you received: 146
  • Karma: 41
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
The administrator has disabled public write access.

Eliminating noise 2 years 4 days ago #1124

  • BowDown
  • BowDown's Avatar
  • OFFLINE
  • Senior Member
  • Posts: 55
  • Thank you received: 6
  • Karma: 2
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?
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.162 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio