#generic pcb design chat thread

1 messages · Page 1 of 1 (latest)

silent cargo
#

Lets see how this works - #projects-chat-😏😁 is kinda allround channel, and we seem to be hijacking a lot of random #1216045182915576028 threads with @rose terrace and @mystic kraken so lets try this - this could be a random topic thread about all kinds of random topics related to kicad and pcb design

mystic kraken
#

Haha, had to have an RP2040 as the title picture😅❤️

I like the idea. I'll try to remember linking to this thread instead of posting 500 word essays in people's threads🙈

silent cargo
#

yeah, and we can sneak people in here 😉

silent cargo
#

so speaking of the board outline stuff, do you usually do that in SVG if you want a more complex shape, or construct it from the basic curves and lines in kicad?

#

because what bugs me is it feels like I sometimes get a bit off alignment of separate parts and thus complaints in design rule check and step export that the outline is broken

mystic kraken
#

My process so far:

  • Design the faceplate and housing in Fusion360
  • export DXF/DWG (not sure which format right now tbh)
  • in KiCad, import graphics to a user defined layer
  • draw board outlines with 0.1mm grid-snap resolution
  • select user defined layer active while laying out components

The last step allows me to snap component locations to the dwg lines. The fab hasn't complained to date about dimensions. If a bore hole is at X74.4765 | Y47.27456 in the gerber for example, I believe it just gets drilled at X74.48 | Y47.27 . Since the soldering process doesn't result in pin-perfect location anyways this hasn't caused any issues for me yet. However DRC has complained about sub 0.05 mm precision dimensions. I've generally ignored those warnings in the past and haven't had any issues.

rose terrace
#

Hardest part is when you have to solder them 120 degrees off from their normal orientation because you used a symbol with different pin numbering

mystic kraken
#

Ooof, that sounds frustrating...

#

Reminds me of when I used the wrong footprint for a resistor network... ended up soldering 1206 resistors perked up on their sides across the pads... 4 in parallel...

rose terrace
#

My worst resistor mistake was forgetting an entire board's worth of pull ups

mystic kraken
#

Oh boy.

Did you hotwire tht resistors across the board or scrap it and order a new pcb?

rose terrace
#

Wired them on the back

#

SMD 0805 with wires used for the V+ line

silent cargo
#

I had this too but it was a through hole transistor

#

it ended up looking like a toilet sign with crossed legs

#

I think mine was so that I had accidentally put the component on the wrong side

#

also nice idea to forward messages from other chats here

#

I like that feature

mystic kraken
rose terrace
#

Pin headers. 20 pins with 1mm pitch.

clever jolt
# rose terrace

@silent cargo , you should have used this picture as the title picture.

#

My first COMM Radio board design got made, shipped, and assembled before I realized all the tactile switches were to ground whether they were pressed or not.

silent cargo
#

dang I tried to edit it but looks like you cannot add one later

#

wait

#

did I create this as a thread on the forum channel?

#

somethign weird in this one

clever jolt
#

https://jlcpcb.com/partdetail/10499-MAX7219CWGT/C9964

I am trying to figure out how to calculate power dissipation in the ISET resistor for the MAX chips to ensure the Watt rating is adequate for the resistor I select. I know how to do this if I was just putting a resistor between a supply voltage and a LED, but I'm not sure if the max chip throws that out the window or not.
For reference, my 6-digit displays are white, nominal Vf = 3.3V, supply 5V.
I have been using 28kΩ resistors but I'm thinking about upping this to 47kΩ as I find the digits to be significantly brighter than the backlighting LEDs and I want to dim them down a bit.

#

The datasheet has a section on calculating power dissipation but I think that is within the MAX chip itself, not for the ISET resistor.

silent cargo
#

I use 47k

#

for no apparent reason or logic behind it, I think I saw 47k used somewhere and it seemed to work fine

#

they are still plenty bright, even through smoked acrylic glass

