Skip to the content
2 layers93.1 × 65.5 mmButterfly, the printed circuit board in 3D

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

2

README

README.md

This repository contains the KiCad and Gerber files for a PCB nightlight shaped like a butterfly.

photo of nightlight

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

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

  1. Solder the surface-mount components C1, C2, R1, and POT1 onto the back of the board.

  2. 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.

  3. Solder the 8-pin DIP socket to the front of the board. The "U"-shaped indentation should point toward the top of the butterfly.

  4. 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.

  5. 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.

  6. Program the firmware into the ATtiny85 chip.

  7. Insert the ATtiny85 into the socket on the butterfly. The dot on the chip should be in the upper-left corner.

  8. Plug the butterfly into the USB power adapter.

  9. 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
QtyValueFootprintReferences
18Neopixel_THTmyLibrary:LED_D5.0mm-4D1, D2, D3, D4, D5, D6, D7, D10, D11, D12, D13, D14, D15, D16, D17, D18 +2
10.1uFCapacitors_SMD:C_0805_HandSolderingC1
110uFCapacitors_SMD:C_0805_HandSolderingC2
1470Resistors_SMD:R_0805_HandSolderingR1
1ATTINY85-20PUmyLibrary:DIP-8_W7.62mmU1
1Conn_01x02myLibrary:AntennaeJ3
1LOGOmyLibrary:copper-on-wing-rightG***
1LOGOmyLibrary:AbsMaxRat_LogoG***
1LOGOmyLibrary:copper-on-wing-leftG***
1SW_PushButtons_Switches_SMD:SW_SPST_B3S-1000SW1
1TC33X-2-103Edigikey-footprints:TC33X-2-103EPOT1
1USB_AmyLibrary:USB_A_Molex-0480370001_VerticalJ2

The 29 most common of 30 parts.

Similar boards

  • 4 layers60 × 110 mmNeptune, the printed circuit board in 3D

    Neptune

    wntrblm/Neptune

    A salty diode ladder filter

    279 parts44
  • 2 layers177.4 × 202.8 mmMQ Breakout, the printed circuit board in 3D

    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 mmESP32.27, the printed circuit board in 3D

    ESP32.27

    OpenMYR/ESP32-Stepper

    OpenMYR ESP32 controller board, stepper driver with A5984

    71 parts5
  • 2 layers210 × 109 mmCapacitive soil sensor panel, the printed circuit board in 3D

    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 mmEmg analog front end, the printed circuit board in 3D

    Emg analog front end

    neurotech-berkeley/emg-neurowrist

    Building an EMG-wristband

    49 parts2MIT
  • 4 layers222 × 100 mmHydroScan V1, the printed circuit board in 3D

    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 mmTentacle board, the printed circuit board in 3D

    Tentacle board

    rc-sr/tentacle

    Modular robotic tentacle

    80 parts1MIT
  • 4 layers70.8 × 110 mmThors Arsenal, the printed circuit board in 3D

    Thors Arsenal

    shannon-greenlight/Thors-Arsenal

    Eurorack Module

    311 parts1GPL-3.0

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).