Author Topic: My first PCB - MSP430 - Will it explode?  (Read 23698 times)

0 Members and 1 Guest are viewing this topic.

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #25 on: October 10, 2015, 07:43:43 pm »
That's a good looking 3D mockup, what software did you use to make that?  I had a MIDI keyboard when I was younger but not any more.   This 16-key assignable pad can be useful :)

The mockup was rendered out from Solidworks using the standard photoview 360 engine and stock materials - pretty decent results for that I'd say! Got my mechanical drawings from it too.

Here's the updated PCB. After switching the headers, I routed VUSB at the top of the board - any issue with routing close to edges? I did this to avoid cutting the ground plane under the JTAG traces.
I also VUSB to U6 very close to the USB data lines as an attempt to minimize the amount of ground plane splitting in that area but am unsure if having power close to data would cause any issues.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #26 on: October 11, 2015, 12:48:20 am »
I'll have to find a demo copy and give Solidworks a try one day.  I know it's a popular produce, perhaps the top in the field.  About 10 years ago I bought a license for TurboCad 8 which is mostly a 2D drafting tool, and I've been using that so I'm proficient with it.  They had some 3D features too but it was poor. 

Here's the updated PCB. After switching the headers, I routed VUSB at the top of the board - any issue with routing close to edges? I did this to avoid cutting the ground plane under the JTAG traces.
I also VUSB to U6 very close to the USB data lines as an attempt to minimize the amount of ground plane splitting in that area but am unsure if having power close to data would cause any issues.
The VUSB near the top will be OK.  I agree, routing it downward would split the ground plane too much again, so I also like it at the top and I would have done the same.

Traces near the edge, be it power or signal, are mostly frowned upon because it can cause EMI due to energy radiating out from the edges of the board.  This occurs because the EM field is no longer fully contained within the dielectric of the board and can escape to free air more easily, as lines of flux wrap around the board edge and close underneath the board (close, as in opposite to open).  With the EM field in two mediums (air and FR4) propagating down the board you get an antenna.

Even so, this is usually only going to be a problem at speeds above 100 MHz [*] or so, and also with a ground plane beneath the signal trace for the EM field to return to. You don't have this, and your power trace is planar with your ground, so the EM field is different.  You actually have a slot line radiator, but it's a poor radiator at your operating frequencies, a poor radiator at switching PSU frequencies, and the trace is not likely to have any high-speed transients on it anyways.

When thinking about any trace that is near the edge, you should think about what will that trace be used for and will there be periodic current demands that will cause high-frequency switching components to appear on the trace? Even if it's a low speed trace or in this case a power trace, it might have switching with fast edge rates above 100 MHz or so.  Since this particular trace goes off-board via the header pin, you have to ask yourself where does it go from there,  and will there be any high-frequency periodic current demands? If so, these will be possible sources of EM radiation.

The rule of thumb for traces near the edge is to make the edge of the trace at least as far from the edge of the board as the board is thick. So for a 1.6 mm thick board you want to keep the trace about 1.6 mm away from the edge.  Some say 2x as far, but I think for a power trace which might have just 10's of millivolts of transient edges then the changing EM field is going to be weak anyways so keeping the power trace about 1.0 to 1.6 mm away from the edge should be fine.  And as I said above, your EM field on that trace is not leaving via the edge anyways, as the trace is co-planar with the ground plane.

The board looks great!  Get it made ! not yet :)... I have a comment coming...

EDIT: change the cyan power trace to the green trace. This opens up the analog ground better to the analog inputs, and splits the plane better into the analog and digital regions. It keeps the analog return currents off the digital ground plane better with this change.  It is still not a split ground plane, just careful routing of the split to keep analog currents on the analog side and digital currents on the digital side.  After this, you can get it made :)

[*] There are published papers (pdf) with experimental results showing edge-radiated near-field EM radiation at -50 dB for a 100 MHz signal when the signal trace is approx 2x the dielectric thickness away from the edge. It gets better with increased distance from the edge and worse with higher frequencies.
« Last Edit: October 11, 2015, 01:38:34 am by codeboy2k »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #27 on: October 11, 2015, 02:18:09 am »
PS: with no copper pour on the top layer the PCB board house might want to add copper thieving, to balance out the copper on top and bottom.

You can add a top layer thieving pattern yourself if you want to give it a try:

http://www.newelectronics.co.uk/electronics-videos/altium-design-secret-17/51478/

Note that in this video the presenter grows the thieving pattern so they all connect and touch, I would not do that because you don't really want a larger copper area, otherwise you'd do a copper pour instead. Also, he rotates the square pads to make a diamond pattern, but I would just leave it in a square pattern.