mystic kraken
#

47kOhm should result in around 10.6mA segment current assuming 0V voltage drop advertisement ISET-GND connections. This would result in around PD = 280mW.

#

Assuming 5 V power supply and 2V LEDs

#

Since your LEDs are 3.3V (just saw that) you should see a total dissipation of around 180W in the MAX7219 IC with Rset = 47kOhm

#

It is however safe to assume that the ISET input has some sort of shunt resistance and the actual segment current will be a bit lower.

I have been experimenting with Rset a bit and found that two 820kOhm resistors in series (1.6MOhm) result in a pleasant display brightness with white displays alone but is a little dark behind tint. I've reverted to 43kOhm because I had those in stock, 86kOhm (two in series) is still plenty bright but I decided to give myself some headroom.

#

I haven't found an explanation to why such incredibly high Rset even works at all. My assumption is the internal comparator has some sort of bias that just overrides such small Iset currents

clever jolt
mystic kraken
#

Oh, no that is PD in the chip

#

¼W resistor is perfectly fine

clever jolt
#

You you would indeed calculate PD in the resistor like normal then?

#

That was my confusion. Wasn't sure if things happening in the chip affected the calculation

mystic kraken
#

Yes, however I assume actual current is lower due to the internals of the max chip.

mystic kraken
clever jolt
#

Well I feel better about the 1/8W resistor now at any rate, thank you

mystic kraken
#

Misread that as ¼W🙈.

But yes, that will be more than plenty

rose terrace
clever jolt
#

Actually I misread Mattlock's image, that's only 0.106mA

clever jolt
#

The footprint for this USB-C connector has all the through-holes drawn as edge cuts. Is that going to be a problem?

#

Footprint came from Digikey

silent cargo
#

hmm not sure

#

that is going to be hard to solder, is it really through hole? those will be tiny

#

I use USB b for that reason

rose terrace
#

Square holes the size of a usb-c pin sound like the sort of stuff a fab might reject

#

I did use a surface-mount socket of a very similar design and got charged x-ray fees for that

silent cargo
#

do you plan to hand solder this or have it done by jlcpcb?

#

because thoe pins are super small

clever jolt
#

Well I'm not really sure what my plan is yet. I need a vertical port (perpendicular to the board) and that limits my choices.

silent cargo
#

on the back?

#

I sometimes also used a flat port and just have a cutout on the pcb and route the cable to the back

#

but vertical usb c on the back would be ideal

#

but those are just hard to find or super tiny to solder

#

and at least my usb micro b verticals were not a great experience, the cable tends to yank a bit and the connector just loosened up and started to have issues

#

usb B is quite sturdy

clever jolt
#

I could 3D print a sort of support for the vertical port, or put the panel inside a case

#

We've talked about USB-B/C before. Seems a simple enough thing to adopt the new standard on our boards when all we need is 5V and USB2.0 speed

rose terrace
#

Honestly I see types B and C more as coexisting than a straight-up replacement

#

only USB3 type Micro-B needs to be erased from existence

clever jolt
#

Would a type B micro be easier to hand solder if a through hole component was used?

silent cargo
#

micro b is very fragile connector in my experience

#

its just what was on most arduinos before usb c became more common

#

maybe there are vertical usb c ports but most have just a ton of tiny connectors that are not really needed for usb 2 that arduinos and rp2040 use

#

this was what I was looking at sometime ago

#

it looks like the one you also found

#

yeah looks the same

#

one thing would be to look if easyeda has something and see how that footprint is

#

you can export and import to kicad

#

@clever jolt you can also ask at jlcpcb website chat

#

if you are logged inm they usually are good at trying to help

clever jolt
#

Ya okay that's good. And yes that's the same one I found from digikey. There are vertical mount SMD varieties available from JLC as extended parts

#

Kind of starting to really rack up the list of extended parts though

#

