Do people spend a lot of time sorting the Kicad rats nest before running freeroute?
Is there a methodology for doing the sort out that leads to a better Route plan?
Rob
Do people spend a lot of time sorting the Kicad rats nest before running freeroute?
Is there a methodology for doing the sort out that leads to a better Route plan?
Rob
Ha, here I was routing things manually like some kind of caveman. Definitely going to look into freeroute and give it a try.
Even before doing manual routing I do spend some time placing components. Usually I start with UI bits, like pots, sliders, jacks, switches, buttons and leds. The I’ll try and layout the components around all that in a way that matches the functional blocks of the schematic and try and group pads on the same nets in a kind of signal flow manner. I imagine I’d do the same thing before auto routing. Would probably also manually route power nets first but maybe freeroute has some special handling for that? I’ll try it out and report back.
Cheers,
Jared
Learned allot since the initial post, i tend now to layout similar to the actual schematic where I can.
That approach definitely helps when you’re trying to squeeze lots of thruhole stuff onto a tiny board
Gave freerouting a shot (v1.4.4) - can’t say I’m convinced.
I couldn’t find an easy way to stop it routing my GND net which I usually do with copper pours in Pcbnew.
I kind of made it do that by selecting the inverse of GND and then clicking auto-route, but it was still getting itself into trouble and wasn’t doing multiple passes of rip up and opt to fix it.
I ended up hacking the .dsn file to remove the GND connections - which seemed to work a lot better. Anyone know how to get it to do that without an editor?
I also like to route wide principal power rails - and then branch out to individual pins small if needed - couldn’t see a way of doing that. It did do a better job of the signal routing if I routed the rails by hand first though.
I can’t seem to get a detailed report out of kicad/pcbnew on total track length etc, but comparing via count and track count on a recent design I did (86 nets, 263 pads) I see:
Manually routed: 32 vias and 408 track segments
Freerouting: 23 vias and 427 track segments
There are a couple of suspicious looking routes in the auto-routed version, but it does pass DRC.
Not sure I care enough to get this board remade to do any kind of testing, but maybe next time I will give it a shot and see if it can’t speed things up - maybe do 80% of the grunt work and then manually clean up the rest.
In any case - fun thing to set up and might be of some use in the future.
Cheers,
Jared
Haven’t tried them all, but autorouters tend to route GND to make sure everything’s actually connected, and then apply the pour on top of that. Avoids GND islands.
Yeah - I get that - but I don’t want the ground nets to make it difficult/impossible to cleanly route my signal nets. I know I’m going to have front/back copper pours, and so far I’ve been able to attach every GND pad with pours and a couple of strategically placed vias to connect up any floating islands. Maybe not the most precise way of going about it but it seems to have worked okay so far.
I did read somewhere that anywhere you rely on ground being clean you should individually route that back to the power supply or board connector - i.e. don’t pollute the analog signal ground with nasty digital noisy ground - but I’m not that picky yet…
Maybe if there was some way to give nets priority in freerouting I could tell it to do GND last or something, and at least hacking the .dsn to remove the GND connections seemed to have worked - after importing that into Pcbnew the pours worked like normal.
Did you try filling a copper zone for GND before routing?
Hmm, it worked automatically for me. I drew a grounded fill before exporting the DSN and it didn’t try to otherwise route grounds.
If your power rails are in a net class with wide default track widths, then it’ll make those tracks wide. Though if for instance you want a +12 V going to a resistor as a reference voltage and want that track to be narrow, it’s not obvious to me how to make that happen. Maybe the latter’s what you meant.
Unless they are different nets then there is no way for the router to know,
but you can lay our tracks before routing and specify their width, the router leaves them alone.
Thanks guys - that was fairly obvious in hindsight - worked a treat. Need to make sure you redo the pours in Pcbnew after importing the session - there was the same floating GND island problem, nothing a few vias didn’t fix. Now the autoroute version has 22 vias and 408 tracks. Is that a win?
So yeah, I’ve been trying this out.
There’s a plugin that makes it a lot less tedious, it handles exporting the DSN, opening freerouting, and importing the SES. Unfortunately it apparently works only with the nightly KiCad build — which I also installed. It’s a preview of Version 6 and is quite different from Version 5. You can install both nightly and stable versions. Note that files written by the nightly can’t be read by the stable version (though vice versa works).
I never use autorouting. I like to know the mistakes are mine, not a machine. This process isnt for everyone though.
I found I could make the freerouting plug in kind of work with the stable version of KiCad by making the following changes:
50,51c50,51
< if os.path.isfile(self.module_input):
< os.remove(self.module_input)
---
> # if os.path.isfile(self.module_input):
> # os.remove(self.module_input)
57,65c57,66
< ok = pcbnew.ExportSpecctraDSN(self.module_input)
< if ok and os.path.isfile(self.module_input):
< return True
< else:
< wx_show_error("""
< Failed to invoke:
< * pcbnew.ExportSpecctraDSN
< """)
< return False
---
> return True
> # ok = pcbnew.ExportSpecctraDSN(self.module_input)
> # if ok and os.path.isfile(self.module_input):
> # return True
> # else:
> # wx_show_error("""
> # Failed to invoke:
> # * pcbnew.ExportSpecctraDSN
> # """)
> # return False
103,111c104,113
< ok = pcbnew.ImportSpecctraSES(self.module_output)
< if ok and os.path.isfile(self.module_output):
< return True
< else:
< wx_show_error("""
< Failed to invoke:
< * pcbnew.ImportSpecctraSES
< """)
< return False
---
> return True
> # ok = pcbnew.ImportSpecctraSES(self.module_output)
> # if ok and os.path.isfile(self.module_output):
> # return True
> # else:
> # wx_show_error("""
> # Failed to invoke:
> # * pcbnew.ImportSpecctraSES
> # """)
> # return False
153c155,156
< return hasattr(pcbnew, 'ExportSpecctraDSN') and hasattr(pcbnew, 'ImportSpecctraSES')
---
> return True
> # return hasattr(pcbnew, 'ExportSpecctraDSN') and hasattr(pcbnew, 'ImportSpecctraSES')
With these mods you still have to manually export the DSN from KiCad before routing and import the SES after. But that’s easy enough, with the system standard file dialogs defaulting to the project directory. The business of launching freerouting, importing the DSN, and exporting the SES is handled by the plugin, and that’s the tedious bit, especially if your KiCad projects are buried as far down the directory structure as mine tend to be (the non system file dialog defaults to your toplevel home directory).
It works for me, anyway. No guarantees.
Looks like fun. I think I’ll stick to manually invoking the thing, don’t want to risk breaking my mostly functioning flow right now.
Just have to decide what I want to layout next - I’ve got a couple of filter schematics I want to breadboard up first. Other ideas include a “noise source, S&H, portamento” module, or getting in on the game from the Envelope followers thread…
Cheers,
Jared