Go Down

Topic: Advanced auto-routing software? (Read 444 times) previous topic - next topic

robfocus

Sep 18, 2019, 10:18 am Last Edit: Sep 18, 2019, 10:57 am by robfocus
Recently I've enjoyed learning how to use Eagle, and then (when I hit the board size limit), I moved to KiCad, both are great bits of software.

In Eagle I played with the auto-routing tools and it seems that maybe it works well for boards with mostly passive components and few pins, where there is only really one way to wire things together.

However when using micro processors and some ICs like multiplexers etc, there can be many different wiring permutations and the power of manual trace routing seems to come from going back and forth between your schematic and pcb layout, modifying pin assignments and then improving your traces. Especially for single-sided boards, it seems impossible to wire anything but an elementary circuit without using that technique.

So this got me thinking, is there a more programmatic alternative to designing boards?  Instead of hooking pins together with a wire in a schematic view, you would have to say something equivalent to "I need a trace between a digital pin on device A (e.g. an AVR) and pin 0 on device B (e.g. a mosfet)", after having specified all your constraints that way, it can be viewed as a gigantic optimisation problem which the computer can crunch.  At the end of it you'll obviously have to go back and modify the code you run on your AVR etc to reflect the chosen pin assignments.

Does anything like this exist?

EDIT:  aside from pin assignments, there are also big variables like relative component position and orientation, all of these variables could be expressed and go into the solver.




zwieblum

That's exactly how the internals work. Just the optimisation part tured out to be verry hard, so it's easier to get humans to solve it.

robfocus

#2
Sep 18, 2019, 05:07 pm Last Edit: Sep 18, 2019, 05:12 pm by robfocus
No doubt it does, but my question is more whether any software actually opens up the pin assignment as a variable rather than a constant, so you specify the type of pin that needs to be connected, not the specific one.

It definitely going to be an extremely tough optimisation space, but even if it's just trying random permutation (and then running the existing algorithm), it could probably find solutions to route boards where current auto-routing fails.

Are you saying this kind of thing has been tried and didn't work out?

Doing it by hand is pretty satisfying, it has to be said, though.

DVDdoug

Usually the LAST thing you want is to deviate from the schematic. ;)   I suppose it could be made interactive to automatically update the schematic at the same time but that seems a little "dangerous".   

And typically, if you change the inputs you'd have to change the outputs so there's have to be enough intelligence to do that.  And, sometimes if you change the pins you have to change the programming of the device.

robfocus

Yes definitely, the schematic view would have to change a little, and there would have to be a way to feed the pin selections back into any device code that needs recompiling.

I've been trying to make some pretty complex single-sided boards lately (for CNC milling) so it got me to thinking about this, I can do double sided but the whole process is a bit error prone as it is, so I end up redesigning the layout over and over to try to keep it on one side only.

raymw

I have a spray etch tank, used to use it a lot ten years or so ago, used to use eagle. Bigger boards, I'd treat as two single boards, just made sure tracks lined up at edges, then merged the prints together. Used their gerber files, for milling, but not in anger. Double sided is not that bad, - drill a couple of holes, then have two pins to locate it when turned over, but easier, as you say, to get as much as you can on one side, and wire links, or through hole components judiciously placed to over come the single sided restrictions.

For milling, my recent venture is with fritzer - it produces gerber files, the auto routing is not good, but none of the cheaper routing packages will be. As the boards are quite crude and simple, I use an 0.8 mm routing bit to drill (actually pocket out the holes) to 0.95mm and route out the tracks/pads, which gives me a usable pcb in one operation. The cheap tapered single flute pcb router would be better for the tracks, but drilling would be a second op. I used to enjoy correcting the auto routing tracks, could often get an eagle double sided pcb to single side and a couple of links, I saw it as an art form.

Wrt your special pin selection software, it is probably only under used uP's that have a choice of pins, and you would have to specify which pins could be used, and the software would need to communicate back to you its choice. I'm not sure that could be easily done graphically, and it could make an interesting net list. If it is a single uP, with a few spare pins, then just run different net lists, if you can get at that in the pcb design software.