At this point I'm trying to save any viable extended parts for hand soldering and buying separately from digikey, though between the added cost of the parts themselves from digikey vs jlc + digikey's shipping rates it's turning into a fine line.

silent cargo
#

yea this is why my usb is through hole that I solder by hand

#

on the back

#

because SMD on both sides is even more expensive

#

I do usb port and reset button as through hole on the other side. if your switches are also through hole, then you can of course do the usb and rp2040 on the backside and switches and possible through hole leds on front

#

its always a kind of compromise

mystic kraken
#

I honestly prefer USB-B connectors on my PCBs. They are the sturdiest option available, cheap, easy to solder and provide all the connectivity required for arduino style and rp2040 circuits. None of the USB-C shenanigans, no unnecessary pins, no "do I need a PD chip for voltage negotiations" train of thought... and they're easy to plug into, even in tight spaces behind a thing, in the dark, in a rush!🤷‍♂️😅

clever jolt
#

I've been doing a fair bit of reading on USB-C. Nothing I've read up to this point has mentioned needing to be worried about voltage negotiation if you're using C type as just a simple replacement for B type. Not saying that isn't a thing, I just haven't read anything on that subject yet. Is there a situation with what we do where something like that is a concern?

#

Using a USB-C type receptacle in our applications would leave the RX1/2+/-, TX1/2+/-, and SBU1/2 pins unconnected. CC pins just for cable orientation. Wouldn't think there'd be anything left there for power negotiation.

#

Well, I suppose the CC pins do the communicating for PD.

rose terrace
#

Cable orientation also does not matter on usb2

#

All the resistors do is signal that this device does not have PD and is acting as a power sink and peripheral device

silent cargo
#

this is how I did usb-C

#

found it from some adafruit usb c rp2040 board schema

rose terrace
#

looks decent to me

#

just make sure you don't cross the D+/D- lines 😛

silent cargo
#

it has a flat usb c that is smd by jlcpcb

#

also, if someone had shown me this a few years back

#

man

mystic kraken
mystic kraken
rose terrace
mystic kraken
#

I've recently been contemplating the pro's and con's of custom built USB-C hubs with active voltage negotiation.

I currently use a 4pin molex minifit Jr connector to deliver 12V, 5V and 3.3V to my boards. Additionally I have 3.3V buck regulators on rp2040 boards for operation with USB only (for programming and debugging purposes). I discriminate between 5V load supply (from molex only) and 5V logic supply (from molex and USB) where 5Vload is used for LEDs, mechanical drives and 7segment displays and 5Vlogic is used for... well... logic chips and a source for the buck regulator. 12V from molex is sometimes used if I have A LOT of backlight LEDs and will in future be used for mechanical drives as well.

Having a negotiable voltage supplied to my panel PCBs from a custom USB hub with 5V, 12V and potentially even 20V capability could reduce the amount of wiring and clean things up, potentially reducing the number of "antennas" in the power supply circuits. It would however also significantly increase the complexity of each panel PCB and the cost of power delivery would certainly skyrocket!

I feel like powered hubs and a simple 12V 5V 3.3V power distribution board, supplied from an old ATX power supply are my preferred options for simplicity's sake. Input ferrites and caps should suffice for stable, noise free power supply (have done so far at least!)

rose terrace
#

Real PoE injection from a DC source would be nicer of course, but that drives up price a lot

#

Also kinda thinking DP injection/splitting would be cool, both for panels housing pop-up screens and for general portable pc + usb monitor use cases, but commercial solutions are through the roof and custom builds require test equipment I do not have

#

Questioning your number of antennas concern though - SMPSes also introduce noise, whereas the noise picked up by wires can be mitigated a lot by bundling power, return and data.

mystic kraken
#

