Sketch review - USB connector and mounting holes


#1

Hi all,

I’m designing my first-ever PCB for an Arduino-based project, and I’d like to ask for some help in finalising the design. Attached is the design - I think it’s straightforward: Arduino Nano, stepper (ULN2003), 4-digit display (TM1637), clock (DS3231), and touch button.
The Arduino will be powered with a stripped cable from its microUSB to the USB Header, so I can also easily use the serial port for sketches and communication.

Of course I would like to know if all the traces and widths are okay. I used 16 mill now for the 5V traces and 8 mil for signals. I will still do a top and bottom fill, so the ground wires might be a bit weird now.

Some specific questions:

  1. All peripherals have an on-board capacitors for smoothing the 5V. Do I need to add extra capacitors on the board? The display and stepper are more power-hungry, so I split the 5V for those.
  2. The stepper is connected with a JST-XH 5-pin vertical connector. This part is not available in Fritzing, but the spacing is normal 0.1". It should work with the normal female header I used now, right?
  3. The ZS-042 board is mounted battery-down. I want to mount it the other way around, but Fritzing does not allow to flip the part. The dirty option is to simply reverse the wiring of course, but surely there is a more elegant solution?
    Furthermore, I don’t need the top headers, and want to use the top two mounting holes. How do I remove this header? And how do I align my PCB holes to the board? Now I just guesstimated their position, assuming the board uses 0.1" spacing.
  4. I only found one micro-usb connector in Fritzing, which has one flat edge for soldering. I’m thinking a through-hole mounted connector is more robust. Is this necessary, and if so how would I add this part?

Sorry for the overload of questions - it’s my first time designing a board. Any help is greatly appreciated! :slight_smile:

Watchwinder_shield_20190315.fzz (23.8 KB)


#2

To start with, the 4 connections between the 2003 and the stepper header in breadboard are not connected (the connections aren’t green) so the same 4 connections in pcb are not connected because there were no rats nest lines. Move the wires in breadboard until the connection goes green (and rats nest lines appear in pcb). You probably also want to route schematic view as it is often easier to see how things connect in schematic (although it will work as is). To check the traces run DRC: in PCB view routing->Design Rules Check (DRC) which indicates (correctly) that you can’t run the VCC trace through the SDA pad on the RTC as it will short. Since there is lots of room, I don’t see the point in not using the default 24 mil trace width. The smaller trace widths are for when there a space constraints which there aren’t here. In general bigger is better if there is space. For the power to the stepper motor you may in fact want to run larger traces as the motor is relatively high current and the less trace resistance the better Ithe ground fill should deal with ground).

You might want to add a .1 ceramic capacitor (or at least the space for one) in parallel with the 10uf capacitor at the stepper motor. That is the point where you are going to have the most noise generated, The rest of the parts internal capacitors should do, although space for extra bypass capacitors is never wasted, you don’t have to install them if you don’t need them but the pads are there if you do need them.

As long as you remember to not put any other components near enough to interfere with the connectors. The JSTs are larger than a header and won’t show up in silkscreen.

Select the RTC part in pcb and in inspector (the window on the bottom right) click the pcb layer pull down from top to bottom and it will invert the board as desired (which will also fix your routing issue). You can’t eliminate the pads without editing the part.

Usually the mounting holes are marked with a circle in the silk screen layer, and you drag a hole over the top of the pad. This part doesn’t appear to have done that so you would need to find the x/y position of the mounting holes and position them or modify the part (or more likely get one of us to do so as part creation is difficult) to add the holes to silk screen. That would be the best solution.

First the referenced connector is SMD not through hole, this is through hole (I actually didn’t think that they made these in through hole til I did a google search):

There doesn’t appear to be a Fritzing part for it but there probably should be as it would be useful. I’ll think about making one.

Edit: there is in fact already a part for it in core parts (and the pins are smd, it is only the mounting that is through hole). Type micro usb connector in to the parts search and first one that comes up is these connectors.

Peter


#3

Thanks for the extensive reply, Peter! Really appreciated.

I made a new board based in your input:

  • Wired the ULN2003 (how could I have missed this?!)
  • Added 0.1 pF ceramic to all +5V for peripherals, just in case (good idea).
  • Thicker traces; 24 mil for normal lines, 32 mil for +5V through the Arduino, and 48 mil for +5V to the display and stepper; for the USB connector I still need thin traces, but that’s only a short distance.
  • Removed the ground traces in favour of the ground fill later on
  • All power traces to the bottom layer and sensitive signal traces to the top layer

