Ground loops / High-Low frequencies

Hi,

I am currently working on a project involving an atmega328 and 6 74hc595 shift registers.

Everything is put on a dual layer pcb. 90% of the wires are on the top side, the bottom is supposed to be all ground plane but i will have gaps with no plane below(or islands dont know how to call it). i do not route ground traces between any pins directly

I read a lot online on the topic of ground plane and loops etc and I have a feeling that I might have a problem.. As an example for material I read, this site below shows that if using low frequencies the current loop can get rather large.. (figure 5b) http://www.learnemc.com/tutorials/Current_Paths/Current_Paths.html

Now I don't believe I am running high frequencies, only the atmega328 crystal is clocked at 16mhz..or does it affect the whole circuit? From my basic understanding the frequency for those signal traces is related to how fast im triggering that "one/zero" data to the pins (digitally speaking).. voltage..

Most of what I read online (from professional pdfs to forums posts) lead me to believe that for my basic designs what I will mostly tackle will behave more in the style of figure 5a (higher frequencies) and that I need to "calculate" where the current loop will return. Figure 5b looks all haywire on the ground plane without really knowing where your current is going back to/from..

I am a bit confused now, still googling.. but its rather hard to find good posts or reads on that specific topic as the word "frequency" lands many unrelated topics

p.s - there is a possibility im really overkilling myself with reading and designing this pcb.. and all this wouldnt matter for my purposes, its a very noobish circuit just chaotic pcb as its very small

There might be a problem, there might not.

It all depends on what you connect to your 74hc595 shift registers (which you're keeping a secret...)

Well it is a top secret project mate ;) Now seriously, the only reason is that I don't like to bug people with too much reading.. I am the one who is suppose to do it and be as precise or direct as I can with my questions, as said I am sometimes overkilling it with reading on boards that might not need that too deep of precision..

  • I have 16 rgb leds connected to the shift registers (daisy chaining the registers)

  • I put 0.1uf ceramic capacitors on all vcc pins of registers and for the vcc of arduino (dont have one for avcc).

  • There are 10uf electrolytic capacitors between the power supply and the 5v voltage regulator and just "after it" on the trace routing to the rest of the board

  • On two of the 6 shift registers i am planning to have much less ground plane if at all due to traces that must go on bottom layer..

  • I also have 3 header connections for 2 potentiometers and a breakout sound sensor board, this analog part i've set in a different area where i plan to put a separated ground plane connected to the main big one between two vias

  • On the top layer i am considering a regular copper fill, not power nor ground plane (working with fritzing has its limitations.. :\ i will move to kicad or eagle next time)

i ground filled the bottom and cleaned some of the isolated plane areas that were left unconnected but i did this quickly just for the image, this is almost final in terms of traces probably but haven’t worked on all the grounding yet, as you can see i didn’t block and manual fill ground plane for 3 headers area (middle area)

The frequencies you are running at aren't going to be critically affected by a ground plane. You still want one though. It provides other benefits: better ground paths for high currents, heat sinking, some minimal decoupling if is connected to power, etc.

Generally I avoid orphans (isolated copper areas). If I can't connect it to ground (or a power rail) I leave it out.

Thanks james for the insights :) of course i appreciate any opinion anyone can give on this, the design or anything that seems not to be in place and not only on my original question :grin:

Even at 25 kHz current begins to behave strangely. Raise and fall times on 74HCXXX create noise at about 70 MHz.

Best is a groundplane with only holes. The black dotted line, is it a ratsnet for all GND? Are pin 13 on all shift register connected to the groundplane?

The coppertrace between the decoupling capacitor and pin 7/8 on the IC should be as straight as possible, no crossing lines.

What I can se you have long traces cutting the GP Make 2 screenshot with top copper and bottom copper ( and 1 with the components)

You can make smaller pads and thinner lines, pad 60 mil and traces 20 mil giving a isolation of 10 mil when drawing traces between pins.

Pelle

There’s lots of places I’d rework.

eg. On the capacitor below, go from Vcc to the capacitor and then on to the chip (light blue line). Don’t make that weird ‘h’ shape in the track.

Some of the decoupling capacitors are much too far from their chips. eg. C22, C18…

Screenshot_0002_2014_07_27_16_44_43.jpg

Pelleplutt: Even at 25 kHz current begins to behave strangely. Raise and fall times on 74HCXXX create noise at about 70 MHz.

Yeah but from what I read the higher frequency the easier the life i am supposed to have when checking that ground plane, thats why i asked

im using shiftpwm.. he has a calculatoron his website http://www.elcojacobs.com/shiftpwm/ He speaks more oh HZ when talking on the PWM "refersh rate" of the leds, so if i am using his library to easy my life, i guess i AM going to use rather low frequencies as of how i will utilize the code..

can the current return back on the same trace if there is no ground plane below? considering the grounds for the two parts are "proportionally" connected correctly..?

Pelleplutt: The black dotted line, is it a ratsnet for all GND? Are pin 13 on all shift register connected to the groundplane?

