Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help with midi noise all over circuit

Status
Not open for further replies.

Pancra85

Junior Member level 1
Joined
Dec 3, 2012
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,477
I made a little synth with Arduino (atmega328 standalone really) and it works very good but has one problem.
When Arduino outputs midi notes or clock it makes a *click* noise for each byte (clock is a constant stream of clicks and notes are a little louder click), midi output not pictured in schematic.
Also when Arduino gets midi notes on midi input when the synth audio output is off (gain=0) I can hear the *clicks* the same way.
If I disconnect RX from the midi part it stops doing it.
They are not that loud, as I said, I can only hear them when the audio output is off, but when amplifying the output on another stage it gets louder and they are annoying.
It's making me crazy, I don't know what to do anymore.
I know it has nothing to do with the atmega328 code itself, because if I load another code (led blink for example) it still does it.
If I disconnect AGND from GND it stops that but the clicks come back later.

I also tested this on a PCB design of my (poorly designed) that has this chain: Arduino -> LPF -> Delay -> Amp.
If I disconnectAnd I noticed that every stage of the chain has that noise, for example if I close the LPF, the *clicks* are still heard within the delay. Even if I just connect just the LPF,Delay and Amp part.

ITS LIKE THE MIDI SIGNAL IS PARASITING THE ENTIRE CIRCUIT!!

Thanks! midi in clicks.png
 

It's probably a layout and/or grounding problem, but without seeing your hardware it's impossible to tell.
 



In order to isolate parts I breadboarded just what you see on the schematic:
If I generate a constant clock signal with the Atmega it's not heard, only Midi input from external device.
I placed a 10uF on pin 7 and I realized the midi clicks were attenuated, so I put a 1000uF and they are gone now!! :D
That part is solved.

Now testing the entire synth, that has also a LPF and a Delay (not in schematic):
I can listen to the clicks in all stages, on LPF output I hear them until the cutoff it's closed. On Delay output I can hear the LPF's clicks plus clicks on the Delay itself.
I placed a gigantic 3300uF on +5 and GND and the clicks got lowered a little! the Delay clicks are gone, but they still sound on the LPF when the cutoff it's opened.
The LPF works with +9V and GND, so that's why I think it didn't got affected by the capacitor.
Also now midi generated from INSIDE Atmega are heard and not attenuated by the cap (tried several places)

Errors on the PCB design I realized now:
* There are islands of copper pour which are not connected to anything
* I didn't separated DIGITAL GND from ANALOG GND (to join them only at the power supply in star topography)
* It seems that didn't decouple enough (with high value capacitors)

My question is, could the clicks of MIDI Input and Output be because of these 3 errors? Should I redo the PCB?
 

Again, without actually seeing your hardware, it's just guessing. Islands of copper don't cause problems (lack of ground plane, however, does.) Saying you "didn't decouple enough" is a pretty vague analysis. Contrary to the old-school philosophy, you don't necessarily need separate grounds; you just need to lay the board out properly.
 

I think it has nothing to do with your problem, but maybe something in this document is worth reading about analog switches and removing pops and clicks in audio? Might help see where problem comes from. Hope not to waste your time.

"Reducing distortion from CMOS analog switches"

View attachment slyt612.pdf
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top