[quote=“vanepp, post:2, topic:6854”]To check the traces run DRC: in PCB view routing->Design Rules Check (DRC) which indicates (correctly) that you can’t run the VCC trace through the SDA pad on the RTC as it will short.
[…]
Usually the mounting holes are marked with a circle in the silk screen layer, and you drag a hole over the top of the pad. This part doesn’t appear to have done that so you would need to find the x/y position of the mounting holes and position them or modify the part (or more likely get one of us to do so as part creation is difficult) to add the holes to silk screen. That would be the best solution.[/quote]
That is why I want to remove these 6 headers from the ZS-042 part, as I will use the 4-pin header on the other side. They’re kind of in the way now. I will see if I can modify the part myself to remove the 6-pin header and add the mounting holes to the silkscreen. Nice challenge :slight_smile:

As for the USB connector, all micro-USB ones are SMD indeed. The one I originally had was the one you linked from Mouser: SMD with 1 tab/foot per side for mounting. I found the part you mentioned in Fritzing with the through-hole mounting feet; it should match the one I linked before.

Watchwinder_shield_20190320.fzz (33.9 KB)


#4

This one looks better other than the short through the pads on the RTC. Your major problem with the mounting holes is likely to be finding their position. I had a look last night and didn’t find a mechanical drawing of the module that gave x/y coords of the mounting holes. Measuring them with vernier calipers is probably the easiest way to go assuming you have the module already. If you haven’t seen them, these 2 tutorials apply to the latest version (most out there are for older versions):

Peter


#5

Thanks again, Peter!

Indeed, I did not find any mechanical drawings either. Normally they are easily found for these kind of boards. The Fritzing part has the holes drawn in already, and I have the board at home. I will verify the position.

Thanks for the tutorials; it might take me some time, but I’ll make an “updated” version of the part. If I succeed I can update the existing one with the mounting holes, and then create a custom one for myself without the 6-pin header.


#6

Okay, modifying the ZS-042 is not very successful so far. I first tried to add the mounting holes by simply copying the mounting hole positions from the breadboard view to the PCB view. They should correspond, right?
Strikingly, the mounting holes completely fell outside the PCB size. The board size is 38 * 29 mm in breadboard view and only roughly 28 * 12 mm in PCB view. That does not correspond…
I can’t understand why there are no mechanical drawings of this board at all, since it seems to be a very commonly used board. The best I’ve found is this drawing which at least verifies the outer dimensions. There are multiple Fritzing parts avaible, none of them with the mounting holes. I did find an Eagle PCB part, I’m trying to reverse-engineer that one.

If that does not work, I’d almost consider buying the Robotdyn version of this board, since it does provide a mechanical drawing…


Edit: The drawing from Eagle does not correspond to the Fritzing one. The dimensions remain a mystery. Time to bring out the calipers and measure it; I’ll try to do it this weekend.


#7

You are correct, the part is pretty broken. Breadboard is about twice its life size (and so far that’s as far as I’ve got). I have one of those boards in front of me calipers in hand and I’ll fix it up. Feel free to try for your self though the more people making parts the better!

edit:

OK here is a corrected part for the rtc. There are quite a few changes in all three views.

ZS-042 RTC Module.fzpz (16.0 KB)

Peter


#8

Fantastic Peter, thanks a lot! Where’s the button to buy you a beer? :smiley:
I’m going to finish my drawing and re-upload it.

Edit: I’ve managed to modify the ZS-042 to remove the 6-pin header. (Is it normal that the part editor creates multiple copies of the svg’s?)
Also I’m still in doubt about the microUSB connector. Is still does not seem to be the right part for this microUSB one? Otherwise I’ll use the flat-edge smd variant (also added to the sketch).

And there is another issue with the USB connection: according to the Design Rules Check, the traces at the usb connector legs are too close together and overlap with the legs. Is this okay, or should I decrease the trace width here?

Watchwinder_shield_20190325.fzz (49.9 KB)


#9

Looks good, while I’m far from an expert on making boards, the default drc rules are fairly liberal, the board houses can do much lower clearances. That said you may want to set the view->set grid size to .01in and do something like this to increase clearance while keeping a large trace size:

going straight in, Fritzing centers the trace on the connector so you can’t easily offset it from the center. The sides have more room. The default drc rules still complain because they think the pads are too close but they should fabricate fine.

Peter


#10

Thanks for the tips, Peter.
I changed the USB connector anyway to the standard one with flat tabs for soldering (no through-holes).
I finished the entire sketch and PCB, including the ground fill. The ground fill added a connector to the top-left corner, no idea why. Other than that, I think the board looks fine :slight_smile:

Additional question: in the PCB layout the parts have their outline and name on the board. Can I easily copy these to the silkscreen to get the outlines and names printed on the board?

Watchwinder_shield_20190326.fzz (99.0 KB)


#11

To me in gerbv it looks fine, but note that I am not a pcb expert. I think the ground fill should have routed the rats nest lines (but then I’ve not used copper fill either) but it seems to have made it in to the gerbers fine.