Copper thieving is used primarily to improve the electroplating process so that some areas don't get more current and thus more copper plated than other areas.  The board house also likes it because it reduces the copper that needs to be etched away, but that's not its primary purpose.
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #28 on: October 12, 2015, 05:45:27 pm »
I'll have to find a demo copy and give Solidworks a try one day.  I know it's a popular produce, perhaps the top in the field.  About 10 years ago I bought a license for TurboCad 8 which is mostly a 2D drafting tool, and I've been using that so I'm proficient with it.  They had some 3D features too but it was poor. 
Yeah - it's quite good. Certainly one of the most popular modelling programs for mechanical engineers.

EDIT: change the cyan power trace to the green trace. This opens up the analog ground better to the analog inputs, and splits the plane better into the analog and digital regions. It keeps the analog return currents off the digital ground plane better with this change.  It is still not a split ground plane, just careful routing of the split to keep analog currents on the analog side and digital currents on the digital side.  After this, you can get it made :)

Made some changes, see below. Also aligned all the headers to a 100mil grid for flexibility if I/someone ever wants to snap a vero board on top (thanks Alexander). Re: the copper thieving - would it make sense to do a copper pour on the top vs. thieving?

Also any tips for the "getting it manufactured part"? That is to say - from what I've read from seeed studio, I just need to export the gerber files (top, top overlay, top solder, bottom, bottom overlay, bottom solder, and a mechanical board outline) and NC drill files from Altium's "Fabrication Outputs" then zip and send them all. I've seen some people import the gerber files and overlay them just to double check everything lines up which I'll do as one thing. Wondering if there are any other general things one should check.

My only other last question for codeboy is.... how the heck did you get all those thieving squares on the photo of the board using paint?!? haha.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5141
  • Country: ro
  • .
Re: My first PCB - MSP430 - Will it explode?
« Reply #29 on: October 12, 2015, 09:20:50 pm »
Wouldn't it be easier to switch the positions of the two headers at the top?  Seems like a lot of unused pcb space right below that 3 pin header and the 5v trace unnecessarily dragged to the other header when you could just switch them around.
The 3.3v output would then cross those two thin traces but how about you flip the R6 resistor to the right and just come to the top with the 3.3v trace above the two CLK and IO traces , to the right of the newly flipped resistor?

I also wonder if it wouldn't be more efficient to rotate U5 by 90 degrees, maybe even U4 (which seems like it could be moved on the top side if it would make manufacturing easier).  If you move the  SW traces a bit, I think U4 could fit in the space below the A* header. (with the 3.3v rail on the right of those two traces, you could move the A header a bit towards the top and make more room)

PS. If it's possible to spread the two bottom headers a bit (but even without spreading), i think you could split the 8 resistors in two sets of 4 resistors each to one side of that COLS header, and then you would have those 8 resistors on the top layer as well. Even less parts on the bottom of the board.
« Last Edit: October 12, 2015, 09:36:58 pm by mariush »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #30 on: October 12, 2015, 09:36:18 pm »
The board looks great!

I just want you to change the power trace supplying the top of C11..  That is the AVCC, and I want to remove the trace that drops down and to the left on the bottom layer, connecting the two vias.

So in the image below, remove the yellow marked trace, and add the cyan trace instead, following the path under the top trace, to pin 7 , AVCC.
EDIT: or you could just go straight down to the existing trace, just to the right of the analog ground via.  It's the same, electrically.

The goal as I stated in my previous post was to open up the analog ground to the analog header pins.  The analog ground currents will thus stay in the smaller area in purple and not have to cross digital areas.

The top layer is pretty chopped up with signal traces. You can put a ground plane if you want, or a vcc plane, but there's no electrical or EMC  benefit in doing so, and the plane will end up with lots of tiny islands that need to be removed.     With the thieving it looks neat and tidy, so I'd just use that.

EDIT: re getting it made, yes, they just need the gerbers and NC drill file.  The aperture list file is important too, but SeeedStudio wants RS274X format, so the aperture data is embedded in the gerber files and you won't need to worry about creating a separate aperture list file.  Other PCB houses that take standard gerbers will want a separate aperture list file.  You don't need that as long as you generate your gerbers in RS274X format.   For your NC drill file choose EXCELLON output, not gerber.   Don't put any notes on the board outline layer, but instead include a README.TXT file with your manufacturing notes, for example, no changes without contacting you first, or if you want them to look at something specific to see if it's ok, (like the trace too close to the top edge!)

Review your gerber files with at least 2 different gerver viewers to look for any issues.

