• Stars
    star
    1,126
  • Rank 41,221 (Top 0.9 %)
  • Language
    Python
  • License
    MIT License
  • Created about 3 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.

The main window KiCAD JLCPCB tools



Update parts database


Plugin to generate all files necessary for JLCPCB board fabrication and assembly

  • Gerber files
  • Excellon files
  • BOM file
  • CPL file

Furthermore it lets you search the JLCPCB parts database and assign parts directly to the footprints which result in them being put into the BOM file.

The main window

The parts library window

The parts details dialog

Warning πŸ”₯

I try to keep it working with 7.99 nightly builds but there are massive API changes on the horizon and I'm not sure if I can keep up with them.

This is under a lot of developments, so consider this README out of date all the time 😏

If you find any sort of problems, please create an issue so that I can hopefully fix it!

Installation πŸ’Ύ

KiCAD PCM

Add my custom repo to the Plugin and Content Manager, the URL is https://raw.githubusercontent.com/Bouni/bouni-kicad-repository/main/repository.json

image

From there you can install the plugin via the GUI.

Git

Simply clone this repo into your scripting/plugins folder.

Windows

cd C:\users\<username>\Documents\kicad\<version>\scripting\plugins\  # <username> is your username, <version> can be 6.0, 7.0, or 7.99 depending on the version you use
git clone https://github.com/Bouni/kicad-jlcpcb-tools.git

Linux

cd /home/<username>/.local/share/kicad/<version>/scripting/plugins  # <version> can be 6.0, 7.0, or 7.99 depending on the version you use
git clone https://github.com/Bouni/kicad-jlcpcb-tools.git

Linux

cd ~/Library/Preferences/kicad/scripting/plugins
git clone https://github.com/Bouni/kicad-jlcpcb-tools.git

You may need to create the scripting/plugins folder if it does not exist.

Flatpack ⚠️

The Flatpak installation of KiCAD currently dows not ship with pip and requests installed. The later is required for the plugin to work. In order to get it working you can run the following 3 commands:

  1. flatpak run --command=sh org.kicad.KiCad
  2. python -m ensurepip --upgrade
  3. /var/data/python/bin/pip3 install requests

See issue #94 for more info.

Usage πŸ₯³

To access the plugin choose Tools β†’ External Plugins β†’ JLCPCB Tools from the PCB Editor menus

Checkout this screencast, it shows quickly how to use this plugin:

KiCAD JLCPCB example

Keyboard shortcuts

Windows can be closed with ctrl-w/ctrl-q/command-w/command-w (OS dependent) and escape. Pressing enter in the keyword text box will start a search.

Toggle BOM / CPL attributes

You can easily toggle the exclude from BOM and exclude from CPL attributes of one or multiple footprints.

Select LCSC parts from the JLCPCB parts database

Select one or multiple footprints, click select part. You can select parts with equal value and footprint using the Select alike button. In the upcoming modal dialog, search for parts, select the one of your choice and click select part. The LCSC number of your selection will then be assigned to the footprints.

Footprint selection

Generate fabrication data

Generate all necessary assembly files for your board with a simple click.

A new directory called jlcpcb is created, and in there, two separate folders are created, gerber and production_files.

In the gerber folder all necessary *.gbr and *.drl files are generated and zipped into the production_files folder, ready for upload to JLCPCB. The zipfile is named GERBER-<projectname>.zip

Also in the production_files folder, two files are generated, BOM-<projectname>.csv and CPL-<projectname>.csv.

Footprints are included into the BOM and CPL files according to their exclude from BOM and exclude from POS attributes.

The fabrication files

Footprint rotation correction

JLCPCB seems to need corrected rotation information. @matthewlai implemented that in his JLCKicadTools and I adopted his work in this plugin as well. You can download Matthews file from GitHub as well als manage your own corrections in the Rotation manager.

Icons

This plugin makes use of a lot of icons from the excellent Material Design Icons

Development

  1. Fork repo
  2. Fit clone forked repo
  3. Install pre-commit pip install pre-commit
  4. Setup pre-commit pre-commit run
  5. Create feature branch git switch -c my-awesome-feature
  6. Make your changes
  7. Commit your changes git commit -m "Awesome new feature"
  8. Push to GitHub git push
  9. Create PR

Make sure you make use of pre-commit hooks in order to format everything nicely with black In the near future I'll add ruff / pylint and possibly other pre-commit-hooks that enforce nice and clean code style.

More Repositories

1

max-cube-protocol

A attempt to write down the protocol of the eQ3 / ELV MAX! Cube
119
star
2

luxtronik

Luxtronik integration for Home Assistant
Python
82
star
3

MateDealer

MateDealer, a open source MDB cashless device implementation
C
58
star
4

Arduino-Pinout

PowerShell
45
star
5

python-luxtronik

python-luxtronik is a library that allow you to interact with a Luxtronik heatpump controller.
Python
37
star
6

ard-mediathek

commandline download of ARD videos
Python
16
star
7

abfallplus

AbfallPlus component for Home Assistant
Python
13
star
8

Luxtronik-2

An atempt to document the inner workings and meaning of the Luxtronik 2 Webinterface data connection
Python
8
star
9

esphome-bwt-sensor

Determine the state of a BWT AQA Life S decalcifier using an ESP32 + TCS34725 color sensor and integrate into Home-Assistant using ESPHome
8
star
10

ModBusGateway

A ModbusTCP to ModbusRTU gateway written in python
Python
7
star
11

drkblutspende

DRK Blutspende component for Home Assistant
Python
5
star
12

VNC-remote-screen

making a raspberrypi + a TV into remote display for a VNC server
5
star
13

smoothieboard-graphics

Graphics of the smoothieboard and components
5
star
14

MDT-Glas-Push-Button-Template

A SVG template for MDT Glas Push Buttons
4
star
15

node-red-contrib-luxtronik2-ws

node-red contribution package for Luxtronik2 heat pump controllers.
JavaScript
3
star
16

luxtronik-firmware-analysis

Scripts and notes on my analysis around the luxtronik firmware
Python
3
star
17

pcb-drill

A little OpenCV program to aim for the drill position using a webcam
Python
2
star
18

flask-hdmi-cec

A micro API to control your TV from a RaspberryPi
Python
2
star
19

node-red-contrib-luxtronik2

A node red node that reads data from a Luxtronik2 heat pump controller and parses the data
JavaScript
2
star
20

xkb-us-umlaut-capslock

Disables the standard capslock function and uses capslock + aou/AOU for german Umlaut
1
star
21

flipdot

Arduino code to control a flipdot matrix
Makefile
1
star
22

linuxcnc-ethercat-playground

First steps into using erthercat devices with linuxcnc and a RaspberryPi 4B as its brain
Shell
1
star
23

doco

A simple script for managing multi layer docker compose files
Shell
1
star
24

bouni-kicad-repository

A repositiory for my KiCAD addons
Python
1
star
25

WifiPowerbutton

A WifiPowerButton for my home server
1
star
26

VNC-CEC-remote-screen

Second iteration of my VNC + CEC remote screen using a Raspberry Pi 3B+
1
star
27

swisshydroapi

A RESTful API for the data of FOEN
Python
1
star
28

feuersoftware

A Feuersoftware API implementation
Python
1
star
29

FanController

This project aims to give Vario Vent decentralized ventilation systems a second life. The company behind it went bankrupt and as soon as a sensor fails the ventilators refuse to work and tell you to contact the support.
1
star
30

cab-mach4-label-tool

A tool to generate and print label sets for CAB MACH4 label printers
HTML
1
star
31

jlcpcb-csv2sqlite

Python
1
star