

A PegJS parser for Kicad Modules
- Size
- 85 × 57.5 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 104
- Nets
- 58
- Pads
- 323
- Tracks, vias
- 842, 396
- Pours
- 15
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 9 Aug 2020
- Updated
- 17 Nov 2024
Overview
Firefly is an open-source printed circuit board by jdthorpe, from the jdthorpe/kicad-module-parser repository on GitHub. It is a 4-layer board of 85 × 57.5 mm with 104 parts on 58 nets, routed with 842 tracks and 396 vias.
It is built around the ATMEGA328PB-AU, FT231XS-R and AMS1117, with the PESD5V0X1UAB and 100UF/16V among its other parts. Its parts include 30 capacitors, 12 resistors, 9 diodes, 6 connectors and 4 ICs. It belongs with the AVR (ATmega, ATtiny) boards of this library.
Main components
5ATMEGA328PB-AU
TQFP-32(7x7)-40℃~+85℃ 1.8V~5.5V 10bit 1KB 20MHz 27 2KB 32KB 8 Bit AVR Built-in FLASH Power-on reset (POR)、Undervoltage detection (BOR/LVD/LVR/LVI)、Watchdog reset、External pin reset (NRST)、Built-in general-purpose timer、Programmable watchdog、Touch function TQFP-32(7x7) Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)FT231XS-R
SSOP-20-150mil-40℃~+85℃ 125uA 5V 8.4mA USB 2.0 USB to UART SSOP-20-150mil USB Converters ROHSFTDIUSB ConvertersAMS1117
1.0 A Low-Dropout Fixed RegulatorAdvanced Monolithic SystemsUncategorisedPESD5V0X1UAB
SC-79(SOD-523)-55℃~+150℃ 1 1.55pF 1nA 2A@8/20us 5.8V 5V 9V ESD IEC 61000-4-2、IEC 61000-4-5 Unidirectional SC-79(SOD-523) ESD and Surge Protection (TVS/ESD) ROHSNexperiaESD And Surge Protection (TVS/ESD)100UF/16V
C1812C1812 SMT ROHSJLCPCB AssemblyUncategorised
README
README.mdConvert Kicad Board and Module files to JSON
Do you love working with S-Expressions? Me either. Convert your Kicad board and module files to JSON or YAML and use your favorite tools to work with your Kicad board and module file data!
CLI Usage
When installed globally (npm i -g kicad-to-json), npm installs the
k2j command line tool, which converts your kicad files to json like so:
k2j ./my_module_file.kicad_mod
# creates ./my_module_file.json in compact format
k2j ./my_board_file.kicad_pcb --yaml --format long
# creates ./my_board_file.yaml in long formatUse the -h flag for the usual help:
usage: index.js [-h] [-o OUTPUT] [-f {compact,long,bare}] [-v] [--yaml] file
Convert Kicad board and module files to JSON/YAML
positional arguments:
file The Kicad pcb or module file to convert to json
optional arguments:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Output file (defaults to input file with '.json' or '.yaml' extension)
-f {compact,long,bare}, --format {compact,long,bare}
Set the output format
-v, --verbose verbose output
--yaml set output to yamlJavascript / Typescript Usage
User friendly data
import { parse } from "kicad-module-parser"
// convert the module (string) to compact format
const my_module = parse.module(kicad_mod_contents_string)
// convert the board (string) to long format
const my_board = parse.board(kicad_pcb_contents_string,"long")Output Formats
Background
The kicad_mod and kicad_pcb files are S-Expressions based which have
the general format (name ...contents ) where the contents are either
individual values or nested s-expressions (e.g. ( pts (xy 1 1) (xy 2 2))).
Some s-expressions are singletons, such as the pts expression within a
polygon and others can appear multiple times, such as the individual xy
pairs within an array of points.
bare Notation
In the bare notation the first token in the s-expresion appears as it's type
attribute, and the remaining sub-expression appear in the value attribute.
This format is quite literal, but generally hard to work with. Here is a brief
example (in yaml format):
type: kicad_pcb
value:
- type: version
value:
type: number
value: '20171130'
- type: general
value:
- type: thickness
value:
type: number
value: '1.6'
- type: drawings
value:
type: number
value: '605'
- type: tracks
value:
type: number
value: '2555'
- type: zones
value:
type: number
value: '0'compact Notation
In the compact format, s-expression types and values from the bare format are
used as key-value pairs of a JSON object This works for s-expressions that are
singletons, but for expressions like (add_net GND) (add_net +3v3) which may
appear multiple times within the parent s-expression, the contents of the
expression are included in an array of the same name, such as :
{
"add_net":[
{"net_name": "GND"},
{"net_name": "+3v3"}
]
}Here is the same example from above in compact format:
kicad_pcb:
version: 20171130
general:
thickness: 1.6
drawings: 605
tracks: 2555
zones: 0
modules: 172
nets: 143long Notation
The long format is a hybrid between the Compact and Bare formats, and
recoginses that module and board files are special, in that nearly every file
will have many repeating entities (such as gr_lines) where preserving the
order of the entites may be useful. Hence, the immediate children of boards and
modules (and modules nested within boards) are represent in bare format, and
everything else is represented in compact format. Here is the same example from
above in long format:
kicad_pcb:
- type: version
value: 20171130
- type: general
value:
thickness: 1.6
drawings: 605
tracks: 2555
zones: 0
modules: 172
nets: 143bare Format Details
There are 4 primitives in the bare format which have type "string", "hex",
"number" and "boolean", such as:
{ "type": "string", "value": "GND" }
{ "type": "hex", "value": "1234ABCD" }
{ "type": "number", "value": "3.2" } // yes, numbers are represented as strings
{ "type": "boolean", "value": true }The array type has a type attribute of "array" and a value contianing an
aray of primitives, such as:
{ "type": "array", "value": [ { "type": "string", "value": "GND" } ] }The container type is like the array type but it's type attribute has a
value other than "string", "hex", "number", "boolean" or "array", and
the value can contain any type (including other containers), or an array
containing any of the types, sucy as:
{
"type": "xy",
"value": [
{
"type": "x",
"value": {
"type": "number",
"value": "117.4"
}
},
{
"type": "y",
"value": {
"type": "number",
"value": "28"
}
}
]
}Final notes
There are a handfule of sub-parsers and things I was not personally
interested in (such as page formatting) which result in a value like
"page info": "unsupported". If you despirately need page info (or any other
unsupported features), I welcome your pull request!
If your board or module results in an error, please put it in a github repo (or a minimal example that raises the same error), and open an issue with a link to that github repo.
Parts
104| Qty | Value | Footprint | References |
|---|---|---|---|
| 14 | 100n | Capacitor_SMD:C_0603_1608Metric | C102, C103, C108, C113, C114, C117, C118, C119, C120, C121, C122, C123, C124, C206 |
| 6 | 10n | Capacitor_SMD:C_0603_1608Metric | C104, C105, C111, C112, C115, C116 |
| 4 | 300 | Resistor_SMD:R_0603_1608Metric | R1, R2, R104, R106 |
| 3 | 82306120029 | Diode_SMD:D_0603_1608Metric | D101, D106, D107 |
| 3 | MountingHole | MountingHole:MountingHole_3.2mm_M3_Pad_Via | H1, H2, H4 |
| 2 | 100nF | Capacitor_SMD:C_0603_1608Metric | C201, C205 |
| 2 | 1uF | Capacitor_SMD:C_0603_1608Metric | C109, C110 |
| 2 | 22pF | Capacitor_SMD:C_0603_1608Metric | C106, C107 |
| 2 | 270R | Resistor_SMD:R_0603_1608Metric | R204, R205 |
| 2 | 27R | Resistor_SMD:R_0603_1608Metric | R202, R203 |
| 2 | 47pF | Capacitor_SMD:C_0603_1608Metric | C203, C204 |
| 2 | LED_5V | LED_SMD:LED_0603_1608Metric | D104, D105 |
| 2 | PESD5V0X1UAB | Diode_SMD:D_SOD-523 | ESD1, ESD2 |
| 2 | RJ45_Shielded | Connector_RJ:RJ45_Amphenol_RJHSE5380 | J1, J2 |
| 2 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP105, JP106 |
| 2 | SolderJumper_2_Open | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP107, JP108 |
| 1 | 100K | Resistor_SMD:R_0603_1608Metric | R201 |
| 1 | 100uF/16V | Capacitor_SMD:CP_Elec_6.3x5.3 | C101 |
| 1 | 100µF 50V 27mΩ | Capacitor_SMD:CP_Elec_10x10 | Cvin1 |
| 1 | 120R | Resistor_SMD:R_0603_1608Metric | R105 |
| 1 | 16MHz | Crystal:Crystal_SMD_0603-2Pin_6.0x3.5mm | Y101 |
| 1 | 1K | Resistor_SMD:R_0603_1608Metric | R102 |
| 1 | 1k | Resistor_SMD:R_0603_1608Metric | Radd1 |
| 1 | 4.7µF | Capacitor_SMD:C_1210_3225Metric | C202 |
| 1 | 4K7 | Resistor_SMD:R_0603_1608Metric | R101 |
| 1 | ADM2687E | Package_SO:SOIC-16W_7.5x12.8mm_P1.27mm | U103 |
| 1 | AMS1117 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U104 |
| 1 | ATmega328PB-AU | Package_QFP:TQFP-32_7x7mm_P0.8mm | U101 |
| 1 | Analog_1_2 | Connector_PinHeader_1.00mm:PinHeader_2x03_P1.00mm_Vertical | J102 |
| 1 | Analog_3_4 | Connector_PinHeader_1.00mm:PinHeader_2x03_P1.00mm_Vertical | J103 |
| 1 | Conn_02x03_Counter_Clockwise | Connector_PinHeader_2.54mm:PinHeader_2x03_P2.54mm_Vertical | J101 |
| 1 | DMX_3V3 | TestPoint:TestPoint_Pad_D1.0mm | TP13 |
| 1 | DMX_DE | TestPoint:TestPoint_Pad_D1.0mm | TP8 |
| 1 | DMX_RE | TestPoint:TestPoint_Pad_D1.0mm | TP7 |
| 1 | DMX_RX | TestPoint:TestPoint_Pad_D1.0mm | TP6 |
| 1 | DMX_TX | TestPoint:TestPoint_Pad_D1.0mm | TP9 |
| 1 | D_Schottky_Small | Diode_SMD:D_SOD-123 | D102 |
| 1 | Driver_Disable1 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP104 |
| 1 | Driver_Enable1 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP103 |
| 1 | ET1 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP1 |
| 1 | ET2 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP2 |
| 1 | FID_ATM | Fiducial:Fiducial_0.5mm_Mask1mm | FID1 |
| 1 | FID_GUL | Fiducial:Fiducial_0.5mm_Mask1mm | FID2 |
| 1 | FID_TLV | Fiducial:Fiducial_0.5mm_Mask1mm | FID3 |
| 1 | FT231XS | Package_SO:SSOP-20_3.9x8.7mm_P0.635mm | U201 |
| 1 | Fuse DNP | Fuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolder | F1 |
| 1 | JP_FTDI_RX | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP4 |
| 1 | JP_FTDI_TX | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP3 |
| 1 | LED_3V | LED_SMD:LED_0603_1608Metric | D103 |
| 1 | LOGO | logo:FireFly_big | G*** |
| 1 | LOGO | logo:radiona-16mm | G*** |
| 1 | LOGO | logo:novena | G*** |
| 1 | MSTBA2 | Connector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_Horizontal | Jc1 |
| 1 | MSTBA3 | Connector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_3-G-5,08_1x03_P5.08mm_Horizontal | Jadd1 |
| 1 | MountingHole | MountingHole:MountingHole_3.2mm_M3 | H3 |
| 1 | RESET | Button_Switch_SMD:SW_SPST_PTS645 | SW102 |
| 1 | RX | LED_SMD:LED_0603_1608Metric | D201 |
| 1 | Receiver_Disable1 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP101 |
| 1 | Receiver_Enable1 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP102 |
| 1 | SW_DIP_x08 | Package_DIP:DIP-16_W8.89mm_SMDSocket_LongPads | SW101 |
| 1 | TP_3V3 | TestPoint:TestPoint_Pad_D1.0mm | TP5 |
| 1 | TP_A | TestPoint:TestPoint_Pad_D1.0mm | TP104 |
| 1 | TP_GND1 | TestPoint:TestPoint_Pad_D1.0mm | TP105 |
| 1 | TP_Vin | TestPoint:TestPoint_Pad_D1.0mm | TP4 |
| 1 | TX | LED_SMD:LED_0603_1608Metric | D202 |
| 1 | USB_B | Connector_USB:USB_B_OST_USB-B1HSxx_Horizontal | J3 |
The 102 most common of 104 parts.
Questions
How big is the Firefly PCB?
It measures 85 × 57.5 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Firefly use?
104 parts, built around the ATMEGA328PB-AU, FT231XS-R, AMS1117 and PESD5V0X1UAB. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Firefly KiCad files?
From the jdthorpe/kicad-module-parser repository on GitHub, at the commit this page was made from: the board is data/pcb/custom/Firefly.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Firefly design in my own project?
Its repository states no licence, so its author keeps all rights: ask jdthorpe before reusing the design.
More from jdthorpe/kicad-module-parser
4- 4 layers43 × 24 mm

