リファレンス・マニュアル

このドキュメントは以下の貢献者により著作権所有 © 2010-2015 されています。あなたは、GNU General Public License ( http://www.gnu.org/licenses/gpl.html ) のバージョン 3 以降、あるいはクリエイティブ・コモンズ・ライセンス ( http://creativecommons.org/licenses/by/3.0/ ) のバージョン 3.0 以降のいずれかの条件の下で、配布または変更することができます。

このガイドの中のすべての商標は、正当な所有者に帰属します。

*貢献者*

Jean-PierreCharras, FabrizioTappero

翻訳

miettal <iharahiromasa AT gmail.com>, 2015. starfort <starfort AT nifty.com>, 2015. Norio Suzuki <nosuzuki AT postcard.st>, 2015. yoneken <yoneken AT kicad.jp>, 2011-2015. Millo, Zenyouji, Silvermoon, Nekokuni, 2011-2012.

フィードバック

このドキュメントに関するコメントや提案をKiCadメーリングリストに送ってください : https://launchpadnet/~kicad-developers

発行日とソフトウェアのバージョン

2014年3月17日 発行

1. Pcbnew 入門

1.1. 説明

Pcbnew は、Linux、Microsoft Windows や Apple OS X オペレーティングシステムで使用可能な強力なプリント回路基板用ソフトウェアツールです。Pcbnew は、プリント基板作成のための回路図キャプチャ・プログラム Eeschema と連携して使用されます。

Pcbnew は、フットプリントのライブラリを管理します。各々のフットプリントとは、ランドパターン(基板上に配置されたパッド)を含む物理的なコンポーネントを示す図です。必要なフットプリントはネットリストの読み込み中に自動的にロードされます。フットプリントやアノテーションは回路図で変更可能で、ネットリストを再生成して再度 Pcbnew へ読み込ませると反映されます。

Pcbnew provides a design rules check (DRC) tool which prevents track and pad clearance issues as well as preventing nets from being connected that aren’t connected in the netlist/schematic. When using the interactive router it continuously runs the design rules check and will help automatically route individual traces.

Pcbnew は、ラッツネスト表示という図面上で接続されているフットプリントのパッドを接続する細い線を提供します。これらの接続は、配線とフットプリントの移動に追従して動的に動きます。

Pcbnew は、配線設計を補助するための簡単ながら効果的なオートルータを持っています。より高度な外部のオートルータを使用するために、SPECCTRA dsn フォーマットのファイルをインポート/エクスポートすることも出来ます。

Pcbnew は、高周波回路基板設計のための特別なオプション(例えば台形や複雑な形のパッド、プリント基板上のコイルの自動レイアウトなど)も提供します。

1.2. 主要な設計上の特徴

Pcbnew は 1 nm の内部分解能を持っています。全ての寸法は、nm 単位の整数値で保存されます。

Pcbnew は 32 の導体レイヤ、14 のテクニカルレイヤ(シルクスクリーン、ソルダマスク(レジスト)、コンポーネント接着剤、ソルダペースト、基板外形)、さらに 4 つの予備レイヤ(図形とコメント)を扱い、リアルタイムでの未配線のラッツネスト(細線表示)を管理します。

The display of the PCB elements (tracks, pads, text, drawings…) is customizable:

  • 塗り潰しまたはアウトライン表示。

  • 配線クリアランスの有無。

For complex circuits, the display of layers, zones, and components can be hidden in a selective way for clarity on screen. Nets of traces can be highlighted to provide high contrast as well.

フットプリントは 0.1 度刻みで任意の角度で回転できます。

Pcbnew includes a Footprint Editor that allows editing of individual footprints that have been on a pcb or editing a footprint in a library.

The Footprint Editor provides many time saving tools such as:

  • ナンバリングしたい順にパッド上へマウスをドラッグするだけの高速なパッドナンバリング。

  • LGA/BGA や円形のフットプリント用の長方形と円のパッド配列を簡単に作成。

  • パッドの行や列の半自動配置(配列ツール)。

Footprint pads have a variety of properties that can be adjusted. The pads can be round, rectangular, oval or trapezoidal. For through-hole parts drills can be offset inside the pad and be round or a slot. Individual pads can also be rotated and have unique soldermask, net, or paste clearance. Pads can also have a solid connection or a thermal relief connection for easier manufacturing. Any combination of unique pads can be placed within a footprint.

Pcbnew easily generates all the documents necessary for production:

  • 製造用出力:

    • フォトプロッタ用ファイル(ガーバー RS274X フォーマット)。

    • 穴あけ用ファイル(EXCELLON フォーマット)。

  • プロットファイル(HPGL, SVG, DXF フォーマット)。

  • プロットとドリルのマップ(POSTSCRIPT フォーマット)。

  • ローカルプリンタ出力。

1.3. 一般的な注意事項

Due to the degree of control necessary it is highly suggested to use a 3-button mouse with pcbnew. Many features such as panning and zooming require a 3-button mouse.

In the new release of KiCad, pcbnew has seen wide sweeping changes from developers at CERN. This includes features such as a new renderer (OpenGL and Cairo view modes), an interative push and shove router, differential and meander trace routing and tuning, a reworked Footprint Editor, and many other features. Please note that most of these new features only exist in the new OpenGL and Cairo view modes.

2. インストール

2.1. ソフトウェアのインストール

インストールの手順は、KiCad のドキュメントに記載されています。

2.2. デフォルト設定の変更

デフォルトの設定ファイル kicad.pro は、KiCad インストール・ディレクトリ下 kicad/share/template にあります。このファイルは、すべての新規プロジェクトの初期設定として使用されます。

This configuration file can be modified to change the libraries to be loaded.

以下のようにします:

  • 直接あるいは kicad を使って、pcbnew を起動します。Windows では C:\kicad\bin\pcbnew.exe`(ユーザ環境によって変わります) 、そしてLinux ではバイナリが `/usr/local/kicad/bin にある場合、 /usr/local/kicad/bin/kicad あるいは /usr/local/kicad/bin/pcbnew で起動できます。

  • “設定” メニューより ”フットプリント ライブラリの管理” を選択します。

  • ロードするライブラリ一覧を編集します。

  • 変更されたコンフィグレーションを kicad/share/template/kicad.pro に保存します。( “設定” メニューより ”設定の保存” )

2.3. フットプリント・ライブラリの管理: 以前のバージョン

設定メニューからライブラリリストの初期設定へと進めます。:

images/ja/Library_list_menu_item.png

下の図はフットプリント・ライブラリ・リストを設定するダイアログです。

images/ja/Footprint_library_list.png

You can use this to add all the libraries that contain the footprints required for your project. You should also remove unused libraries from new projects to prevent footprint name clashes. Please note, there is an issue with the footprint library list when duplicate footprint names exist in more than one library. When this occurs, the footprint will be loaded from the first library found in the list. If this is an issue (you cannot load the footprint you want), either change the library list order using the "Up" and "Down" buttons in the dialog above or give the footprint a unique name using the footprint editor.

2.4. フットプリント・ライブラリの管理: .pretty リポジトリ

As of release 4.0, Pcbnew uses the new footprint library table implementation to manage footprint libraries. The information in the previous section is no longer valid. The library table manager is accessible by:

images/ja/Library_tables_menu_item.png

The image below shows the footprint library table editing dialog which can be opened by invoking the "Library Tables" entry from the "Preferences" menu.

images/ja/Footprint_tables_list.png

The footprint library table is used to map a footprint library of any supported library type to a library nickname. This nickname is used to look up footprints instead of the previous method which depended on library search path ordering. This allows Pcbnew to access footprints with the same name in different libraries by ensuring that the correct footprint is loaded from the appropriate library. It also allows Pcbnew to support loading libraries from different PCB editors such as Eagle and gEDA.

2.4.1. グローバル・フットプリント・ライブラリ・テーブル

グローバル・フットプリント・ライブラリ・テーブルは、現在のプロジェクトに関係なく、常に有効なライブラリのリストを保持しています。このテーブルは、ユーザのホームディレクトリにある “fp-lib-table” ファイルに保存されています。このディレクトリの位置は、オペレーティングシステムに依存します。

2.4.2. プロジェクト固有のフットプリント・ライブラリ・テーブル

プロジェクト固有のフットプリント・ライブラリ・テーブルは、現在のプロジェクトにのみ有効なライブラリのリストを保持しています。プロジェクト固有のフットプリント・ライブラリ・テーブルは、プロジェクトの基板ファイルが読み込まれている時のみ編集可能です。プロジェクトファイルが読み込まれていないか、プロジェクトのパスにフットプリント・ライブラリ・テーブル・ファイルがない場合、編集可能な空のテーブルが作られ、後で基板ファイルと一緒に保存されます。

2.4.3. 初期設定

CvPcb または Pcbnew の初めての実行時には、グローバル・フットプリント・テーブル・ファイル fp-lib-table はユーザのホームディレクトリに見つかりません。Pcbnew は、システムの KiCad テンプレートディレクトリにあるデフォルトのフットプリント・テーブル・ファイル fp_global_table をユーザのホームディレクトリへ fp-lib-table ファイルとしてコピーしようとします。もし、fp-lib-table が見つからなかったら、ユーザのホームディレクトリに空のフットプリント・ライブラリ・テーブルが作られるでしょう。こうなった場合、ユーザは自分で fp_global_table をコピーし、手動でテーブルを設定できます。デフォルトのフットプリント・ライブラリ・テーブルは、KiCad の一部としてインストールされる標準のフットプリントライブラリを全て含んでいます。

2.4.4. テーブル要素の追加

In order to use a footprint library, it must first be added to either the global table or the project specific table. The project specific table is only applicable when a board file is open. Each library entry must have a unique nickname. This does not have to be related in any way to the actual library file name or path. The colon : character cannot be used anywhere in the nickname. Each library entry must have a valid path and/or file name depending on the type of library. Paths can be defined as absolute, relative, or by environment variable substitution. The appropriate plug in type must be selected in order for the library to be properly read. Pcbnew currently supports reading KiCad legacy, KiCad Pretty, Eagle, and gEDA footprint libraries. There is also a description field to add a description of the library entry. The option field is not used at this time so adding options will have no effect when loading libraries. Please note that you cannot have duplicate library nicknames in the same table. However, you can have duplicate library nicknames in both the global and project specific footprint library table. The project specific table entry will take precedence over the global table entry when duplicated names occur. When entries are defined in the project specific table, an fp-lib-table file containing the entries will be written into the folder of the currently open netlist.

2.4.5. 環境変数の代替

フットプリント・ライブラリ・テーブルの最も強力な機能の一つは、環境変数の代替です。環境変数に保存されたライブラリへの独自のパスを定義するすることができます。環境変数の代替は、フットプリント・ライブラリ・パスで ${ENV_VAR_NAME} 構文を使うことにより、サポートされます。デフォルトでは、実行中 Pcbnew は環境変数 $KISYSMOD を定義します。ここは KiCad と一緒にインストールされたデフォルトのフットプリントライブラリの場所です。デフォルトのフットプリントライブラリに代わって自分のライブラリを置けるよう $KISYSMOD を上書きできます。基板が読み込まれると、Pcbnew はまた基板のファイルパスを使って、$KPRJMOD を定義します。これにより、プロジェクト固有のフットプリント・ライブラリ・テーブルでライブラリの絶対パスを定義することなく、プロジェクトのあるパスへライブラリを作ることができます。

2.4.6. GitHub プラグインの使用

The GitHub plugin is a special plugin that provides an interface for read-only access to a remote GitHub repository consisting of pretty (Pretty is name of the KiCad footprint file format) footprints and optionally provides "Copy-On-Write" (COW) support for editing footprints read from the GitHub repo and saving them locally. Therefore the "GitHub" plugin is for read-only for accessing remote pretty footprint libraries at https://github.com. To add a GitHub entry to the footprint library table the "Library Path" in the footprint library table entry must be set to a valid GitHub URL.

例:

https://github.com/liftoff-sr/pretty_footprints

(フォームを取得する)典型的な GitHub URL :

https://github.com/user_name/repo_name

The "Plugin Type" must be set to "Github". To enable the "Copy-On-Write" feature the option allow_pretty_writing_to_this_dir must be added to the "Options" setting of the footprint library table entry. This option is the "Library Path" for local storage of modified copies of footprints read from the GitHub repo. The footprints saved to this path are combined with the read-only part of the GitHub repository to create the footprint library. If this option is missing, then the GitHub library is read-only. If the option is present for a GitHub library, then any writes to this hybrid library will go to the local *.pretty directory. Note that the github.com resident portion of this hybrid COW library is always read-only, meaning you cannot delete anything or modify any footprint in the specified GitHub repository directly. The aggregate library type remains "Github" in all further discussions, but it consists of both the local read/write portion and the remote read-only portion.

以下のテーブルは allow_pretty_writing_to_this_dir オプションがないフットプリント・ライブラリ・テーブルの入力項目です。:

Nickname Library Path Plugin Type Options Description

github

https://github.com/liftoff-sr/pretty_footprints

Github

Liftoff’s GH footprints

以下のテーブルは COW オプションのあるフットプリント・ライブラリ・テーブルの入力項目です。見本用のため、環境変数 ${HOME} を使っていることに注意してください。 github.pretty ディレクトリは、${HOME}/pretty/path となります。allow_pretty_writing_to_this_dir を使う時には必ず、あらかじめ .pretty という拡張子を持つディレクトリを作っておく必要があります。

Nickname Library Path Plugin Type Options Description

github

https://github.com/liftoff-sr/pretty_footprints

Github

allow_pretty_writing_to_this_dir= ${HOME}/pretty/github.pretty

Liftoff’s GH footprints

Footprint loads will always give precedence to the local footprints found in the path given by the option allow_pretty_writing_to_this_dir. Once you have saved a footprint to the COW library’s local directory by doing a footprint save in the Footprint Editor, no GitHub updates will be seen when loading a footprint with the same name as one for which you’ve saved locally.

Always keep a separate local *.pretty directory for each GitHub library, never combine them by referring to the same directory more than once. Also, do not use the same COW (*.pretty) directory in a footprint library table entry. This would likely create a mess. The value of the option allow_pretty_writing_to_this_dir will expand any environment variable using the ${} notation to create the path in the same way as the "Library Path" setting.

What’s the point of COW? It is to turbo-charge the sharing of footprints. If you periodically email your COW pretty footprint modifications to the GitHub repository maintainer, you can help update the GitHub copy. Simply email the individual *.kicad_mod files you find in your COW directories to the maintainer of the GitHub repository. After you’ve received confirmation that your changes have been committed, you can safely delete your COW file(s) and the updated footprint from the read-only part of GitHub library will flow down. Your goal should be to keep the COW file set as small as possible by contributing frequently to the shared master copies at https://github.com.

最終に、Nginx(high-speed Web server/reverse proxy and email proxy) をフットプリントの読み込みスピードを上げるための github のキャッシュとして使うことができます。これは、 pcbnew/github/nginx.conf での KiCad ソースの設定例です。これを使う最も簡単な方法は、デフォルトの nginx.conf を export KIGITHUB=http://my_server:54321/KiCad で上書きすることです。ここで、 my_server は nginx を実行しているマシンの IP またはドメイン名です。

2.4.7. 使用パターン

フットプリントライブラリは、読み込まれているプロジェクトに対して、グローバル、固有どちらとしてでも定義できます。ユーザのグローバルテーブルで定義されたフットプリントライブラリは常に有効で、ユーザのホームディレクトリにある fp-lib-table ファイル内に保存されます。グローバル・フットプリント・ライブラリは、プロジェクトのネットリストファイルを開いていない時でも、常にアクセスすることができます。プロジェクト固有のフットプリントテーブルは、現在開かれているネットリストファイルに対してのみ有効です。プロジェクト固有のフットプリント・ライブラリ・テーブルは現在開かれている基板ファイルのパスにある fp-lib-table ファイルに保存されます。どちらのテーブルにライブラリを定義しても構いません。

以下は、各方法の長所と短所です。:

  • 全てのライブラリをグローバルテーブルで定義すると、必要な時にいつでも使うことができます。

    • これの短所は、探しているフットプリントを見つけるために多くの ライブラリを調べなければならなくなることです。

  • 全てのライブラリをプロジェクト固有のテーブルへ定義することもできます。

    • これの長所は、プロジェクトが本当に必要とするライブラリだけとなるので、 探しやすくなることです。

    • これの短所は、プロジェクトごとに必要とするフットプリントライブラリを それぞれ忘れずに追加しなければならないことです。

  • フットプリントライブラリはグローバルとプロジェクト固有、両方のテーブルで定義することもできます。

使用パターンの一つは、よく使うライブラリをグローバル、そのプロジェクトでのみ必要とされるライブラリはプロジェクト固有のライブラリテーブルに定義することでしょう。ライブラリを定義するにあたっての制約は特にありません。

3. 一般操作

3.1. ツールバーとコマンド

Pcbnew では様々な方法によりコマンドを実行することが可能です:

  • Text-based menu at the top of the main window.

  • Top toolbar menu.

  • Right toolbar menu.

  • Left toolbar menu.

  • Mouse buttons (menu options). Specifically:

    • The right mouse button reveals a pop-up menu the content of which depends on the element under the mouse arrow.

  • Keyboard (Function keys F1, F2, F3, F4, Shift, Delete, +, -, Page Up, Page Down and Space bar). The Escape key generally cancels an operation in progress.

The screenshot below illustrates some of the possible accesses to these operations:

images/ja/Right-click_legacy_menu.png

3.2. マウスコマンド

3.2.1. 基本的なコマンド

  • 左ボタン

    • Single-click displays the characteristics of the footprint or text under the cursor in the lower status bar.

    • Double-click displays the editor (if the element is editable) of the element under the cursor.

  • 中央ボタン/ホイール

    • Rapid zoom and some commands in layer manager.

    • Hold down the centre button and draw a rectangle to zoom to the described area. Rotation of the mouse wheel will allow you to zoom in and zoom out.

  • 右ボタン

    • Displays a pop-up menu

3.2.2. ブロックでの操作

Operations to move, invert (mirror), copy, rotate and delete a block are all available via the pop-up menu. In addition, the view can zoom to the area described by the block.

The framework of the block is traced by moving the mouse while holding down the left mouse button. The operation is executed when the button is released.

By holding down one of the hotkeys Shift or Ctrl, or both keys Shift and Ctrl together, while the block is drawn the operation invert, rotate or delete is automatically selected as shown in the table below:

Action Effect

Left mouse button held down

Trace framework to move block

Shift + Left mouse button held down

Trace framework for invert block

Ctrl + Left mouse button held down

Trace framework for rotating block 90°

Shift + Ctrl + Left mouse button held down

Trace framework to delete the block

Centre mouse button held down

Trace framework to zoom to block

ブロックを移動する場合:

  • 新しい位置にブロックを移動して、要素を配置するためにマウスの左ボタンを操作します。

  • To cancel the operation use the right mouse button and select Cancel Block from the menu (or press the Esc key).

ブロックを描画する際に何もキーが押されていない場合、コンテキストメニューを表示して必要な操作を選択するためには代わりにマウスの右ボタンを使用します。

それぞれのブロック操作に対して、選択ウィンドウを使用すると、いくつかの要素だけに限定して操作することができます。

3.3. グリッドサイズの選択

要素のレイアウト際、カーソルはグリッド上を移動します。左のツールバーのアイコンを使用してグリッドのオン/オフを切り替えることができます。

定義済のグリッドサイズとするか、ユーザ定義のグリッドサイズとするかは、画面の上部のツールバーのドロップダウンリストあるいはポップアップウィンドウを使用して選択することができます。ユーザ定義のグリッドサイズは、メニューバーから 寸法 → グリッド を選択してユーザグリッドで設定します。

3.4. ズームレベルの調整

The zoom level can be changed using any of the following methods:

  • ポップアップウィンドウを開き (マウス右ボタンを使って) 、希望するズームを選択します。

  • Use the following function keys:

    • F1: 拡大(ズームイン)

    • F2: 縮小(ズームアウト)

    • F3:画面を再描画

    • F4: 現在のカーソル位置を中央にして表示

  • Rotate the mouse wheel.

  • Hold down the middle mouse button and draw a rectangle to zoom to the described area.

3.5. カーソル座標の表示

左側のツールバーにあるインチ/ mm 切り替えアイコンによる選択に従い、カーソル座標は ‘インチ’ または ‘mm’ で表示されます。

どちらの単位が選択されても、Pcbnew は常に 1/10,000 インチ精度で稼働します。

以下は画面下部のステータスバー表示です:

  • 現在のズーム設定。

  • カーソルの絶対位置。

  • カーソルの相対位置。スペースバーを押すと相対座標 (x,y) を任意の位置で (0,0) に設定するので注意してください。以降、カーソルの位置はこの新しい位置を基準に相対表示されます。

In addition the relative position of the cursor can be displayed using its polar co-ordinates (ray + angle). This can be turned on and off using the icon in the left hand side toolbar.

images/ja/Pcbnew_coordinate_status_display.png

3.6. キーボードコマンド - ホットキー

多くのコマンドは、直接キーボードにより操作可能です。大文字または小文字のどちらを選んでもかまいません。ほとんどのホットキーは、メニューに表示されます。表示されていないホットキーは、以下のとおりです。:

  • Delete: deletes a footprin or a track. (Available only if the Footprint tool or the track tool is active)

  • V キー:作業中のレイヤをペアで設定されたレイヤに切り替えます。配線中はビアが配置され、ペアのレイヤ側の作業に移行します。

  • キー:アクティブレイヤを次、あるいは前のレイヤとします。

  • キー:全てのホットキーのリストを表示します。

  • スペース キー:相対座標をリセットします。

3.7. ブロックでの操作

Operations to move, invert (mirror), copy, rotate and delete a block are all available from the pop-up menu. In addition, the view can zoom to that described by the block.

The framework of the block is traced by moving the mouse while holding down the left mouse button. The operation is executed when the button is released.

By holding down one of the keys Shift or Ctrl, both Shift and Ctrl together, or Alt, while the block is drawn the operation invert, rotate, delete or copy is automatically selected as shown in the table below:

Action Effect

Left mouse button held down

Move block

Shift + Left mouse button held down

Invert (mirror) block

Ctrl + Left mouse button held down

Rotate block 90°

Shift + Ctrl + Left mouse button held down

Delete the block

Alt + Left mouse button held down

Copy the block

ブロックコマンド状態ではダイアログウィンドウが表示され、このコマンドを適用するアイテムを選択することができます。

上記のどのコマンドも、同じコンテキストメニューまたはエスケープキー (Esc) を押すことで取り消すことができます。

images/ja/Pcbnew_legacy_block_selection_dialog.png

3.8. ダイアログで使われる単位

寸法値を表示するのに使用できる単位はインチと mm です。使用する単位は、左ツールバーにあるアイコン images/Inch_mm_combo_icon.png を押して選択できます。新しい値を入力する際には、値の単位も入力できます。

利用可能な単位は次のとおりです:

1 in

1 inch

1

1 inch

25 th

25 thou (1/1000 inch)

25 mi

25 mils, thou と同じ

6 mm

6 mm

ルールは次のとおりです:

  • 数値と単位の間にはスペースを入れられます。

  • 最初の2文字だけが重要です。

  • ピリオドと異なる代替の小数点記号( , )を使用している国では、ピリオド( . )も同じ様に扱われます。従って 1,51.5 はフランス語では同じ意味です。

3.9. 上部メニューバー

上部メニューバーは、ファイル(読み込みと保存)、設定オプション、印刷、プロットやヘルプファイルへのアクセスを提供します。

images/ja/Pcbnew_top_menu_bar.png

3.9.1. ファイルメニュー

images/ja/Pcbnew_file_menu.png

ファイルメニューではプリント基板の印刷、プロットだけでなく、プリント基板ファイルの読み込み、書き込みができます。自動テスターで使用する回路を出力( GenCAD1.4 形式)することもできます。

3.9.2. 編集メニュー

いくつかの基板全体に対する編集コマンドがあります:

images/ja/Pcbnew_edit_menu.png

3.9.3. 表示メニュー

images/ja/Pcbnew_view_menu.png

ズーム機能と3Dビューア(3Dによる基板表示)があります。

3D Viewer

Opens the 3D Viewer. Here is a sample:

images/ja/Sample_3D_board.png

Switch canvas

Allows switching canvas.

  • default

  • OpenGL

  • Cairo

3.9.4. 配置メニュー

右ツールバーと同じ機能です。

images/ja/Pcbnew_place_menu.png

3.9.5. Route menu

Routing function.

images/Pcbnew_route_menu.png

3.9.6. 設定メニュー

images/ja/Pcbnew_preferences_menu.png

次の項目が実行可能です。:

  • フットプリントライブラリの選択。

  • レイヤマネージャの表示/非表示(表示レイヤやその他要素の色を選択。 要素表示の有無を選択。)

  • 一般オプションの管理(単位など)。

  • その他表示オプションの管理。

  • Creation, editing (and re-read) of the hot keys file.

3.9.7. 寸法メニュー

images/Pcbnew_dimensions_menu.png

An important menu. Allows adjustment of:

  • ユーザ・グリッド・サイズ。

  • テキストの大きさと描画の線幅。

  • パッドの寸法と属性。

  • ハンダ・レジスト・レイヤとハンダ・ペースト・レイヤのグローバル値の設定

3.9.8. ツールメニュー

images/Pcbnew_tools_menu.png

3.9.9. デザイン・ルール・メニュー

images/ja/Pcbnew_design_rules_menu.png

Provides access to 2 dialogs:

  • Setting Design Rules (tracks and vias sizes, clerances).

  • Setting Layers (number, enabled and layers names)

3.9.10. ヘルプメニュー

ユーザマニュアルとバージョン情報(Pcbnew について)メニューへのアクセスを提供します。

3.10. 上部ツールバーにあるアイコンの使用

このツールバーは、Pcbnew の主な機能へのアクセスを提供します。

images/ja/Pcbnew_top_toolbar.png

images/icons/new.png

Creation of a new printed circuit.

images/icons/open_brd_file.png

Opening of an old printed circuit.

images/icons/save.png

Save printed circuit.

images/icons/sheetset.png

Selection of the page size and modification of the file properties.

images/icons/module_editor.png

Opens Footprint Editor to edit library or pcb footprint.

images/icons/modview_icon.png

Opens Footprint Viewer to display library or pcb footprint.

images/icons/undo.png images/icons/redo.png

Undo/Redo last commands (10 levels)

images/icons/print_button.png

Display print menu.

images/icons/plot.png

Display plot menu.

images/icons/zoom_in.png images/icons/zoom_out.png

Zoom in and Zoom out (relative to the centre of screen).

images/icons/zoom_redraw.png

Redraw the screen

images/icons/zoom_fit_in_page.png

Fit to page

images/icons/find.png

Find footprint or text.

images/icons/netlist.png

Netlist operations (selection, reading, testing and compiling).

images/icons/drc.png

DRC (Design Rule Check): Automatic check of the tracks.

images/Pcbnew_toolbar_layer_select_dropdown.png

Selection of the working layer.

images/Pcbnew_layer_pair_indicator.png

Selection of layer pair (for vias)

images/icons/mode_module.png

Footprint mode: when active this enables footprint options in the pop-up window.

images/icons/mode_track.png

Routing mode: when active this enables routing options in the pop-up window

images/icons/web_support.png

Direct access to the router Freerouter

images/icons/py_script.png

Show / Hide the Python scripting console

3.10.1. 補助ツールバー

images/ja/Pcbnew_track_thickness_dropdown.png

使用する配線幅の選択。

images/ja/Pcbnew_via_size_dropdown.png

使用するビア寸法の選択。

images/icons/auto_track_width.png

自動配線幅: 新しい配線の作成時に有効の場合、既存の配線上から始まる新しい配線を既存の配線幅へ設定。

images/ja/Pcbnew_grid_size_dropdown.png

グリッドサイズの選択。

images/ja/Pcbnew_zoom_factor_dropdown.png

ズームの選択。

3.11. 右ツールバー

images/Pcbnew_right_toolbar.png

このツールバーは、Pcbnew で PCB を変更するための編集ツールへのアクセスを提供します:

  • フットプリント、配線、導体ゾーン、 テキストなどの配置。

  • ネットをハイライト表示。

  • ノート(注釈、メモ)、グラフィック要素などの作成。

  • 要素の削除。

images/icons/cursor.png

Select the standard mouse mode.

images/icons/net_highlight.png

Highlight net selected by clicking on a track or pad.

images/icons/tool_ratsnest.png

Display local ratsnest (Pad or Footprint).

images/icons/module.png

Add a footprint from a library.

images/icons/add_tracks.png

Placement of tracks and vias.

images/icons/add_zone.png

Placement of zones (copper planes).

images/icons/add_keepout_area.png

Placement of keepout areas ( on copper layers ).

images/icons/auto_track_width.png

Auto track width: when starting on an existing track use its width otherwise, use current width setting.

images/icons/add_line.png

Draw Lines on technical layers (i.e. not a copper layer).

images/icons/add_circle.png

Draw Circles on technical layers (i.e. not a copper layer).

images/icons/add_arc.png

Draw Arcs on technical layers (i.e. not a copper layer).

images/icons/add_text.png

Placement of text.

images/icons/add_dimension.png

Draw Dimensions on technical layers (i.e. not the copper layer).

images/icons/add_mires.png

Draw Alignment Marks (appearing on all layers).

images/icons/delete.png

Delete element pointed to by the cursor

Note: When Deleting, if several superimposed elements are pointed to, priority is given to the smallest (in the decreasing set of priorities tracks, text, footprint). The function "Undelete" of the upper toolbar allows the cancellation of the last item deleted.

images/icons/pcb_offset.png

Offset adjust for drilling and place files.

images/icons/grid_select_axis.png

Grid origin. (grid offset). Useful mainly for editing and placement of footprints. Can also be set in Dimensions/Grid menu.

3.12. 左ツールバー

images/Pcbnew_left_toolbar.png

このツールバーは表示と制御オプションを提供します。

images/icons/drc_off.png

Turns DRC (Design Rule Checking) on/off. Caution: when DRC is off incorrect connections can be made.

images/icons/grid.png

Turn grid display on/off Note: a small grid may not be displayed unless zoomed in far enough

images/icons/polar_coord.png

Polar display of the relative co-ordinates on the status bar on/off.

images/icons/unit_inch.png images/icons/unit_mm.png

Display/entry of coordinates or dimensions in inches or millimeters.

images/icons/cursor_shape.png

Change cursor display shape.

images/icons/general_ratsnest.png

Display general rats nest (incomplete connections between footprints).

images/icons/local_ratsnest.png

Display footprint rats nest dynamically as it is moved.

images/icons/auto_delete_track.png

Enable/Disable automatic deletion of a track when it is redrawn.

images/icons/show_zone.png

Show filled areas in zones

images/icons/show_zone_disable.png

Do not show filled areas in zones

images/icons/show_zone_outline_only.png

Show only outlines of filled areas in zones

images/icons/pad_sketch.png

Display of pads in outline mode on/off.

images/icons/via_sketch.png

Display of vias in outline mode on/off.

images/icons/showtrack.png

Display of tracks in outline mode on/off.

images/icons/contrast_mode.png

High contrast display mode on/off. In this mode the active layer is displayed normally, all the other layers are displayed in gray. Useful for working on multi-layer circuits.

images/icons/layers_manager.png

Hide/Show the Layers manager

images/icons/mw_toolbar.png

Access to microwaves tools. Under development

3.13. ポップアップウィンドウを使った迅速な編集作業

A right-click of the mouse opens a pop-up window. Its contents depends on the element pointed at by the cursor.

これは、次への迅速なアクセスを提供します:

  • 表示の変更 (カーソル位置を画面中央に表示、ズームイン、ズームアウト、あるいはズームの選択)。

  • グリッドサイズの設定。

  • Additionally a right-click on an element enables editing of the most commonly modified element parameters.

The screenshots below show what the pop-up windows looks like.

3.14. 利用可能なモード

There are 3 modes when using pop-up menus. In the pop-up menus, these modes add or remove some specific commands.

images/icons/mode_module.png images/icons/mode_track.png 無効

ノーマルモード

images/icons/mode_module.png 有効

フットプリントモード

images/icons/mode_track.png 有効

配線モード

3.14.1. ノーマルモード

  • 未選択時のコンテキストメニュー:

images/ja/Pcbnew_popup_normal_mode.png

  • 選択した配線上でのコンテキストメニュー:

images/ja/Pcbnew_popup_normal_mode_track.png

  • 選択したフットプリント上でのコンテキストメニュー:

images/ja/Pcbnew_popup_normal_mode_footprint.png

3.14.2. フットプリントモード

フットプリントモードでの同じ例 ( images/icons/mode_module.png 有効)

  • 未選択時のコンテキストメニュー:

images/ja/Pcbnew_popup_footprint_mode.png

  • 選択した配線上でのコンテキストメニュー:

images/ja/Pcbnew_popup_footprint_mode_track.png

  • 選択したフットプリント上でのコンテキストメニュー:

images/ja/Pcbnew_popup_footprint_mode_footprint.png

3.14.3. 配線モード

配線モードでの同じ例 ( images/icons/mode_track.png 有効)

  • 未選択時のコンテキストメニュー:

images/ja/Pcbnew_popup_track_mode.png

  • 選択した配線上でのコンテキストメニュー:

images/ja/Pcbnew_popup_track_mode_track.png

  • 選択したフットプリント上でのコンテキストメニュー:

images/ja/Pcbnew_popup_track_mode_footprint.png

4. 回路図の具現化

4.1. プリント基板への回路図のリンク

Generally speaking, a schematic sheet is linked to its printed circuit board by means of the netlist file, which is normally generated by the schematic editor used to make the schematic. Pcbnew accepts netlist files made with Eeschema or Orcad PCB 2. The netlist file, generated from the schematic is usually missing the footprints that correspond to the various components. Consequently an intermediate stage is necessary. During this intermediate process the association of components with footprints is performed. In KiCad, CvPcb is used to create this association and a file named *.cmp is produced. CvPcb also updates the netlist file using this information.

CvPcb can also output a "stuff file" *.stf which can be back annotated into the schematic file as the F2 field for each component, saving the task of re-assigning footprints in each schematic edit pass. In Eeschema copying a component will also copy the footprint assignment and set the reference designator as unassigned for later auto-incremental annotation.

Pcbnew reads the modified netlist file .net and, if it exists, the .cmp file. In the event of a footprint being changed directly in Pcbnew the .cmp file is automatically updated avoiding the requirement to run CvPcb again.

Refer to the figure of "Getting Started in KiCad" manual in the section KiCad Workflow that illustrates the work-flow of KiCad and how intermediate files are obtained and used by the different software tools that comprise KiCad.

4.2. プリント基板の作成手順

Eeschema で回路図を作成した後に:

  • Eeschema を使用してネットリストを生成します。

  • Assign each component in your netlist file to the corresponding footprint (often called footprint) used on the printed circuit using Cvpcb.

  • Launch Pcbnew and read the modified Netlist. This will also read the file with the footprint selections.

Pcbnew will then load automatically all the necessary footprints. Footprints can now be placed manually or automatically on the board and tracks can be routed.

4.3. プリント基板の更新手順

(プリント基板を作成した後で)回路図が修正された場合、次のステップを繰り返さなければなりません:

  • Eeschema を使用して新規ネットリストファイルを生成します。

  • If the changes to the schematic involve new components, the corresponding footprints must be assigned using Cvpcb.

  • Launch Pcbnew and re-read the modified netlist (this will also re-read the file with the footprint selections).

Pcbnew will then load automatically any new footprints, add the new connections and remove redundant connections. This process is called forward annotation and is a very common procedure when a PCB is made and updated.

4.4. ネットリストファイルの読み込み - フットプリントの読み込み

4.4.1. ダイアログボックス

アイコン images/icons/netlist.png からアクセスできます。

images/ja/Pcbnew_netlist_dialog.png

4.4.2. 利用可能なオプション

Footprint Selection

Components and corresponding footprints on board link: normal link is Reference (normal option Timestamp can be used after reannotation of schematic, if the previous annotation was destroyed (special option)

Exchange Footprint:

If a footprint has changed in the netlist: keep old footprint or change to the new one.

Unconnected Tracks

Keep all existing tracks, or delete erroneous tracks

Extra Footprints

Remove footprints which are on board but not in the netlist. Footprint with attribute "Locked" will not be removed.

Single Pad Nets

Remove single pad nets.

4.4.3. 新規フットプリントの読み込み

ネットリストファイルの中に新規フットプリントが見つかった場合、それらは自動的に読み込まれて座標 (0,0) に配置されます。

images/Pcbnew_stacked_footprints.png

新規フットプリントを一つずつ移動して並べることができます。より良い方法は、自動的にそれらを(重ならないように)移動させることです:

フットプリントモードをアクティブにします ( images/icons/mode_module.png )

マウスのカーソルを適切な(コンポーネントが置かれていない)領域に移動させ、右ボタンをクリックします:

images/ja/Pcbnew_move_all_modules.png

  • Automatically Place New Footprints, if there is already a board with existing footprints.

  • Automatically Place All Footprints, for the first time (when creating a board).

次のスクリーンショットにその結果を示します。

images/Pcbnew_unstacked_footprints.png

5. 作業レイヤのセットアップ

Pcbnew は 50 の異なるレイヤで作業することが可能です:

  • 32 copper layers (for routing of tracks).

  • 14 technical layers (includes 1 board outline layer).

  • 4 つの補助レイヤ

The number of copper layers, and if needed their names and attributes, should be set. Unused technical layers can be disabled.

5.1. 導体レイヤの選択

5.1.1. はじめに

Copper layers are the usual working layers used by the automatic router to place and re-arrange tracks. Layer 1 is the copper (solder) layer. Layer 32 is the component layer. Other layers are the inner layers, from L2 to L31.

5.1.2. レイヤ数の選択

To enable navigation between layers, it is necessary to select the number of working layers. To do this you can use the menu bar and select Design Rules → Layers Setup.

images/ja/Pcbnew_layer_setup_menu_item.png

Then select the number of layers wanted, from 2 to 32.

images/ja/Pcbnew_layer_setup_dialog.png

5.1.3. 導体レイヤ

The name of any copper layer is editable. Copper layers have attributes useful when using the external router Freerouter.

images/ja/Pcbnew_layer_setup_dialog_layer_properties.png

5.2. テクニカルレイヤと予備レイヤ

Some are associated in pairs, others not. When they appear as a pair this affects the behaviour of footprints. The elements making up a footprint (pads, drawing and text) appearing on a layer (solder or component), appear on the other complementary layer when the footprint is inverted (mirrored).

テクニカルレイヤは次のようなものです:

5.2.1. ペアレイヤ

  • 接着(ボンド) レイヤ(表および裏):

    • 一般的にハンダディップ(フロー工程)の前に、SMDコンポーネントを回路基板に貼り付けるためのボンド塗布工程で使用されます。

  • ハンダペースト レイヤ(表および裏):

    • Used to produce a mask to allow solder paste to be placed on the pads of surface mount components, generally before reflow soldering. Usually only surface mount pads occupy these layers.

  • シルクスクリーン レイヤ(表および裏):

    • コンポーネントの図形要素(線や文字)を描くレイヤです。

  • ハンダマスク レイヤ(表および裏):

    • These define the solder masks. Normally all pads appear on one or the other of these layers (or both for through pads) to prevent the varnish covering the pads.

5.2.2. 汎用レイヤ

  • コメント

  • ECO1

  • ECO2

これらのレイヤは任意で使用できます。自動組立てや機械加工用のファイルを作るために使用したり、部品実装やコネクタ配線を指示するための指示書、基板の組立図に、これらのレイヤを使用することができます。

5.2.3. 特殊レイヤ

  • Edge.Cuts (基板外形) レイヤ:

    • This layer is reserved for the drawing of circuit board outline. Any element (graphic, texts…) placed on this layer appears on all the other layers. Use this layer only to draw board outlines.

5.3. アクティブレイヤの選択

以下のようないくつかの方法でアクティブな作業レイヤの選択が可能です:

  • 右ツールバー(レイヤマネジャー)を使用する。

  • 上部ツールバーを使用する。

  • (マウスの右ボタンで開く)ポップアップウィンドウ使用する。

  • “+” と “-” キーを使用する(導体レイヤ上のみ)。

  • ホットキーを使用する。

5.3.1. レイヤマネジャーを使用した選択

images/ja/Pcbnew_layer_manager_pane.png

5.3.2. 上部ツールバーを使用した選択

images/ja/Pcbnew_layer_selection_dropdown.png

これは作業レイヤを直接選択します。

作業レイヤを選択するためのホットキーが表示されます( PgUp, PgDn など一部のみ)。

5.3.3. ポップアップウィンドウを使用した選択

images/ja/Pcbnew_layer_selection_popup.png

The Pop-up window opens a menu window which provides a choice for the working layer.

images/ja/Pcbnew_layer_selection_dialog.png

5.4. ビア用レイヤの選択

右ツールバーで *配線とビアの追加* アイコンが選択されている場合、 “ビアのレイヤペアを選択” オプションがポップアップウィンドウに表示されます:

images/ja/Pcbnew_via_layer_pair_popup.png

これを選択するとメニューウィンドウ(導体ペアレイヤの選択)が開き、ここでビア用に使用するレイヤの選択を行います。

images/ja/Pcbnew_via_layer_pair_dialog.png

ビアが配置されると、作業(アクティブ)レイヤは、ビア用に使用されるレイヤペアのもう一方のレイヤに自動的に切り替わります。

ホットキーで別のアクティブなレイヤに切り替えることも可能です。また、配線途中の場合にはビアが挿入されます。

5.5. ハイコントラストモードの使用

“ハイコントラスト表示モード” ツール(左ツールバー)をクリックして有効にした場合、このモードになります: images/icons/contrast_mode.png

このモードを使用すると、アクティブなレイヤはノーマルモードで表示されますが、他の全てのレイヤはグレイカラー表示(グレイスケール)になります。

これは次の2つの場合に役立ちます:

5.5.1. ハイコントラストモードの導体レイヤ

When a board uses more than four layers, this option allows the active copper layer to be seen more easily:

ノーマルモード (裏面導体レイヤ・アクティブ):

images/Pcbnew_copper_layers_contrast_normal.png

ハイコントラストモード (裏面導体レイヤ・アクティブ):

images/Pcbnew_copper_layers_contrast_high.png

5.5.2. テクニカルレイヤ

The other case is when it is necessary to examine solder paste layers and solder mask layers which are usually not displayed.

このモードが有効な場合、パッド上にマスクが表示されます。

ノーマルモード (表面レジストレイヤ・アクティブ) :

images/Pcbnew_technical_layers_contrast_normal.png

ハイコントラストモード (表面レジストレイヤ・アクティブ) :

images/Pcbnew_technical_layers_contrast_high.png

6. 基板の作成および修正

6.1. 基板の作成

6.1.1. 基板外形の作成

It is usually a good idea to define the outline of the board first. The outline is drawn as a sequence of line segments. Select Edges pcb as the active layer and use the Add graphic line or polygon tool to trace the edge, clicking at the position of each vertex and double-clicking to finish the outline. Boards usually have very precise dimensions, so it may be necessary to use the displayed cursor coordinates while tracing the outline. Remember that the relative coordinates can be zeroed at any time using the space bar, and that the display units can also be toggled using Ctrl-U. Relative coordinates enable very precise dimensions to be drawn. It is possible to draw a circular (or arc) outline:

  1. 円入力 または 円弧入力 を選択します。

  2. クリックして円の中心を固定します。

  3. マウスを移動して半径を調節します。

  4. 再度クリックして終了します。

The width of the outline can be adjusted in the Parameters menu (recommended width = 150 in 1/10 mils) or via the Options, but this will not be visible unless the graphics are displayed in other than outline mode.

以下は基板外形の例です:

images/Pcbnew_simple_board_outline.png

6.1.2. 基板外形のための DXF 図面の使用

直接 Pcbnew で基板外形を作成する代わりに、基板外形を DXF 図面からインポートすることもできます。

この機能を用いると、より複雑な形状の基板を作成できます。

例えば、機械系 CAD は筐体に合わせた基板外形の定義に使用できます。

KiCad へインポートするための DXF 図面の準備

KiCad の DXF インポートは、 ポリライン(POLYLINES)楕円(ELLIPSIS) のような DXF の機能をサポートしていません。これらの機能を使用している DXF ファイルは、インポートのために若干の変換ステップを必要とします。

LibreCAD のようなソフトウェアは、 この変換のために使用できます。

最初のステップとして、 ポリライン は基本の単純な形状へ分割 (Exploded) する必要があります。LibreCAD では以下のような手順となります:

  1. DXF ファイルのコピーを開きます。

  2. 基板外形を選択します。(選択された外形は破線で表示されます)

  3. Modify メニューで、Explode を選択します。

  4. ENTER キーを押します。

次のステップとして、 楕円(ELLIPSIS) のような複雑な曲線は、その形状に近似した連続する短い線分へと分割する必要があります。これは、古い DXF R12 ファイルフォーマットへエクスポートするか保存する時に、自動的に行われます。(R12 フォーマットは複雑な曲線の形状をサポートしていないので、CADソフトはこれらの形状を線分へと変換します。いくつかの CAD ソフトは、使用する線分の長さや数を選べるようになっています。)LibreCAD では、基板外形に使用するには十分に小さい線分の長さとなっています。

LibreCAD では、DXF R12 ファイルフォーマットのエクスポートは次のようなステップとなります:

  1. File メニューで、Save As… を使います。

  2. Save Drawing As ダイアログの下の方に Save as type: セクションがあります。ここでオプション Drawing Exchange DXF R12 を選びます。

  3. File name: フィールドへ任意のファイル名を入力します。

  4. Save をクリックします。

これで KiCad へインポートする DXF ファイルの準備ができました。

KiCad への DXF ファイルのインポート

以下のステップは、準備した DXF ファイルを KiCad へ基板外形としてインポートする方法を示したものです。インポートの方法は使用している キャンバス によって若干異なることに注意してください。

"default" キャンバス モードを使用:

  1. ファイル メニューから インポート を選び、DXF ファイル オプションを選択します。

  2. DXF ファイルのインポート ダイアログで、 参照 を使ってインポートために準備した DXF ファイルを選択します。

  3. DXF の原点座標 (0,0) をセット: オプションで、基板の座標に対する DXF の原点の位置を選びます。(KICad の基板は左上角を (0,0) としています。)ユーザー定義の位置 を選んだ場合は、 X 位置Y 位置 フィールドへ座標を入力します。

  4. レイヤ セクションで、インポートする基板レイヤを選択します。 基板外形には Edge.Cuts を選択する必要があります。

  5. OK をクリックします。

    "OpenGL" または "Cairo"  キャンバス モードを使用:
  6. ファイル メニューから インポート を選び、DXF ファイル オプションを選択します。

  7. DXF ファイルのインポート ダイアログで、 参照 を使ってインポートために準備した DXF ファイルを選択します。

  8. DXF の原点座標 (0,0) をセット: オプションの設定は、このモードでは無視されます。

  9. レイヤ セクションで、インポートする基板レイヤを選択します。 基板外形には Edge.Cuts を選択する必要があります。

  10. OK をクリックします。

  11. 図形はカーソルに連動し、基板の領域を動かすことができます。

  12. 基板へ図形を ドロップ するには、マウスを左クリックします。

DXF 図形をインポートした例

以下は、短い線分の集合で近似したいくつかの楕円部分を持つ基板を DXF インポートした例です:

images/Pcbnew_board_outline_imported_from_a_DXF.png

6.1.3. 回路図から生成したネットリストの読み込み

images/icons/netlist.png アイコンをアクティブにしてネットリストのダイアログを表示します:

images/ja/Pcbnew_netlist_dialog.png

If the name (path) of the netlist in the window title is incorrect, use the Select button to browse to the desired netlist. Then Read the netlist. Any footprints not already loaded will appear, superimposed one upon another (we shall see below how to move them automatically).

images/Pcbnew_board_outline_with_dogpile.png

If none of the footprints have been placed, all of the footprints will appear on the board in the same place, making them difficult to recognize. It is possible to arrange them automatically (using the command Global Spread and Place accessed via the right mouse button). Here is the result of such automatic arrangement:

images/Pcbnew_board_outline_with_globally_placed_modules.png

If a board is modified by replacing an existing footprint with a new one (for example changing a 1/8W resistance to 1/2W) in CvPcb, it will be necessary to delete the existing component before Pcbnew will load the replacement footprint. However, if a footprint is to be replaced by an existing footprint, this is easier to do using the footprint dialog accessed by clicking the right mouse button over the footprint in question.

6.2. 基板の修正

回路図の変更に応じて基板を修正することは、頻繁に行われます。

6.2.1. 修正手順

  1. 変更した回路図から新しいネットリストを作成します。 If new components have been added, link these to their corresponding footprint in CvPcb.

  2. Pcbnewで新しいネットリストを読み込みます。

6.2.2. 不要な配線の削除

Pcbnew は、回路を変更したことで不要になった配線を自動的に削除できます。これを行うには、ネットリストのダイアログにある “未接続配線” オプションで “削除” を選択します。:

images/ja/Pcbnew_bad_tracks_deletion_option.png

しかしながら、手作業で配線修正した方が速いこともよくあります( DRC 機能により特定できます)。

6.2.3. コンポーネントの削除

Pcbnew can delete footprint corresponding to components that have been removed from the schematic. This is optional.

This is necessary because there are often footprints (holes for fixation screws, for instance) that are added to the PCB that never appear in the schematic.

images/ja/Pcbnew_extra_footprints_deletion_option.png

ネットリストのダイアログにある “ネットリストに無い部品” オプションで “削除” を選択した場合、ネットリストに見つからないコンポーネントに対応するフットプリントは削除されます。削除したくないものは “フットプリントのプロパティ” にある “移動/配置” オプションで “モジュールをロック” を選択します。“機械的” フットプリント用にこのオプションを使います:

images/ja/Pcbnew_unlock_footprint_option.png

6.2.4. Modified footprints

If a footprint is modified in the netlist (using CvPcb), but the footprint has already been placed, it will not be modified by Pcbnew, unless the corresponding option of the Exchange Footprint box of the netlist dialog is checked:

images/ja/Pcbnew_exchange_module_option.png

Changing a footprint (replacing a resistor with one of a different size, for instance) can be effected directly by editing the footprint.

6.2.5. 詳細オプション - タイムスタンプを使用した選択

Sometimes the notation of the schematic is changed, without any material changes in the circuit (this would concern the references - like R5, U4…).The PCB is therefore unchanged (except possibly for the silkscreen markings). Nevertheless, internally, components and footprints are represented by their reference. In this situation, the Timestamp option of the netlist dialog may be selected before re-reading the netlist:

images/ja/Pcbnew_module_selection_option.png

With this option, Pcbnew no longer identifies footprints by their reference, but by their time stamp instead. The time stamp is automatically generated by Eeschema (it is the time and date when the component was placed in the schematic).

警告
Great care should be exercised when using this option (save the file first!). This is because the technique is complicated in the case of components containing multiple parts (e.g. a 7400 has 4 parts and one case). In this situation, the time stamp is not uniquely defined (for the 7400 there would be up to four - one for each part). Nevertheless, the time stamp option usually resolves re-annotation problems.

6.3. 配置済みフットプリントの直接交換

あるフットプリント(または幾つかの同じフットプリント)を別のフットプリントに置き換えることは大変便利で簡単に行えます:

  1. フットプリントを左ダブルクリックし、“フットプリントのプロパティ” ダイアログボックスを開きます。

  2. Activate Change Footprints.

images/ja/Pcbnew_change_modules_button.png

フットプリントの交換のオプション:

images/ja/Pcbnew_footprint_exchange_options.png

新規フットプリントの名前を選択し、以下のオプションのいずれかを選択します:

  • Change Footprint for the current footprint

  • Change same footprints for all footprints like the current footprint.

  • Change same footprint+value for all footprints like the current footprint, restricted to components which have the same value.

全てを変更 :基板上の全てのフットプリントを再読み込み。

7. フットプリントの配置

7.1. 配置補助

フットプリントの移動中、配置を補助するためにフットプリントのラッツネスト(ネット状の結線)を表示できます。これを有効にするには、左ツールバーの images/icons/modratsnest.png アイコンをアクティブにしなければなりません。

7.2. 手動配置

フットプリント上でマウスの右ボタンをクリックしてコンテキストメニューを表示させ、フットプリントを選んで移動コマンドを選択します。必要な位置にフットプリントを移動させ、マウスの左ボタンをクリックして配置を決定します。必要なら、選択したフットプリントを回転、反転または編集することも可能です。中止するには、マウスの右ボタンをクリックしてコンテキストメニューからキャンセルを選択(または Esc キーを押す)します。

下図のように、フットプリントの移動中にラッツネストを表示させることも可能です。(左ツールバーの “フットプリントに表示されたラッツネストを表示” を有効にする)

images/Pcbnew_ratsnest_during_move.png

次の図は、全フットプリントの配置が終了した例です:

images/Pcbnew_circuit_after_placement.png

7.3. フットプリントの角度変更

初期状態では全てのフットプリントはライブラリ内で設定されているのと同じ角度を引き継ぎます(通常は0度)。

個々のフットプリント毎あるいは全てのフットプリントを別の角度(例えば 90 度)にする必要がある場合は、上部ツールバーのアイコンでフットプリントモードにしてからマウスの右クリックでコンテキストメニューを表示させ、“グローバル移動/配置” → “全てのプットプリントの方向を揃える” を選びます。この時、フィルタを使用する(フィルターのフィールドへフィルタ文字を入力)と特定のコンポーネントだけ角度を変更できます(例えば、リファレンスが "IC" で始まるフットプリントのみ等)。

images/ja/Pcbnew_footprints_orientation_dialog.png

7.4. フットプリントの自動展開

一般的にフットプリントは "ロック(固定)" されていなければ、移動させることが可能です。上部ツールバーのアイコンでフットプリントモードにしてからマウスの右クリックで表示させたコンテキストメニュー、または “フットプリントのプロパティ”(フットプリントを左ダブルクリック)で "ロック" の設定ができます。

直前の章で述べたように、ネットリストを読み込むと新規のフットプリントは基板上の一箇所に積み上げられて表示されます。Pcbnew では、手作業による選択および配置を容易にするためにフットプリントの自動展開を行うことができます。

  • "フットプリントモード" (Icon images/icons/mode_module.png 上部ツールバーのアイコン ) を選択します。

  • マウスの右ボタンをクリックすると表示されるコンテキストメニューは次のようになります:

カーソルの下にフットプリントがある場合:

images/ja/Pcbnew_context_module_mode_module_under_cursor.png

カーソルの下に何もない場合:

images/ja/Pcbnew_context_module_mode_no_module_under_cursor.png

両方の場合で次のコマンドが使用可能です:

  • 全てのフットプリントを展開 :固定されていない全フットプリントの自動展開を行うことができます。通常はネットリストの初回読み込み後にこれを使用します。

  • ボード上に無い全てのフットプリントを展開 :基板外形の内側に配置されていないフットプリントの自動展開を行うことができます。このコマンドを使用するには、対象となるフットプリントを識別するために基板外形を先に作成しておかなければなりません。

7.5. フットプリントの自動配置

7.5.1. 自動配置の特徴

フットプリントの自動配置は、基板の表裏両面にあるフットプリントを自動で配置します(ただし、表裏レイヤの切り替えは自動ではありません)。

配置に最適なフットプリントの角度( 0、90、-90、180 度)を求め、最適化アルゴリズムに従って配置が行われます。そのアルゴリズムによって、ラッツネストの長さが最小となるよう、また多数のパッドを持つ大きなフットプリント間の間隔を十分に確保するよう処理が行われます。配置順序は、多数のパッドを持つより大きなフットプリントが最初に配置されるように最適化されます。

7.5.2. 準備

前述のように Pcbnew はフットプリントを自動的に配置することが可能ですが、ソフトウェアは全てを推測できないので実行にはユーザの補助が必要です。

自動配置を実行する前に次のことを行わなければなりません:

  • 基板の外形を作成します(複雑な外形でも構いませんが、形状が矩形ではなくても必ず閉じていなければなりません)。

  • 位置が固定されている (imposed) コンポーネント(コネクタ、クランプ穴など)を手作業で配置します。

  • 同様に、特定の SMD フットプリントおよび重要な (critical) コンポーネント(例えば大きなフットプリント)は、基板の特定の場所(面と位置)に配置しなければなりません。またこれは手作業で行わなければなりません。

  • すべての手動配置が完了したら、これらのフットプリントが動かないように "固定" する必要があります。上部ツールバーのアイコン images/icons/mode_module.png でフットプリントモードにした後、フットプリントを右クリックしてコンテキストメニューを表示させ、“フットプリントをロック” を選択します。(フットプリントを左ダブルクリックして “フットプリントのプロパティ” を表示させ、移動/配置にある “モジュールをロック” を選択しても同様に固定できます。)

  • Automatic placement can then be carried out. With the Footprint Mode icon selected, right click and select Glob(al) Move and Place - then Autoplace All Footprints.

自動配置の実行中、Pcbnew は必要に応じてフットプリントの角度を最適化することができます。しかしながらこの機能は、フットプリントの回転が許可されている場合に限り有効です( “フットプリントのプロパティ” を参照)。

通常、抵抗器および無極性のコンデンサーは 180 度の回転が可能 (authorized) です。ある種のフットプリント(例えば小型のトランジスタなど)では、±90 度および 180 度の回転も可能です。

“フットプリントのプロパティ” にある自動配置のプロパティは、1つ目のスライダーが 90 度回転の許可、2つめのスライダーが 180 度回転の許可の設定です。0を設定すると回転を禁止、10を設定すると完全に許可となります。また中間の値を設定すると必要に応じて回転の選択を表示します。

基板上に配置したフットプリントは、“フットプリントのプロパティ” により回転の許可を設定できます。しかし、必要なオプションはフットプリントライブラリにあるフットプリントに予め設定しておいた方がいいでしょう。その設定がフットプリントを使用する度に引き継がれるからです。

7.5.3. インタラクティブな自動配置

自動配置を実行中に( Esc キーを押して)一旦停止してフットプリントを手作業で再配置することが必要になるかもしれません。“次のフットプリントを自動配置” コマンドを使用すると、停止したところから自動配置を再スタートできます。

“新しいフットプリントを自動配置” コマンドを使うと、基板外形の内側に配置されていないフットプリントの自動配置ができます。フットプリントを “ロック” していない場合でも、基板外形の内側にあるフットプリントを移動させることはありません。

フットプリントが “ロック” されている場合でも、フットプリント上でマウスを右クリックし、コンテキストメニューから “フットプリントを自動配置” コマンドを選ぶとフットプリントは再配置されます。

7.5.4. 補注

Pcbnew は基板の形状によってフットプリントの配置が可能な領域を自動的に決定します。その基板外形は必ずしも矩形である必要はありません(円形あるいは切り抜きがあってもよい)。

基板が矩形ではなくても、その外形は閉じていなければなりません。閉じていれば、Pcbnew は基板の内部にあるものと外部にあるものを区別できます。同様に、内部に切り抜きがある場合も、その輪郭線は閉じている必要があります。

Pcbnew は、基板の形状からフットプリントの配置が可能な領域を計算した後、配置に最適な位置を決定するため、各フットプリントをこの領域上に順々に移動させていきます。

8. 配線パラメータの設定

8.1. 現在の設定

8.1.1. メインダイアログへのアクセス

最も重要なパラメータは、上部メニューバーにある次のドロップダウンメニューからアクセスします:

images/ja/Pcbnew_design_rules_dropdown.png

ここで “デザインルール” を選び、 “デザインルールエディタ” ダイアログで設定します。

8.1.2. 現在の設定

Current settings are displayed in the top toolbar.

images/ja/Pcbnew_design_rules_top_toolbar.png

8.2. 一般設定

The General options menu is available via the top toolbar link Preferences → General dialog.

images/ja/Pcbnew_preferences_menu.png

以下は “一般設定” のダイアログです。

images/ja/Pcbnew_general_options_dialog.png

配線の作成に必要なパラメータは以下の通りです:

  • 配線時の角度を45度単位に制限 : 配線セグメントに許される向きを 0、45、90 度に制限します。

  • ダブルセグメント配線 : 配線を作成する時、セグメントが2つ表示されます。

  • 未接続の配線を削除 : 配線をやり直す時、冗長と見做した古い配線を自動的に削除します。

  • マグネティックパッド : カーソルの形状がパッドになり、パッド領域の中央に 置かれます。

  • マグネティック配線 : カーソルの形状が配線軸になります。

8.3. ネットクラス

Pcbnew は各々のネットに異なる配線パラメータを定義できます。パラメータはネットのグループごとに定義されます。

  • ネットのグループをネットクラスと呼びます。

  • “デフォルト” のネットクラスが必ず存在します。

  • ユーザは、他のネットクラスを追加できます。

ネットクラスには、以下の項目を指定します:

  • 配線幅、ビア径、ビアドリル、マイクロビア径、マイクロビアドリル。

  • クリアランス(パッド、配線(またはビア)間の間隔)。

  • When routing, Pcbnew automatically selects the netclass corresponding to the net of the track to create or edit, and therefore the routing parameters.

8.3.1. 配線パラメータの設定

The choice is made in the menu: Design Rules → Design Rules.

8.3.2. ネットクラス・エディタ

“デザインルールエディタ” の “ネットクラスエディタ” タブページにより、以下のことができます:

  • ネットクラスの追加または削除。

  • 配線パラメータ値の設定: クリアランス、配線幅、ビア径、ビアドリル、マイクロビア径、マイクロビアドリル。

  • ネットクラスのグループ化。

images/ja/Pcbnew_design_rules_editor_netclass_tab.png

8.3.3. グローバル・デザイン・ルール

“デザインルールエディタ” の “グローバルデザインルール” タブページの設定は、以下の通りです:

  • Enabling/disabling Blind/buried Vias use.

  • Enabling/disabling Micro Vias use.

  • Minimum Allowed Values for tracks and vias.

指定した最小値よりも小さい値があった場合は DRC エラーが出力されます。下図は2番目のタブページ(グローバル・デザイン・ルール)です:

images/ja/Pcbnew_design_rules_editor_global_tab.png

このタブページにより配線とビアサイズの "ストック(在庫)" を入力することもできます。

When routing, one can select one of these values to create a track or via, instead of using the netclass’s default value.

これは、小さい配線セグメントが決められた大きさでなければならないような厳しい(critical)用途で役に立ちます。

8.3.4. ビアパラメータ

Pcbnew は3種類のビアを扱います:

  • Through vias (usual vias).

  • ブラインドまたはベリッドビア。

  • マイクロビア。これはベリッドビアに似ていますが、外側のレイヤからその最近傍レイヤへの接続に制限されます。 それらはBGAのピンを最も近い内側のレイヤに接続することを意図しています。通常その直径は非常に小さく、レーザーで穴が開けられます。デフォルトでは、ビアは同じドリル値を採ります。

デフォルトでは、全てのビアは同じドリルの値を持っています。

グローバル・デザイン・ルールのタブページで、これらのビアの最小許容値を指定します。ここで指定した値よりも小さいビアが基板上に見つかると DRC エラーが生成されます。

8.3.5. 配線パラメータ

許容される最小の配線幅を指定して下さい。ここで指定した値よりも小さい配線幅が基板上に見つかると DRC エラーが生成されます。

8.3.6. 特殊サイズ

images/ja/Pcbnew_specific_size_options.png

予備の配線およびビアのサイズをまとめて入力して “在庫” することが可能です。配線する場合、現在のネットクラスの値の代わりに必要に応じてこれらの値を使用できます。

8.4. 典型的な寸法例

8.4.1. 配線幅

普通は出来るだけ大きな値を使用し、最小値はここで与えた値に従って下さい。

Units CLASS 1 CLASS 2 CLASS 3 CLASS 4 CLASS 5

mm

0.8

0.5

0.4

0.25

0.15

mils

31

20

16

10

6

8.4.2. 絶縁(クリアランス)

Units CLASS 1 CLASS 2 CLASS 3 CLASS 4 CLASS 5

mm

0.7

0.5

0.35

0.23

0.15

mils

27

20

14

9

6

通常、最小クリアランスの値は、最小配線幅に近い値となります。

8.5. その他の例

8.5.1. 余裕を持たせたパターンの値

  • クリアランス: 0.35mm (0.0138 インチ)。

  • 配線幅: 0.8mm (0.0315 インチ)。

  • ICおよびビアのパッド直径: 1.91mm (0.0750 インチ)。

  • ディスクリート部品のパッド直径:2.54mm (0.1 インチ)。

  • グラウンド線幅: 2.54mm (0.1 インチ)。

images/Pcbnew_dr_example_rustic.png

8.5.2. 標準的な値

  • クリアランス: 0.35mm (0.0138 インチ)。

  • 配線幅: 0.5mm (0.0127 インチ)。

  • ICのパッドの直径: パッド間に配線を1本通過させ、且つ端子の電気的接続を確実にするためにパッドを細長くします (1.27×2.54 mm → 0.05×0.1 インチ)。

  • ビア: 1.27mm (0.0500 インチ)。

images/Pcbnew_dr_example_standard.png

8.6. 手動配線

Manual routing is often recommended, because it is the only method offering control over routing priorities. For example, it is preferable to start by routing power tracks, making them wide and short and keeping analog and digital supplies well separated. Later, sensitive signal tracks should be routed. Amongst other problems, automatic routing often requires many vias. However, automatic routing can offer a useful insight into the positioning of footprins. With experience, you will probably find that the automatic router is useful for quickly routing the obvious tracks, but the remaining tracks will best be routed by hand.

8.7. 配線作成時の支援機能

images/icons/modratsnest.png ボタンがアクティブである場合、Pcbnew で全ラッツネストを表示させることが可能です。

images/icons/net_highlight.png ボタンにより、ネットをハイライト表示できます(パッドまたは既存の配線をクリックすると、対応するネットがハイライト表示されます)。

The DRC checks tracks in real time while creating them. One cannot create a track which does not match the DRC rules. It is possible to disable the DRC by clicking on the button. This is, however, not recommended, use it only in specific cases.

8.7.1. 配線の作成

A track can be created by clicking on the button images/icons/add_tracks.png . A new track must start on a pad or on another track, because Pcbnew must know the net used for the new track (in order to match the DRC rules).

images/Pcbnew_creating_new_track.png

When creating a new track, Pcbnew shows links to nearest unconnected pads, link number set in option "Max. Links" in General Options.

End the track by double-clicking, by the pop-up menu or by its hot key.

images/ja/Pcbnew_track_in_progres_context.png

8.7.2. 配線の移動およびドラッグ

When the button images/icons/add_tracks.png is active, the track where the cursor is positioned can be moved with the hotkey M. If you want to drag the track you can use the hotkey G.

8.7.3. ビアの挿入

配線作成中の時にのみ次の方法でビアを挿入することが可能です:

  • コンテキストメニュー

  • By the hotkey V.

  • 適切なホットキーを使用して、新しい導体レイヤへ切替え。

8.8. 配線幅およびビアサイズの選択/編集

配線またはパッドをクリックした時、Pcbnew はその対応するネットクラスから配線サイズとビア寸法を自動的に選択します。

以前に見たように、グローバル・デザイン・ルールのタブページで、配線およびビアの予備サイズを追加して “在庫” できます。

  • 上部ツールバーにあるドロップダウンリストで、配線およびビアのサイズを “在庫” から選択ができます。

  • images/icons/add_tracks.png ボタンがアクティブの時、(配線の作成時にもアクセス可能な)コンテキストメニューから現在の配線幅を選択可能です。

  • ユーザはデフォルトのネットクラス値あるいは特定の値のどちらも利用できます。

8.8.1. 上部ツールバーの使用

images/ja/Pcbnew_track_toolbar.png

images/Pcbnew_track_toolbar_track_width_selection.png

Track width selection. The symbol * is a mark for default Netclass value selection.

images/Pcbnew_track_toolbar_track_width_selection_in_use.png

Selecting a specific track width value. The first value in list is always the netclass value. Others values are tracks widths entered from the Global Design Rules editor.

images/Pcbnew_track_toolbar_via_size_selection.png

Via size selection. The symbol * is a mark for default Netclass value selection.

images/Pcbnew_track_toolbar_via_size_selection_in_use.png

Selecting a specific via dimension value. The first value in list is always the netclass value. Others values are vias dimensions entered from the Global Design Rules editor.

images/icons/auto_track_width.png

When enabled: Automatic track width selection. When starting a track on an existing track, the new track has the same width as the existing track.

images/Pcbnew_track_toolbar_grid_size_selection.png

Grid size selection.

images/Pcbnew_track_toolbar_zoom_selection.png

Zoom selection.

8.8.2. コンテキストメニューの使用

配線用に新しいサイズを選択、あるいは以前に作成したビアまたは配線セグメントを変更することができます:

images/ja/Pcbnew_track_context_menu.png

多数のビア(または配線)サイズを変更したい場合、一番良い方法は、編集する必要があるネット用に特定のネットクラスを使用することです(グローバル変更を参照)。

8.9. 配線の編集および変更

8.9.1. 配線の変更

多くの場合、配線は再配線が必要となります。

新規配線(作業中):

images/Pcbnew_new_track_in_progress.png

終了時:

images/Pcbnew_new_track_completed.png

Pcbnew will automatically remove the old track if it is redundant.

8.9.2. グローバル変更

“配線とビアのグローバル編集” ダイアログは、配線を右クリックして表示されるポップアップウィンドウによりアクセス可能です:

images/ja/Pcbnew_track_global_edit_context_menu.png

“配線とビアのグローバル編集” により、次のグローバル変更を行うことができます:

  • 現在選択しているネット。

  • 基板全体。

images/ja/Pcbnew_track_global_edit_dialog.png

9. インタラクティブ・ルーター

インタラクティブルーターを使うと、いま配線しようとしているパターンが衝突している基板上のアイテムを押しのけるか、その周りを回り込むので、基板をすばやく効果的に配線できます。

次のモードがサポートされます:

  • 衝突箇所をハイライト表示 全ての抵触するオブジェクトをきれいな明るい緑色で ハイライト(強調表示)し、領域同士のクリアランス(間隔)が足りないことを示します。

  • 押しのけ 引いた配線に抵触するアイテムを押し出そうと 試みます

  • 速度優先探索 障害物の周りに沿って回り込むことで、避けようと 試みます。

9.1. 設定

インタラクティブルーターを使う前に、次の2つを設定して下さい。:

  • クリアランスの設定 クリアランス(間隔)を設定するには デザインルール ダイアログを開きます。 少なくともクリアランスのデフォルト値は妥当と思われる値にしてください。

Rules editor
  • * OpenGL(3D) モードの設定 * メニューオプション 表示→キャンバスを OpenGL(3D) へ切替 を選択、 または F11 キーを押して設定します。

OpenGL mode

9.2. パターン配線

ルーターツールを有効にするには、 インタラクティブ・ルーター・ボタン Interactive Router Button X キーを押します。カーソルが十字に変わり、ツールの名前がステータスバーへ表示されます。

配線を開始するには、アイテム(パッド、パターン、ビア(貫通孔))上でクリックするか、アイテムにマウスを合わせて X キーを押します。新しい配線は、開始されたアイテムのネット情報を使うでしょう。基板上の何もない場所でクリックするか X キーを押すとネットを持たない配線を開始します。

配線パターンの形状を決めるためにマウスを動かします。ルーターはモードによって、(パッドのような)動かせない障害物に沿うか、衝突した配線パターンまたはビア(貫通穴)を押しのけて、マウスの軌跡を追いかけようとするでしょう。マウスカーソルを後退させると、押しのけられたアイテムは元の位置へ戻るでしょう。

同じネット情報を持つパッド/配線パターン/ビア(貫通穴)上でクリックすることで、ルーティングを終了します。何もないところでクリックすると、それまでにルートされたセグメントを固定し、配線のルーティングを続けます。

ルーティングを中止し、全ての変更(押しのけられたアイテムなど)を元に戻すには、 Esc を押してください。

配線のルーティング中に V を押すか、右キリックによるコンテキストメニューから 貫通ビアの配置 を選択すると、ルートされた配線パターンの最後にビア(貫通穴)が置かれます。 V をもう一度押すと、置かれたビアは消えます。どこでクリックしてもビアが置かれ、ルーティングが続けられます。

/ を押すか、コンテキストメニューから 配線の形を変える を選択するごとに、配線の最初のセグメントの方向を “ ストレート(水平/垂直)” または “ 斜め( 45 度)” に切替えます。

デフォルトでは、ルーターはアイテムの中心/中心線へスナップします。スナップは、ルーティング中またはアイテムの選択中に Shift を押し続けることで無効にできます。

9.3. トラック幅とビアサイズの設定

トラック幅/ビアサイズを事前に設定またはルーティング中に変更するには、いくつかの方法があります。

  • 標準の KiCad ショートカットを使用する。

  • W を押すか、コンテキストメニューから _カスタム配線幅_ を選択する。

  • コンテキストメニューの 配線/ビア幅の選択 の下にあるサブメニューから予め定義された幅を選ぶ。

  • 開始アイテム(または既に配線されたパターン)の幅と同じにするには、コンテキストメニューの 配線/ビア幅の選択 の下にあるサブメニューから 開始トラック幅を使用 を選ぶ。

9.4. ドラッグ

ルーターは配線セグメント、コーナー、ビアをドラッグできます。アイテムをドラッグするには、 Ctrl キーを押しながらアイテムをクリックするか、 G を押してマウスを動かすか、コンテキストメニューから 配線/ビア幅のドラッグ を選びます。再度クリックすることでドラッグを終了するか、 Esc を押して中止します。

9.5. オプション

ルーターは、E を押すか、コンテキストメニューから 配線オプション を選ぶことで設定できます。次のようなウィンドウが開きます。:

Router options window screenshot

オプションは以下の通りです。:

  • モード - ルーターが DRC 違反をどのように扱うか選択する(押しのけ、 速度優先探索、等)

  • ビアの押しのけ - 無効の場合、ビアは動かないものとして扱われ、 押しのけに代わって周りに沿うように配線される

  • 障害ジャンプ - 有効化すると,ルーターは障害物を押しのける代わりに、 衝突した配線を障害物(例えば、パッド)の後ろに迂回させる

  • 余分な配線を削除 - ルーティング中に重複を削除する(例えば、新しい 配線が既存の配線と同じ接続であることが確実な場合、古い配線は削除 される)重複の削除は局所的に行われる(現在ルーティング中の配線の 始点と終点の間にあるものだけが対象)

  • 自動ネックダウン(線幅調整) - 有効な場合、ルーターは、鋭角やギザギザした 配線を避けるように、パッド/ビアを直線的に配置する。

  • セグメントをスムーズに移動 - 有効の場合、ルーターはいくつかのギザギザ した配線を一つの直線的な配線へ纏めようと試みる(ドラッグモード)

  • DRC 違反を許容する (衝突箇所をハイライト表示 モードのみ) - DRC ルール違反があっても配線することを許容する

  • 探索最適化レベル - ルーティングまたは押しのけされた配線をルーターが最適化 する時間を定義する。高い探索最適化レベルは凸凹していないルーティング を行うことを意味し(だが遅い)、低い探索最適化レベルは幾分ギザギザした 配線でもより早くルーティングすることを意味します。

10. 導体ゾーンの作成

導体ゾーンは外形(閉ポリゴン)により定義され、穴(外形内部の閉ポリゴン)を含めることが可能です。ゾーンは導体レイヤまたはテクニカルレイヤに作成可能です。

10.1. 導体レイヤでのゾーンの作成

Pad (and track) connections to filled copper areas are checked by the DRC engine. A zone must be filled (not just created) to connect pads. Pcbnew currently uses track segments or polygons to fill copper areas.

各オプションには長所と短所があり、それは主に画面の再描画に関するものです。しかしながら最終結果は同じものとなります。

For calculation time reasons, the zone filling is not recreated after each change, but only:

  • ゾーン塗り潰しコマンドを実行する場合。

  • When a DRC test is performed.

Copper zones must be filled or refilled after changes in tracks or pads are made. Copper zones (usually ground and power planes) are usually attached to a net.

導体ゾーンを作成するためには、以下のことが必要です:

  • Select parameters (net name, layer…). Turning on the layer and highlighting this net is not mandatory but it is good practice.

  • Create the zone limit (If not, the entire board will be filled.).

  • ゾーンを塗り潰す。

Pcbnew tries to fill all zones in one piece, and usually, there will be no unconnected copper blocks. It can happen that some areas remain unfilled. Zones having no net are not cleaned and can have insulated areas.

10.2. ゾーンの作成

10.2.1. ゾーン境界の作成

ツール images/icons/add_zone.png を使用します。アクティブなレイヤは導体レイヤでなければなりません。ゾーン外形の作成を始めるために左ボタンをクリックすると、“導体ゾーンのプロパティ” ダイアログボックスが開きます。

images/ja/Pcbnew_zone_properties_dialog.png

このダイアログボックスで、作成しようとするゾーンに関するパラメータを指定します。:

  • Net

  • Layer

  • 塗り潰しオプション

  • パッドオプション

  • 優先度

Draw the zone limit on this layer. This zone limit is a polygon, created by a left-clicking at each corner. A double-click will end and close the polygon. If the starting point and ending point are not at the same coordinate, Pcbnew will add a segment from the end point to the start point.

  • ゾーン外形の作成時、DRC コントロールはアクティブです。

  • DRC エラーとなるような角を Pcbnew は受け付けません。

In the following image you can see an example of a zone limit (polygon in thin hatched line):

images/Pcbnew_zone_limit_example.png

10.2.2. 優先度

時には大きなゾーンの中に小さなゾーンを作らなければならない場合があります。

This is possible if the small zone has a higher priority level than the large zone.

Level setting:

images/Pcbnew_zone_priority_level_setting.png

次に例を示します:

images/Pcbnew_zone_priority_example.png

塗り潰し後:

images/Pcbnew_zone_priority_example_after_filling.png

10.2.3. ゾーンの塗り潰し

When filling a zone, Pcbnew removes all unconnected copper islands. To access the zone filling command, right-click on the edge zone.

images/ja/Pcbnew_zone_context_menu.png

"ゾーンの塗り潰し" コマンドを実行します。ポリゴン内部に開始点がある場合の塗り潰し結果を次に示します:

images/Pcbnew_zone_filling_result.png

ポリゴンは塗り潰し領域の境界です。ゾーン内部の非塗り潰し領域が分かると思います。これは、この領域にアクセスできないためです:

  • 配線は境界を作成します。

  • また、この領域に塗り潰しの開始点はありません。

複数のポリゴンを使用して切り抜き領域を作成することが可能です。次に示す例を参照して下さい:

images/Pcbnew_zone_filled_with_cutout.png

10.3. 塗り潰しオプション

images/ja/Pcbnew_zone_filling_options.png

領域を塗り潰す時には、以下を選択する必要があります:

  • 塗りつぶしのモード。

  • クリアランスおよび最小の導体幅。

  • ゾーン内部のパッド作成方法(ゾーンへの接続あり/なし)。

  • サーマルパターン(サーマルリリーフ)のパラメータ。

10.3.1. 塗りつぶしモード

ポリゴンまたはセグメントを使用してゾーンを塗り潰します。どちらを使用してもその結果は同じです。ポリゴンモードで問題(画面の更新が遅い)がある場合はセグメントを使用します。

10.3.2. クリアランスおよび最小導体幅

クリアランスには配線で使用するグリッドよりも少し大きいグリッドを選択すると良いでしょう。最小導体幅の値により、小さ過ぎない導体領域の確保を保証します。

警告
この値が大きすぎるとサーマルパターンのスポークのような小さな形状を作成することができません。

10.3.3. パッドオプション

パッドへの接続部分をゾーンに含める、除外する、あるいはサーマルパターンとすることが可能です。

  • パッドへの接続部分をゾーンに含める場合、ハンダ付けおよびハンダ除去が非常に困難になることがあります。

images/Pcbnew_zone_include_pads.png

  • パッドへの接続部分をゾーンから除外する場合、ゾーンとの接続は十分に低いインピーダンスにはならないでしょう。

    • ゾーンの領域へ接続するトラックが存在する場合のみゾーンは塗り潰されます。

    • パッドはトラックで接続しなければなりません。

images/Pcbnew_zone_exclude_pads.png

  • サーマルパターンは好ましい妥協です。

    • パッドは4 つの配線セグメントにより接続されています。

    • セグメント幅は配線幅で使用している現在値です。

images/Pcbnew_zone_thermal_relief.png

10.3.4. サーマルパターンパラメータ

images/ja/Pcbnew_thermal_relief_settings.png

サーマルパターン用に2つのパラメータを設定することが可能です:

images/ja/Pcbnew_thermal_relief_parameters.png

10.3.5. パラメータの選択

The copper width value for thermal reliefs must be bigger than the minimum thickness value for the copper zone. If not, they cannot be drawn.

さらに、このパラメータまたはパッド抜きサイズの値が大き過ぎると( SMD コンポーネントに使用するパッドサイズのような)小さいパッド用のサーマルパターンを作成することができません。

10.4. ゾーン内部への切り抜き領域の追加

ゾーンがすでに存在していなければなりません。切り抜き領域(ゾーン内部の非塗り潰し領域)を追加するには:

  • Right-click on an existing edge outline.

  • “切り抜きの追加” を選択します。

images/ja/Pcbnew_add_cutout_menu_item.png

  • 新規外形を作成します。

images/Pcbnew_zone_unfilled_cutout_outline.png

10.5. 外形の編集

外形には次のような修正が可能です:

  • 角または辺を移動させる。

  • 角を削除または追加する。

  • 同様のゾーンまたは切り抜きを追加する。

ポリゴンが重なっている場合、それらは結合されます。

images/ja/Pcbnew_zone_modification_menu_items.png

To do that, right-click on a corner or on an edge, then select the proper command.

以下は切抜きの頂点を移動した例です。

images/Pcbnew_zone_corner_move_during.png

以下は最終的な結果です:

images/Pcbnew_zone_corner_move_after.png

ポリゴンが結合されています。

10.5.1. 同じゾーンへの追加

同じゾーンにゾーンを追加します:

images/Pcbnew_zone_add_similar_during.png

最終結果です:

images/Pcbnew_zone_add_similar_after.png

10.6. Editing zone parameters

When right-clicking on an outline, and using Edit Zone Params the Zone params Dialog box will open. Initial parameters can be inputted . If the zone is already filled, refilling it will be necessary.

10.7. 最終ゾーン塗り潰し

基板の作業終了時に、全てのゾーンを塗り潰しまたは再塗り潰しをしなければなりません。次のようにします。:

  • ボタン images/icons/add_zone.png によりゾーンのツールを実行します。

  • Right-click to display the pop-up menu.

  • “全てのゾーンを塗りつぶす” を使用します: images/ja/Pcbnew_fill_refill_all_zones.png

警告
Calculation can take some time if the filling grid is small.

10.8. ゾーンネット名の変更

回路図の編集後、任意のネットの名前を変更することが可能です。例えば、VCC を +5V に変更可能です。

グローバル DRC コントロールを行う時に、Pcbnew はゾーンのネット名が存在するかをチェックし、もしそれがなければエラーを表示します。

Manually editing the zone parameters will be necessary to change the old name to the new one.

10.9. テクニカルレイヤでのゾーン作成

10.9.1. ゾーン境界の作成

“塗りつぶしゾーンの追加” ボタンを使用して行います。アクティブなレイヤはテクニカルレイヤでなければなりません。

When clicking to start the zone outline, this dialog box is opened:

images/ja/Pcbnew_technical_layer_zone_dialog.png

ゾーンを配置するテクニカルレイヤを選択し、導体レイヤのところで説明したようにゾーン外形を作成します。

  • For editing outlines use the same method as for copper zones.

  • If necessary, cutout areas can be added.

10.10. キープアウトエリアの作成

ツール images/icons/add_keepout_area.png を選択します。

アクティブレイヤは導体レイヤである必要があります。

新しいキープアウトエリアの開始点で左クリックすると、ダイアログボックスが開きます:

images/ja/Pcbnew_keepout_area_properties.png

禁止するオプションを複数選択できます。

  • Tracks.

  • Vias.

  • Copper pours.

キープアウト内に許可されていない配線やビアがある場合、DRC エラーが発生します。

For copper zones, the area inside a keepout with no copper pour will be not filled. A keep-out area is a like a zone, so editing its outline is analogous to copper zone editing.

11. 基板製造のためのファイル出力

Let us see now what are the steps necessary for the creation of the necessary files for the production of your printed circuit board.

All files generated by KiCad are placed in the working directory which is the same directory that contains the xxxx.brd file for the printed circuit board.

11.1. 最後の準備

プリント基板を製造するために必要なファイルの生成ステップを、下記に示します。

  • 各々のレイヤ (‘ 表面 ’ や ‘ 裏面 ’ など) へプロジェクト名などのテキストを配置します。

  • 裏面やハンダレイヤと呼ばれる導体レイヤの文字列は、全て反転させる必要があります。

  • ベタ GND パターンを作成します。必要に応じて他の配線パターンを調整します。

  • 基板の製造時に必要となるアライメントマーク(十字マーク)や、基板外形の寸法線を配置します。これらは通常、汎用レイヤに配置します。

Here is an example showing all of these elements, except ground planes, which have been omitted for better visibility:

images/Pcbnew_final_preparation_example_board.png

4つの導体レイヤのための主要色も含まれています: images/Pcbnew_layer_colour_key.png

11.2. 最終的な DRC テスト

ファイルを生成する前に、グローバル DRC テストを実施することを強くおすすめします。

DRC テストを開始すると領域が塗りつぶされます。ボタン images/icons/drc.png をクリックし、以下の DRC ダイアログを表示させます。

images/ja/Pcbnew_DRC_dialog.png

パラメータを適宜変更して、 “ DRC 開始 ” をクリックします。

この最終チェックで、つまらないミスを未然に防止することができます。

11.3. 原点座標の設定

Set the coordinates origin for the photo plot and drill files, one must place the auxiliary axis on this origin. Activate the icon images/icons/pcb_offset.png . Move the auxiliary axis by right-clicking on the chosen location.

images/Pcbnew_setting_pcb_origin.png

11.4. フォトプロッタのためのファイル生成

これらはプロットの “製造ファイル出力” から作成します。上部メニューバー “ファイル” → “プロット” から次のダイアログを呼び出します:

images/ja/Pcbnew_plot_dialog.png

通常、これらのファイルはガーバーフォーマットで出力されます。他に PostScript、SVG、DXF、HPGL、PDF フォーマットで出力することもできます。下図に PostScript ファイルが選択された場合を示します。PostScript の場合、高精度なスケール調整が可能です。

images/ja/Pcbnew_plot_postscript_dialog.png

In these formats, a fine scale adjust can be used to compensate for the plotter accuracy and to have a true scale of 1 for the output:

images/ja/Pcbnew_plot_fine_scale_setting.png

11.4.1. ガーバーフォーマット

For each layer, Pcbnew generates a separate file following the GERBER 274X standard, by default in 3.4 format (each coordinate in the file is represented by 7 digits, of which 3 are before the decimal point and 4 follow it), units in inches, and a scale of 1.

It is normally necessary to create files for all of the copper layers and, depending on the circuit, for the silkscreen, solder mask, and solder paste layers. All of these files can be produced in one step, by selecting the appropriate check boxes.

For example, for a double-sided circuit with silkscreen, solder mask and solder paste (for SMD components), 8 files should be generated (xxxx represents the name of the .brd file).

  • xxxx-F_Cu.gbr(表面導体パターン、リフロー面)。

  • xxxx-B_Cu.gbr(裏面導体パターン、フロー面)。

  • xxxx-F_SilkS.gbr(表面シルク印刷)。

  • xxxx-B_SilkS.gbr(裏面シルク印刷)。

  • xxxx.soldpcmp.pho for the component-side solder paste.

  • xxxx.soldpcu.pho for the copper-side solder paste.

  • xxxx.maskcmp.pho for the component-side solder mask.

  • xxxx.maskcu.pho for the copper-side solder mask.

ガーバーファイルフォーマット:

Pcbnew で利用されるフォーマットは、ゼロサプレス(先方、後方ゼロ省略)、絶対値表記の RS274X 4.5/4.6 フォーマットです。

11.4.2. PostScript フォーマット

PostScript 形式の場合、標準のファイル拡張子は .ps となります。HPGL 出力と同様に、ユーザが選択したスケールと反転/非反転の設定で出力が可能です。もし Org = Centre オプションがアクティブならば、トレーステーブルの座標の原点は図の中心にあると仮定されます。

「全てのレイヤにシートリファレンスを出力」オプションが有効になっていた場合、図枠もトレースされます。

11.4.3. プロットオプション

ガーバーフォーマット:

images/ja/Pcbnew_plot_options_gerber.png

その他のフォーマット:

images/ja/Pcbnew_plot_options_other_formats.png

GERBER フォーマットのオプション:

Use Protel filename extensions

Use .gbl .gtl instead of .pho for file name extensions.

Include extended attributes

Output extended attributes to file.

Subtract soldermask from silkscreen

Remove all Silk from solder paste areas.

11.4.4. その他のフォーマット

標準の拡張子は、出力ファイルの種類によって異なります。

幾つかのオプションはフォーマットによっては使用できません。

ユーザが選択した倍率で出図でき、反転することも可能です。

上部メニューバー “ファイル” → “プリント” で印刷のダイアログのボックスが開きます。印刷時は、このダイアログにあるパッドドリルのオプションで、ドリルマークなし、実ドリル形状、小マーク(手加工で穴を開ける際のガイド)を選択できます。

「全てのレイヤにシートリファレンスを出力」オプションが有効になっていた場合、図枠もトレースされます。

11.5. レジストとハンダペーストのマスクのグローバルクリアランス設定

マスクのクリアランス設定値は、レジストレイヤとハンダペーストレイヤで利用されます。これらクリアランスの設定は、下記の段階ごとに設定可能です。

  • パッドごと。

  • フットプリントごと。

  • グローバル。

Pcbnew では、下記の順序で値が適用されます。

  • パッドに対する設定値(数値が入力されている場合):

  • フットプリントに対する設定値(数値が入力されている場合):

  • グローバルの設定値。

11.5.1. アクセス

このオプションメニューは、上部メニューバーにある “寸法” メニューから利用できます:

images/ja/Pcbnew_pad_mask_clearance_menu_item.png

表示されるダイアログボックスを下記に示します:

images/ja/Pcbnew_pad_mask_settings_dialog.png

11.5.2. レジストのクリアランス

通常は 0.2mm に近い数値を設定しておくとよいでしょう。レジストマスクは通常パッドよりも大きくなるため、この値は正の数となります。

2つのパッド間のレジストの残り幅に対し、最小値を設定することができます。

実際の値が最小値より小さい場合、2つのレジストマスク形状が結合されます。

11.5.3. ハンダペーストのクリアランス

最終的なクリアランスは、ハンダペーストのクリアランスとパッドのサイズの合計値になります。

ハンダマスク(メタルマスク)は通常パッドよりも小さくなるため、負の数が設定されることとなります。

11.6. ドリルファイルの生成

The creation of a drill file xxxx.drl following the EXCELLON standard is always necessary.

オプションでドリルレポート、およびドリルマップを生成することができます。

  • The drill map can be plotted using several formats.

  • The drill report is a plain text file.

The generation of these files is controlled via:

  • "Create Drill File" button, or

  • Files/Fabrication Outputs/Drill file menu selection.

ドリルファイル生成のダイアログを下記に示します:

images/ja/Pcbnew_drill_file_dialog.png

原点の設定は、ダイアログにあるドリル原点を使用します(下記参照):

images/ja/Pcbnew_drill_origin_setting.png

  • 絶対値座標位置を使用:絶対値座標系を利用します。

  • Auxiliary axis: coordinates are relative to the auxiliary axis, use the icon (right toolbar) to set it.

11.7. Generating wiring documentation

To produce wiring documentation files, the component and copper silkscreen layers can be traced. Usually, just the component-side silkscreen markings are sufficient for wiring a PCB. If the copper-side silkscreen is used, the text it contains should be mirrored in order to be readable.

11.8. 自動部品挿入機のためのファイル生成

This option is accessed via the Postprocess/Create Cmp file menu option. However, no file will be generated unless at least one footprint has the Normal+Insert attribute activated (see Editing Footprints). One or two files will be produced, depending upon whether insertable components are present on one or both sides of the PCB. A dialogue box will display the names of the file(s) created.

11.9. 高度なオプション

The options described below (part of the Files/Plot dialogue) allow for fine-grained control of the tracing process. They are particularly useful when printing the silkscreen markings for wiring documentation.

images/ja/Pcbnew_advanced_tracing_options.png

利用可能なオプションを、以下に示します:

Use Proper Gerber Extensions

GERBER format specific. When creating files, use specific extensions foe each file. If disabled the Gerber file extension is .pho.

Exclude pcb edge layer

GERBER format specific. Do not plot graphic items on edge layer.

Print Sheet Ref

Trace sheet outline and the cartridge.

Print Pads on Silkscreen

Enables/disables printing of pad outlines on the silkscreen layers (if the pads have already been declared to appear on these layers). Prevents any pads from being printed in the disabled mode.

Print Footprint Value

Enables printing of VALUE text on the silkscreen.

Print Footprint Reference

Enables printing of the REFERENCE text on the silkscreen.

Print other footprint texts

Enables the printing of other text fields on the silkscreen.

Force Print Invisible Texts

Forces printing of fields (reference, value) declared as invisible. In combination with Print Footprint Reference and Print Footprint Value, this option enables production of documents for guiding wiring and repair. These options have proven necessary for circuits using components that are too small (SMD) to allow readable placement of two separate text fields.

12. Footprint Editor - Managing Libraries

12.1. Overview of Footprint Editor

Pcbnew can simultaneously maintain several libraries. Thus, when a footprint is loaded, all libraries that appear in the library list are searched until the first instance of the footprint is found. In what follows, note that the active library is the library selected within the Footprint Editor, the program will now be described

Footprint Editor enables the creation and the editing of footprints:

  • パッドの追加および削除。

  • Changing pad properties (shape, layer) for individual pads or globally for all pads of a footprint.

  • グラフィック要素(ライン、テキスト)の編集。

  • 情報フィールド(値、リファレンスなど)の編集。

  • 関連ドキュメント(説明、キーワード)の編集。

Footprint Editor allows the maintenance of the active library as well by:

  • Listing the footprints in the active library.

  • Deletion of a footprint from the active library.

  • Saving a footprint to the active library.

  • Saving all of the footprints contained by a printed circuit.

新規ライブラリを作成することも可能です。

このライブラリの拡張子は .mod です。

12.2. Accessing Footprint Editor

The Footprint Editor can be accessed in two different ways:

  • Pcbnew のメインツールバーのアイコン images/icons/module_editor.png を左クリックする。

  • In the edit dialog for the active footprint (see figure below: accessed via the context menu), there is the button Footprint Editor.

images/ja/Pcbnew_module_properties.png

In this case, the active footprint of the board will be loaded automatically in Footprint Editor, enabling immediate editing or archiving.

12.3. Footprint Editor user interface

By calling Footprint Editor the following window will appear:

images/ja/Modedit_main_window.png

12.4. Top toolbar in Footprint Editor

images/Modedit_top_toolbar.png

このツールバーから、次の機能が使用可能です:

images/icons/library.png

Select the active library.

images/icons/save_library.png

Save the current footprint to the active library, and write it to disk.

images/icons/new_library.png

Create a new library and save the current footprint in it.

images/icons/modview_icon.png

Open the Footprint Viewer

images/icons/delete.png

Access a dialog for deleting a footprint from the active library.

images/icons/new_footprint.png

Create a new footprint.

images/icons/module_wizard.png

Create a footprint using a wizard

images/icons/load_module_lib.png

Load a footprint from the active library.

images/icons/load_module_board.png

Load (import) a footprint from the printed circuit board.

images/icons/update_module_board.png

Export the current footprint to the printed circuit board. when the footprint was previously imported from the current board. It will replace the corresponding footprint on the board (i.e., respecting position and orientation).

images/icons/insert_module_board.png

Export the current footprint to the printed circuit board. It will be copied on to the printed circuit board at position 0.

images/icons/import_module.png

Import a footprint from a file created by the Export command.

images/icons/export_module.png

Export a footprint. This command is essentially identical to that for creating a library, the only difference being that creates a library in the user directory, while creates a library in the standard library directory (usually kicad/modules).

images/icons/undo.png images/icons/redo.png

Undo and Redo

images/icons/module_options.png

Invokes the footprint properties dialog.

images/icons/print_button.png

Call the print dialog.

images/icons/zoom_in.png images/icons/zoom_out.png images/icons/zoom_redraw.png images/icons/zoom_fit_in_page.png

Standard zoom commands.

images/icons/options_pad.png

Call the pad editor.

images/icons/module_check.png

Perform a check of footprint correctness

12.5. 新規ライブラリの作成

新規ライブラリの作成はボタン images/icons/new_library.png で行います。この場合、ファイルはデフォルトでライブラリのディレクトリに作成されます。あるいはボタン images/icons/export_module.png を用います。その場合にはファイルはデフォルトで作業ディレクトリに作成されます。

A file-choosing dialog allows the name of the library to be specified and its directory to be changed. In both cases, the library will contain the footprint being edited.

警告
同じ名前のライブラリが既に存在する場合、警告なしで上書きされます。

12.6. Saving a footprint in the active library

The action of saving a footprint (thereby modifying the file of the active library) is performed using this button images/icons/save_library.png . If a footprint of the same name already exists, it will be replaced. Since you will depend upon the accuracy of the library footprints, it is worth double-checking the footprint before saving.

It is recommended to edit either the reference or value field text to the name of the footprint as identified in the library.

12.7. Transferring a footprint from one library to another

  • ボタン images/icons/library.png で移動元ライブラリを選択します。

  • Load the footprint via the button images/icons/load_module_lib.png .

  • ボタン images/icons/library.png で移動先ライブラリを選択します。

  • Save the footprint via the button images/icons/save_library.png

You may also wish to delete the source footprint.

  • 移動元ライブラリを再度選択し、ボタン images/icons/library.png

  • Delete the old footprint via the button images/icons/delete.png

12.8. Saving all footprints of your board in the active library

It is possible to copy all of the footprints of a given board design to the active library. These footprints will keep their current library names. This command has two uses:

  • To create an archive or complete a library with the footprints from a board, in the event of the loss of a library.

  • さらに重要なことは、以下のようにライブラリ用のドキュメントを作成できるようにすることでライブラリの保守を容易にします。

12.9. Documentation for library footprints

It is strongly recommended to document the footprints you create, in order to enable rapid and error-free searching.

For example, who is able to remember all of the multiple pin-out variants of a TO92 package? The Footprint Properties dialog offers a simple solution to this problem.

images/ja/Modedit_module_properties.png

このダイアログには次の項目が入力可能です:

  • ドキュメント(説明=1行コメント)

  • キーワード(複数の単語を入力可)

The description is displayed with the component list in Cvpcb and, in Pcbnew, it is used in the footprint selection dialogs.

The keywords enable searches to be restricted to those footprints corresponding to particular keywords.

When directly loading a footprint (the icon images/icons/module.png of the right-hand Pcbnew toolbar), keywords may be entered in the dialog box. Thus, entering the text =CONN will cause the display of the list of footprints whose keyword lists contain the word CONN.

ライブラリ用のフットプリントを配置した複数の補助的なプリント基板ファイルを作ることで、間接的にライブラリを作成することを推奨します。以下はその手順です:拡大/縮小して印刷可能にするために、A4 フォーマットで回路基板を作成します。 (scale = 1)

Create the footprints that the library will contain on this circuit board. The library itself will be created with the File/Archive footprints/Create footprint archive command.

images/ja/Pcbnew_archive_footprints_menu.png

The "true source" of the library will thus be the auxiliary circuit board, and it is on this circuit that any subsequent alterations of footprints will be made. Naturally, several circuit boards can be saved in the same library.

It is generally a good idea to make different libraries for different kinds of components (connectors, discretes,…), since Pcbnew is able to search many libraries when loading footprints.

以下はライブラリソースの例です:

images/ja/Pcbnew_example_library.png

この手法には利点がいくつかあります:

  • 回路を拡大/縮小して印刷することが可能で、あとは何もしなくてもライブラリ用のドキュメントとしての役目を果たします。

  • Pcbnew の今後の変更によってライブラリの作り直しが必要になるかも知れません。この種の回路基板のソースを使用していれば、非常に迅速に作り直しを行うことが可能です。これは重要なことです。プリント基板ファイルのフォーマットは今後開発されている間は互換性を維持していることが保証されていますが、そのことがライブラリのファイルフォーマットには当てはまらないからです。

12.11. フットプリント ライブラリの管理

Pcbnew のフットプリント ライブラリの一覧は、フットプリント・ライブラリ・マネージャ(設定メニューで "フットプリント ライブラリの管理" を選択)を使って編集することができます。手動でフットプリント ライブラリの追加と削除ができ、また "ウィザードを使用して追加" ボタンを押すと "フットプリント ライブラリの追加ウィザード" を呼び出すことができます。

"フットプリント ライブラリの追加ウィザード" は設定メニューから呼び出す(設定メニューで "フットプリント ライブラリ ウィザード" を選択)こともでき、ファイルまたは Github URL から自動的に(種類を検出して)ライブラリを追加できます。以下は公式ライブラリの URL です: https://github.com/KiCad

More details about footprint library tables and the Manager and Wizard can be found in the CvPcb Reference Manual in the section Footprint Library Tables.

12.12. 3D Shapes Libraries Management

The 3D shape libraries can be downloaded by 3D Shape Libraries Wizard. It can be invoked from the menu Preferences → 3D Shapes Libraries Downloader.

13. Footprint Editor - Creating and Editing Footprints

13.1. Footprint Editor overview

Footprint Editor is used for editing and creating PCB footprints. This includes:

  • パッドの追加および削除。

  • Changing pad properties (shape, layer), for individual pads or for all the pads in a footprint.

  • その他図形要素(ライン、テキスト)の追加および編集。

  • フィールド(値、リファレンスなど)の編集。

  • 関連ドキュメント(説明、キーワード)の編集。

13.2. Footprint elements

A footprint is the physical representation (footprint) of the part to be inserted in the PCB and it must be linked to the relative component in your schematic. Each footprint includes three different elements:

  • パッド。

  • グラフィカルな外形とテキスト。

  • フィールド。

さらに、自動配置機能を使用するのであれば、他の多くのパラメータを正しく定義しなれければなりません。同じことが自動実装ファイルの生成の場合にも言えます。

13.2.1. パッド

2つの重要なパッドの設定があります:

  • ジオメトリ(形状、レイヤ、ドリル穴)。

  • パッド番号。これは回路図コンポーネントのピン番号に相当するもので、4文字以内の英数字から構成されます。例えば、次のものはすべて有効なパッド番号です : 1、45、9999、そのほか AA56、ANOD なども有効です。パッド番号は回路図内の対応するピン番号のそれと同じでなければなりません。それは、パッド番号によりピンとパッド番号の認識を行い、それによって Pcbnew がピンとパッドをリンクさせるからです。

13.2.2. 外形線

Graphical contours are used to draw the physical shape of the footprint. Several different types of contour are available: lines, circles, arcs, and text. Contours have no electrical significance, they are simply graphical aids.

13.2.3. フィールド

These are text elements associated with a footprint. Two are obligatory and always present: the reference field and the value field. These are automatically read and updated by Pcbnew when a netlist is read during the loading of footprints into your board. The reference is replaced by the appropriate schematic reference (U1, IC3, etc.). The value is replaced by the value of the corresponding part in the schematic (47K, 74LS02, etc.). Other fields can be added and these will behave like graphical text.

13.3. Starting Footprint Editor and selecting a footprint to edit

Footprint Editor can be started in two ways:

  • Directly via the images/icons/module_editor.png icon from the main toolbar of Pcbnew. This allows the creation or modification of a footprint in the library.

  • Double-clicking a footprint will launch the Footprint Properties menu, which offers a Go to Footprint Editor button. If this option is used, the footprint from the board will be loaded into the editor, for modification or for saving.

13.4. Footprint Editor Toolbars

Calling Footprint Editor will launch a new window that looks like this:

images/ja/Modedit_main_window.png

13.4.1. 編集ツールバー(右ツールバー)

このツールバーには以下を行うためのツールが含まれています:

  • パッドの配置。

  • グラフィック要素(外形線、テキスト)の追加。

  • アンカーの設定。

  • 要素の削除。

個別の機能は次の通りです:

images/icons/cursor.png

No tool.

images/icons/pad.png

Add pads.

images/icons/add_polygon.png

Draw line segments and polygons.

images/icons/add_circle.png

Draw circles.

images/icons/add_arc.png

Draw circular arcs.

images/icons/add_text.png

Add graphical text (fields are not managed by this tool).

images/icons/anchor.png

Position the footprint anchor.

images/icons/delete.png

Delete elements.

images/icons/grid_select_axis.png

Grid origin. (grid offset). Useful for placement of pads. The grid origin can be put on a given location (the first pad to place), and after the grid size can be set to the pad pitch. Placing pads is therefore very easy

13.4.2. 表示ツールバー(左ツールバー)

These tools manage the display options in Footprint Editor:

images/icons/grid.png

グリッドの表示。

images/icons/polar_coord.png

直交座標系/極座標系の切り替え。

images/icons/unit_mm.png images/icons/unit_inch.png

単位系の切り替え( mm /インチ)

images/icons/cursor_shape.png

十字カーソルの表示。

images/icons/pad_sketch.png

アウトラインモード(輪郭線)でパッドを表示する。

images/icons/text_sketch.png

アウトラインモード(輪郭線)でテキストを表示する。

images/icons/show_mod_edge.png

アウトラインモード(輪郭線)で外形シルクを表示する。

images/icons/contrast_mode.png

ハイコントラストモードの切り替え

13.5. コンテキストメニュー

マウスの右ボタンによりカーソルの下の要素に応じたメニューを呼び出します。

The context menu for editing footprint parameters:

images/ja/Modedit_context_menu_module_parameters.png

パッド編集用のコンテキストメニュー:

images/ja/Modedit_context_menu_pads.png

グラフィック要素編集用のコンテキストメニュー:

images/ja/Modedit_context_menu_graphics.png

13.6. Footprint properties dialog

This dialog can be launched when the cursor is over a footprint by clicking on the right mouse button and then selecting Edit Footprint.

images/ja/Modedit_module_properties_dialog.png

The dialog can be used to define the main footprint parameters.

13.7. Creating a new footprint

A new footprint can be created via the button images/icons/new_footprint.png . The name of the new footprint will be requested. This will be the name by which the footprint will be identified in the library.

This text also serves as the footprint value, which is ultimately replaced by the real value (100uF_16V, 100_0.5W, …).

The new footprint will require:

  • 外形線(および場合によりグラフィックのテキスト)。

  • パッド。

  • フットプリント名(ライブラリに登録するフットプリント名です。定数フィールドへも使用する時に正しい値に置き換えられる非表示テキストとして現れます)。

別の方法です:

When a new footprint is similar to an existing footprint in a library or a circuit board, an alternative and quicker method of creating the new footprint is as follows:

  • Load the similar footprint ( images/icons/load_module_lib.png , images/icons/load_module_board.png or images/icons/import_module.png ).

  • Modify the "Footprint Name in Library" field in order to generate a new identifier (name).

  • Edit and save the new footprint.

13.8. パッドの追加および編集

Once a footprint has been created, pads can be added, deleted or modified. Modification of pads can be local, affecting only the pad under the cursor, or global, affecting all pads of the footprint.

13.8.1. パッドの追加

右ツールバーから images/icons/pad.png アイコンを選択します。希望する位置でマウスの左ボタンをクリックして、パッドを追加することが可能です。パッドプロパティメニューでパッドプロパティを定義します。

パッド番号を入力するのを忘れないで下さい。

13.8.2. パッドプロパティの設定

これは3つの異なる方法で行うことが可能です:

  • 上部ツールバーから ”パッドの設定“ アイコンを選択する。

  • 既存のパッドをクリックし、パッドの編集 を選択する。

  • 既存のパッドをクリックし、'パッドの設定をエクスポート'を選択する。この場合、選択されたパッドのジオメトリプロパティがデフォルトのパッドプロパティになります。

最初の2つケースでは、次のダイアログウィンドウが表示されます:

images/ja/Modedit_pad_properties_dialog.png

パッドが属するレイヤを正しく定義することに注意した方がよいでしょう。特に、導体レイヤは定義が容易ですが、非導体レイヤ(ハンダレジスト、ハンダパッド…)の管理は、回路製作およびドキュメントのために同様に重要です。

パッド形状の選択は、適合するレイヤを自動的に選択するきっかけになります。

矩形パッド

For SMD footprints of the VQFP/PQFP type which have rectangular pads on all four sides (both horizontal and vertical) it is recommended to use just one shape (for example, a horizontal rectangle) and to place it with different orientations (0 for horizontal and 90 degrees for vertical). Global resizing of pads can then be done in a single operation.

パッドの回転

Rotations of -90 or -180 are only required for trapezoidal pads used in microwave footprints.

非メッキのスルーホールパッド

パッドを非メッキスルーホールパッド (NPTH パッド) として定義することが可能です。

これらのパッドは1つまたはすべての導体レイヤ(明らかに穴はすべての導体レイヤに存在する)に定義しなければなりません。

この要件により特定のクリアランスパラメータ(例えば、ネジのクリアランス)を定義することができます。

円形か長円形のパッドで、パッド穴のサイズがパッドサイズと同じ場合、このパッドはガーバーファイル内の導体レイヤには作成されません。

これらのパッドは機械的な目的で使用されます(ネジ穴など)。そのため、パッド名またはネット名がなくても問題ありません。ネットへの接続はできません。

非導体レイヤのパッド

これらは特殊なパッドです。テクニカルレイヤ上に基準点あるいはマスクを作成するためにこのオプションを使用できます。

オフセットパラメータ

下図の例では、パッド3のオフセットは Y = 15mil です。

images/Modedit_pad_offset_example.png

デルタパラメータ(台形パッド)

下図の例では、パッド1はパラメータが Delta X = 10mil です。

images/Modedit_pad_delta_example.png

13.8.3. ハンダレジストおよびハンダペーストマスク(メタルマスク)レイヤ用のクリアランスの設定

クリアランスの設定は3つのレベルで行うことが可能です:

  • グローバルレベル。

  • フットプリントレベル。

  • パッドレベル。

Pcbnew は、以下のようにクリアランスを計算します:

  • パッド設定。これが 0 の場合は、

  • フットプリント設定。これが 0 の場合は、

  • グローバル設定。

ハンダレジストのパッド形状は、パッドそのものよりも通常は大きくなります。そのためクリアランス値は正の値です。メタルマスクのパッド形状は、パッドそのものよりも通常は小さくなります。そのためクリアランス値は負の値です。

ハンダペーストマスク(メタルマスク)パラメータ

ハンダペーストマスク(メタルマスク)用に2つのパラメータがあります:

  • 固定値。

  • パッドサイズの比率。

実際の値はこれら2つの値の合計です。

フットプリントレベルの設定:

images/ja/Modedit_footprint_level_pad_settings.png

パッドレベルの設定:

images/ja/Modedit_pad_level_pad_settings.png

13.9. フィールドプロパティ

少なくとも2つのフィールドがあります:リファレンスと定数です。

それらのパラメータ(属性、サイズ、幅)を更新しなければなりません。フィールドを左ダブルクリックするか、コンテキストメニューからテキストの編集を選んで “フットプリントテキストのプロパティ” ダイアログボックスを開きます。あるいは “フットプリントのプロパティ” ダイアログボックスで編集を左クリックします。以下はリファレンスの例です。

images/ja/Modedit_footprint_text_properties.png

13.10. Automatic placement of a footprint

If the user wishes to exploit the the full capabilities of the auto-placement functions, it is necessary to define the allowed orientations of the footprint (Footprint Properties dialog).

images/ja/Modedit_module_autoplace_settings.png

通常、抵抗器、無極性コンデンサー、および他の対称的な素子の場合に180度の回転が可能です。

Some footprints (small transistors, for example) are often permitted to rotate by +/- 90 or 180 degrees. By default, a new footprint will have its rotation permissions set to zero. This can be adjusted according to the following rule:

0 の値は回転不可で、10 は完全に許可、それ以外の中間値は限られた回転を表します。例えば、抵抗器は回転許可設定を 10 にして 180 度(自由な)回転させたり、また回転許可設定を5にして ±90 度回転(可能であるが非推奨)させられます。

13.11. 属性

属性ウィンドウは次の通りです:

images/ja/Modedit_module_attributes.png

  • ノーマルは標準属性です。

  • Normal+Insert indicates that the footprint must appear in the automatic insertion file (for automatic insertion machines). This attribute is most useful for surface mount components (SMDs).

  • Virtual indicates that a component is directly formed by the circuit board. Examples would be edge connectors or inductors created by a particular track shape (as sometimes seen in microwave footprints).

13.12. Documenting footprints in a library

It is strongly recommended to document newly created footprints, in order to facilitate their rapid and accurate retrieval. Who is able to recall the multiple pin-out variants of a TO92 footprint?

The Footprint Properties dialog offers a simple and yet powerful means for documentation generation.

images/ja/Modedit_module_properties_documentation_fields.png

このメニューにより以下を行うことができます:

  • コメント行(説明)の入力。

  • キーワード(複数の単語を入力可)

The comment line is displayed with the component list in CvPcb and in the footprint selection menus in Pcbnew. The keywords can be used to restrict searches to those parts possessing the given keywords.

Thus, while using the load footprint command (icon in the right-hand toolbar in Pcbnew), it is possible to type the text =TO220 into the dialog box to have Pcbnew display a list of the footprints possessing the keyword TO220

13.13. 3次元的な可視化

A footprint may have been associated with a file containing a three-dimensional representation of itself. In order to associate such a file with a footprint, select the 3D Settings tab. The options panel is the following:

images/ja/Modedit_module_3d_options.png

データ情報を入力しなければなりません:

  • 3Dシェイプ名は、3D表現を含むファイルです。( 拡張子.wrl の vrml フォーマット。3Dモデラーの Wings3D で作成できます。)

  • 標準パスは、デフォルトが kicad/modules/package3d です。

  • x、y、z の各拡大率(スケール)。

  • The offset with respect to the anchor point of the footprint (usually zero).

  • シェイプの回転(度)は、各軸に対する回転角で単位は度です。(通常は 0 )。

スケールの設定により次のことができます:

  • 同じような形状でサイズの異なるフットプリント(抵抗器、コンデンサー、SMDコンポーネント…)には同じ3Dファイルを使用。

  • 小さいパッケージの場合、Wings3D グリッドの活用。スケール1は Pcbnew での 0.1インチ = Wings3D での1グリッド に相当します。

以上の設定を行うと、コンポーネントを3Dで見ることが可能になります。

images/ja/Modedit_footprint_3d_preview.png

3Dモデルはプリント基板の3D表現の中に自動的に現れます。

13.14. Saving a footprint into the active library

保存コマンド(アクティブなライブラリのファイルの修正)は images/icons/save_library.png ボタンで実行します。

If a footprint of the same name exists (an older version), it will be overwritten. Because it is important to be able to have confidence in the library footprints, it is worth double-checking the footprint for errors before saving.

Before saving, it is also recommended to change the reference or value of the footprint to be equal to the library name of the footprint.

13.15. Saving a footprint to the board

編集したフットプリントが現在の基板からのものである場合、ボタン images/icons/update_module_board.png により基板上のこのフットプリントを更新します。

14. 進化した PCB 編集ツール

There are some more advanced editing tools available in Pcbnew and Footprint Editor, which can help you to efficiently lay out components on the canvas.

14.1. アイテムの複製

複製はアイテムをコピー (clone) する方法です。大まかにいうとコピペ (copy-and-pasting) と同じようなものですが、PCB(基板)にコンポーネントをばらまいたり、 ”数値を指定して移動” ツール(下記参照)を使ってより簡単にコンポーネントを手動配置できます。

複製はホットキー(デフォルトは Ctrl-D)か、コンテキストメニューのアイテムの複製を使います。以前のバージョンと互換のある画面ではタイプによって、次のように現れます。:

images/icons/duplicate_pad.png images/icons/duplicate_line.png images/icons/duplicate_text.png images/icons/duplicate_module.png images/icons/duplicate_target.png images/icons/duplicate_zone.png

14.2. 数値を指定して移動

”数値を指定して移動” ツールを使うと、サポートされている単位の直交座標または極座標で入力された決められた値で、アイテム(やアイテムグループ)を移動できます。これは別のグリッドへ切り替えて(コンポーネントがグリッドに乗らなくなり)扱いに困った時や、間隔の幅が既存のどんなグリッドにも乗らない時に便利です。

このツールを使うには、動かしたいアイテムを選んで、ホットキー(デフォルトは Ctrl-M)を使うかコンテキストメニューから選んで、ダイアログを表示させます。アイテムの移動中または複製中でもホットキーでダイアログを表示でき、簡単に複数のコンポーネントへ続けてオフセットを与えることができます。

直交座標入力での数値を指定して移動

images/ja/Pcbnew_move_exact_cartesian.png

極座標入力での数値を指定して移動

images/ja/Pcbnew_move_exact_polar.png

チェックボックスで、直交座標系と極座標系を切替できます。どんな形状であっても、自動的に別の系へと変換されます。

それから、目的位置への移動に必要な値を入力します。単位はラベルで明示でき(上の画像では ”mm”)、それ自体でも指定できます(例えば、1インチの場合 ”1 in” 、2rad の場合 ”2 rad” )。

OK ボタンを押すと選択したものへの変更が適用され、キャンセルボタンでダイアログが閉じ、アイテムは動きません。もし OK ボタンが押されると、移動のパラメータ(vector)は保存されて次にダイアログが開いた時には既入力となり、複数のオブジェクトを繰り返して同じように移動できます。

14.3. 配列ツール

Pcbnew and the Footprint Editor both have assistants for creating arrays of features and components, which can be used to easily and accurately lay out repetitive elements on PCBs and in footprints.

14.3.1. 配列ツールの有効化

配列ツールは、カーソルのあるコンポーネントで、あるいは GAL モードで、または選択中のアイテムで働きます。選択中のコンテキストメニューから、またはキーボードショートカット(デフォルトは Ctrl-N )から使用できます。(以前のバージョンとの)互換モードでは、コンテキストメニューのアイコンは選択したアイテムの種類を表します:

images/icons/array_pad.png images/icons/array_line.png images/icons/array_text.png images/icons/array_module.png images/icons/array_target.png images/icons/array_zone.png

配列ツールは、配列の種類ごとにタブがあるダイアログとして現れます。今のところ、2種類の配列タイプが用意されています。: グリッド(格子)と円 (circular)です。

どちらのタイプの配列も、それぞれのタブページで完全に指定できます。幾何学的オプション(どのようにグリッドを配置するか)は左、ナンバリングに関するオプション(グリッドでどのように番号が振られていくのか)は右にあります。

14.3.2. グリッド配列

グリッド配列は2次元の正方形グリッドへコンポーネントを配置する配列です。この種の配列はまた、一つの列または行へ直線的に配置するためにも使用できます。

グリッド配列の設定ダイアログは、以下のようになります。:

images/ja/Pcbnew_array_dialog_grid.png

幾何学的オプション

幾何学的オプションを次に示します:

  • 横 (x) 方向の数: グリッドの ”列数(columns)”

  • 縦 (y) 方向の数: グリッドの ”行数(rows)”

  • 横 (x) 方向の間隔: 同じ行にあるアイテム間の水平距離。(負の場合、 グリッドの方向は右から左となる。)

  • 縦 (y) 方向の間隔: 同じ列にあるアイテム間の垂直距離。 (負の場合、グリッドの方向は下から上と なる。)

  • 横 (x) オフセット: 先行する行に対し、各行はこの距離だけ右にずれた ところから始まる(オフセットは1行ごとに加算される)。

  • 縦 (y) オフセット: 先行する列に対し、各列はこの距離だけ下がったところから始まる(オフセットは1列ごとに加算される)。

x と y のオフセットを持つ 3x3 グリッド。

images/Pcbnew_array_grid_offsets.png

  • 配列シフト: n行またはn列ごとに適当な間隔の オフセットが与えられる。

行の配列シフト(間隔2)を持つ 3x3 グリッド。

images/Pcbnew_array_grid_stagger_rows_2.png

行の配列シフト(間隔3)を持つ 3x3 グリッド。

images/Pcbnew_array_grid_stagger_cols_3.png

ナンバリング・オプション
  • ナンバリングの方向: 行の方向に順番に番号を付けていくか、列の方向に 順番に番号を付けていくかを決定する。 間隔の符号によって進行方向が決められることに注意。:間隔が負の数の場合、 右から左または下から上となる。

  • 行/列方向でナンバリングを入れ替える: 選択された場合、行または列の ナンバリングの順番(例えば、左から右または右から左)を入れ替える。 入れ替えを行うのが行か列かは、ナンバリングの方向に依存する。 (このオプションは、DIP パッケージのようにナンバリングが片側が上から下、 反対側が下から上のような場合に役立ちます。)

  • 自動ナンバリング: 既に番号を持っているアイテムを使ってレイアウトする場合、 開始時にリセットするか、このアイテムの番号から続けてナンバリングする。

  • ナンバリングの方式

    • 連続: 中断された行/列の番号に続いてナンバリングする - もし、最初の行の最後のアイテムの番号が ”7” なら、次の行の最初の アイテムの番号は ”8” となる。

    • 組み合わせ: ナンバリングに2つの軸(X,Y)を使用する。 番号は行と列のインデックスから作られ、どちら(行または列)が 先かは、ナンバリングの方向による。

  • 軸のナンバリング: 軸ナンバリングで使用する番号の ”文字(alphabet)” 。以下から選択する。

    • 数値 - 通常の整数表示

    • 16進数値 - 16進数での表示

    • アルファベット、IOSQXZ以外の文字 - 数値との混乱を避けるため、(ASME Y14.35M-1997 sec. 5.2 (previously MIL-STD-100 sec. 406.5)で推奨されている)一般的な回路図用記号で 使われる文字を除いたもの

    • アルファベット、26文字全て A から Z

14.3.3. 円配列

円配列はアイテムを円または円弧に沿って配置します。円は選択されているアイテムの位置(または選択されたアイテムグループの中心)により定義され、中心位置を指定します。円配列設定ダイアログを以下に示します。:

images/ja/Pcbnew_array_dialog_circular.png

幾何学的オプション
  • X軸中心, Y軸中心: 円の中心位置。半径のフィールド は中心位置を入力する度に自動更新される。

  • 角度: 配列にある2つの連続したアイテム間の角度。 0をセットすると、円は ”数” フィールドの値で分割される。

  • : 配列のアイテム数 (オリジナルアイテムを含む)

  • 回転: それぞれのアイテムの位置で回転する。そうでなければ、 アイテムは回転せずに移動する。(例えば、このオプションがセット されていない場合、角型パッドは常に直立状態を保つ)

ナンバリング・オプション

円配列は1つの次元しか持たず、グリッドより単純な幾何学的図形です。用意されているオプションの意味は、グリッドと同様です。アイテムは通常は時計回りにナンバリングされ、負の角度が指定された場合に反時計回りとなります。

15. KiCad スクリプト リファレンス

スクリプトにより、 Python 言語を使って KiCad のタスクを自動化できます。

Python スクリプト リファレンスの doxygen ドキュメントも参照して下さい。

ターミナルエミュレータで pydoc pcbnew と入力すると、Python モジュールのヘルプが表示されます。

スクリプトの使用により、作成可能なものを以下に示します:

  • プラグイン :このタイプのスクリプトは KiCad の開始時に読み込まれます。以下はその例です:

    • フットプリント ウィザード :パラメータ設定の簡素化でフットプリントの作成を助けます。以降のセクション フットプリント・ウィザード を参照のこと。

    • ファイル I/O (計画中) :別のファイル形式のエクスポート/インポートを行うプラグインを作成します。

    • アクション (計画中) :スクリプトのアクションイベントを結合したり、ツールバーのアイコンや新しいメニューを登録します。

  • コマンドライン スクリプト :コマンドラインで使用するスクリプトで、基板やライブラリの読込みや変更、レンダリング出力、新しい基板の作成を行います。

スクリプトをサポートした KiCad アプリケーションは Pcbnew のみであることに注意して下さい。また Eeschema は今後サポートされる予定です。

15.1. KiCad のオブジェクト

スクリプト API は、KiCad/Pcbnew にある内部オブジェクトの構造を反映します。BOARD はメインオブジェクトで、プロパティの集合、MODULE の集合、TRACK/SEGVIA, TEXTE_PCB, DIMENSION, DRAWSEGMENT を持っています。さらに、MODULE は D_PADs, EDGEs 等を持っています。

  • 以下の BOARD セクションを参照して下さい。

15.2. 基本 API リファレンス

全ての pcbnew API は、 Python の "pcbnew" モジュールから提供されます。GetBoard()メソッドはエディタで現在開いている基板 (BOARD) を返します。Pcbnew に統合されたスクリプトシェルやアクションプラグインに書かれるコマンドで有用です。

15.3. 基板の読込みと保存

  • LoadBoard(ファイル名): ファイルから基板を読み込み、BOARD オブジェクトへ反映します。ファイル拡張子と一致したファイル形式として下さい。

  • SaveBoard(ファイル名,BOARD): ファイルへ BOARD オブジェクトを保存します。ファイル拡張子と一致したファイル形式として下さい。

  • board.Save(ファイル名): 上と同様ですが、これは BOARD オブジェクトのメソッドです。

ボードを読み込んで、全ての値を非表示とし、全てのリファレンスを表示する例です。
#!/usr/bin/python
import sys
from pcbnew import *

filename=sys.argv[1]

pcb = LoadBoard(filename)
for module in pcb.GetModules():
    print "* Module: %s"%module.GetReference()
    module.GetValueObj().SetVisible(False)      # set Value as Hidden
    module.GetReferenceObj().SetVisible(True)   # set Reference as Visible

pcb.Save("mod_"+filename)

15.4. ライブラリのリスト表示および読み込み

ライブラリ、モジュール、パッドを列挙する例です。
#!/usr/bin/python

from pcbnew import *

libpath = "/usr/share/kicad/modules/sockets.mod"
lst = FootprintEnumerate(libpath)

for name in lst:
    m = FootprintLoad(libpath,name)
    print name,"->",m.GetLibRef(), m.GetReference()
    for p in m.GetPads():
        print "\t",p.GetPadName(),p.GetPosition(),p.GetPos0(), p.GetOffset()

15.5. BOARD

BOARD は KiCad Pcbnew における基本オブジェクトで、以下はその技術資料です。

BOARD は下記のメソッドを使ってアクセスできるオブジェクトリストの集合を含んでいます。これらのメソッドは、"for obj in list:" を使って反復可能なイテラブルリストを返します。

  • board.GetModules(): このメソッドは MODULE オブジェクトのリストを返します。ここには基板で有効な全てのモジュールが記述されます。

  • board.GetDrawings(): 基板図面に含まれる BOARD_ITEMS のリストを返します。

  • board.GetTracks(): このメソッドは基板内部の TRACK と SEGVIA のリストを返します。

  • board.GetSegZones(): SEGZONE のリストを返します。

  • board.GetFullRatnest(): ラッツネット(未配線接続)のリストを返します。

  • board.GetLocalRatsnest(): (ドラッグ中のような)移動中のフットプリントのラッツネットのリストを返します。

  • board.GetNetClasses(): ネットクラスのリストを返します。

  • board.GetCurrentNetClassName(): 現在のネットクラスを返します。

  • board.GetViasDimensionsList(): 基板で有効なビア径のリストを返します。

  • board.GetTrackWidthList(): 基板で有効な配線幅のリストを返します。

基板検査の例です。
#!/usr/bin/python
import sys
from pcbnew import *

filename=sys.argv[1]
pcb = LoadBoard(filename)

ToUnits=ToMils
FromUnits=FromMils

print "LISTING VIAS:"
for item in pcb.GetTracks():
    if type(item) is SEGVIA:

        pos = item.GetPosition()
        drill = item.GetDrillValue()
        width = item.GetWidth()
        print " * Via:   %s - %f/%f "%(ToUnits(pos),ToUnits(drill),ToUnits(width))

    elif type(item) is TRACK:

        start = item.GetStart()
        end = item.GetEnd()
        width = item.GetWidth()

        print " * Track: %s to %s, width %f" % (ToUnits(start),ToUnits(end),ToUnits(width))

    else:
        print "Unknown type    %s" % type(item)

print ""
print "LISTING DRAWINGS:"
for item in pcb.GetDrawings():
    if type(item) is TEXTE_PCB:
        print "* Text:    '%s' at %s"%(item.GetText(),item.GetPosition())
    elif type(item) is DRAWSEGMENT:
        print "* Drawing: %s"%item.GetShapeStr() # dir(item)
    else:
        print type(item)

print ""
print "LIST MODULES:"
for module in pcb.GetModules():
    print "* Module: %s at %s"%(module.GetReference(),ToUnits(module.GetPosition()))

print ""
print "LIST ZONES:"
for zone in pcb.GetSegZones():
    print zone

print ""
print "RATSNEST:",len(pcb.GetFullRatsnest())

15.6. その他の例

15.6.1. 部品のピンのハンダマスクのマージンを変更する。

1~14番のピンのみ変更し、15番ピンはサーマルパッドのまま保持したい場合の例です。
b = pcbnew.GetBoard()
u304 = b.FindModuleByReference('U304')
pads = u304.GetPads()

for p in pads:
    print p.GetPadName(), pcbnew.ToMM(p.GetLocalSolderPasteMargin())
    id = int(p.GetPadName())
    if id<15: p.SetLocalSolderPasteMargin(0)

15.7. フットプリント ウィザード

The footprint wizards are a collection of python scripts that can be access via from the Footprint Editor. If you invoke the footprint dialog you select a given wizard that allows you to see the footprint rendered, and you have some parameters you can edit.

If the plugins are not properly distributed to your system package, you can find the latest versions in the KiCad source tree at launchpad.

They should be located in for example C:\Program Files\KiCad\bin\scripting\plugins.

On linux you can also keep your user plugins in $HOME/.kicad_plugins.

パラメータを付加したフットプリントを簡単に作成します。
#!/usr/bin/python

from pcbnew import *

class FPCFootprintWizard(FootprintWizardPlugin):
    def __init__(self):
        FootprintWizardPlugin.__init__(self)
        self.name = "FPC"
        self.description = "FPC Footprint Wizard"
        self.parameters = {
             "Pads":
                {"*n":40,           # not internal units preceded by "*"
                 "pitch":           FromMM(0.5),
                 "width":           FromMM(0.25),
                 "height":          FromMM(1.6)},
             "Shield":
                {"shield_to_pad":   FromMM(1.6),
                 "from_top":        FromMM(1.3),
                 "width":           FromMM(1.5),
                 "height":          FromMM(2)}
        }

        self.ClearErrors()

    # build a rectangular pad
    def smdRectPad(self,module,size,pos,name):
            pad = D_PAD(module)
            pad.SetSize(size)
            pad.SetShape(PAD_RECT)
            pad.SetAttribute(PAD_SMD)
            pad.SetLayerMask(PAD_SMD_DEFAULT_LAYERS)
            pad.SetPos0(pos)
            pad.SetPosition(pos)
            pad.SetPadName(name)
            return pad

    # This method checks the parameters provided to wizard and set errors
    def CheckParameters(self):
        p = self.parameters
        pads            = p["Pads"]["*n"]
        errors = ""
        if (pads<1):
            self.parameter_errors["Pads"]["n"]="Must be positive"
            errors +="Pads/n has wrong value, "
        p["Pads"]["n"] = int(pads)  # make sure it stays as int (default is float)

        pad_width       = p["Pads"]["width"]
        pad_height      = p["Pads"]["height"]
        pad_pitch       = p["Pads"]["pitch"]
        shl_width       = p["Shield"]["width"]
        shl_height      = p["Shield"]["height"]
        shl_to_pad      = p["Shield"]["shield_to_pad"]
        shl_from_top    = p["Shield"]["from_top"]

        return errors

    # build the footprint from parameters
    def BuildFootprint(self):

        print "parameters:",self.parameters
        #self.ClearErrors()
        #print "errors:",self.parameter_errors

        module = MODULE(None) # create a new module
        self.module = module

        p = self.parameters
        pads            = int(p["Pads"]["*n"])
        pad_width       = p["Pads"]["width"]
        pad_height      = p["Pads"]["height"]
        pad_pitch       = p["Pads"]["pitch"]
        shl_width       = p["Shield"]["width"]
        shl_height      = p["Shield"]["height"]
        shl_to_pad      = p["Shield"]["shield_to_pad"]
        shl_from_top    = p["Shield"]["from_top"]

        size_pad = wxSize(pad_width,pad_height)
        size_shld = wxSize(shl_width,shl_height)

        module.SetReference("FPC"+str(pads))   # give it a reference name
        module.m_Reference.SetPos0(wxPointMM(-1,-2))
        module.m_Reference.SetPosition(wxPointMM(-1,-2))

        # create a pad array and add it to the module
        for n in range (0,pads):
            pad = self.smdRectPad(module,size_pad,wxPoint(pad_pitch*n,0),str(n+1))
            module.Add(pad)

        pad_s0 = self.smdRectPad(module,
                            size_shld,
                            wxPoint(-shl_to_pad,shl_from_top),
                            "0")
        pad_s1 = self.smdRectPad(module,
                            size_shld,
                            wxPoint((pads-1)*pad_pitch+shl_to_pad,shl_from_top),
                            "0")

        module.Add(pad_s0)
        module.Add(pad_s1)

        e = EDGE_MODULE(module)
        e.SetStartEnd(wxPointMM(-1,0),wxPointMM(0,0))
        e.SetWidth(FromMM(0.2))
        e.SetLayer(EDGE_LAYER)
        e.SetShape(S_SEGMENT)
        module.Add(e)

        module.SetLibRef("FPC"+str(pads))

# create our footprint wizard
fpc_wizard = FPCFootprintWizard()

# register it into pcbnew
fpc_wizard.register()