Wouldn't it be easier to switch the positions of the two headers at the top?  Seems like a lot of unused pcb space right below that 3 pin header and the 5v trace unnecessarily dragged to the other header when you could just switch them around.
The 3.3v output would then cross those two thin traces but how about you flip the R6 resistor to the right and just come to the top with the 3.3v trace by the resistor on the right of it?

OP originally had those two top headers swapped, in the position you suggest, but I suggested he move them the way they are now in order to prevent TCLK and TDIO from crossing a split in the ground plane (as you yourself have noted in your post).

If your additional suggestions re: flipping R6 can work, then I agree with flipping the headers back too, to shorten the 5V line.

Quote
I also wonder if it wouldn't be more efficient to rotate U5 by 90 degrees, maybe even U4 (which seems like it could be moved on the top side if it would make manufacturing easier).  If you move the  SW traces a bit, I think U4 could fit in the space below the A* header. (with the 3.3v rail on the right of those two traces, you could move the A header a bit towards the top and make more room)

I agree with this. Josh,  you might be able to try U4 on top...
« Last Edit: October 12, 2015, 10:14:56 pm by codeboy2k »
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #31 on: October 13, 2015, 12:37:19 am »
Thanks for the comments codeboy and mariush!

Below is a version with the headers swapped again, the ground plane is broken under the SBW pins to get the 3v3 back up to the pull-up resistor R6 and the 3V3 header pin. I like this way, minimal breaking of the ground plane and no VBUS on the board edge.

Re: the shift registers U4 and U5. Before, they didn't fit rotated 90 degress and it make more sense to have them orientated the way they are because the whole bottom row of pins connect to IO points. I may be able to move U4 to the top now and re-route the header IO points. I suppose I'm not too worried about parts on the bottom as I'll be hand soldering myself anyway.

I was doing some checks on my components and have a different concern with U4 and U5 though. Right now the chip is supplied with 3.3 volts and that seems fine to power the chip from the data sheet (located here). However, I'm using these shift registers to drive a [future] external LED matrix. Looking on Digikey blue LEDs typically have a Vf of 3.2 volts. With only 3.3 volts of power I imagine there is going to be an issue with controlling the current. So do I route VBUS down to the chip? I'm no pro on reading datasheets, but I think if I do this then the MCU connected pins won't be high enough voltage to drive the shift register's serial and clock inputs high. Not sure what to do...


I'll also have to re-calculate the resistor values after this is sorted out.

edit: FYI, this is the post with the schematics for the shift register and LED matrix:
« Last Edit: October 13, 2015, 12:39:37 am by Josh »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5141
  • Country: ro
  • .
Re: My first PCB - MSP430 - Will it explode?
« Reply #32 on: October 13, 2015, 01:31:19 am »
If you're successful with this project and/or if you want to make a larger batch, then having all ICs and as few passives as possible on the bottom would help a lot.

You could order a stencil made of stainless steel or kapton or whatever and then you would apply a layer of solder paste, put the components and solder everything at once using a frying pan or even something as simple as a hot air gun. The few passives that must be on the bottom (like the two ceramic capacitors under the IC), you'd be able to solder them really fast using your soldering iron or just by applying solder paste manually and heating those passives with hot air gun.

I'm actually thinking if the IC even needs to have those capacitors on the bottom. I know the caps have to be as close as possible to the power inputs but it's not like the controller runs at very high frequencies and at least for one of those capacitors there is some room to put a capacitor right above the lead where the capacitor is now connected to. I admit it's just at a very cursory look over the design and I'm not a pro at this, I could be wrong.
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #33 on: October 13, 2015, 10:46:10 am »
I suppose with the new layout you could now push the crystal over a bit and make room for the two ceramic caps on the top layer.  But it's not worth doing that at all unless you can get EVERYTHING on top (which does benefit you as mariush says, since you gain the option of a quick reflow and using a paste stencil)

I think those ceramics are fine at the bottom of the U1 IC, so no need to move them to the top unless you try very hard to get everything else to the top layer too. That's up to you, Josh.

As for the shift registers, those are HC parts and if you run those at 5V then you can't directly interface to the 3.3V outputs of the microcontroller. As you see in the datasheet, the VIH threshold is too high for 3.3V GPIO outputs.   You will need to level shift them if you want to run the shift registers at 5V.  So you will need to add 3 level shift circuits for your SER, CLK and SHIFT lines.

Also, note that the shift registers can source or sink max 35 mA.  If you multiplex your LED matrix one row at a time, then each row of 4 LEDS will have a 25% duty cycle.  Since they are sharing source current from the output of the shift-register, the total current is limited to 35 mA. So each LED will see an average current of (35 mA / number_of_leds_on_in_a_row) * 25%.  So when there is 1 LED on in a row, that LED will see an average of 8.75 mA.  But when there is 4 LEDS on in a row, then each LED will see just 2.2 mA, and will appear dimmer.  To improve this, you could use a transistor array for switching voltage onto the row, or choose another IC that can source more current. Have you bread-boarded the LED matrix and seen it in operation yet?  This will tell you how it will perform.

