Homepage

RGB Colourwashing Hairclip

A hairclip/jewellery project producing a randomly changing RGB LED wash.

Conception

Complete Project Image

This idea was conceived as a Christmas present, and draws inspiration from:

The PCB for the project was produced by BatchPCB.

The basic idea here is to get a steampunk style piece of jewelery small enough to be used as a hairclip, but large enough to hide/enclose a PCB. The PCB has an RGB LED, a microcontroller to drive it, and a tilt switch to further "randomise" the colour output on the shake of a head. Finally, a rechargeable Li-Ion battery and associated circuitry provide power.

The pictures here are of the first board, which has the on/off switch and USB voltage sensing added as bodges. Version 2 or the board will have these on the board, with the on/off switch most likely being a "soft" on/off, connected to the STM8's GPIO.

Pictures

Unit with brooch

The complete PCB and the steampunk jewellry it's designed to fit under

Labelled Unit

The complete PCB, with labelled blocks

Microcontroller

The microcontroller is an STM8S105, driving a side-looking RGB LED. The RGB is driven "randomly" (see source code below) from the STM8S timer PWM outputs. The tilt switch triggers an IO interrupt that triggers an immediate "jump" in RGB colour with a few shakes of the PCB. An On/Off switch toggles the RGB outputs.

The micro also monitors the USB port for power, and lights the LED red for charging, green for charged based on the charging IC output. The USB power needs monitoring, as the charging IC status output has no difference between "no battery" and "charging" states.

Power

The battery is an LIR2032 from The Small Battery Company, who are awesome.This battery provides a 3v3 supply for the circuit. 5v recharging power is provided by a USB mini-B port, and fed to a MCP73831 charging IC. This IC provides a status output to the microcontroller, as described above.

LED

The LED chip is a tiny one from Avago (HSMF-C113).

Other Bits

The tilt switch pulls an interrupt pin low, and that's about it.

Project Files

rgb_brooch.zip - Zip of all project files

Firmware