Exploring Wearables: LED Sequin Brooch
I wanted to make something unique as the finishing touch to an elaborate outfit, so I made a brooch with LED sequins! I took some notes and published the code afterward and thought I’d share them in case anyone else is looking for a chill project to get started with ✨wearables✨.

Equipment List
- Gemma M0 for running the LEDs
- LED Sequins (I used 3 pink and 3 white)
- 2x CR2032 power supply
- Conductive thread
- Fabric for sewing LEDs
- Sewing needle
- Double sided tape for positioning LEDs prior to sewing
- 4 inch embroidery hoop
- Pin backs for affixing to clothing
- High temp precision glue gun and matching fabric hot glue
- Textured fabric for brooch design
- Non-clear Scotch tape and/or white tissue paper for diffusing light
- Card stock cut to size for structure
- Fabric to cover card stock for back structure
The Code
I started by struggling with CircuitPython for awhile with all the LEDs connected to the Gemma in a chaotic mess of alligator clips and test leads. In retrospect, I had been having issues identifying the output pins and understanding if digital or analog would work and which pins were active.
I knew the effect I wanted–a breathing or heartbeat kind of effect–but I had to play around for awhile and read up on the limitations of digital vs analog when working with LEDs. Eventually I figured out I needed to stick to analog and pwm (pulse width modulation).
Here’s the code I used. I tried a couple different versions of CircuitPython besides the one that came loaded on Gemma. Eventually I settled on 7.3.3 as the latest 7.x version available. The newest version (9.2.8) didn’t work and unfortunately I can’t recall exactly why, but the tutorials and reference code I checked out about pwm and fading LEDs seemed to reference CircuitPython 7.
# Gemma M0 - m0_led_brooch
# CircuitPython 7.3.3
# adapted from https://learn.adafruit.com/adafruit-led-sequins/circuitpython-code & Gemma IO demo & adafruit pwm demo
import time
import board
import pwmio
from analogio import AnalogIn, AnalogOut
# PWM (fading) LEDs are connected on A1 and A2 - valid PWM outs
pwm_leds_white = pwmio.PWMOut(board.A1, frequency=60, duty_cycle=0)
pwm_leds_pink = pwmio.PWMOut(board.A2, frequency=60, duty_cycle=0)
# define max and min brightness
max_brightness = 100
min_brightness = 5
# define fade time in secs (float)
fade_time = 0.02
while True:
# pass min/max percentages of duty cycle (brightness)
for i in range(min_brightness, max_brightness):
pwm_leds_white.duty_cycle = int(i / 100 * 65535)
pwm_leds_pink.duty_cycle = int(i / 100 * 65535)
if i == max_brightness:
time.sleep(1)
time.sleep(fade_time)
for i in range(max_brightness, min_brightness, -1):
pwm_leds_white.duty_cycle = int(i / 100 * 65535)
pwm_leds_pink.duty_cycle = int(i / 100 * 65535)
time.sleep(fade_time)
if i == min_brightness: # yeah i flipped these oh well
time.sleep(1)
The Hardware

After mixed success with the first iteration of code (at least I had the wiring right), I switched to the hardware side of the project. The first step was to arrange the LEDs and the Gemma. Here’s the wiring diagram I followed when sewing the LEDs. It’s also a great tutorial on sewing LEDs! I attached Gemma to the sewing fabric using a dot of fabric hot glue on the flat side and arranged the LEDs using small strips of double sided tape. In my case I cut some Hollywood Secret clothing adjustment dots in half and used those. I definitely recommend using an embroidery hoop for this kind of sewing project.

This photo from my diffusion experiments shows a bad hardware hack that did not make it into the final product! The LED I wired to its neighbor and secured with hot glue (OMG 😅) flickered way too much to be usable. I assume it’s because it wasn’t getting consistent power that way. Plus it just looked like a bad job. Don’t cheat, even if it’s the last LED and you’re trying to conserve thread instead of threading the needle yet again. Always rethread the needle!
Once I had everything wired up neatly, I continued to experiment with the code until I had the effect I wanted. Next it was time to design the front of the brooch. I connected the power supply for more flexibility since I finally had working code and had committed to running it for the project. The design work involved experimenting with diffusion materials and layering fabrics to get the right effect. I ended up using a layer of tape and a well positioned square of white tissue paper.

The key was to not have the tissue paper or tape sit too close to the LEDs–being right on top minimized the light diffusion. I solved this by taping the tissue paper on one side for more stability, folding it into a smaller square, unfolding it, and finally attaching it with glue in the middle but leaving the sides detached. Since they had been unfolded, the sides of the tissue paper sat slightly higher up from the LEDs than if it had started out flat.
After deciding on the diffusion and layering design, I needed a structure to accommodate the fabric layers and power supply. I glued the LED/Gemma fabric to some card stock cut out to make the basic structure. I cut a matching piece of card stock for the back and covered it with matching fabric.

Next I attached the fabric layers to the front using hot glue. I turned the brooch on again to make sure everything was still working and fine tuned the placement of the layers.
After getting the front the way I wanted, it was time to attach it to the back. I added a square of card stock to the back of the design side so the power supply wouldn’t get caught up on the fabric when it slid across it. I decided to glue it on the top and bottom and leave the sides open to hide the power supply while keeping it easily accessible to change the batteries.

Finally, I glued a pin back in place at the top. I ended up adding a second locking pin on the bottom for a more solid hold when attached to clothes/accessories.
The Result
View post on imgur.com
Video showing fading effects
I’m pretty pleased with this for a first ever wearable project.
What I’d do differently next time:
- Design the final structure ahead of time and 3D print or upcycle a light, solid frame to wrap the sewn fabric around vs attaching the “design” half to the card stock panel backing half. I would want to make a matching side to attach on the back to stow the power supply in a neater way–ideally the power supply switch would still be accessible while enclosed.
- Start with the matching color fabric glue and right size glue gun! (things were much neater later in the project when I had the right equipment)
- Document the state of Gemma or whatever is driving the project before it’s all wrapped up and inaccessible. 😅
All in all, it was a fun little dive into wearables. Now that I have some familiarity, I want to explore touch interactions and LED status reporting then roll it up into some kind of wearable wireless hacking tech with a Raspi Zero W or similar. I’m imagining it could be cool to integrate into a small handbag or fanny pack.
Happy hacking!