My only other last question for codeboy is.... how the heck did you get all those thieving squares on the photo of the board using paint?!? haha.

I had to use the Gimp editor... paint couldn't do it :) ... it took just a few seconds:  copy a square and use a fill tool to fill with the paste buffer.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5141
  • Country: ro
  • .
Re: My first PCB - MSP430 - Will it explode?
« Reply #34 on: October 13, 2015, 03:14:26 pm »
Something I forgot about having the board in a single layer. It would allow you to use just an insulating plastic (or paper/cardboard) sheet on the bottom and then just screw or hot glue the board on the bottom of a project case.
With passives on bottom, you'd have to be careful and use spacers and make sure there's no pressure on those capacitors and so on.

As for driving the leds, codeboy is right. 

It may raise the BOM of your board, but it may be worth looking into actual led driver chips.

See for example http://uk.farnell.com/led-drivers , pick something that works from a low voltage (say 2-3v) and multiple channels (8, 16, 24) and something that can give reasonable current on each channel and then sort by price. You have the benefit of each output being constant current so you don't need resistors anymore and some of these chips behave like shift registers so you can link two together to have more output channels but still controlled through just 2-4 data wires.

For example, something cheap and simple to use and capable of  5-100mA per led (configurable through a resistor) and 8 outputs would be this : http://uk.farnell.com/stmicroelectronics/stp08cp05mtr/led-driver-8bit-30mhz-nsoic-16/dp/2460704
You can link two together like a couple of shift registers, shift 16 bits to the first IC, hit the latch and output enable and all 16 leds change their state instantly.

If your leds won't need that much current, TLC5928 is even better, with 16 outputs and 2-35mA per output : http://uk.farnell.com/texas-instruments/tlc5928dbqr/ic-led-display-driver/dp/1697163

Oh, and i forgot to mention it... both of the above can be powered from 3.3v for their internal circuitry and data input from microcontroller and the leds can be powered from 5v or something higher, which would allow you to use white or blue leds without worrying about the forward voltage (and also it's a good idea to not get the 3.3v used in the micro "dirty" with 16 switched leds, you won't get the 3.3v ldo stressed with the additional load of 16 leds, keep the 3.3v happy and cool with a low amount of output current, leds don't need regulated voltage as the driver chip would control the current for each led).

Yes, the more I look at it, the TLC5928 seems like the perfect choice for your needs.
« Last Edit: October 13, 2015, 03:29:44 pm by mariush »
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #35 on: October 13, 2015, 05:27:11 pm »
If you're successful with this project and/or if you want to make a larger batch, then having all ICs and as few passives as possible on the bottom would help a lot.
True, I am just trying to get through my first PCB but I may be able to get more (or everything) on top and will give it a shot. Soldering on a fry pan seems kinda fun anyways ;)

Have you bread-boarded the LED matrix and seen it in operation yet?  This will tell you how it will perform.
I haven't - but I chose this chip because of it's widely documented use by Audino hobbyists driving matrix'd LEDs (you know - let them do the testing for you), but then ran into this 3V3 vs 5V problem.

Yes, the more I look at it, the TLC5928 seems like the perfect choice for your needs.
Thanks for the tips - going to look into this option and see if I can get it on the board. It's going to require double the header pins and double the wires, but it's certainly better than a thing that doesn't work :).
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5141
  • Country: ro
  • .
Re: My first PCB - MSP430 - Will it explode?
« Reply #36 on: October 13, 2015, 06:53:01 pm »
Quote
It's going to require double the header pins and double the wires, but it's certainly better than a thing that doesn't work

You have space on the pcb to add another row of pins for power... you could bring down 5v from the usb to the LEDs headers.  I would make two sets of  2x8 headers and position them where the COLS header is (extend the cols header to 2x8) aligned to the right, and put the second 2x8 header above the COLS header, and put the led driver IC under the A1 header... the traces from the led driver output pins would just flow naturally to the 2 headers.
Maybe add a small capacitor (like 100-330uF) right by the 2 headers, as a small energy buffer.

Technically it's not really required to have power pin for each led because you don't have to use a single wire for power to each LED, all LEDs' positive leads could be wired together and then connected to 5-17v (the max the tlc5928 allows).  But headers with two wires for each led would make your board more flexible.

