Overview
Use a Gemma M0 and a couple of LEDs to make this Princess Peach / Bowsette inspired crown! Use Circuit Python to fade the 10mm LEDs inside the translucent filament to illuminate this magical mushroom inspired crown.
Top it off with a pair of our flexible printed horns to create a unique twist on the Bowsette crown!
The crown is 3d printed in flexible material, making it easy for cut or sew onto fabrics, perfect for cosplay.
The Gems are 3d printed in a translucent material that allows it to fully diffuse.
The horns are printed in glow in the dark flexible material, so the look spooky under blavk uv lights!
3D print or use an existing headband to wear for your next halloween or cosplay event!
Prerequisite Guides
If you're new to Adafruit Circuit Python and soldering, take a moment to walk through the following guides to get you started.
Parts List
A more digestible list of parts used to build this project.
Tools and Supplies
List of handy things to assist in any project.
Page last edited March 08, 2024
Text editor powered by tinymce.
3D Printing
What If I Don't Have A 3D Printer?
Not to worry! You can use a 3D printing service such as 3DHubs or MakeXYZ to have a local 3D printer operator 3D print and ship you parts to you. This is a great way to get your parts 3D printed by local makers. You could also try checking out your local Library or search for a Maker Space.
Fusion 360 files
Below are links to modify the design of the Crown, Gems and Battery Pocket to fine tune them to adjust to your printer tolerances.
Design Source Files
The enclosure assembly was designed in Fusion 360. This can be downloaded in different formats like STEP, SAT and more. Electronic components like the board, displays, connectors and more can be downloaded from our Fusion 360 CAD parts github repo.
Slice Settings
These settings are for NinjaFlex 85A with a 0.4mm nozzle profiles using FlashPrint Optimized for the Flashforge Inventor 2.
- Nozzle .4mm
- Layer Height .2mm
- Line Width .38
- Print Speed 40mm/s
- Retraction 0mm
- Build plate adhesion type – skirt
- Bed 0c Blue Tape
3D Printing Flexibles
The crown was 3D printed with FDM type 3D printers using Ninjaflex TPU filament. This material is flexible and rubbery so it can be folded, cut, and sewn – This makes it great for wearables! Printing this material requires a bit of know how (documented in our learn guide).
Printing Gems
Use translucent natural PLA filament to make gems that will evenly diffuse the LEDs.
All of the gem elements are separated into individual pieces to make printing easier. Assembly is pretty easy and straight forward. Use the links below to download the STLs files.
Page last edited March 08, 2024
Text editor powered by tinymce.
Circuit Diagram
Circuit Diagram
This provides a visual reference for wiring of the components. They aren't true to scale, just meant to be used as reference. This diagrams was created using Fritzing software.
Connections:
Gemma:
The GND is shared with all ground (-) connections.
D2 connects two of the LEDs, each on the opposite side of the crown.
D0 connects the other two LEDs.
220Ω resistors connect on the positive legs of the LEDs
Page last edited March 08, 2024
Text editor powered by tinymce.
Code
Setup Adafruit GEMMA M0 for CircuitPython
Your GEMMA M0 should already come with CircuitPython but maybe there's a new version, or you overwrote your board with Arduino code! In that case, see the below for how to reinstall or update CircuitPython. Otherwise you can skip this and go straight to the next page.
Upload The Code
Copy and paste the code below into a new text document (we recommend using Mu as your editor, which is designed for CircuitPython.). Save the file and name it as main.py
Once the files has been uploaded to the drive, the board will automatically reboot and run the code.
import time
import board
import pulseio
from digitalio import DigitalInOut, Direction
# PWM (fading) LEDs are connected on D0, D2 (PWM not avail on D1)
pwm_leds = board.D2
pwm = pulseio.PWMOut(pwm_leds, frequency=1000, duty_cycle=0)
pwm2_leds = board.D0
pwm2 = pulseio.PWMOut(pwm2_leds, frequency=1000, duty_cycle=0)
brightness = 0 # how bright the LED is
fade_amount = 1285 # 2% steping of 2^16
counter = 0 # counter to keep track of cycles
while True:
# And send to LED as PWM level
pwm.duty_cycle = brightness
pwm2.duty_cycle = brightness
# change the brightness for next time through the loop:
brightness = brightness + fade_amount
print(brightness)
# reverse the direction of the fading at the ends of the fade:
if brightness <= 0:
fade_amount = -fade_amount
counter += 1
elif brightness >= 65535:
fade_amount = -fade_amount
counter += 1
# wait for 15 ms to see the dimming effect
time.sleep(.015)
Page last edited March 08, 2024
Text editor powered by tinymce.
Assembly
Mount LED
After cleaning up the crown, we can move on to mounting the electronics! We'll start off by inserting the 10mm LEDs into each of the holes around the crown.
Press the LEDs until you reach the flange. We'll arrange the legs so the ground are close to the GND pin on Gemma board.
Gem mount
The Gems are held in place by press fitting them into the 10mm LEDs. Align each gem and press them into the cavities. The gems will only fit in one direction only, we can rotate them until they fully seat into the cavity.
If the tolerances are loose, we'll use a drop of super glue to keep the gem in place.
Battery Pocket
Next we'll attach the battery pocket inside of the crown. Position the pocket with the opening facing up.
The small hole will allow the cable to pass through the pocket and align with the JST port on the Gemma.
We'll use a drop of hot glue to adhere the battery pocket to the inside of the crown as show in the picture.
LED legs
Next, we'll bend the legs on the LEDs around the shape of the crown. Align each leg so it's closest to the battery pocket.
Wires
Follow the circuit diagram to connect the resistor and wire to each LED.
Now we'll measure and cut the wires to reach the pads on the Gemma. The two LEDs furthest from the battery pock will need wires to be 100mm long. The nearby LEDs will need ~30mm long wires to reach the connections on the Gemma.
Gemma mount
The Gemma board will mount directly to the battery pocket. Align the Gemma with the USB port facing up.
Use a drop of the hot glue to adhere the board to the battery pocket. Do not insert the battery until the end.
Gemma Connect
Allow the Gemma to adhere to the battery pocket before connecting the LEDs. We'll use tweezers to help hold wires while soldering each connection to the Gemma board.
Battery wire
After we verify all connections are fully connected with soldered, we move on to inserting our 150mAh lipo battery into the pocket. Align the wire so the JST connection can fit through the small opening on the bottom of the pocket.
Battery mount
We can use pliers to help pass the battery JST through the battery pocket hole. Gently guide the lipo battery into the pocket by pull on the wire as to push the battery inside.
Headband
The crown is almost complete! To adore, we'll need to attach a headband to the bottom of the crown.
The print includes indents on each side to allow you to cut a slit into the crown. Measure a headband and using a hobby knife, carefully cut away slit to fit the headband.
Horns
To finish off the bowsette look, attach our horn parts to each side of the headband. Slide each tab on the horns as shown in the picture.
Page last edited March 08, 2024
Text editor powered by tinymce.