# 3D Printed Unicorn Horn

## Overview

http://youtu.be/S1b7TDTNjsY

Searching for a simple costume project to bring your Unikitty or Lady Rainicorn to the next level? 3D print a flexible unicorn horn and illuminate it from within with NeoPixels and a [GEMMA M0](https://www.adafruit.com/product/3501), [GEMMA v1](https://www.adafruit.com/product/2470) or&nbsp;[GEMMA v2](https://www.adafruit.com/product/1222)&nbsp;based microcontroller. Or forget the electronics and use glow in the dark NinjaFlex filament for a green glow with no batteries required.

Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/027/014/medium800thumb/led_pixels_unicorn_hat_iso.jpg?1448319313)

This is a pretty quick soldering project that is suitable for attentive beginners!&nbsp;Prerequisite guides:

- [Introducing Gemma M0](../../../../adafruit-gemma-m0/)&nbsp;or&nbsp;[Introducing GEMMA](../../../introducing-gemma)&nbsp;
- [NeoPixel Uberguide](../../../adafruit-neopixel-uberguide)
- [3D Printing with NinjaFlex](../../../3d-printing-with-ninjaflex)
- [Adafruit Guide to Excellent Soldering](../../../adafruit-guide-excellent-soldering)

![](https://cdn-learn.adafruit.com/assets/assets/000/027/016/medium800/led_pixels_3d-printed-unicorn-horn-20.jpg?1438719951)

For this project you will need:

- Ninjaflex filament in [white](http://www.adafruit.com/product/1691), [translucent](https://www.adafruit.com/products/2445), or&nbsp;[glow-in-the-dark](http://www.adafruit.com/product/2655)
- 2&nbsp;[NeoPixel Sticks](http://www.adafruit.com/product/1426)
- The&nbsp;[GEMMA M0](https://www.adafruit.com/product/3501)&nbsp;is recommended over the [GEMMA v1](https://www.adafruit.com/product/2470) or&nbsp;[GEMMA v2](https://www.adafruit.com/product/1222).&nbsp;Either will work.
- [500Ah lipoly battery](http://www.adafruit.com/product/1578)&nbsp;and charger
- [Silicone coated wire in three colors](https://www.adafruit.com/product/1882)
- Grosgrain ribbon and hair elastic OR baseball cap
- Fiberfill (optional)
- [Needle](http://www.adafruit.com/product/615)&nbsp;and thread
- Soldering tools and supplies
- 3D printer
- seam ripper
- scissors
- double-stick foam tape
- sewing machine (optional)

Unicorn glamour shots by Andrew Tingle.

# 3D Printed Unicorn Horn

## 3D Printing the Horn

https://www.youtube.com/watch?v=HUhMtVD3Zjk

Download the printable unicorn horn file:

[Adafruit Unicorn Horn](http://www.thingiverse.com/thing:956359)
## 3D Printer

To print the unicorn horn, the 3D printer will need to be capable of printing a minimum of 140mm tall. The diameter of the horn is 40mm x 48mm, which should be enough to fit on most beds, such as the Printrbot Simple Metal.

For 3D printing with Ninjaflex material, we recommend using a printer with a direct direct, spring loaded extruder. The horn can be printed in PLA, ABS and other filaments.

## Slicer Settings

For the best quality when printing with NinjaFlex, we recommend the following slicing settings:

- Retraction: Off
- Speeds:&nbsp;90/150
- Extruder Temp: 230c
- Infill 10%
- Raft+Support:&nbsp;Off
- No Heated Bed

Print time is approximately 3 hours.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/021/medium800/led_pixels_3d-printed-unicorn-horn-34.jpg?1438722290)

From left to right: translucent, white, glow in the dark, white

![](https://cdn-learn.adafruit.com/assets/assets/000/027/018/medium800/led_pixels_Unicorn_Hat_iso_Glow_in_the_Dark_03_ORIG.jpg?1438720185)

https://youtu.be/YIXQSmGU4_o

# 3D Printed Unicorn Horn

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/027/025/medium800/led_pixels_unicorn-diagram.png?1438746725)

Info: 

Two NeoPixel sticks are wired in parallel to GEMMA:

- GEMMA GND to NeoPixel sticks GND
- GEMMA D1 to NeoPixel sticks DIN
- GEMMA Vout to NeoPixel sticks 4-7VDC
- 500mAh battery connected to GEMMA's JST port
- GEMMA's on/off switch used to toggle power

# 3D Printed Unicorn Horn

## Arduino Code

Here's a simplified version of the NeoPixel sample code that just cycles a slow rainbow on eight pixels connected to D1:

Info: 

[Click to downlaod the NeoPixel library](https://github.com/adafruit/Adafruit_NeoPixel/archive/master.zip)
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/3D_Printed_Unicorn_Horn/3D_Printed_Unicorn_Horn.ino

Installing Arduino libraries is a frequent stumbling block. If this is your first time, or simply needing a refresher, please read the&nbsp;[All About Arduino Libraries](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use)&nbsp;tutorial.[![](../../../../assets/divider_icon-45a76f14a0234c47f43488c60c9d77a1701a0ff9f3a09498809a26305ce3df23.gif)](../../../../neopixel-punk-collar/3634)If the library is correctly installed (and the Arduino IDE is restarted), you should be able to navigate through the “File” rollover menus as follows:  
  
**File→Sketchbook→Libraries→Adafruit\_NeoPixel→strandtest**  
  
Connect up your NeoPixels in a solderless breadboard and use alligator clips to attach to GEMMA, referring to the circuit diagram if necessary.  
  
You’ll need to change a few lines in the code regarding the data pin (1), type of pixels (RGB vs GRB), and number of pixels (5). The resulting (and slightly simplified) code is below:

From the&nbsp; **Tools→Board** &nbsp;menu, select&nbsp;the&nbsp;device you are using: **&nbsp;**

- **Adafruit Gemma M0**
- **Adafruit Gemma 8 MHz** &nbsp;
- Connect the USB cable between the computer and your device. The original Gemma (8 MHz) need the reset button pressed on the board, then click the upload button (right arrow icon) in the Arduino IDE. You do not need to press the reset on the newer Gemma M0 or Trinket M0.

When the battery is connected, you should get a light show from the LEDs. All your pixels working? Great! You can take apart this prototype and get ready to put the pixels in the collar. Refer to the&nbsp;[NeoPixel Uberguide](../../../../adafruit-neopixel-uberguide)&nbsp;for more info.

# 3D Printed Unicorn Horn

## CircuitPython Code

![](https://cdn-learn.adafruit.com/assets/assets/000/046/939/medium800/led_pixels_gemma-cp.jpg?1507062168)

 **GEMMA&nbsp;M0** &nbsp;boards can&nbsp;run&nbsp; **CircuitPython** &nbsp;— a different approach to programming compared to Arduino sketches. In fact,&nbsp; **CircuitPython comes&nbsp;factory pre-loaded on GEMMA&nbsp;M0**. If you’ve overwritten it with an Arduino sketch, or just want to learn the basics of setting up and using CircuitPython, this is explained in the&nbsp;[**Adafruit GEMMA&nbsp;M0 guide**](../../../../adafruit-gemma-m0/circuitpython-setup-1).

Info: 

Below is CircuitPython code that works&nbsp;similarly (though not exactly the same) as the Arduino sketch shown on a prior page. To use this, plug the GEMMA M0 into USB…it should show up on your computer as a small&nbsp; **flash drive** …then edit the file “ **code.py** ” with your text editor of choice. Select and copy the code below and paste it into that file,&nbsp; **entirely replacing its contents** &nbsp;(don’t mix it in with lingering bits of old code). When you save the file, the code should&nbsp; **start running almost immediately** &nbsp;(if not, see notes at the bottom of this page).

**If GEMMA M0 doesn’t show up as a&nbsp;drive, follow the GEMMA M0 guide link above to prepare the board for CircuitPython.**

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/3D_Printed_Unicorn_Horn/code.py

This code requires the&nbsp; **neopixel.py** &nbsp;library. A factory-fresh board will have this already installed. If you’ve just reloaded the board with CircuitPython, create the “lib” directory and then&nbsp;[download neopixel.py from Github](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel).

[Download neopixel.py from Github](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel)
# 3D Printed Unicorn Horn

## Sew Headband

For the headband version, measure two pieces of grosgrain ribbon to fit your skull, and mark/cut to length. The hair elastic will make up for the lack of seam allowance.

![led_pixels_3d-printed-unicorn-horn-00.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/982/medium640/led_pixels_3d-printed-unicorn-horn-00.jpg?1438715933)

![led_pixels_3d-printed-unicorn-horn-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/983/medium640/led_pixels_3d-printed-unicorn-horn-01.jpg?1438715986)

![led_pixels_3d-printed-unicorn-horn-02.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/984/medium640/led_pixels_3d-printed-unicorn-horn-02.jpg?1438716088)

Using a zigzag stitch on your sewing machine, stitch the edges of the ribbons together leaving the last 1.5 inches unstitched.

![led_pixels_3d-printed-unicorn-horn-03.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/986/medium640/led_pixels_3d-printed-unicorn-horn-03.jpg?1438716155)

![led_pixels_3d-printed-unicorn-horn-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/988/medium640/led_pixels_3d-printed-unicorn-horn-04.jpg?1438716345)

Fold over the raw ends around a hair elastic and stitch in place for a stretch fit!

![led_pixels_3d-printed-unicorn-horn-05.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/991/medium640/led_pixels_3d-printed-unicorn-horn-05.jpg?1438716536)

![led_pixels_3d-printed-unicorn-horn-06.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/993/medium640/led_pixels_3d-printed-unicorn-horn-06.jpg?1438716664)

![led_pixels_3d-printed-unicorn-horn-07.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/994/medium640/led_pixels_3d-printed-unicorn-horn-07.jpg?1438717500)

If you don’t plan to add electronics, you can make the headband with just one piece of ribbon.

&nbsp;

Fold the headband in half and crease it at the mid point, then hand stitch the horn in place through the sew tabs and wear.

![led_pixels_3d-printed-unicorn-horn-09.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/998/medium640/led_pixels_3d-printed-unicorn-horn-09.jpg?1438718705)

![led_pixels_3d-printed-unicorn-horn-10.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/000/medium640/led_pixels_3d-printed-unicorn-horn-10.jpg?1438718773)

![led_pixels_3d-printed-unicorn-horn-11.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/001/medium640/led_pixels_3d-printed-unicorn-horn-11.jpg?1438718836)

![led_pixels_3d-printed-unicorn-horn-12.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/003/medium640/led_pixels_3d-printed-unicorn-horn-12.jpg?1438718941)

# 3D Printed Unicorn Horn

## Assemble and Test Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/026/980/medium800/led_pixels_3d-printed-unicorn-horn-14.jpg?1438715896)

Set up your NeoPixel sticks in a pair of helping hands with the input ends facing you and close to one another.

&nbsp;

Tin the pads with solder and connect one ground to another with a small piece of silicone coated wire. Also solder on a long wire to another ground pad, to extend to GEMMA.

&nbsp;

Similarly solder up parallel connections between the pairs of digital inputs and power pads according to the circuit diagram. Take care where two wires are soldered to the same pad to avoid shorts.

![led_pixels_3d-printed-unicorn-horn-15.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/985/medium640/led_pixels_3d-printed-unicorn-horn-15.jpg?1438716082)

![led_pixels_3d-printed-unicorn-horn-16.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/987/medium640/led_pixels_3d-printed-unicorn-horn-16.jpg?1438716193)

![led_pixels_3d-printed-unicorn-horn-17.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/989/medium640/led_pixels_3d-printed-unicorn-horn-17.jpg?1438716340)

![led_pixels_3d-printed-unicorn-horn-18.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/990/medium640/led_pixels_3d-printed-unicorn-horn-18.jpg?1438716478)

![](https://cdn-learn.adafruit.com/assets/assets/000/026/992/medium800/led_pixels_3d-printed-unicorn-horn-19.jpg?1438716559)

If you’re making a headband, snip a hole in the outer layer of ribbon at the front center and thread the long wires through to the back of the headband. Use a seam ripper to open up the zigzag stitching a bit to get the wires out and make room for the GEMMA and battery. Solder the three wires to GEMMA according to the circuit diagram.

![led_pixels_3d-printed-unicorn-horn-21.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/999/medium640/led_pixels_3d-printed-unicorn-horn-21.jpg?1438718754)

![led_pixels_3d-printed-unicorn-horn-22.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/002/medium640/led_pixels_3d-printed-unicorn-horn-22.jpg?1438718882)

![led_pixels_3d-printed-unicorn-horn-23.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/004/medium640/led_pixels_3d-printed-unicorn-horn-23.jpg?1438719063)

If you’re making a baseball cap, cut a hole in the front with a seam ripper and thread the long wires through before soldering to GEMMA.

![led_pixels_3d-printed-unicorn-horn-28.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/007/medium640/led_pixels_3d-printed-unicorn-horn-28.jpg?1438719300)

![led_pixels_3d-printed-unicorn-horn-29.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/008/medium640/led_pixels_3d-printed-unicorn-horn-29.jpg?1438719408)

![led_pixels_3d-printed-unicorn-horn-30.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/011/medium640/led_pixels_3d-printed-unicorn-horn-30.jpg?1438719800)

![](https://cdn-learn.adafruit.com/assets/assets/000/027/005/medium800/led_pixels_3d-printed-unicorn-horn-24.jpg?1438719121)

Upload the rainbow sample code to GEMMA with the [Arduino Code](../../../../3d-printed-unicorn-horn/arduino-code)&nbsp;or to the GEMMA M0 using the [CircuitPython Code](../../../../3d-printed-unicorn-horn/circuit-python-code). This will allow confirmation that&nbsp;your solder joints are solid before sticking the NeoPixel sticks together, back to back, using double-stick foam tape.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/015/medium800/led_pixels_3d-printed-unicorn-horn-25.jpg?1438719944)

# 3D Printed Unicorn Horn

## Attach Horn

![](https://cdn-learn.adafruit.com/assets/assets/000/027/020/medium800/led_pixels_3d-printed-unicorn-horn-33.png?1438721349)

Use an optional tuft of fiberfill to help keep the sticks centered within the horn, and place inside. Rotate the assembly until you’re happy with the arrangement.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/019/medium800thumb/led_pixels_3d-printed-unicorn-horn-33.jpg?1448319335)

![](https://cdn-learn.adafruit.com/assets/assets/000/027/013/medium800/led_pixels_3d-printed-unicorn-horn-31.jpg?1438719587)

Thread a needle, double over the thread, and knot the ends together. Hand stitch each sew tab and knot/cut the thread individually.

![led_pixels_3d-printed-unicorn-horn-27.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/009/medium640/led_pixels_3d-printed-unicorn-horn-27.jpg?1438719425)

![led_pixels_3d-printed-unicorn-horn-26.jpg](https://cdn-learn.adafruit.com/assets/assets/000/027/010/medium640/led_pixels_3d-printed-unicorn-horn-26.jpg?1438719478)

Inside the cap, tack the wires down along their way to the GEMMA and battery inside the trim.

![](https://cdn-learn.adafruit.com/assets/assets/000/027/012/medium800/led_pixels_3d-printed-unicorn-horn-32.jpg?1438719543)

# 3D Printed Unicorn Horn

## Wear it!

![](https://cdn-learn.adafruit.com/assets/assets/000/026/977/medium800/led_pixels_dano-alberto-3dp-unicorn-horn.jpg?1438707620)

Use GEMMA’s onboard on/off switch to toggle the circuit’s power. This project is fun with or without electronics, make one to fit your costume's style!

![](https://cdn-learn.adafruit.com/assets/assets/000/027/017/medium800/led_pixels_becky-stern-unicorn-horn-headband.jpg?1438720114)

Consider further protecting the circuit with a coating or covering if you plan to be very active/sweaty or in wet conditions. Tips on that can be found in this video:

https://www.youtube.com/watch?v=kolq3eSu4ug


## Featured Products

### Adafruit GEMMA M0 - Miniature wearable electronic platform

[Adafruit GEMMA M0 - Miniature wearable electronic platform](https://www.adafruit.com/product/3501)
The **Adafruit Gemma M0** is a super small microcontroller board, with just enough built-in to create many simple projects. It may look small and cute: round, about the size of a quarter, with friendly alligator-clip sew pads. But do not be fooled! The Gemma M0 is incredibly...

In Stock
[Buy Now](https://www.adafruit.com/product/3501)
[Related Guides to the Product](https://learn.adafruit.com/products/3501/guides)
### Adafruit GEMMA v2 - Miniature wearable electronic platform

[Adafruit GEMMA v2 - Miniature wearable electronic platform](https://www.adafruit.com/product/1222)
 **Deprecation Warning: The Gemma bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Gemma so that people can maintain some older projects, we no longer recommend it.** <a...></a...>

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1222)
[Related Guides to the Product](https://learn.adafruit.com/products/1222/guides)
### Arduino GEMMA - Miniature wearable electronic platform

[Arduino GEMMA - Miniature wearable electronic platform](https://www.adafruit.com/product/2470)
What do you get when you combine&nbsp;an Adafruit classic with geniuses at Arduino? The Arduino GEMMA!&nbsp;It's a tiny wearable platform board with a lot of might in a 1" diameter package. Powered by a Attiny85 and programmable with an Arduino IDE over USB, you'll be able to...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2470)
[Related Guides to the Product](https://learn.adafruit.com/products/2470/guides)
### Flashforge Creator PRO

[Flashforge Creator PRO](https://www.adafruit.com/product/2742)
The **Flashforge Creator Pro** is the latest addition to FlashForge’s Creator family, built upon an open source platform.

Based on proven design of the Creator X chassis, the Pro is now enclosed so you can print ABS better and more efficient than ever. The upgraded...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2742)
[Related Guides to the Product](https://learn.adafruit.com/products/2742/guides)
### NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers

[NeoPixel Stick - 8 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/1426)
Make your own little LED strip arrangement with this stick of NeoPixel LEDs. We crammed 8 of the tiny 5050 (5mm x 5mm) smart RGB LEDs onto a PCB with mounting holes and a chainable design. Use only one microcontroller pin to control as many as you can chain together! Each LED is addressable as...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1426)
[Related Guides to the Product](https://learn.adafruit.com/products/1426/guides)
### Silicone Cover Stranded-Core Wire - 2m 26AWG White

[Silicone Cover Stranded-Core Wire - 2m 26AWG White](https://www.adafruit.com/product/1882)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/1882)
[Related Guides to the Product](https://learn.adafruit.com/products/1882/guides)
### Silicone Cover Stranded-Core Wire - 2m 26AWG Black

[Silicone Cover Stranded-Core Wire - 2m 26AWG Black](https://www.adafruit.com/product/1881)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/1881)
[Related Guides to the Product](https://learn.adafruit.com/products/1881/guides)
### Silicone Cover Stranded-Core Wire - 2m 26AWG Gray

[Silicone Cover Stranded-Core Wire - 2m 26AWG Gray](https://www.adafruit.com/product/1884)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/1884)
[Related Guides to the Product](https://learn.adafruit.com/products/1884/guides)

## Related Guides

- [Space Face LED Galaxy Makeup](https://learn.adafruit.com/space-face-led-galaxy-makeup.md)
- [NeoPixel Tiara](https://learn.adafruit.com/neopixel-tiara.md)
- [Gemma M0 Sheikah Pendant](https://learn.adafruit.com/gemma-m0-sheikah-pendant.md)
- [Knobby Sequencer](https://learn.adafruit.com/knobby-sequencer.md)
- [Prop-Maker Feather Talking Adabot Clock](https://learn.adafruit.com/prop-maker-feather-talking-adabot-clock.md)
- [A NeoPixel Blinkendisc](https://learn.adafruit.com/a-neopixel-blinkendisc.md)
- [Gemma LightTouch](https://learn.adafruit.com/gemma-lighttouch.md)
- [Annoy-O-Matic Sound Prank Device](https://learn.adafruit.com/annoy-o-matic-sound-prank-device.md)
- [Larson Scanner Shades (Trinket-Powered NeoPixel LED Strip Glasses)](https://learn.adafruit.com/larson-scanner-shades.md)
- [3D Printed NeoPixel Ring Hair Dress](https://learn.adafruit.com/neopixel-ring-hair-dress.md)
- [Light-Activated Pixel Heart](https://learn.adafruit.com/light-activated-pixel-heart.md)
- [Princess Peach LED Crown](https://learn.adafruit.com/bowsette.md)
- [Sound Reactive NeoPixel Peace Pendant](https://learn.adafruit.com/sound-reactive-neopixel-peace-pendant.md)
- [ItsyBitsy ESP32 wFL case](https://learn.adafruit.com/itsybitsy-esp32-wfl-case.md)
- [FLORA Pixel Brooch](https://learn.adafruit.com/flora-pixel-brooch.md)