Yes, the buck-/boost-regulators can induce significant noise, but at a frequency I can filter for both in circuit design (RC-networks, bulky caps) as well as PCB layout (grounding strategy, trace design, stitching vias around the SMPS etc...). Also, the SMPS's EMI frequency is far higher (I tend to design for >=50kHz) than for example MAX7219 at 900Hz and significantly lower in amplitude due to the aforementioned mitigation strategies (learned on YT, might I add, so the effectiveness remains to be tested!)

rose terrace
#

Yeah, visible flicker should theoretically not be an issue for smps noise

mystic kraken
#

Bundling supply lines is off course am important measure, which is where the molex connectors I use come in handy. Current return path can be kept real close to the supply path

rose terrace
#

And rf immissions should be managable by keeping the SMPS power well-decoupled, low-current and local

mystic kraken
#

I have no clue how susceptible a crystal oscillator is to EMI, but since EVERYTHING depends on them it keeps me up at night😅

rose terrace
#

Yeah, analog signals (through aliasing), high-frequency data lines and the likes are going to be the "fun stuff". And crystals kinda fit into that domain

#

Hmm, I wonder

#

You know that bus system Ralf and Stefan are using in their overheads?

#

Kinda wonder how that would go with RS485 signals, a relatively high bus voltage, and 4 wires for power and data

#

Might be best to not use XH for that, of course, since you would not want to feed 48 volts into an rp2040 pin by accident

#

But this could be used to create a bus inside a larger panel that can supply dozens of watts

mystic kraken
mystic kraken
rose terrace
# mystic kraken Not sure what you mean by that

JST-XH is the connector standard used by the mf proto board and stuff like that. Its 2.5mm pitch is close enough to 0.1" that small connectors are perfboard-friendly. If you make a high-voltage distro system, better not use plugs that are popular in other parts of the MF ecosystem and easy to plug onto the wrong port by mistake

clever jolt
#
  1. KiCad is fighting me on net names/routing a differential pair. Keeps telling me unable to find a differential pair, nets need to end with P/N or +/-. My nets are USB+ and USB-, doesn't want to recognize that.
  2. For my 1.6mm PCB, 1oz copper, the differential pair calculator says .15mm track spacing and trace width at .75mm, however, with a connector like this one where I have to route to each side of the USB port, there's no way I can maintain spacing like that so how does that work? Would this be less of an issue since my USB port is so close to the 2040?
rose terrace
#

just keep it consistent over the length of the run if possible. No large loops between the traces or anything like it

clever jolt
#

Thank you. I can run the traces and then use the length matching tool to ensure the traces are the same length.

rose terrace
#

I'd say keeping spacing consistent is more important than length identical. Which of course your connector orientation sadly does not help with

#

length matching is more important for synchronous and/or parallel interfaces

#

I would see if you can't sneak the minus trace between pins 2 and 4 and come in that way, to not have that large loop between them aroung the ground, ID and mounting pins.

clever jolt
rose terrace
#

between 3 and 4 is a non-starter, but between 2 and 4 looks close enough to get by with minimal fiddling

clever jolt
#

Those through hole pads are 1.3mm apart center to center (between 2 and 4)

#

With JLC minimum width and spacing, won't go.

#

I can try to find a different USB receptacle I guess but that would be my 3rd one because of various routing issues.

rose terrace
#

the grey can overlap the circles

clever jolt
#

How do I tell KiCad that?

rose terrace
#

just not the pads themselves

#

the red/blue must be outside the circles

rose terrace
clever jolt
#

So just to clarify, differential pair calculator here for 90Ω target says .15mm spacing and .75mm trace width. You're saying I can squeeze a .1 or .15mm trace and that's better than looping around using the wider trace?

rose terrace
#

I have not run any specific simulations, but this layout with traces forming a big old loop certainly has a very uncontrolled differential-mode impedance

clever jolt
#

Ya, okay. I'll dig into this a bit more. Thanks for offering your knowledge/suggestions.

clever jolt
silent cargo
#

in practice it likely will work, but good to dig into things a bit

clever jolt
#

