Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:02 29 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Converting a ratsnest to a tracked PCB.

Author Message
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 10:51pm 17 Apr 2023
Copy link to clipboard 
Print this post

Hi all,
I'm about to start routing a PCB. I have a schematic and a ratsnest, and am wondering how to start the track layout.  ( For better or worse I am using KiCad 7 !)

The board has 2 ADC's for voltage and current measurement and 2 DAC's for offset nulling of the ADC's, with a signal conditioning op-amp for each, and a relay each to switch a calibration input in to replace the V or I input. Also an assortment of resistors and caps. A prototype on solderless breadboard worked well.

I am thinking of using a 2-layer board, with a ground plane on one side, and the majority of tracking as far as possible on the other.

There are some very skilled board "layouteers" here - can you offer any advice to a total newbee on an approach to untangling the ratsnest to tracks ?

With thanks, Paul.
Nothing so constant as change.
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2132
Posted: 11:39pm 17 Apr 2023
Copy link to clipboard 
Print this post

circuit would be useful. Must it be pcb or vero ok?
 
Andy-g0poy
Regular Member

Joined: 07/03/2023
Location: United Kingdom
Posts: 59
Posted: 11:58pm 17 Apr 2023
Copy link to clipboard 
Print this post

First of all there is no hard and fast rule regarding the layout.
It really depends on the circuit and what that requires.

Ground plane - why? do you NEED one.

If you use a ground plane you are limiting your routing options.

It is common practice to fill each side with a copper pour (zone on kicad) this is often to simply reduce the copper to be etched away, with is more "environmentally nice" Kicad will do this for you, so don't worry about it at first.

It is common to connect a zone to a net usually ground, but you can have zones connected to power or isolated as demanded by the design.  

I usually start by shoving the footprints on the board and juggle them about until I see the beginnings of a convenient routing start to form while looking at the ratsnest lines. Usually the chips are pretty logical and things tend to work fairly easily.

Think about input and output connections. Having wires exiting from all sides of a board  can be a pain

Be prepared to redo the layout several times, as you WILL find your self saying "why did I put that there" :-)


Once you get a reasonable placement of the components you can start routing. Don't worry about the ratsnest, as you route that will automatically reduce. When there are no more ratsnest lines you have the routing done.

Bus type connections are fairly easy, and quickly reduce a ratsnest. A classic method is to bring the bus out from one chip turn a right angle and lay the traces down towards the next chip on the bus and then onwards to the next. You pop onto the second layer to connect the intermediate chips to the bus.

A very common layout method is to have the traces running at right angles to each other on each layer. Note that not all circuits lend themself to this, but most do.


Do not use micro thin tracks unless you need them. Most of the "kitchen sink" projects I do generally use between 0.25 and 1.5mm tracks for general routing. Obviously heavier tracks for higher current use.

Once you get everything connected up, have a close look at it and see if shifting things about would be helpful.

Now the hard part.

Check the circuit carefully - then check it again, then recheck it. Get someone else to check it...

There is nothing worse than getting a set of boards back form the pcb house, only to find that you transcribed the circuit incorrectly and put the measuring bridge connection on the wrong point. Don't ask how I know this :-)

Make sure that the DRC and ERC rule checks come out clean.

As you are a newcomer to this, don't try to do too much at first. Having a "play" at laying out a few simple circuits first will really help, it will get you used to the kicad toolkit, which is a little different to others, but there is nothing wrong with it. I've been using it for years...

From the sound of your design you will not have to mess about with creating your own footprints and symbols, but that is a skill that you will need in the future. It's not hard, I am, constantly surprised when I see requests for "has anyone got a footprint / symbol for a BC108, 74lS, relay xyz" then it goes on for a day or two.

Drawing up the footprint would have only taken 15 mins in the first place!)

There is one thing that you will run in to in kicad that will confuse you (unless you have run into it before) You may get errors saying that net xyz is not powered or something like that. In order for the ERC to work, it checks to see if various lines are connected to power. A power OUT pin provides power, and obviously power IN pins take power. There can only be one power OUT on a net.
The pin types are defined on the circuit symbols.

