

ArtDecoEarrings
Shimmering electronic earrings in the Art Deco style.
- Size
- 38.6 × 6.6 mm
- Copper layers
- 2
- Thickness
- 0.1 mm
- Parts
- 20
- Nets
- 34
- Pads
- 98
- Tracks, vias
- 176, 29
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 1 May 2020
- Updated
- 1 May 2020
Overview
ArtDecoEarrings is an open-source printed circuit board by sawaiz, from the sawaiz/artDecoEarrings repository on GitHub. It is a 2-layer board of 38.6 × 6.6 mm with 20 parts on 34 nets, routed with 176 tracks and 29 vias.
It is built around the ATTINY85-20MU, LSM6DSM and MIC5365-3.3YD5-TR, with the WS2812B-2020 and TC2030-IDC-NL among its other parts. Its parts include 8 diodes, 3 capacitors, 3 ICs, 2 resistors and 1 connector. It belongs with the AVR (ATmega, ATtiny) boards of this library.
Main components
5ATTINY85-20MU
QFN-20-EP(4x4)-40℃~+85℃ 10bit 2.7V~5.5V 20MHz 512Byte 512Byte 6 8 Bit 8KB AVR Built-in FLASH QFN-20-EP(4x4) Microcontrollers (MCU/MPU/SOC) ROHSMicrochip TechnologyMicrocontrollers (MCU/MPU/SOC)LSM6DSM
LGA-14(2.5x3)-40℃~+85℃ 1.71V~3.6V 4KB Accelerometer Gyroscope SPI、I2C X,Y,Z X,Y,Z ±16g ±2000dps LGA-14(2.5x3) Accelerometers ROHSSTMicroelectronicsAccelerometersMIC5365-3.3YD5-TR
TSOT-23-5-40℃~+125℃@(Tj) 1 150mA 200uVrms 3.3V 310mV@(150mA) 39uA 5.5V 70dB@(1kHz) Fixed Over Current Protection、Over Temperature Protection、Enable Positive TSOT-23-5 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSMicrochip TechnologyVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsWS2812B-2020
SMD,2.2x2mm0.6mA 0.84mm 120us 160mcd 200mcd 2kHz 2mm 2mm 300ns 470.4nm 515.6nm 520mcd 5V 622.5nm 800Kbit/s Built-in power-on reset circuit、Built-in power-on reset circuit、Integrated intelligent reverse connection protection function Top-mount SMD,2.2x2mm RGB LEDs(Built-in IC) ROHSWorldsemiRGB LEDs(Built-In IC)TC2030-IDC-NL
UncategorisedTag Connect
README
readme.mdArt Deco Earrings
Shimmering electronic earrings in the Art Deco style. Dangle style earring that just lightly shimmers when you are still, and glow brightly when dancing. The lights travel down the length of the earring revealing movement over time.

The earrings use an IMU, sensing changes in acceleration and rotation and based on the magnitude of the change, the brightness is set. Each of the three axes of motion are mapped to a color so the color depends on the way you move.
Design
The design follows the Art Deco style. Clean sharp lines, hard contrast, metallics including gold, and bold colors. A focus on materials and glamour. This can be seen in the sharp point on the bottom or the light ray motif running along the sides along with other small touches across the board.

Electrical
The electrical design is made to be very minimal and manufacturable. Keeping all parts on one side and using no smaller the 0402 components helps with that. Total packages are also kept to a minimum to simplify assembly. The circuit has voltage range of 3.3V to 5.5V. It is expected to consume 5mA in low activity and about 25mA in high activity. A theoretical maximum consumption is 133.49mA.

The schematic.pdf version is also available.
Microcontroller
Microchip's ATtiny20 in a QFN 4mmx4mm package was selected due to its size. Without getting into WLCSP, selecting a device with the correct peripherals that is smaller is difficult. It is a reasonably low cost 8-bit processor, able to be programmed through the Arduino IDE, somewhat low power, and could be prototyped with the PDIP package. It has limited RAM, but with only eight LEDs that is not a problem.
The device is programed with a Tag-Connect TC2030 programing header that has the corresponding ICSP contacts on the back of the board along with the needed locating pins.

IMU
ST-Microelectronics's LSM6DSM available in a small (2.5mmx3mm) is a low power accelerometer and gyroscope with I2C and SPI. It is very low power and also has additional embedded functions that are not being used currently.
LED Array
WorldSemi WS2812B-2020 RGB LEDs in the 2mmx2.2mm package provide the light. They come in a small package that can glow brightly and are addressable so only a single data line provides data to the whole array in a shift-register fashion.