Those DP/DM traces are under 4mm long. To be honest... I'm not really sure where to go to dig into this more.

silent cargo
#

yeah, I dont think either

#

I think it will be fine

clever jolt
#

Dove a little deeper on this and found an Application Note from NXP, which states in Section 3.2 that "Although it is recommended to implement 45ohm signal traces, for full-speed USB it is not critical for obtaining good results. Keep your signal traces as short as possible for good performance".
www.nxp.com/docs/en/application-note/AN11392.pdf

silent cargo
#

yea

#

I think this is more than fine

mystic kraken
#

I think unless you're opting for microstrip on a four layer board this is your best bet. Impedance matching on a two layer board is nigh impossible anyways. Since your traces are only 4 mm long you'll be absolutely fine in fs USB. With the termination resistors in place the system shouldn't know the difference and any signal integrity issues should be taken care of by USB protocol itself. I've had similar layouts work with no issues at all.

The Raspberry Pi Pico 2 does it like this, just for reference:

#

So they've tried to impedance match

#

Try to get your traces as close as possible to impedance matched, but don't woory too much is what I would recommend

rose terrace
#

they are also using a thinner board to make matching work out more easily

#

1.0 mm

mystic kraken
#

I wasn't aware of that. Only ever had Pi Zero boards from Amazon

rose terrace
#

General rule of thumb is to not worry too much about wave propagation if your connections are shorter than 1% of the wavelengths you are expecting. Which for the revised layout is clearly the case.

#

Also large current loops are a major source of interference, so keeping the differential pair tightly together is probably more important than keeping the traces wide

clever jolt
#

Thanks very much for all the help on this guys. This topic is pretty intense when first setting off into it.

mystic kraken
#

Let's take the solder discussion up over here again.

#

@silent cargo regarding the SnAgCu vs. SnAg... do you feel there's a noticable difference?

silent cargo
#

so cannot say, I think I have mostly just used that stuff and leaded earlier. I have one roll of super smoky and smelly rosin core 2mm thick

#

leaded, that I use if I need something big soldered

#

it flows so well

#

but it is pretty nasty and smokes a lot

mystic kraken
mystic kraken
silent cargo
#

oh hmm

#

isn't that kinda the same formula?

#

wait this is the wrong one

#

both are Sn96% and ~4% Ag (silver)

#

or am I blind?

mystic kraken
#

Lyijytön Ei puhdistamista vaativa Juotoslanka Sn96,5Ag3Cu0,5

#

That is what the description for the digikey.fi link says on my end

#

0,5% CU

mystic kraken
#

Might be showing up strange at my end

clever jolt
#

I am very partial to SnPbAg 62/36/2 Silver-Bearing Rosin-Core Solder. Flows very well and never had a problem with it, even when needing to desolder mistakes

#

Obviously contains lead.

#

I did buy some Sn99 Ag0.3 Cu0.7 solder a while back and it takes so much heat to get it to flow I find myself not using it.

#

Ah, it seems after peeking into the thread you brought this conversation over from, I am not the only one to experience lead-free solder being a pain to melt.

mystic kraken
silent cargo
#

yeah it's pain, but only way in EU unless you have old stock of leaded, and are not doing anything for sale

#

but with proper tools and routine lead free works fine

oak pulsar
#

Hi all, how would I secure the pcb to the 3mm acrylic plates? Am prototyping a radio panel, so would I use standoffs? Thx

silent cargo
#

for example yeah

mystic kraken
# oak pulsar Hi all, how would I secure the pcb to the 3mm acrylic plates? Am prototyping a r...

I would use bits of nylon tube (pneumatic hose) cut to length with a Knife and adjusted to the exact length required with some coarse sandpaper... then long screws with a nut.

Unless you have access to a 3d-printer, then just print out some standoffs + long screws and nuts.

By long screws I literally mean the longest you can get (at a reasonable price) so that the entire assembly sits nicely off your bench/desk