Polygon label/ Fill zone

I did a footprint of a interdigital filter related to this topic: Distributed Element Filter Footprint
The device consists basically of transmissions lines connected to CPW lines (in/out). Additionally, I must have a zone without copper around those transmission lines. In order to achieve this on the footprint editor (and to overcome some limitation of fill zone) I created some polygon to define the zone without copper. These polygons are part of F.Cu layer and must part of GND. So, I used the footprint in a layout and I got just this:

It shouldnā€™t have this gap around the polygons, because all the fill zone is GND. However, I donā€™t know how to ā€œlabelā€ this polygon as GND to get everything connected.

** I must have this clearance around tracks due to CPW parameters (impedance).

kicad_mode file:filter-3th.kicad_mod (9.3 KB)

Thanks in advance,
VinĆ­cius

post the kicad_mod file

1 Like

hi,
it took me a bit ā€¦
but as I thought the solution is dirty
attached a board with the fill zone as required (with only 1 pad inserted)

  1. you need to create fill zones with the points from your poly zones
    (with a text editor)
  2. you need to copy the pads and silk from your fp (with a text editor)
  3. you need to adjust all the pads substituting GND with a sequential pad nbr (with a text editor)

just copy the text of fill zones and fp in the board you have and adjust net number

then to move the obj, you need to move fill zones and fp together
filter-3th-fz-edited.kicad_pcb (8.1 KB)
I donā€™t think there is other way to make your poly connected to GND

Iā€™m curious where these lines come from in the OPs kicad_mod file:

(fp_poly (pts (xy 0 -13.5239) (xy 12.259 -13.5239) (xy 12.259 -4.8154) (xy 17.259 -4.8154)
(xy 17.259 -18.9359) (xy -17.259 -18.9359) (xy -17.259 -4.8154) (xy -12.259 -4.8154)
(xy -12.259 -13.5239) (xy 0 -13.5239)) (layer F.Cu) (width 0.01))

I looked in the footprints editor and the symbol editor or pcbnewā€¦ neither of the tools has got a way to create those.
Itā€™s also no wonder that these copper areas wonā€™t connect to a net/zoneā€¦ they have no net option.

I would convert the fp-poly stuff into SMD pads with pin numbers and as you said, give all the PTHs a pin number as well (probably 3), instead of ā€˜GNDā€™.
Should then be possible to have this thing as a footprintā€¦

I think the idea of use multiples pads would work, although it is going to return some errors because I will get the vias crossing the pads. It is a tricky solution but it could solve my problem by now.
@maui I will analyse your workaround when I get my notebook.

Anyway, I am not sure there is a trivial solution to this case.

Not if they got the same pin numberā€¦ the only problem you would encounter with that approach are ratnest/track layingā€¦ but as itā€™s GND plane stuff, no worries.
Btw, check the 3D view of the kicad_mod of yoursā€¦ all PTHs still have got silkscreen circles on themā€¦ donā€™t think you want that (looks ugly and fulfills no purpose).

Yes, it is true. I will modify that, thank you.

bitmap2component
but you cannot assign a net to a fp poly zone, so I suggested to create a FZ from those poly shapes

a nice solution would need a code modification as Marco Hess suggested
https://lists.launchpad.net/kicad-developers/msg18709.html
but this is not an easy path because it involves code reworking-testing

a useful workaround would be to have a tool to convert DXF in a multiple pads module, so it would be easier to have RF parts as footprint
may be @Joan_Sparky could think something about it
:smile:

:stuck_out_tongue_closed_eyes:

I had a short stroll on google thoughā€¦

Graphically they all talk about something like this (with/without holes makes a difference and also what kind of specifications the rectangles need to have)ā€¦

If I find some free time I might actually try this, but donā€™t hold your breath please.
No really, donā€™t hold your breath.

I implemented the idea of substituting polygons by as much rectangular pads as needed to cover the same area. I gave them the number 3 and added a pin on its schematic symbol. Then, I connected pin 3 to GND and regenerated the netlist file.

Here, the footprint:

And here, the result on the layout:

I can say it is a progress however I lost the non-copper zone in the middle part. I donā€™t know how to avoid the fill in this area.

Hmā€¦ quick-fix - place a no-fill zone in the size of the footprint (roughly where the vias are) on the pcb?

I donā€™t think you will be able to ā€˜transplantā€™ something like this into the footprint unfortunately:

(zone (net 0) (net_name ā€œā€) (layer F.Cu) (tstamp 5697C758) (hatch edge 0.508)
(connect_pads (clearance 0.3))
(min_thickness 0.2)
(keepout (tracks allowed) (vias allowed) (copperpour not_allowed))
(fill (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
(polygon
(pts
(xy 126 94.2) (xy 126 98.4) (xy 128 98.4) (xy 128 94.2)
)
)
)

EDIT: NOT WORKINGā€¦
One ideaā€¦ probably not working, but you can tryā€¦
Create a SMD pad, same/similar size as the zone I suggested in the footprint above.
Change itā€™s layer to something like Cmts.User only.
Maybe it keeps the fill out - fingers crossed.

The more practical and useful solution that I got was using keep out zones. It works but I need to define the keep out zone on the layout. So, whenever I move the footprint I also need to do the same with the keep out. Ok, itā€™s not so complicated but itā€™s just a workaround, not a final solution.

Anyway, thanks for your help.
Here, the final result:

1 Like

Currently interested in some of this myself. I find it strange you can draw polygons but not assign them to the copper layer in KiCAD footprint editor?

I suppose this should be an easy fix in the code? No?

RF question: Why CPW for input and ouput and not microstrip? Because of FR4 & 2 layer board?
Not worried about transition from CPW to microstrip filter and back to CPW? (Guess would depend on frequency)

You canā€™t draw filled polygons in the fp editor currently, thatā€™s why I asked up there where those came from.
And even if you get them done via Bitmap2Component module (start via KiCAD main menu), they wonā€™t attach to any net, thus you canā€™t flow or use them really (unless you disable DRC).

One thing is for sure, those DEFs as footprints need a way to draw filled polygons (even with arc outlines) and a way to specifiy no-fill areas. All possible in PCBnew on board level, but not in the FP editor - on footprint level.

IMHO the fp editor needs an overhaul and more options. Dunno when this will happen though as they just went over that part of KiCAD and now focus on EEschema afaik.

1 Like

@Joan_Sparky
if they would add just the ability to add filled poly to a net would solve the pcb issueā€¦ (using Bitmap2Component for designing the poly)ā€¦
I had asked some RF improvements a month ago
https://lists.launchpad.net/kicad-developers/msg21602.html
but unfortunately, as you pointed out, they are focusing on eeschemaā€¦

@tipofthesword
Iā€™d like to start playing a bit with RF/high speed signals, but Iā€™m really a newbie in that fieldā€¦
would you mind to suggest me where I could get some tips to start working with?
I mean I found some tech advice at
https://www.maximintegrated.com/en/app-notes/index.mvp/id/5100
but I was wondering if there is some video/doc about some simple RF circuit design with basic examples, or some nice bookā€¦

Hey, @tipofthesword

Nice questions!
Actually itā€™s possible to assign polygons to copper, you just need to edit the kicad_mod file, thatā€™s easy.

In this project I used CPWG because itā€™s possible to isolate the signal and avoid interference applying stitching vias. Additionally, you can reach the same impedance using CPW with a narrower transmission line width than using microstrip lines, almost two times in this case. This is also important since I have to connect the tracks in tiny smd pads.

The transition between CPW and microstrip is a ā€œcriticalā€ point because there are differences between the propagation modes of the structures. However, I simulated the filter model in an EM software and everything was OK. I also built a prototype and everything works just fine. The frequency in this case is 2.4 GHz.

Good point about the filled polygon. Hadnā€™t realized thatā€¦
I guess Iā€™ll also have to go the bitmap2component route and then edit
manually in PCBnew.

By the way, the PCB board is not complete in the last figure. Every track will be surrounded by stitching vias, not only the filter structure. I doing this part right now and I can point out another good RF feature which would be very good to have in this case: a script to automatic add those stitching vias around the tracks where RF signals are flowing.
Unfortunately, I have almost zero experience with python and Iā€™ve never developed any script for kicad.

+1

and here are your 20+ characters, you /piiep/ forum

@viniciuslbar
have a look here
https://lists.launchpad.net/kicad-developers/msg19528.html


and here
https://lists.launchpad.net/kicad-developers/msg21865.html
you may need to build your version of kicad, but may be you can get some useful tools :smile:
and here some tips to do stitching vias with the stable release

1 Like