Power Supply
Microchip's MIC5365 and battery pads are the main power components. The 3.3V LDO linear regulator provides power to the microcontroller and IMU. There is no UVLO so it is recommended your battery has one. With voltage below 3.3V the output voltage corresponds to the input with the ~60mA drop, the board should continue working until 2.7V where the blue diode will cut out and the microcontroller falls out of it's speed grade and may not be able to maintain its clock speed. The two battery pads on the back are marked with plus and minus symbols and can have enameled wires soldered to them to provide power to the board.

Coating
After programming and testing, four thin coats of OPI Top Coat were added on top to secure the enameled wires and provide encapsulation.

Then following the lines on the back silkscreen, the board is trimmed to its final dimensions removing the locating holes for the programmer.

Firmware
The main loop is shown below (an excerpt from main.cpp) and the logic is currently very minimal. The sensor is read every 25ms, and its current value is compared to the previous value. The magnitude of difference between those values is mapped (after dividing by 2^6 to reduce sensitivity) to the three colors, one for each axis.
All the LEDs are moved down one spot, and the calculated values are assigned to the top LED. As this repeats, the colors waterfall down the chain until they "fall off" at the end.
void loop() {
imu.readRawAccel();
// Calculate change, and map to lower sensitivity
uint8_t red = abs((imu.accelData.x >> 6) - (prevX >> 6));
uint8_t green = abs((imu.accelData.y >> 6) - (prevY >> 6));
uint8_t blue = abs((imu.accelData.z >> 6) - (prevZ >> 6));
// Store current reading as new previous data
prevX = imu.accelData.x;
prevY = imu.accelData.y;
prevZ = imu.accelData.z;
// Shift all LEDs down one spot
memmove(&leds[1], &leds[0], NUM_LEDS * sizeof(CRGB) - 1);
// Set color of 0th LED
leds[0] = CRGB(red, green, blue);
FastLED.show();
delay(25);
}On boot there is a pulse of light from the acceleration vector of gravity being compared to the initial all zero values.
LSM6DM Driver
The driver is meant to be minimal and fast. Producing only int16_t values and no floating-point operations. It can access the accelerometer, gyroscope, and temperature sensor as well as set their max scale and rates.
Compiling
It is set up to be compile through PlatformIO. More information can be found through its doucmentation. Changes may be need to the settings in the ini file.
Flashing
An ICSP programmer along with the TagConnect programming header is needed to program the board. A retaining clip is useful for extended programing sessions.
Recommended programers are the Atmel-ICE or Adafruit's USBtinyISP. Take care to remove the power target jumper if using the USBTinyISP as the IMU has an absolute max voltage of 4.8V. The board will need external power regardless for programming, so attach a battery.
Uploading using PlatformIO is currently used. Refer to documentaiton. Changes may be needed to the ini file settings.
Fuses
The highest fuse bit in the low fuses needs to be to disable the CKDIV8 flag. The fuses can either be flashed though PlatformIO as they are set in the ini file, or through avrdude as shown below.
avrdude -p t85 -c atmelice_isp -U lfuse:w:0xE2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:mTiming Analysis
An extra GPIO was used toggling around the delay function. This will provide the approximate time the processor needs to be awake. There is a lot of overhead from the Arduino libraries. Running an empty loop takes ~700us (5600 cycles) from the end of the loop to the start of the next.

The values were averaged over 64 samples and will not sum across the measurements due to noise but should be within 0.5%. The frequency value was taken to cross check the high and low time.
| Domain | Value | Unit | Percentage |
|---|---|---|---|
| Full | 26.33 | ms | 100.00% |
| Sleep | 24.67 | ms | 93.70% |
| Active | 1.746 | ms | 6.63% |
Based on that rough data, and the current draw values from the datasheet, we can estimate average power consumption.
4mA Active * 0.0663 = 0.2652 mA
1mA Idle * 0.9370 = 0.9370 mA +
------------
1.2022 mAThis can be significantly improved by switching to C to reduce the active time.
BOM
The bill of materials is available in bom.csv and is copied into a table below.
| Ref Des | Qty | Manufacturer | MPN | Description |
|---|---|---|---|---|
| C1 | 1 | Samsung | CL05A105KQ5NNNC | CAP: Ceramic 1uF 6.3V X5R 0402 |
| C2 | 1 | Taiyo Yuden | JMK105BJ225KV-F | CAP: Ceramic 2.2uF 6.3V X5R 0402 |
| C3 | 1 | Wuerth Elektronik | 885012105010 | CAP: Ceramic 0.1uF 10V X5R 0402 |
| D1-D8 | 8 | WorldSemi | WS2812B-2020 | LED: Addressable RGB (2x2) |
| R1 R2 | 2 | Stackpole Electronics | RMCF0402JT10K0 | RES: 10K OHM 5% 1/16W 0402 |
| U1 | 1 | Microchip | MIC5365-3.3YMT-TZ | REG Linear 3.3V 150mA 4TMLF (1x1) |
| U2 | 1 | Microchip | ATTINY85-20MU | MCU: AVR 8b 8KB Flash 20QFN (4x4) |
| U3 | 1 | STMicroelectronics | LSM6DSMTR | IMU: Accel/Gyro I2C/SPI 14LGA (2.5x3) |
A Octopart BOM is also available to simplify ordering.
Assembly
Assembly is all surface mount with components on one side of the board to make PNP assembly easy. The layout layer duplicated below lists components by their reference designators and values.

