How do I get component values on the manufactured PCB?

Hi,

In my default canvas my footprints have a value in yellow (F.Fab) in addition to the component identifier (eF.SilkS).

I assume that I’d have to include a gerber for the F.Fab layer if I want the component values to appear on my manufactured PCB.

Would that then include the yellow component outlines that appear to be a duplicate of those in F.Silk?

I notice that turning off the display of the F.Fab layer turns off the outlines but not the component values.

Thanks.

You can move it to the silk layer if you want. (press e when your mouse is above the component.)
Or you can create your own library where you put a copy of the value on the silk layer (add a user text field with text = %V) Another option is you make your lib such that the values are only on the silk layer.

Why does the kicad library not include the values on the silk layer?
Well in most pcbs you don’t have space left on the silk screen to get the values included. (In a lot of my pcbs i struggle to find enough space for the reference designator.)
For this reason it has been decided to move the value field to the fab layer.

Note that the fab layer is not designed in such a way that it does not create problems if you use it as a silk layer substitute.

  • The reference is inside the component -> not visible after placing the component.
  • The Pin 1 markers are not guaranteed to be outside the component.
  • The part outline represents the real part measurements -> not outside of the component and possibly above copper!

It seems that the value visibility is only controlled via the render tab. The same should be true than for the main reference on the silk screen. (It seems this might be a “feature” of the stable version. In the nightly/development version that i use, the value is not visible if i turn off the fab layer.)

2 Likes

There are two different field types for footprints.

One type are the value/reference field types…

(fp_text reference REF** (at 0.00 1.00 0.00) (layer F.Fab)
(effects (font (size 0.60 0.60) (thickness 0.10)))
)
(fp_text value VAL** (at 0.00 0.00 0.00) (layer F.Fab)
(effects (font (size 0.60 0.50) (thickness 0.10)))
)

Those react to the render tab visibility switches ONLY, not to the layer switches.
You can only have ONE of each in your footprint.

Then there are text fields of type ‘user’…

(fp_text user %R (at 0.00 2.65 0.00) (layer Eco1.User)
(effects (font (size 0.30 0.30) (thickness 0.03)))
)

If you put in %R you get another reference field, if you put in %V you get another value field.
They will act on the layer switches, bot NOT on the render tab switches for visibility.
You can have as many of these as you want.

I don’t know what else is available from the meta information though.
It currently is definitely not possible to get the other fields into PCBnew via those means, but it can’t be impossible, “just some developer needing it” I guess. :nerd:

PS:
on layer usage
x.Fab - outline of packages for documentation purposes
x.CrtYd - overall total outline of part for layout/assembly/machine space
x.Silk - visual guide/info on final board
Dwgs.User - your own decision
Cmts.User - your own decision
EcoX.User - your own decision
Margin - ?!

1 Like

Thanks very much for this. I’ll go with moving the component values to the silk layer.

There’s enough room for the component values on my first boards. I’m sure I’ll not have room on more complicated boards.

Is it usual to include F.Mask even for a single-sided board with wire links on the front?

The mask layer is a negative of the soldermask. You only need it if your pcb is fabricated with a soldermask. (A thin coating that isolates everything that does not need to be blank copper. In most cases everything except pads plus a small area around them is covered.)

If your fabrication method does not include a soldermask, you can ignore it during the fabrication output generation. (I would include it in the footprints though. Maybe later production runs need soldermask.)

In my opinion a good starting point on how footprints or symbols can look like is the kicad library convention. Your personal libraries can differ from this standard of course but i think it gives a good idea of what is important/possible.
(My personal libs for example have a different line width for the fab layer and have the main reference on fab. Only the second reference is on the silk layer. Yours might move the value to the silk layer or have a different font size, …)

As I remember, someone from Library Management team decided as follows:

x.Fab - outline of packages, reference designators and component values for manual assembly or assembly check and for documentation purposes.
x.CrtYd - overall total outline of part for layout/assembly/p&p machine space.
x.Silk - visual info about component (for ex. simple functional diagram of relay) on final board, which should be hide under component. Does not apply for reference designators, boundary outline and Pin1 markings.
Dwgs.User - drawings provided by user for his own purposes.
Cmts.User - comments provided by user.
EcoX.User - comments provided by user for special board manufacturing.
Margin - outline of free space between Edge.Cuts/other obstacles and components courtyard or traces. Something similar to KeepOutLayer in AD. Requested by users.