Power outs are generally things like batteries - however when you provide power externally you have to tell the ERC that the connection where the power comes from is powered. All you need to do is add a symbol called a power flag to that line. You will find that symbol in the power port lib.  That's the ground symbol on the right hand toolbar. The bit that really confuses is that ERC defines Ground as a power OUT so you need power flag on that as well. You must only have ONE power flag per net.

I often end up with the power input in the top left of the circuit, with a +5 port or whatever on it. Also that's where I put the ground input. On each of those I have a power flag. That keeps things tidy.

As I said. Have a play with the system first, practice simple layouts, zone fills and so on, and shout if you get stuck.

Andy
 
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 12:52am 18 Apr 2023
Copy link to clipboard 
Print this post

Hi stanleyella and Andy,
Thanks for your replies. My plan is to use this as a PCB learning exercise as much as a practical project. I plan to put the circuit onto a soldered breadboard next, which is a mimic layout of the solderless board I am currently using, with the view to going to a PCB in the future.

As you say Andy - you have to start somewhere, so I'll start with some supplies/ground and see what complications that solves/causes. I suspect that a ground plane woun't be needed if I can ground enough zoned areas round critical signal nets.

I found for the solderless layout that screening some signals such as the ADC/DAC reference voltage and cal. levels helped reduce erratic measurements, so was thinking that an earth plane would help here without such screening.

The circuit is controlled by an MM Explore 28, linked to an MM+ Explore 100 backpack, which caused significant noise issues from the TFT screen until isolated.

Thanks for your offer of further advice if I get stuck.

With best regards, Paul.
Nothing so constant as change.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 06:38am 18 Apr 2023
Copy link to clipboard 
Print this post

KiCAD almost drove me bonkers...  :)
It's a great piece of software but the manual appeared (to me anyway) to have been written by someone with an incredible amount of experience and wasn't really suitable for beginners. It's also huge.

It's years ago that I played with it and things may have moved on now. And I know why people look for ready made footprints for components - if you want to use the 3D view you have to create a 3D model in some other (usually insanely complex) 3D modeller and link files for the schematic symbol, footprint and model in several different menus that seem to be buried. I didn't find it easy to steal a footprint from a different component either. Eventually I gave up and moved to what was then a free version of Eagle, which was much more friendly. That's more or less gone now, since AutoDesk decided to monetize it for all that they could.

If you can learn to get along with KiCAD then it's probably well worth it. It has a lot going for it - it's up there with the best, but the learning curve was simply too steep for me.

Copper pours can work very well for grounds - and can simplify routing - but you may need to link a few areas with tracks on the other side. Don't expect the autorouter to either complete the board or make a good job of it. Autorouters give you a good start, but you can then spend ages modifying some of their silly layouts. It's up to you to work from your ratsnest to make the connections as short as possible in most cases. That will encourage the autorouter to complete as many routes as possible. On simple boards you are probably better routing by hand from the start as an autorouter can make a right shambles of them..
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3815
Posted: 10:17am 18 Apr 2023
Copy link to clipboard 
Print this post

  Bowden_P said  Hi all,
I'm about to start routing a PCB. I have a schematic and a ratsnest, and am wondering how to start the track layout.  ( For better or worse I am using KiCad 7 !)

Just checking, but did you see this thread ?

John
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4253
Posted: 11:11am 18 Apr 2023
Copy link to clipboard 
Print this post

In case you are using DAC's to correct ADC offset (and not a software calculation, removing the ADC offset) you are most likely trying to measure small voltages on top of larger DC voltages (something like ripple on a 5Vdc bus or so).

In that case I would definitely look at layout propsals that are in the datasheet of the ADC. In many cases analog ground and digital ground are separate (planes ?), just tied together in one spot. (sometimes through a 0 ohm resistor, that you could replace by a ferrite bead to create a noise free analog ground plane).

Do put good decoupling (i.e. capacitors) close to the power pins of ADC and DAC towards the ground plane of interest (digital pins to digital ground, andalog power pins to analog ground).

Put series resistors in all the digital lines. Especially in SPI busses (i.e. 100 ohm). It can help you getting noise free.

Route analog signals to one side of the board, and digital to the other side. Make sure analog and digital signals stay separate as much as possible.