Qdeathstar

recommended reading for anyone considering milling there own PCBs...

https://forum.electricunicycle.org/topic/11205-milling-pcbs-with-cheap-chinese-desktop-cnc-router/
A creaking creeping shadow
stiff against the freezing fog
glares at a tickless watch.

Time has failed him -- all things shall pass.

raymw

Afaik eagle uses a sort of monte-carlo routing algorythm, e.g. it randomly or otherwise decides which tracks to start laying, then when it can't lay all tracks it rips them up and starts again in another order, and eventually it presents its best result. Altering the track parameters, spacing etc. (it must be ten years since I used it last) effects how quickly it will come up with a suitable layout. For double sided, it does one side primarily e-w, the other n-s, you can always get to where you want to with that. There were some parameters, which were important to me, that I could not adjust in the way I wanted, e.g. I  wanted tracks to avoid passing between  adjacent dil pads, but iirc, the autorouting would take the shortest route. If you give more options for pin connections, then the time taken to autoroute will most like go up as a square (just a gut feeling but if going from a to 1 originally, then a to 1 & 2 then a+b to 1 +2  the time will be related to the options available, so could be 1 , 2, 4 minutes/whatever). And the autorouting generally presents the first solution, not necessarily the best, certainly not the 'prettiest'. But, your first requirement would be easily doable, and easy to specify. It would be more tricky to try and get it to lay out the components based on what could be placed next to other components.
Maybe learn code, and write it yourself, it would be interesting. I would possibly have done it twenty years ago, but I have little requirement now.


wvmarle

I've given up on autorouting and doing it by hand. Double sided PCB always (same cost as single sided but so much easier for anything but the simplest designs).

Start by placing the main components in a sensible place/rotation looking at the rat's nest in KiCAD, make it as unentangled as possible, and at the same time looking at physical restrictions (space between connectors etc).

Then manually routing - tedious but gives the best result, takes about as long and nicer end result compared to trying to clean up an autorouter mess - and all the while changing pin assignments. Many outputs of the microcontroller are equivalent (but not all, of course), same goes for ICs like port extenders. Of course code has to follow this, but that's why you have of course all your pins defined at the top of your code so it's a quite simple change.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

DrAzzy

#9
Sep 24, 2019, 01:46 am Last Edit: Sep 24, 2019, 01:59 am by DrAzzy
I'm with wvmarle on this. Manual routing and pinout aware design (when I make eagle libraries, I always make the pinout OG the symbol match the part (rather than logically reordering the pins like some do) so while I'm doing the schematic,  i have an idea of how bad/good the routing will be.

Autorouters aren't very good at their job. My father likes to tell the story of when the manufacturer supplied autorouter routed a trace on the board (a very, very expensive board - 6-figures I think; it was a while back and absolute top of the line board at the time, a bajillion layers, fine pitch, impedance controlled and huge) outside the board area. They were not happy when the boards came back.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

wvmarle

I'm with wvmarle on this. Manual routing and pinout aware design (when I make eagle libraries, I always make the pinout OG the symbol match the part (rather than logically reordering the pins like some do) so while I'm doing the schematic,  i have an idea of how bad/good the routing will be.
I stick to the logical layout for pins. Makes it so much easier to find the pin of interest when making the schematic.

A bit more work later maybe, but just now done with a board where 16 pins go to 16 connectors, and the physical layout of those connectors also affect the routing and the order at which you connect those pins. If you have banks of pins (e.g. 8 or 16 I/O pins on a chip) they're usually placed in order anyway. I have had to completely reverse a bank of 8 to not have them all cross each other, but go nicely in parallel.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Grumpy_Mike

Quote
but my question is more whether any software actually opens up the pin assignment as a variable rather than a constant, so you specify the type of pin that needs to be connected, not the specific one
Only in respect of ICs with multiple gates in the one package, or for example the choice of any one of three inputs to a logic gate.

I believe the Altium package does this. They did mention it on a sales day I attended about 10 years ago. Mind you they were after about £10 K for the suite of programs. It is not something you will find on a free piece of code. Most auto routing will allow you to route one node at a time.

Go Up