PCB Help

We all start somewhere
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#1 PCB Help

Post by simon »

Some months ago I was playing around with a PGA2311 volume chip, controlled by an Arduino. I was just starting to get somewhere when the the magic smoke was released for no obvious reason. Within 10 seconds I had a melted bowl in my best plastic breadboard. There are a few stories of unexplained self combustions but none that I've found explaining why, and I'm trying a different tack now.

Back to relays. And relays need a PCB really, so here goes with my first attempt at one. On the face of it, it doesn't seem too difficult to design one, but I suspect the devil is in the detail of all the things I don't appreciate! So comments much appreciated.

The plan is to use a slave Arduino in each monoblock amp to control a series of TQ2 relays as a stepped attenuator, also mounted in the monoblock. The two slave Arduinos will be controlled by a master via I2C in a control unit. The control unit won't be a preamp or buffer as such, just a means to control both monoblocks. As the PCBs are only single channel they're much easier to layout.

So this is the simplified stepped attenuator circuit:
Image

And with components looks something like this:
Image

I can comfortably get 7 relays on a board 100mm wide, so plan to use a ULN2003A to drive the relays. Much simpler than 7 sets of diodes, transistors and resistors too. And as it's only a single channel I can use both sides of the relay to make it a ladder attenuator. Here's the circuit from Diptrace:
Image

So I can add a number of boards for as many steps as I feel like buying relays for - the bigger Arduinos have a lot of I/O. This is the board layout. All the signal traces plus the 5V digital control are on the top side, with two ground planes on the bottom - analog covering all the analog traces, and a digital ground covering all the digital traces.
Image

And here's the bottom side for completeness:
Image

Any glaring I've missed or botched?
User avatar
jack
Thermionic Monk Status
Posts: 5493
Joined: Wed Dec 29, 2010 8:58 pm
Location: ɐılɐɹʇsnɐ oʇ ƃuıʌoɯ ƃuıɹǝpısuoɔ
Contact:

#2 Re: PCB Help

Post by jack »

First glance looks OK - but why not design it as a stacking shield?
Vivitur ingenio, caetera mortis erunt
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#3 Re: PCB Help

Post by simon »

Sounds like a good idea, but might be more than I can manage at the moment. Presumably a long header with long pins could plug in directly to the Arduino, but I'd need to pass the header pins from board to board to the correct board. I intend to have another board with another 6 relays for source selection too. I'll have a think about this.
User avatar
jack
Thermionic Monk Status
Posts: 5493
Joined: Wed Dec 29, 2010 8:58 pm
Location: ɐılɐɹʇsnɐ oʇ ƃuıʌoɯ ƃuıɹǝpısuoɔ
Contact:

#4 Re: PCB Help

Post by jack »

Plenty of example template Diptrace Arduino shields out there...
Vivitur ingenio, caetera mortis erunt
User avatar
Mike H
Amstrad Tower of Power
Posts: 20157
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#5 Re: PCB Help

Post by Mike H »

Had to look up "stacking shield". Oo-er.....!
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#6 Re: PCB Help

Post by simon »

It's taken a bit of work but here's the second revision to make it a stackable Arduino shield. I hope! I spent a long time looking for suitable long pin stacking headers on Farnell but couldn't find anything suitable - too much choice and not a general enough search function! (Or it could just be me...). I found these on ebay in a matter of moments

http://www.ebay.co.uk/itm/12MM-40Pin-Fe ... Sw5IJWb951

They're 2 x 20 rather than 2 x 18 but I can always cut them down.

Here's the top of the board:
Image

I found an Arduino Mega 2560 Diptrace file (haven't checked it TBF...) and managed to add it to the existing file. I've added two lots of headers to keep my options open - maybe 28 steps plus 6 source selections. Then there are additional pads so I can link from whichever pin to the ULN2003. I've brought the I2C pins up as well, just in case. It should allow me to power the 5V digital supply simply from the Arduino too. That's the theory anyway.

And here's the bottom side, essentially just two large ground pours, the smaller for analogue, the upper larger for digital:
Image

Look okay?
User avatar
Nick
Site Admin
Posts: 15706
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#7 Re: PCB Help

Post by Nick »

Others may have a view, but I am not sure how good idea the digital ground plain is. Both the +v and gnd lines are going to be potential radiators of EMI, adding a big ground plain may increase the amount of radiated noise.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
User avatar
jack
Thermionic Monk Status
Posts: 5493
Joined: Wed Dec 29, 2010 8:58 pm
Location: ɐılɐɹʇsnɐ oʇ ƃuıʌoɯ ƃuıɹǝpısuoɔ
Contact:

#8 Re: PCB Help

Post by jack »

To be fair, it's not as if there is much activity on the digital planes...
Vivitur ingenio, caetera mortis erunt
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#9 Re: PCB Help

Post by simon »

Mmmm, interesting point. TBH I have no experience of this so can only guess. I'd been working on the perhaps simplistic premise that bigger is better for the ground planes.

I suppose the analogue plane is fair enough as it should minimise loop area. Having said that I did wonder if it was rather large and might act as an aerial for noise?

The digital plane I can see might well be different. What's the alternative to a large plane? Traces following the 5V traces? Or a smaller digital ground plane? Will see if I can find some wisdom on this.
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#10 Re: PCB Help

Post by simon »

Well, preliminary reading suggests I'm out of my depth! But then peeps make careers out of this so I shouldn't be surprised.
User avatar
Nick
Site Admin
Posts: 15706
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#11 Re: PCB Help

Post by Nick »

jack wrote:To be fair, it's not as if there is much activity on the digital planes...
I would have agreed with you until something I had designed faced a real EMC house. I could see the clock of the processor in the conducted emission test as it made its way out of the mains inlet via a transformer.

But thats not a issue Simon needs to worry about.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#12 Re: PCB Help

Post by simon »

Nick wrote:But thats not a issue Simon needs to worry about.
I didn't understand the rest of what you wrote but I liked the sound of this bit :-D.

Just a thought, don't know how obvious it is from the pictures of the boards but I'm using the ground planes for signal return - I presumed that was the best way of doing it?
User avatar
Nick
Site Admin
Posts: 15706
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#13 Re: PCB Help

Post by Nick »

I would think so to the ground plain question.

Re the other bit. The conducted emissions test is interesting. Its a part of the Electromagnetic Compatibility (EMC) tests. As well as looking what RF teh device radiates into the air, this test looks at what noise the device injects back into the mains through the power input. It basically involves hooking up a RF spectrum analyser up to the mains lead and looking what noise is generated. There is a frequency against level curve. If its above at any point it fails, if all below it passes.

The phono that was being tested had a AVR processor in the power supply controlling the start up, the 20Mhz clock of the chip could be seen in the test. It needed a bit better power supply routing to remove it.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
simon
Thermionic Monk Status
Posts: 5600
Joined: Thu May 24, 2007 11:22 am
Location: People's Republic of South Yorkshire

#14 Re: PCB Help

Post by simon »

That's interesting Nick. What this should be telling me is leave well alone things I don't understand! lol

So, I guess the ATmega2560 chips in each Arduino will be doing similar, but is it a big enough problem is the question? I hope not, guess there's only one way to find out.
User avatar
Nick
Site Admin
Posts: 15706
Joined: Sun May 06, 2007 10:20 am
Location: West Yorkshire

#15 Re: PCB Help

Post by Nick »

No no, not at all. just as always the devil is in the detail.
Whenever an honest man discovers that he's mistaken, he will either cease to be mistaken or he will cease to be honest.
Post Reply