

Butterfly
KiCad and Gerber files for a nightlight shaped like a butterfly.
- Size
- 93.1 × 65.5 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 30
- Nets
- 29
- Pads
- 102
- Tracks, vias
- 305, 3
- Pours
- 5
- Routed
- Yes
- KiCad
- KiCad 4
- Created
- 28 Jan 2018
- Updated
- 12 Aug 2024
Overview
Butterfly is an open-source printed circuit board by mignon-p, from the mignon-p/butterfly-hw repository on GitHub, published under the CC-BY-SA-4.0 licence. It is a 2-layer board of 93.1 × 65.5 mm with 30 parts on 29 nets, routed with 305 tracks and 3 vias.
It is built around the ATTINY85-20PU and TC33X-2-103E. Its parts include 18 diodes, 2 capacitors, 2 connectors, 1 resistor and 1 IC. It belongs with the lEDs and displays boards and the AVR (ATmega, ATtiny) boards of this library.
Main components
2ATTINY85-20PU
PDIP-8-40℃~+85℃ 10bit 2.7V~5.5V 20MHz 512Byte 512Byte 6 8 Bit 8KB AVR Built-in FLASH PDIP-8 Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)TC33X-2-103E
SMD-3P,3.8x3.6mm1 10kΩ 150mW ±25% ±250ppm/℃ SMD-3P,3.8x3.6mm Potentiometers, Variable Resistors ROHSBournsPotentiometers & Variable Resistors
README
README.mdThis repository contains the KiCad and Gerber files for a PCB nightlight shaped like a butterfly.