With led driver, you gain simplicity, you just shift 16 bits to the led driver and set the latch and enable and all leds change at once and the led driver takes care of constant current and everything. With your previous design, you have to make your microcontroller work 4 times as hard and your code will be more complex because you won't be able to turn all 16 leds all at a time, you'd turn on just a part of the leds at one time, wait for some time, turn them off and turn on another set of leds... you could get flickering on the led matrix or "ghosting". 
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #37 on: October 13, 2015, 11:09:58 pm »
Quote
It's going to require double the header pins and double the wires, but it's certainly better than a thing that doesn't work

You have space on the pcb to add another row of pins for power... you could bring down 5v from the usb to the LEDs headers.  I would make two sets of  2x8 headers and position them where the COLS header is (extend the cols header to 2x8) aligned to the right, and put the second 2x8 header above the COLS header, and put the led driver IC under the A1 header... the traces from the led driver output pins would just flow naturally to the 2 headers.
Maybe add a small capacitor (like 100-330uF) right by the 2 headers, as a small energy buffer.

Technically it's not really required to have power pin for each led because you don't have to use a single wire for power to each LED, all LEDs' positive leads could be wired together and then connected to 5-17v (the max the tlc5928 allows).  But headers with two wires for each led would make your board more flexible.

With led driver, you gain simplicity, you just shift 16 bits to the led driver and set the latch and enable and all leds change at once and the led driver takes care of constant current and everything. With your previous design, you have to make your microcontroller work 4 times as hard and your code will be more complex because you won't be able to turn all 16 leds all at a time, you'd turn on just a part of the leds at one time, wait for some time, turn them off and turn on another set of leds... you could get flickering on the led matrix or "ghosting".

I certainly wouldn't use a separate wire for each power line - I meant that in the previous design, a set of LED matrices (32 LEDs) could be controlled with 16 wires, each connecting to 4 LEDs. Individually controlling 32 LEDs with the driver chip would require 32 wires + 1 common power line.

Going to give this a shot and post the PCB. I think it's still going to be the best option moving forward.
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #38 on: October 14, 2015, 07:29:29 am »
I suppose with the new layout you could now push the crystal over a bit and make room for the two ceramic caps on the top layer.  But it's not worth doing that at all unless you can get EVERYTHING on top (which does benefit you as mariush says, since you gain the option of a quick reflow and using a paste stencil)

Alright, I gave it a shot getting all the components on the top. With the LED drivers it was actually easier. The crystal traces are a bit longer and go near a gap in the ground plane - I imagine it's still ok, but any thoughts on this updated board?

Edit: I notice one issue - the head of a M3 screw will slightly overlap the corner IO point at the two bottom corners. I might just live with it or use some other method to mount though - they can't get any tighter! I just move the top switch down so there is plenty of space there now too.

« Last Edit: October 14, 2015, 07:33:06 am by Josh »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #39 on: October 14, 2015, 10:29:40 am »
I really like it now.. That was a really helpful suggestion by mariush to use the tlc5928, it eliminates 16 current limit resistors and now you can set a constant current with just one resistor, and you won't have any differing brightness issues.   It's 3.3V compatible with 5V on the LEDs

If you had continued with the shift registers you would have had brightness issues and you would have needed an additional transistor driver chip to get the 5V USB to power the LEDs, and then you would also need level shift transistors and resistors for the 3.3V side... but those are all not needed now.

I think this works really well.  The slightly higher cost of the tlc5928 is worth it for the reduced component count, and it might even be a near equal BOM cost for you.   :-+

The crystal should be fine where it is. The extra trace length and crossing the ground split seems to be minor there.

Is D1 necessary?  Usually you only need that for protection against a back-fed device, so that if your device may have power-on still, when the USB host (the PC) is powered off.  Are you planning on feeding 5V into the header ? If not, then you don't really need D1.

The newer LED drivers are going to have higher current demands then the shift registers and so you will be better on the analog side of your micro if you can give the AVCC pin it's own power trace and keep the digital currents off the AVCC trace. The AVCC shares current with all the DVCC pins, and now with those two caps removed from the bottom you can once again cross the ground under U1, and feed the AVCC cap C11 directly from the LDO.  If you see my in traces below, I would like to see a single cyan trace from the 3.3V LDO to C11, and a second trace (green) alongside it, feeding the digital circuits. You'll need to pop-up onto the topside to cross the AVCC trace at 90-degrees, but that angle will reduce any digital switching noise from coupling into the AVCC trace.  You can reduce the size of the AVCC trace slightly if you need to make room, since it's only feeding the analog section now.  You can reduce the digital VCC trace slightly too if you need to.  Try to squeeze them both in there side by side coming off the LDO.

This splits the ground, but it's still a good split, with USB currents in the top right, analog currents on the left hald, and digital currents in the bottom and right halfs.