Yes they are connected through ground but not traced, actually some of the pins aren't connected to the plane as i have those gaps because of the traces.. it will be fixed, i thought of vias between the planes the ratsnet lines are there because i think the fritzing application doesn't recognize the connection is happening through the ground plane..

Pelleplutt: The copper trace between the decoupling capacitor and pin 7/8 on the IC should be as straight as possible, no crossing lines.

Which trace? The capacitor for pin 7 is straight in front, pin 8 will be connected directly to the ground plane

Pelleplutt: Make 2 screenshot with top copper and bottom copper ( and 1 with the components)

I redid the automatic ground fill without deleting where the ground plane is isolated (red parts), if you prefer i can do that and send it again.. Top - no plane -clear view of parts http://s8.postimg.org/lt3dwnkjp/Screenshot_0003_2014_07_27_22_08_18.jpg Bottom - no plane - clear view of parts http://s18.postimg.org/f24j4892h/Screenshot_0006_2014_07_27_22_21_41.jpg Top - Ground plane fill http://s29.postimg.org/4iqnt2gt3/Screenshot_0005_2014_07_27_22_20_12.jpg Bottom - Ground plane fill http://s27.postimg.org/dl2s4hloz/Screenshot_0004_2014_07_27_22_17_30.jpg

Pelleplutt: You can make smaller pads and thinner lines, pad 60 mil and traces 20 mil giving a isolation of 10 mil when drawing traces between pins.

All my traces are 24mil, the GND (only around power supply) and VCC are 40mil (understood its better for vcc lines for heat dissipation etc), copper keepout is set to 10mm I dont really have great tools for determining the width between the traces, my tools are the grid which i googled the general rule of thumb numbers and the groune plane fill Not sure I can set the pad sizes here.. I didn't quite check that yet

fungus: There's lots of places I'd rework.

eg. On the capacitor below, go from Vcc to the capacitor and then on to the chip (light blue line). Don't make that weird 'h' shape in the track.

Some of the decoupling capacitors are much too far from their chips. eg. C22, C18...

What about the 3 way T intersection (or even more in close proximity).. do you think its fine and i dont have to worry on acid traps to much or the V shapes i've done where i couldn't run a via is better..

I am still rather new hobbyist to electronics specially when it comes to understanding how and what matters. I wasn't quite able to find questions for things like if i can pass the vcc through a pin to a different pin or connector as you just wrote above, I tried taking safest path for everything, it doesn't seem right for example to route VCC to far out places in the pcb through other pins then directly have a trace split to that pin as well.. wasn't sure if this translates correctly in terms of circuit and schematic..

Everything that comes down to orientation of parts "before" / "after" in terms of how the electricity flows always boggled me.. hope that was understood :stuck_out_tongue_closed_eyes: like is it okay to do it the other way around as well, vcc>capacitor>vcc in for 74hc595

The rais and fall time of the 595 output are so short it generats EMI about 70 MHz. It does'not matter how often the output are switched on and off, every on and off generats EMI.

Vcc, clock and load traces dividing the groundplane in two parts, route all long traces on opposite side. If they have to cross each other, two vias and a short trace on the GP side.

From the decoupling capacitor groundconnection, copper as straight as possible to the ground of the circuit.

Pelle

Pelleplutt: The rais and fall time of the 595 output are so short it generats EMI about 70 MHz. It does'not matter how often the output are switched on and off, every on and off generats EMI.

Vcc, clock and load traces dividing the groundplane in two parts, route all long traces on opposite side. If they have to cross each other, two vias and a short trace on the GP side.

From the decoupling capacitor groundconnection, copper as straight as possible to the ground of the circuit.

Pelle

so what i read in the datasheets of 595 - "All registers capture data on rising edge and change output on the falling edge" means that they clock on crazy speeds to fetch new information? i thought the rise and fall (frequency) is determined only when im changing the data and latching it to the output.. isnt this clock speed i see in the datasheets referring to internal clocking between the SHCP and STCP only?

I understand every rise and fall generates EMI, I tried understanding the frequency i'm running at to better understand what is the grounding model that i need to check my back currents by.

what about the traces from the 595 to the leds, do they run on that same frequency that the 595 is clocking at? (i got a feeling im mumbo jumbo-ing all the information i read online into one big salad)

Whats the load trace?

I dont understand your vcc recommendation to be on bottom grond plane, could you clarify please? everywhere i see people recommend otherwise, it will make more isolation in my ground plane instead of making it a bigger almost un-gapped plane

This is basically the schematic by the way - http://www.elcojacobs.com/wp-content/uploads/2012/08/shiftpwm_74hc595_RGB.png its from the shiftpwm site, the only difference is that i didn't place a 100uf capacitor on top of all other 0.1uf 595 caps, but i think i can do without it

I think I was so looking forward into finishing my project that I completely didn’t check alternatives… I think I need to go with the TLC5940 first, it will save a lot of space on the board and aim for better routing (at least it looks like it)…

I am only starting to looking for information now, but do you think i will need any external driver if I plan to use 3 TLC5940s? These will still control 16 rgb leds… i am planning on using 15ma i guess for longer life