The nightlight contains 18 "NeoPixel" (WS-2812) LEDs, controlled by an ATtiny85 microcontroller. (The firmware for the microcontroller is in a separate repository.)
There is a tiny potentiometer on the back, which can be used to control the brightness. (This functionality is handled in software, so it could potentially be repurposed, such as to control speed or color instead.)
The nightlight plugs into a standard USB power adapter (phone charger), which handles the AC-to-DC conversion.
Bill of Materials
- D1-D18 (qty 18) - 5mm through-hole NeoPixel. SparkFun part no. COM-12986. Digi-Key part no. 1568-1213-ND.
- U1 (qty 1) - ATtiny85 microcontroller. Atmel part no. ATTINY85-20PU. Digi-Key part no. ATTINY85-20PU-ND.
- U1 (qty 1) - 8-pin DIP socket. Assmann part no. A 08-LC-TT. Digi-Key part no. AE9986-ND.
- J2 (qty 1) - USB A plug. Molex part no. 0480370001. Digi-Key part no. WM17117-ND.
- C1 (qty 1) - 0.1µF 0805 capacitor. AVX part no. 08055C104KAT2A. Digi-Key part no. 478-1395-1-ND.
- C2 (qty 1) - 10µF 0805 capacitor. Kemet part no. C0805C106K8PACTU. Digi-Key part no. 399-4925-1-ND.
- R1 (qty 1) - 470 Ohm 0805 resistor. Rohm part no. ESR10EZPJ471. Digi-Key part no. RHM470KCT-ND.
- POT1 (qty 1) - 10k Ohm potentiometer. Bourns part no. TC33X-2-103E. Digi-Key part no. TC33X-103ECT-ND.
- SW1 (qty 1; optional) - Pushbutton. Omron part no. B3S-1000. Digi-Key part no. SW415-ND.
- Bare wire, 20 AWG.
- USB power adapter with USB A receptacle.
Tools
- Standard soldering tools.
- Tiny AVR Programmer. SparkFun part no. PGM-11801. Digi-Key part no. 1568-1079-ND.
- Computer with Arduino IDE installed.
Circuit board
Most fabs should work fine, but I chose JLCPCB. I chose blue soldermask for my first set of boards, but red or yellow might work, as well. I chose the ENIG finish.
If you're not making any changes to the board, all you need to do is
zip up the files in the gerber directory, and upload the zipfile to
JLCPCB.
Note that in the KiCad files and Gerber files, the "front" of the board is actually the back, and vice-versa. This is because JLCPCB adds a customer ID number to the front of the board, but I wanted the number to be on the actual back of the board, where it doesn't disrupt the esthetics of the nightlight. (It turns out it's possible to specify the location of the customer ID, but I hadn't read that when I first came up with this trick.)
Assembly
-
Solder the surface-mount components C1, C2, R1, and POT1 onto the back of the board.
-
Solder the USB plug onto the back of the board. The plug is meant to be used at a right angle, so some surgery is required. Use needle-nose pliers to bend the pins so that they are straight, rather than at a right angle. Insert the pins through the holes in the board. Use Scotch tape to hold the plug in place. Trim the pins just a little bit, so they don't protrude quite so far through the board. Solder the pins to the board. Remove the Scotch tape from the back. Then, create a bead of solder all the way around where the plug touches the board on the back, to hold it in place firmly.
-
Solder the 8-pin DIP socket to the front of the board. The "U"-shaped indentation should point toward the top of the butterfly.
-
Solder the 18 LEDs to the front of the board. The LED should be positioned so that the square pad gets one of the longer legs, not one of the shorter ones.
-
Create the butterfly's antennae by inserting a length of bare wire into the holes on the butterfly's head. (These two holes are represented by J3 on the schematic.) It's a tight fit, so friction may be enough to hold the wire in place, but you can always solder it to be sure.
-
Program the firmware into the ATtiny85 chip.
-
Insert the ATtiny85 into the socket on the butterfly. The dot on the chip should be in the upper-left corner.
-
Plug the butterfly into the USB power adapter.
-
Plug the power adapter into the wall.
Bonus Button
SW1 can optionally be populated with a surface-mount pushbutton, which is connected to physical pin 5 of the ATtiny85. (Arduino digital pin 0.) This is not used in the default firmware, and I don't normally populate it. But, you can populate it if you want to have an additional input in custom firmware that you write. The pushbutton pulls the pin to GND, so you'll need to activate the internal pullup.
License
This design is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.
Some of the footprints in myLibrary.pretty are based on footprints
in the KiCad library, which is licensed under the
KiCad library license (which is now also CC-BY-SA-4.0, with an
exception). The footprint in digikey-footprints.pretty is a
modified version of a footprint from the Digi-Key KiCad library,
which is licensed under the same terms as the KiCad library.
Parts
30| Qty | Value | Footprint | References |
|---|---|---|---|
| 18 | Neopixel_THT | myLibrary:LED_D5.0mm-4 | D1, D2, D3, D4, D5, D6, D7, D10, D11, D12, D13, D14, D15, D16, D17, D18 +2 |
| 1 | 0.1uF | Capacitors_SMD:C_0805_HandSoldering | C1 |
| 1 | 10uF | Capacitors_SMD:C_0805_HandSoldering | C2 |
| 1 | 470 | Resistors_SMD:R_0805_HandSoldering | R1 |
| 1 | ATTINY85-20PU | myLibrary:DIP-8_W7.62mm | U1 |
| 1 | Conn_01x02 | myLibrary:Antennae | J3 |
| 1 | LOGO | myLibrary:copper-on-wing-right | G*** |
| 1 | LOGO | myLibrary:AbsMaxRat_Logo | G*** |
| 1 | LOGO | myLibrary:copper-on-wing-left | G*** |
| 1 | SW_Push | Buttons_Switches_SMD:SW_SPST_B3S-1000 | SW1 |
| 1 | TC33X-2-103E | digikey-footprints:TC33X-2-103E | POT1 |
| 1 | USB_A | myLibrary:USB_A_Molex-0480370001_Vertical | J2 |
The 29 most common of 30 parts.
Similar boards
- 4 layers60 × 110 mm

- 2 layers177.4 × 202.8 mm

MQ Breakout
SolderedElectronics/Air-quality-sensor-MQ135-breakout-hardware-design
Hardware design, BOM, gerbers and 3D files for Air-quality-sensor-MQ135-breakout designed by Soldered Electronics.
1,564 parts7 - 2 layers71.8 × 40.8 mm

- 2 layers210 × 109 mm

Capacitive soil sensor panel
SolderedElectronics/Capacitive-soil-sensor-hardware-design
Hardware design, BOM, gerbers and 3D files for Capacitive-soil-sensor designed by Soldered Electronics.
372 parts3 - 2 layers42 × 20 mm

- 4 layers222 × 100 mm

HydroScan V1
paulmartinezcuenta/Proyecto_finales_mecatronica_ITLA
Monorepo for two mechatronics projects sharing a panelized PCB: HydroScan (autonomous IoT maritime buoy with LTE, GPS, and solar power) and AUTOAMBU (automated medical respirator prototype with DC control and USB fast…
156 parts1 - 2 layers48.4 × 52.1 mm

- 4 layers70.8 × 110 mm

Questions
How big is the Butterfly PCB?
It measures 93.1 × 65.5 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Butterfly use?
30 parts, built around the ATTINY85-20PU and TC33X-2-103E. 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 Butterfly KiCad files?
From the mignon-p/butterfly-hw repository on GitHub, at the commit this page was made from: the board is Butterfly.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Butterfly design in my own project?
Its repository publishes it under the CC-BY-SA-4.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).