EDIT: if you can snake that 3.3V trace up to the top header another way, perhaps off the LDO pad once more and going upwards and over, then that's good too and avoids crossing the AVCC trace under U1. 
« Last Edit: October 14, 2015, 10:45:21 am by codeboy2k »
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #40 on: October 14, 2015, 07:19:28 pm »
Is D1 necessary?  Usually you only need that for protection against a back-fed device, so that if your device may have power-on still, when the USB host (the PC) is powered off.  Are you planning on feeding 5V into the header ? If not, then you don't really need D1.

The newer LED drivers are going to have higher current demands then the shift registers

EDIT: if you can snake that 3.3V trace up to the top header another way, perhaps off the LDO pad once more and going upwards and over, then that's good too and avoids crossing the AVCC trace under U1.

Thanks for the tips! You're right - D1 probably isn't needed, I was just being a bit of a nervous noob and thought I'd include to protect my computer as a last resort if I screwed something up. I'm feeling pretty confident I can remove it now.

Will the LED drivers have higher current demands on the 3V3 trace? My understanding was that the 3V3 was to power the chip and it's communication, while the big current draw would be from the 5V header through the LEDs and chip, and then back through the ground plane.

Here's an update:
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #41 on: October 14, 2015, 11:52:57 pm »
I like the new layout  :-+

You can still put one of those solder linkable 0603 pads where D1 used to be.  Then you can have the option of putting a ferrite bead there if you need it; some USB powered devices might need it, most hobby level boards can get away without it, since you are not trying to get it EMC tested for certification anyways. For EMC compliance you'll put a pi filter on your VUSB, with a cap+fb+cap, so that means even more components up in the corner.  You won't need that, but if you can make the room for a FB it's nice to have the board ready to accept it if you find that your VUSB is too noisy, and/or your board is too susceptible to external noise.  The FB also reduces conducted EMI out from your board, but again that's mostly an EMC compliance issue.

So on your schematic in the first post, if D1 was a ferrite bead, then it forms an LC filter with C3 and C4.  Putting one more 0.1u cap in front of the ferrite bead makes a pi filter.  Do you need a pi filter? probably not, so you can skip the extra C (unless you have room) but I think you should make D1 into a 0603 FB and get some USB LC filtering (instead of just removing it outright)

Will the LED drivers have higher current demands on the 3V3 trace? My understanding was that the 3V3 was to power the chip and it's communication, while the big current draw would be from the 5V header through the LEDs and chip, and then back through the ground plane.
The LEDs will get their current from the 5V header, yes. The reason I said the new drivers will have a higher current demand is because there are now 32 mosfets that turn on the LEDs, and these will all have their gates charged simultaneously whenever you go from all LEDs off to all LEDs on.  That's the worst case.  That impulse to charge the 32 gates will come from the decoupling caps, and most of it will stay off the power trace, but the power trace will still see droops in voltage during the event. So I thought it would be good to keep the analog side from sharing this current demand and give it it's own trace back to the LDO. With the separate trace, the current needs of the LED drivers can be supplied from the LDO's output cap, and the analog power pin doesn't share the current with the digital switching side.

The analog Vcc pin will still see voltage transients from the digital side, you can't avoid that unless you add another LDO, but you don't need to.  One of the very best things you can do for your analog supply is to make an RC or an LC filter using the C of the decoupling cap. You can make an effective LC or RC filter if you can just squeeze in one more 0603 pad where the analog VCC trace meets the C11 cap.  Then you can short it with solder, or put a 10 ohm R, or a 10uH inductor in 0603 package.  The RC or LC filter will significantly reduce switching transients from the digital side.  millivolt transients become just a few 10's of microvolts.  If the current draw is not too much on the analog side then my preference is the for a 10 ohm resistor to make an RC filter. With an LC filter, the additional inductance can sometimes add additional ringing too.

When you get your board made you can see for yourself with your scope which of the LC or RC filter is most effective on you Avcc pin.

Cheers!
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #42 on: October 15, 2015, 06:36:50 am »
First off, I want to say thanks again for how much help the thread has been - really helped the design and I've learned a lot.

I think you should make D1 into a 0603 FB and get some USB LC filtering (instead of just removing it outright)

One of the very best things you can do for your analog supply is to make an RC or an LC filter using the C of the decoupling cap. You can make an effective LC or RC filter if you can just squeeze in one more 0603 pad where the analog VCC trace meets the C11 cap.
Cheers!

Added a 0603 pad for the option of adding a FB. I'm not sure the extra filtering on AVCC is worth it for me considering I can do software low-pass filtering, the readings need not be precise (they'd control knobs in software DAWs for audio parameters), and the pins would be connected to pots that are controlled by an precise hand. Also want to mention it's still good information to have in the back pocket nonetheless.