pixilicous: do you think i will need any external driver if I plan to use 3 TLC5940s? These will still control 16 rgb leds.. i am planning on using 15ma i guess for longer life

Driver for what?

You shouldn't need one when used with the TLC5940.

Keep in mind that the way it works is different the 595. The TLC5940 is a constant current driver. So you don't need current limiting resistors (other than IREF) and you want to keep the source voltage close to the forward voltage of the LED. (e.g. don't drive 2V Green LEDs with a 12V battery.)

[quote author=James C4S link=topic=257437.msg1820703#msg1820703 date=1406511167]

pixilicous: do you think i will need any external driver if I plan to use 3 TLC5940s? These will still control 16 rgb leds.. i am planning on using 15ma i guess for longer life

Driver for what?

You shouldn't need one when used with the TLC5940.

Keep in mind that the way it works is different the 595. The TLC5940 is a constant current driver. So you don't need current limiting resistors (other than IREF) and you want to keep the source voltage close to the forward voltage of the LED. (e.g. don't drive 2V Green LEDs with a 12V battery.) [/quote]

Well what I meant is, how do i know if the arduino can handle all this current, at one point daisy chaining wouldn't work.. I read online that people have issues that start some where along the linesof the 6th daisy chained TLC..

The reason why i asked on the TLC5940 is to remove the amount of resistors, so i am aware of this, i also saw i have easy graph in the 5940 datasheet showing which resistor for which output ma..

my source voltage is supposed to be 5v after it was regulated by a switching regulator (7805), is there any effect to a current if need to be "constant" and my voltage regulator is "switching"?

Regarding ground-return paths, the crucial signal here is the clock signal - any distortion of the clock pulse that is bad enough could cause multiple clock triggers (for instance several ringing at the receiving end), which would lead to malfunction of a shift-register chain.

So you just have to ensure there is a resonably good return path parallel to the clock trace, add some ground bridges if necessary across gaps in the ground plane. The rest of the signals will be less crucial.

I try and arrange, on a 2-layer board, that all the signals using the ground-plane side are short and spaced apart from each other, so the ground plane is pretty continuous.

Put another way I route signals to the ground plane side only as needed to hop over other signals. Often its mainly power traces that have to do this.

Until you are routing signals 10cm or more you don't have to worry very much with 16MHz signals. When you get to 200MHz stripline and microstrip signal routing it all gets more fraught and 4+ layers become pretty much essential. Reflections on discontinuities start to become an issue then.

I have routed 400MHz LVDS paths about 1.5cm on 2-layer board - that's the most demanding case I've dealt with, and I matched the geometry to the flat-flex cable the signals were sent down to reduce reflection at the connector.

As another datapoint you can expect breadboarded circuits to struggle at 20MHz and beyond, even if routed neatly and lots of ground wires are gridded around.

Thanks for your reply mark, I’ll take what you wrote into consideration…

Regarding the new idea of using TLC5940 its funny I thought I’ll have easier time tracing the TLCs, i might run into more issues as they are longer and narrower…

Do you think it would matter or is there any recommendation what not to route underneath this TLC IC? I mean I got many cables that would kind go merry-go-round there
VCC
GND

BLANK
SCLK
XLAT
GSCLK
and the serial line itselfG

pixilicous: Well what I meant is, how do i know if the arduino can handle all this current, at one point daisy chaining wouldn't work.. I read online that people have issues that start some where along the linesof the 6th daisy chained TLC..

That's why I asked... ;) On a small PCB like yours, you won't see an issue with the TLCs. I think what happens in larger projects is that poor wiring is used, dropping VCC down to an unusable amount for the TLCs "down the chain."

pixilicous: my source voltage is supposed to be 5v after it was regulated by a switching regulator (7805), is there any effect to a current if need to be "constant" and my voltage regulator is "switching"?

Don't get linear vs switching confused with "constant voltage/current."

In theory, you could use an unregulated voltage source with the LED's connected to the TLC's output channels. The channels will vary their resistance so that the LED gets its forward voltage, while the rest is dropped across its driver. (That's how it creates the "constant current". They are like variable resistors.)

[quote author=James C4S link=topic=257437.msg1821281#msg1821281 date=1406561493] That's why I asked... ;) On a small PCB like yours, you won't see an issue with the TLCs. I think what happens in larger projects is that poor wiring is used, dropping VCC down to an unusable amount for the TLCs "down the chain."

Don't get linear vs switching confused with "constant voltage/current."

In theory, you could use an unregulated voltage source with the LED's connected to the TLC's output channels. The channels will vary their resistance so that the LED gets its forward voltage, while the rest is dropped across its driver. (That's how it creates the "constant current". They are like variable resistors.) [/quote]

Alright, then what you wrote verified what i read.. most of the time i read a lot and not sure if i really understood correctly and there is also a lot of problems with compatibility, whats right for one design isn't necessarily right for another..

thanks for the explanations and replies, really appreciated..

im working on the TLC design now, still on fritzing, as i have to get this birthday present over with already.. im late :D