1 Like

We only allow anything below the component for through hole parts. And for them only if we deem it beneficial for manual board assembly.
(Personal libs can do whatever they want. But i would not suggest putting silk screen below smd parts.)

I’ve moved a lot of component values manually to the silk screen and later found out that is is a lot more effective to edit the footprints and copy them to a custom lib.

Because there is not so much room on PCB’s I put the component values under the component. So for a 1206 resistor you can directly see which resistor value you have to solder, and after soldering you can always look it up from the Reference Number.

Here is a copy of the footprint for a 1206 value I use.
I’ve called this component …_Scheef because the Reference is printed on the silk screen under a 45 degree angle, which made it more readable in my project.
~/project/Footprints.pretty/1206_Scheef.kicad_mod

(module 1206_Scheef (layer F.Cu) (tedit 593B1582)
(descr “Resistor SMD 1206, reflow soldering, Vishay (see dcrcw.pdf)”)
(tags “resistor 1206”)
(attr smd)
(fp_text reference C303 (at 3.429 -0.762 45) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value 100n (at 0 0 270) (layer F.SilkS)
(effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user %R (at 0 0) (layer F.Fab)
(effects (font (size 0.7 0.7) (thickness 0.105)))
)
(fp_line (start -1.6 0.8) (end -1.6 -0.8) (layer F.Fab) (width 0.1))
(fp_line (start 1.6 0.8) (end -1.6 0.8) (layer F.Fab) (width 0.1))
(fp_line (start 1.6 -0.8) (end 1.6 0.8) (layer F.Fab) (width 0.1))
(fp_line (start -1.6 -0.8) (end 1.6 -0.8) (layer F.Fab) (width 0.1))
(fp_line (start 0.762 -1.143) (end 1.905 -1.143) (layer F.SilkS) (width 0.12))
(fp_line (start -2.15 -1.11) (end 2.15 -1.11) (layer F.CrtYd) (width 0.05))
(fp_line (start -2.15 -1.11) (end -2.15 1.1) (layer F.CrtYd) (width 0.05))
(fp_line (start 2.15 1.1) (end 2.15 -1.11) (layer F.CrtYd) (width 0.05))
(fp_line (start 2.15 1.1) (end -2.15 1.1) (layer F.CrtYd) (width 0.05))
(fp_line (start 0.762 1.143) (end 1.905 1.143) (layer F.SilkS) (width 0.12))
(fp_line (start -1.905 1.143) (end -0.762 1.143) (layer F.SilkS) (width 0.12))
(fp_line (start -1.905 -1.143) (end -0.762 -1.143) (layer F.SilkS) (width 0.12))
(pad 1 smd rect (at -1.45 0) (size 0.9 1.7) (layers F.Cu F.Paste F.Mask))
(pad 2 smd rect (at 1.45 0) (size 0.9 1.7) (layers F.Cu F.Paste F.Mask))
(model ${KISYS3DMOD}/Resistors_SMD.3dshapes/R_1206.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)

Is there an automated way to shift all my component values from x.Fab to x.SilkS. Maybe a script ? I don’t want to edit any libraries, I wish to do it as and when I see fit. Having a computer and doing it manually isn’t an option

@dev

(fp_text value 100n (at 0 0 270) (layer F.SilkS)
  (effects (font (size 1 0.8) (thickness 0.15)))
)
(fp_text user %R (at 0 0) (layer F.Fab)
  (effects (font (size 0.7 0.7) (thickness 0.105)))
)

Just let your script search for the text field fp_text value and change it’s layer…

Will it suffice to use the “Plot footprint values” option when plotting?

@Joan_Sparky Thanks the problem is I have no idea how to write the script, I suspected it was possible but I would struggle with implementation.

@1.21Gigawatts It’s no problem to get the values in the Gerbers but they don’t show in a 3d render which is useful to check you have got them in the right place.

That’s what stackoverflow is for (and google) :wink:


.

.
I’m pretty sure even notepad++ would be able to do it with some regex ‘filter’ for the search function.


.

.
So yeah, many ways lead to Rome :wink:

PS: try and give it all you got, then come back here with a bloody nose and ask smart questions - we’re usually pretty good at helping others help themselves :smirk:

1 Like

Haha, fair enough. So before I start my odyssey, can I confirm this can be done from the Python terminal within KiCAD ?

KiCad has the ability to move items such as text and graphics to from one layer (source layer) to another one (target layer) - find this feature from Edit -> Edit Text and Graphics Properties. You have a set of filters, including the ability to only move the items you have currently selected. Unfortunately, the feature has a major limitation - the move is a cut and paste operation. We can not duplicate items from layer to the other.

By default, all footprints have their “Value” field in the Fabrication layer (Fab). When you want to move (cut and paste) these values to the Silkscreen layer, you can use the Edit Text and Graphics Properties interface.

But what if you want component values on both Fabrication and Silkscreen layers? This was my requirement and I learned that KiCad had no easy way of doing it. You have to manually copy items and move them to another layer by accessing properties window.

But I have found a workaround. It is by using an empty layer as intermediatory layer to move duplicated items. Let me show an example.

Assume I have the following state in PCBnew.

  1. Reference fields on Silk
  2. No values on Silk
  3. Reference fields on Fab
  4. Value fields on Fab

Now I want to duplicate value fields from Fab layer to Silk. I can do the following for that.

  1. Isolate the Fab layer from Appearance panel. Now I can only see the content of Fab layer which includes Ref and Value fields.

  2. Drag and select all the text items. This selection can include Ref, Values and other text items. Don’t worry, we can choose a specific type of items later.

  3. Open Edit Text and Graphics Properties and in the Scope pane, select only “Values” because we are interested in moving component values only. Uncheck all others in this pane.

  4. In the Filters section, choose the Fabrication layer on which you have the items to duplicate. For me, this is top Fabrication layer (F.Fab). Uncheck all others in this section. You could use other filters if you want.

  5. From the Action pane, choose an empty target layer, for example User.2. When you press OK, all the value fields from Fab layer will be moved to User.2 layer.

  1. Isolate the User.2 layer and select all items. In my case, this will be all the value fields I want to duplicate.

  2. Duplicate (right click for that) the items you have just selected and move them to an empty area. Now you have the items duplicated but in the same layer.

  1. Now the trick. If you check the property of a footprint now, you can see the newly duplicated item appears as a variable ${VALUE}. This is because we duplicated the value field. KiCad was smart enough to replace the duplicated item with a variable instead of the absolute text value. This is useful because whenever you change the value of a footprint, this will be reflected everywhere where you have the placeholder variable. Even if Kicad didn’t do that, you can still use the “Only include selected items” filter.

image

  1. Now select the duplicated set of items from User.2 layer and open Edit Text and Graphics Properties again. This time, choose Other footprint text items from Scope pane. This will only select values with ${VALUE} field. You can also choose “Only include selected items” filter.

Then choose the target layer as F.Silk as shown above and press OK. Now all those duplicated items will be moved to Silkscreen layer. We have done it. All you have to do now is to reposition the newly moved items to the desired position by selecting all the text.

  1. As a residue of this operation, you will have value fields left on the User.2 layer. You can easily move them to the Fab layer with Edit Text and Graphics Properties tool.

All these headache can be avoided if KiCad’s Edit Text and Graphics Properties dialogue had the option to copy/duplicate operation in addition to the move operation. Hope this feature will be added in future versions. I was using the latest KiCad Nightly version for this btw.

I posted this in this old thread only because it was the first result on Google when I searched for the solution.

1 Like

Thank you… it is quite a task

1 Like

Hi Hipocrates, welcome to this forum, and kudos for searching the forum instead of just opening a new thread.

Retiredfeline closed this thread because reviving old topics is usually not recommended on this forum because KiCad development is occurring at a quite quick pace and 6 year old threads are rarely still relevant.

And regarding your “Quite a task” remark. It’s quite easy and common to make custom footprints to your personal wishes with all the changes in place and put them in a personal library. Then you can just use those footprints.

But for the next time, it’s usually better to start a new topic with a specific question, and then possibly link to an old thread for some background information.

(I can still respond because I have super cow powers).

1 Like

What is the question you wish to ask @Hipocrates ?

1 Like