An Altium issue I ran into with the thieving that I still have not figured out is when following the tutorial video codeboy2k posted, rule checking gave a bunch of silk to solder mask errors. The mask is set to -100mm and I've confirmed in the Gerber file that there is no solder mask for the theiving so I think that's all fine. Thought I'd post up here because it seems wrong to ignore a bunch of design rule errors, but it seems altium has a few bugs of it's own.

I posted the change below and a "final" board image with gerbers if anyone want's to reference them. I say final in quotations because it's only final if codeboy doesn't have another suggestion :) (which are really helpful and I'm not trying to say 'don't suggest more' by any means at all!!)
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #43 on: October 15, 2015, 12:05:07 pm »
Looks really good now!

No, I have no more routing suggestions, but suggest some soldermask changes.

(1) I looked at the Gerbers, and I see that you should tent all your vias top and bottom, this is standard these days.  You might appreciate it on a small board like this one too, it's less pads to accidentally short out (during soldering , or during a test probe slip). (2) You should try to get a sliver of solder mask between the pads of the microcontroller too. You will really want to have some mask between the pads there since you will be hand soldering it, and with no soldermask between the pads you will get bridges that will be frustrating to clear. It will be more solderable (and more pleasurable!) with some mask there.

It's very tight and at the soldermask feature limits of the prototype services.  That's a 0.5 mm pitch device.  Pads are 0.30 mm and spacing between the pads are 0.20 mm.  There's a few things you can do here.  You can set the soldermask expansion to 0, so that the mask is the same as the pad.  This is commonly done, and the shop may increase that expansion.  If they don't then there's a risk that they have poor mask alignment and you get your pads half covered in mask.  To avoid this potential disaster, you can reduce the pad width to 0.28 mm, and set the soldermask expansion on the pads to 0. 045 mm. This gives you (0.5 - 0.28) = 0.22 mm of spacing between the pads, and 0.22 - (0.045*2) = 0.13 mm sliver of soldermask between the pads. They should be able to manage that.

http://support.seeedstudio.com/knowledgebase/articles/671626-what-are-the-specifications-for-the-solder-mask

That's it.  Good work!
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5141
  • Country: ro
  • .
Re: My first PCB - MSP430 - Will it explode?
« Reply #44 on: October 15, 2015, 12:17:22 pm »
Indeed, it looks great.

One thing that irks me a bit (but it's by no means wrong) is those resistors and capacitors oriented at 45 degrees: C3, R1, R2, C4

It looks to me like there is enough room to leave them vertical and just slide them to the right a bit and angle the traces from the micro directly to 45 degrees and then to the right. Just look at the trace between the mcu and R1, it's unnecessarily curved when you could just go directly 45 degrees and to the resistor that will then be vertical. Same for R1 trace, it goes too much up and then 45 degrees when it could go almost right away towards the right and make room for C3 in a vertical layout.

Maybe you'd also be able to move the trace betwen C3 and C12 a bit further to the right or at the very least straighten it and if you do get it more to the right, you may get C14 and C12 directly above their mcu pins and closer (even though it's not really needed).

U2 could go a bit to the left to have the trace between R1 and U2 straight and then go to connector trace, U6 could stay in same place or a bit higher if you move U2, or maybe you'd have to rotate it 90 degrees.   The thick traces will pretty much have the same length or you could tweak them to remain the same length.

I don't know, those are the only parts at 45 degrees on the board so they kind of jump out and bug me, they make the board ugly.

ps.  One more thing... with this new layout, it seems like there's really no need to have those traces between the mcu and the connector on the right side of the board so "wiggly". You could straighten them up a bit or at least fix that trace going from the bottom right pin of the microcontroller, make it go from the end of that pad instead from the middle as it is now.

ps2. looking at U4 .. why not work with the ground the same way you did with U5 , reorient the traces between mcu and ic to go on the outside, make trace between u4 ground go and join the C15 pad directly instead of going through via.
It would also move the via that's close to U5 (SIN pin) closer to U4, so there's less breaking on the bottom layer.