Solder paste can be applied with 25ga+ syringe, or with a stencil of the top paste layer. The components can then be placed, taking note of those that are polarity dependent, being U1-U3 and D1-D8 as marked in the assembly layer. A standard reflow profile, a hotplate, or a hot air rework station should work equally well. Inspect the side joints of the microcontroller as they will experience a lot of stress when trimming the board.

Two pads on the back are to provide power from enameled wire that can be soldered, and then twisted and routed out through the mounting hole on top. Then after final testing the device can be encapsulated and then trimmed.
A detail image of a fully assembled prototype before trimming
PCB Ordering
The board is a two-layer polyimide flex with 6/6mil spacing, plated through vias. These are generally the defaults boards so they can be made by most fabrication houses provided flex is an available option. A set of three was purchased at Oshpark for 2.00 USD and a shared project is available here.

A full set of gerbers are also available in ./docs/gerbers. They have been visually checked although the fabrication of the prototypes was from the KiCad source file.
Dimensions
The board is rather small so it may need to be panelized for some manufacturers.
PCB Dimensions
| Width | Height | |
|---|---|---|
| Inches | 1.53 | 0.26 |
| mm | 38.9 | 6.6 |
Since its tapered, it can be placed in an alternating orientation for better space utilization.

Dimensions of board after being trimmed to size.
To-Do
- Change delay to sleep
- Move code to simple makefile
- Find ideal low power IMU rate
- Switch to C for performance improvements
- Add passives (R & C) to project library
Parts
20| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | WS2812B-2020 | WS2812B-2020:WS2812B-2020 | D1, D2, D3, D4, D5, D6, D7, D8 |
| 2 | 10k | Resistor_SMD:R_0402_1005Metric | R1, R2 |
| 1 | + | TestPoint:TestPoint_Pad_D1.5mm | + |
| 1 | - | TestPoint:TestPoint_Pad_D1.5mm | - |
| 1 | 0u1 | Capacitor_SMD:C_0402_1005Metric | C3 |
| 1 | 1u | Capacitor_SMD:C_0402_1005Metric | C1 |
| 1 | 2u2 | Capacitor_SMD:C_0402_1005Metric | C2 |
| 1 | ATtiny85-20MU | ATtiny85-20MU:QFN-20-1EP_4x4mm_P0.5mm_EP2.6x2.6mm | U2 |
| 1 | LSM6DSM | LSM6DSM:LGA-14_3x2.5mm_6-6 | U3 |
| 1 | MIC5365-3.3YD5 | MIC5365:MIC5365 | U1 |
| 1 | TC2030-IDC-NL | TC2030-IDC-NL:Tag-Connect_TC2030-IDC-NL_2x03_P1.27mm_Vertical | J1 |
| 1 | earringHookWire | earringHookWire:earringHookWire | H1 |
Similar boards
- 4 layers35 × 25 mm

- 4 layers46.7 × 19.3 mm

QFN Touch TTP223
Paschalis/Hardware-Login-Key
The Hardware Login Key is an ATtiny85-based USB device that securely automates password entry using a physical button or touch sensor. It offers a simple, hardware-driven way to log into systems or websites.
24 parts3GPL-3.0 - 2 layers19.8 × 30 mm

ATTiny Breakout Board
xz-group/PCBench
PCBench is a free open-source benchmark for board-level hardware attacks and Trojans.
3 parts3GPL-3.0 - 2 layers

- 2 layers22.9 × 10.9 mm

- 2 layers

- 2 layers160.7 × 86.4 mm

StackedDriver rev 2
currawong-project/picadae
Project files for the Currawong Picadae piano player mechanism
139 parts - 4 layers100 × 96 mm

DeMurxer v01.1 Panel
Ecksteher/DeMurxer_V1
Decoder für Modelleisenbahn Signale mit Multiplex-Technologie
400 parts
Questions
How big is the ArtDecoEarrings PCB?
It measures 38.6 × 6.6 mm and has 2 copper layers, 0.1 mm thick.
What parts does the ArtDecoEarrings use?
20 parts, built around the ATTINY85-20MU, LSM6DSM, MIC5365-3.3YD5-TR and WS2812B-2020. 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 ArtDecoEarrings KiCad files?
From the sawaiz/artDecoEarrings repository on GitHub, at the commit this page was made from: the board is pcb/artDecoEarrings.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the ArtDecoEarrings design in my own project?
Its repository states no licence, so its author keeps all rights: ask sawaiz before reusing the design.