Make sure your ADC and DAC logic levels are compliant with the microcontroller that drives them. Do not drive 5V signals toward a 3.3V DAC or ADC, it may work, but will be exteremly noisy.

Volhout
Edited 2023-04-18 21:16 by Volhout
PicomiteVGA PETSCII ROBOTS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3152
Posted: 01:34pm 18 Apr 2023
Copy link to clipboard 
Print this post

Very good summary, Andy.

A few things I generally do after the components are placed and oriented as I think makes most sense:

1) Set the grid step size--with most parts used by hobbyists having pins on one-tenth inch centers, a step size of half of that works for me--.05 inches. This will make it easier to run traces between pins .

2) Route the power and 0V lines--typically around the perimeter as possible to be out of the way of signals and on opposite sides.

3) When bringing the signal traces out, take them out at least a step past the pads before angling in any direction. If you haven't done that and you decide you need to move the part, some moved traces may cross adjacent pads. If your angles are away from the pads, the routing software is likely to make cleaner adjustments.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9139
Posted: 01:49pm 18 Apr 2023
Copy link to clipboard 
Print this post

Some things I do now which may not be best practice but work for me (CMM2 G2, PicoMite etc.):

I connect all the power as much as possible on the top of the board. Gnd connections for SMD parts I just route a trace to a via. GND connections for a through hole part - ignore.
Then I route as many signal connections as possible on the top layer only using the bottom and vias when absolutely necessary
Finally, I copper flood the bottom as a GND plane. This typically makes nearly all of the GND connections. In case of the odd island in the GND plane then a simple connection on the top surface makes the connection.
 
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 07:21pm 18 Apr 2023
Copy link to clipboard 
Print this post

Thanks for all your replies.

Mixtel90 - I agree with your comment about manuals. KiCad's manuals appear thorough, but as I have found with many manuals - they are written by an experienced user, and can be puzzling for a beginner. I sometimes wish a few appendices showing examples would help.

JohnS - Thanks for the link to Peter's experience with EasyEDA. Is that program tied to JLC for manufacture  - or just coincidentally recommended by them?

I must say I am impressed by the 3D capability and the availability of schematics and footprints. I have already had to create a footprint for the relay I used for cal. (Modded from an existing one in the library.) KiCad "only" has some 19,000 symbols in its library - sounds a lot, but really that's quite small.

Volhout and Lizby - Thanks for the ideas about separation of analogue and digital areas/grounds, good decoupling, routing, and series resistors where SPI lines are used. I have an SPI bus to both the ADC's and the DAC's. I put a series resistor/capacitor l.p.f. in the ADC's SDO output pin for noise reduction on the solderless breadboard.

Peter - interesting design approach - born of experience! Thanks for sharing. Neat idea to get ground plane/connections by flooding.

I can't see any reference to an autorouter in the KiCad manual - just guiding when drawing tracks. I haven't got that far with KiCad, so perhaps I'll look at EasyEDA.

Just for your amusement - here is a picture of the overall project so far, and the front row schematic. It's all been through a few revisions to get here! All the green wires are ground links to ensure a good ground in this layout.





V-I Meas.pdf


With best regards, Paul.
Edited 2023-04-19 05:37 by Bowden_P
Nothing so constant as change.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3815
Posted: 08:11pm 18 Apr 2023
Copy link to clipboard 
Print this post

  Bowden_P said  JohnS - Thanks for the link to Peter's experience with EasyEDA. Is that program tied to JLC for manufacture  - or just coincidentally recommended by them?

I don't know, but I suspect just coincidental.

Peter may know.

John
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3152
Posted: 08:15pm 18 Apr 2023
Copy link to clipboard 
Print this post

EasyEDA, in my limited experience, lives up to its name. Yes, it is offered to be compatible with JLCPCB, and if you design using their components, JLCPCB will make a populated board for you (at a cost).

(That is quite a layout--good luck.)
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6812
Posted: 08:17pm 18 Apr 2023
Copy link to clipboard 
Print this post

AFAIK it's not tied to JLCPCB. It just happens to produce Gerber and Altium format files.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024