Peter


#12

Right, I think my PCB is close to being finished, but I’m still not sure about the USB connector.

I found this shop on Aliexpress that sells a good variety of standard micro USB connectors. It seems however that none of them fit the standard Fritzing parts. The problem is that even the SMT style connectors have two small legs near the pcb connections, which are not accounted for in the Fritzing part. The standard DIP variant is not in Fritzing at all (be it in 2- or 4-leg DIP). It might fit the Adafruit miniUSB, but then again it might not…
The other way around it’s difficult too, finding a part on Aliexpress that fits the Fritzing PCB drawing…

Can you shed some light on this, Peter?

Attached a small overview of three types of USB connectors in Fritzing, of which I think only the Adafruit Mini-USB will fit the aforementioned connector.usb_connectors.fzz (1.4 KB)


#13

It is likely that you either need to buy one of the parts (Adafruit or Sparkfun) that are supposed to fit the footprint (note the weasel words, as someone bought an adafruit barrel connector only to discover the part in their repo is incorrect and the pins in fact don’t fit the board), or select a connector and then modify the part (or more likely get me to do so). The problem there is getting mechanical information for the connector, none of the ones on Aliexpress appear to have pcb footprints available. If you only need one you could buy one from digikey and select one with a recommended footprint.

Peter


#14

The miniUSB_adafruit is SMD, and the miniusb_core is THT.

The 1st one is kind-of like the USB I got last week, just not exactly so the part needs a mod.

You can either buy one and tell is the dimensions, or buy the one above and I’ll post the dimensions.


#15

I think you’re right Peter, I should get some with a PCB drawing to make sure they fit.

I found a local retailer that sells the connectors with datasheet (including PCB drawing), but at a steep price. So I just ordered these from eBay, also with PCB drawing (note htat the first picture is off; the others are correct with the dimensional drawing): https://www.ebay.com/itm/263395028642

I might give it a try myself, but I think it’s a lot safer if you could make the part, Peter…
(I should learn how to do it with a simple part first maybe)

@Old_Grey thanks for the tip too. I want to go for micro USB though.


#16

The slots for the mounting pads are a problem. Fritzing doesn’t do slots as far as I know. They can be done as a 1mm plated through hole which would let you solder the mounting tabs down (but be too wide by .35 mm on the small edge). I’ll have to guess at the size of the two square pads as well as there size nor position isn’t specified but they don’t appear to be vital for anything anyway. I’ll do a footprint and let you decide.

Peter


#17

I think PCB manufactures don’t like overlaping holes because it breaks drills, so it’s probably better finding a SMD version.


#18

Try this one. As noted the mounting tabs are a hole (0.035in same as an IC) so if you have a board with ICs see if the mounting tab will fit in one before ordering a board. The ground pads are a guess because there location isn’t specified but I expect they will be close enough.

micro-USB-connector.fzpz (9.8 KB)

edit:

You might also try this one, which has the mounting pads on the bottom of the board as well (the one above is a real SMD part and only has pads on top). This one will not work correctly if you select bottom of the board though and may screw up at other times as well (if it manages to confuse fritzing which it may). This is a new part so it will load along side the first one. It appears to corrupt the first one as well however so neither of them (and possibly other SMD parts) will work as bottom of board.

micro USB connector-pads-on-bottom.fzpz (10.5 KB)

Peter


#19

Never figured this small little connector would bring so much issues.

@Old_Grey: Good point there. I checked Eurocircuits requirements; besides slots being more complicated, they need to be defined as slots in the drill layer and not as overlapping holes. If Fritzing does not support slots, the only other options is oversized holes.

@Peter: thanks for attempting to draw it. Following @Old_Grey’s comment, this might not be the best option though, sorry…

After some more research I did find that there is some kind of standard for USB connectors layout. The standard SMD footprint is MK5P, which has two small holes near the connections (PCB drawing). These connectors are widely available online.
I checked the dimensions, it this is nearly identical to the Sparkfun part in Fritzing. Just the pad width should be 0.40 instead of 0.35 mm and two pads and the two holes are missing. I took a shot at modifying the part, but the Part’s Editor and I aren’t good friends yet.
Could you update this part maybe? (and again, where’s the button to buy you a beer?!!)

Adafruit also sells micro B connectors for an acceptable price with a datasheet, but again the through-holes requires slots - so a no-go.


#20

AFAIK FZ can only do round holes, so slots are a problem. All I can think of is looking at a set of gerbers made by another program and see how they do it, and then mod FZ drill.txt file - the file gives hole size and cords -.

The 2 small holes are for pins protruding from the USB part and they locate and provide strain relief when cables are plugged in out.

FZ edit can’t do drawing changes, so it’s more complicated than that.