- 2 layers18 × 20 mm

- 4 layers16 × 13 mm

- 4 layers16 × 13 mm

Similar boards
- 2 layers109.8 × 109.9 mm

LightBoxNano
TimGremalm/LightBoxNano
a generic PCB for controlling LED's both LED strip and WS2812
76 parts6GPL-3.0 - 2 layers153 × 95.8 mm

Spekky Matrix
jc-SpaceXp/Spekky-Matrix
Spectrum analyser displayed on a LED matrix board connected to a STM32 device
390 parts1MIT - 2 layers88.9 × 106.7 mm

DataLogger
ataweg/DataLogger
DataLogger using "Arduino UNO" board and Greiman SdFat library
62 partsMIT - 4 layers50.5 × 66 mm

Arduino++
Aghosh993/EE_HWDEV_KiCAD
Repository containing all KiCAD schematic, layout and project files for PCB schematic capture and layout projects
83 parts1GPL-3.0 - 2 layers100 × 88 mm

- 2 layers110 × 121 mm

Panel
Telekomak/FiresportTimer
An open source firesport timer designed for "fire attack" discipline
116 parts - 2 layers70 × 79 mm

- 2 layers68 × 55 mm

Aurdino oled. sd card
ayodhyaphanidurgaprasad-source/PCB-Projects
Designed a 2-layer PCB that converts USB to EtherCAT for industrial network communication. Worked on the complete design flow — schematic design, component selection, PCB layout, and routing in KiCad.
66 parts