ps3. c13 could also be layed out horizontally instead of 45 degrees (the one 45 degree part i missed). It's not like you saved much trace length going with it diagonally. Just move the mcu-led drives traces a bit and you have room for the C13 directly from the mcu pad to the via.
« Last Edit: October 15, 2015, 12:38:13 pm by mariush »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #45 on: October 15, 2015, 01:22:05 pm »
I don't think he'll be able to get the R1 R2 C3 C4 set horizontal.  In a post long ago that change was made to keep the USB traces as straight as possible with as few discontinuities as possible, and to keep it thick enough to maintain about 90 ohms on a 2 layer board for most of it's length.  If those get moved to a horizontal position, then the caps C14 and C12 would have to move upwards I think, but these are decoupling caps for the internal LDOs, so you want them to stay as close as possible to the chip. U2 and U6 cannot be moved away from the wide traces because that would introduce a stub and a reflection there.  These two should be directly on the wide trace as they are now, to minimize reflections.   Also, if the resistors were horizontal then the wide traces must bend downward, which is another discontinuity and a reflection at the bend.  So the whole goal with the diagonal traces and the position of the parts was one designed to minimize discontinuities during the controlled impedance run and to launch directly into the 22 (27?) ohm termination resistors R1 and R2.  The small bends at the driver side (chip side) of the resistors is OK, as it's not a controlled impedance there, although perhaps they can be straightened out a little bit.  But any changes on the USB side should be made carefully.

I don't think it's ugly with 45-degree parts :)
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #46 on: October 15, 2015, 07:30:53 pm »
Thanks for the input! I did make some more changes. I've kept the 45 degree components - I like the way it flows myself so I don't think it's an issue. I did change the LED Driver pins and the connection to ground, straightened out the DI pins on the right, adjusted the MCU solder mask, added via tenting, and cleaned up some traces.

Codeboy, the TI USB guide (pg 14) shows 27 ohm resistors - so that's why I've used those.

EDIT: I had to change the LDO because the original one is on backorder at Digikey. Photo attached and updated gerbers. It seems none of the other LDO's have the same pinout with the tab at ground so I had to change the routing. Too bad - I liked the idea of using the ground plane as a heat sink. Although, with the LEDs sourcing from VBUS, this 1A LDO is pretty beefy and isn't going to see much current draw from the MCU and peripherals anyway

EDIT2: Also found this nice gerber viewer I thought I'd share: gerbv
« Last Edit: October 16, 2015, 01:15:40 am by Josh »
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #47 on: October 16, 2015, 04:46:05 am »
The U1 solder mask looks good.  Just remember to put a note in your readme.txt file to have the manufacturer check the solder mask openings at U1 pads to be sure they can manufacture it.  I measured it in the gerbers and it's 0.13 mm between openings so it should be OK according to their FAQ.

Overall it's much neater with the traces straightened out and I see you cleaned up a little at the USB pads on the MCU too.   Yes, a 1A LDO is definitely overkill, I'd only use it if it's the least cost solution for you.   At a glance, I don't see your board ever going over 100 mA, so you could get away with a smaller 250 mA LDO in SOT-89-3 like the MCP1702T-3302E/MB (0.52 CAD per 100)(0.70 CAD per 10).   

Your drill file has the 4 mounting holes marked as plated, this may cause an error with the manufacturer's automated checks since there is no copper layer intersecting the drill hole there.  Uncheck 'plated' in the pad properties dialog for each hole. Also, there is no solder mask expansion for the holes. They may catch this and add it for you, but instead you should do it for yourself...set your solder mask expansion on the mounting hole pads to 5 mils or  0.125 mm.  This makes the solder mask equal to the finished hole size + 10 mils.

Gerbv is good, I've used it in the past too.  Zofz is really nice for a 3D viewer, it's my new favourite. It's good to use them both, you can see different things sometimes.

Cheers
« Last Edit: October 16, 2015, 05:05:03 am by codeboy2k »
 

Offline JoshTopic starter

  • Contributor
  • Posts: 29
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #48 on: October 16, 2015, 07:56:24 am »
You could get away with a smaller 250 mA LDO in SOT-89-3 like the MCP1702T-3302E/MB (0.52 CAD per 100)(0.70 CAD per 10).   

Zofz is really nice for a 3D viewer, it's my new favourite.

The 1A LDO I've got is 0.43 CAD per 10 so not too chapped on the price, almost as low as i goes. I changed the plating and solder mask on the mounting holes and will plan so send this to the board house tomorrow!

The ZofZ viewer is pretty cool with it's 3D
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
Re: My first PCB - MSP430 - Will it explode?
« Reply #49 on: October 16, 2015, 08:36:57 am »
Good!

re: the termination resistors... I've seen 22, 27 and 33 used. I think 27 is a good middle ground. Chapter 7 in the USB 1.1 spec details the electrical specs, and it's the voltage levels and rise/fall times in that chapter that set the termination resistor choices and cap choices.  Most designers just use one of those 3 resistors without giving it too much thought, and it just works.  It's good to follow the TI guidelines since they may have created their line drivers and receivers to be optimized for 27 ohms.  I wrote 22 (27?) since I couldn't remember what you had used on your schematic and I didn't look :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf