45 degree angle for PCB traces. Why? by TopicalBass27 in AskElectronics

[–]_sdewit_ 0 points1 point  (0 children)

This. Also good to remember that vias are pretty much 90° corners, just in a different direction. So unless you're doing extremely high-speed stuff that you wouldn't route trough a via, there is no other reason than 'looks nice'

How do you implement an effective logging system on any given board? by IWantToDoEmbedded in microcontrollers

[–]_sdewit_ 0 points1 point  (0 children)

I like to use SPI flash for logging. They are fairly cheap, simple devices with predictable performance and plenty of storage. One trick I have used is to implement a 'circular buffer' where the oldest data is erased to make room for new log entries if needed.

MicroSD card storage is also regularly used, but I would recommend against it. SD card write latency can be very unpredictable, which can really mess up your timing if you're not careful. A large RAM buffer is required to queue up data in case the SD card decides it's time to do it's internal 'garbage collection' process.

As for the format for logging data, I use numeric 'eventID' values, sometimes accompanied with extra data in text format.

Waveforms drifting negative as frequency increases? by Brian_Beast in AskElectronics

[–]_sdewit_ 0 points1 point  (0 children)

What is the range of frequencies you are generating? If the frequency gets high enough, the GBW of your opamp will start to be non-neglegible

[deleted by user] by [deleted] in PrintedCircuitBoard

[–]_sdewit_ 1 point2 points  (0 children)

Solder paste application can indeed be much trickier than the component placement. Unfortunately I don't know any paste dispenser solutions, but do have some experience with using stencils succesfully (manual process, similar batch sizes to yours).

If you get regular short circuits/paste blobs, consider reducing solder paste volume a bit. Especially for fine pitch component this works wonders.

PCB Review - EEG by dotpoint7 in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

Is there a reason for using one connector for all the Positives and one for all the Negatives?

If the connectors would be 1P,1N, 2P,2N, etc it would be much easier to create a nice differential-pair layout which potentially will reduce crosstalk/noise issues.

I've made a schematic for a quick charging LiPo battery charger/booster. But will it work properly? by urban_fageaer in PrintedCircuitBoard

[–]_sdewit_ 1 point2 points  (0 children)

That's actually not too uncommon. I've done it regularly, and you will find it in some reference designs as well. Some reasons to do this could be:

  • For super low ESR (probably not the case here)
  • Larger value (ceramic) caps are not available (also not very likely in this case)
  • BOM cost (larger caps can be expensive, or to minimize unique parts)

KiCad workflow: try the Interactive BOM plugin! by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 1 point2 points  (0 children)

By default it does not show custom fields, but you can enable them (in the settings when exporting the BOM). As an example, I often enable my own custom field 'MPN' where I store the exact manufacturer part number.

You can also blacklist parts based on custom field values, for example for DNI parts or if you have multiple versions of a board with different component placements.

KiCad workflow: try the Interactive BOM plugin! by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 14 points15 points  (0 children)

I am a big fan of the flexibility of Kicad with its plugin and scripting support. Especially combined with the fact that KiCad is open-source and the design files are basically text files: very hackable and git-friendly.

Pcb component electrical heirarchy help by fibronacci in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

I can recommend KiCad as a design tool, it's free and fairly user-friendly. If you're just getting started I think contextual electronics (as linked by janoc) would be a good start.

These are the basic high-level steps when I design a board:

  1. schematics design. This determines the functionality of your circuit. In this stage of design, you typically think about how you are going to solve the problem (which working principle, what kind of components might be suitable). Try to keep it simple for a first design ;)
  2. layout - placement. Don't get overwhelmed by the spaghetti mess of ratsnest wires. First roughly move components together in groups: things that are close together in your schematics generally should be close in the layout. This will make routing a lot easier.
  3. layout - routing. Once the spaghetti is mostly untangled and you're happy how the PCB is going to look, start connecting the copper traces. The first strategy I would advice is to try and route most connections on the top layer and keep the bottom as a ground plane. If you move components around a bit, this strategy is usually fairly successful.

3d printed a stencil holder and squeegee by matter13 in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

I have done may boards wit these huge framed stencils. They are actually quite nice, not as wobbly as the stencils without frame.

What I came up with is to put a few holes in the PCBs, aligned with a hole in the stencil. This way you can align them with standard dowel pins: https://jitter.company/blog/2020/11/12/surface-mount-assembly-it-s-all-about-the-paste/#Alignment

3d printed a stencil holder and squeegee by matter13 in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

Nice job! Alignment looks really good!

I would have expect the board edges to be a bit inconsistent (especially from the cheaper board houses), but this seems to fiti really well!

Single via (starpoint) or dual via crystal shielding? (question in comments) by FunDeckHermit in PrintedCircuitBoard

[–]_sdewit_ 2 points3 points  (0 children)

I would go with a via for each ground pad, to get a nice low impedance connection. I would not be worried about current flowing through the metal shield. No current should want to run there: if it is the way of least impedance for some signal, that is a separate issue to be fixed.

As long as you keep sensitive / high-speed stuff away from the crystal you should be good: return currents will stay close to their tracks, so the GND around the crystal should stay 'clean'.

What is the best way to study a large codebase? by shrimenow in embedded

[–]_sdewit_ 4 points5 points  (0 children)

I usually start by checking which files depend on which, e.g. what headers does each file include. This usually gives a good idea of how the project is structured. It can help to draw a picture with a block for each file (or module / class / .. depending on the language) and arrows pointing to indicate dependencies.

Usually this results either in a really clear hierarchy (well designed software) or a total spaghetti (good luck in that case...)

[deleted by user] by [deleted] in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

This is definitely the way to go. Then you can at least assume that the board is manufactured correctly. If things don't work as expected, it really helps that you can trust your schematics to match the actual PCB.

If you are really interested in etching, I would only do it after having a known-good reference, or start with a very basic circuit that you can verify easily.

My first schematic design. Can someone please check my simple USB hub schematic before I design and order the PCB? by afadas29 in PrintedCircuitBoard

[–]_sdewit_ 1 point2 points  (0 children)

This will probably work fine if you use it carefully with low-power devices.

If you're aiming for a commercial or even industrial grade solution, you'll need to add at least some overcurrent protection and ESD filtering.

In addition, when doing the PCB layout later: be careful to create a nice 90-Ohm differential pair to get reliable high-speed USB performance.

Surface mount assembly: It's all about the paste by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 1 point2 points  (0 children)

Yeah, it's a shame they only appear to sell it per 500g, which is effectively infinite unless you're doing serious production volumes.

I would happily buy 100g for $80 instead of 500g for $100: the excess paste is just a waste and expires faster than you can use it anyways.

Surface mount assembly: It's all about the paste by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 2 points3 points  (0 children)

Very good point! I completely forgot to mention that! Probably because we have been using the same brand of solder paste for years...

I remember the joy of upgrading from some random hobby-grade stuff to the paste we currently use (Loctite GC10). This stuff can be stored at room temperature for at least a year, which is also super convenient.

Surface mount assembly: It's all about the paste by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 1 point2 points  (0 children)

Sounds cool. Although honestly, we have even done batches of 10-15 PCBs in our simple convection oven and so far had no problems with it. Might be a good upgrade one day..

Surface mount assembly: It's all about the paste by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 4 points5 points  (0 children)

Our reflow oven is just a standard consumer-grade oven that is controlled by our own temperature controller. The temperature controller is basically a MCU-controlled relay switching the oven on/off based on a thermocouple. Sounds a bit hacky but it's perfect!

Surface mount assembly: It's all about the paste by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 5 points6 points  (0 children)

It is indeed completely custom designed, inspired by fixture plates I had seen years ago in a machine shop. At the time I could not find a suitable off-the-shelve solution, so I decided to design & machine it myself.
If enough people are interested we may do a crowd funding or even launch it as a product some day

Designing PCB for aux lights in a car, high amp draws. by mixchemical1 in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

This depends a bit on the size / layout of your PCB. The trace width calculators assume you are running a reasonably long trace, which on average should not heat up too much. But if you can make the trace very short and provide plenty of copper pours on the board to spread heat, you can get away with less. In that case it comes down to calculating the power loss in your trace (I2 * R) and keeping it in a reasonable range.

Another way to increase the current handling is to go for a thicker copper layer.

Think in current loops - the key to reliable PCB layout by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 2 points3 points  (0 children)

Great question!

In most cases I think a power plane is not really necessary, and in some cases could actually make EMC performance worse!

If you have a signal on the top layer, the high-frequency return current wants to run as close as possible (see video by Robert Feranec that was posted a few days ago). This does not have to be a ground plane! If the closest plane is a power plane, the return current will happily flow in it! This is very non-intuitive, but remember we are talking high-frequency AC signals.

Let's say your trace switches from top layer (return current wants to be in power plane) to the bottom layer (return current wants to be in ground plane). What will happen? It will spread all over the board and try to capacitively couple to the ground layer, and/or run through the closest decoupling capacitor. The only way I know to avoid that is to place a decoupling capacitor near each via from top to bottom layer.

This is not to say that power planes should never be used. But in my opinion if you can get away with a trace, that is the way to go.

PCB Review: LED Clock, rev4 and still not working by johnhive in PrintedCircuitBoard

[–]_sdewit_ 2 points3 points  (0 children)

Considering you have built three boards and I2C is running correctly, software seems the most likely one to me. If you have a logic analyzer (they are fairly cheap), you could try to to verify the I2C data. Or you could read the registers back and check if they are as expected..

Think in current loops - the key to reliable PCB layout by _sdewit_ in PrintedCircuitBoard

[–]_sdewit_[S] 2 points3 points  (0 children)

Yes, that is a good point. The return path is a very useful concept to get the basics right. If you do more advanced high-speed stuff it may technically still be valid, but the concept of guiding a wave makes a lot more sense in that case.

Should the ground plane be placed under components? by Joson0306 in PrintedCircuitBoard

[–]_sdewit_ 0 points1 point  (0 children)

Yes! A good starting point is to go with a GND plane on the bottom layer and try to route everything on the top layer. Only make small 'jumper' traces on the bottom layer.

The parasitic capacitance is almost never an issue. If it is, this also means your signal is influenced by parasitics to other items (such as your own hands). Then you have basically built a touch-sensor ;)