# EEG Costume Cap

## Overview

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

Make this ambitious costume project for Halloween or cosplay event! Before you begin this ambitious and time-consuming project, complete the following prerequisite guides:

- [Adafruit NeoPixel Überguide](../../../adafruit-neopixel-uberguide)
- [Getting Started with FLORA](../../../getting-started-with-flora)
- [Battery Powering your Wearable Electrnics](https://www.youtube.com/watch?v=U_Q3djsktQs)
- [Making Rugged Wearables](https://www.youtube.com/watch?v=kolq3eSu4ug)

To make this project, you will need:

- [Mini PCB NeoPixels](http://www.adafruit.com/product/1612), ~74
- [Silicone coated wire in 30 gauge](https://www.adafruit.com/product/2003)
- [FLORA main board](http://www.adafruit.com/product/659)
- [1200mAh lipoly battery](http://www.adafruit.com/product/258)&nbsp;and charger
- [JST extension cable](https://www.adafruit.com/product/1131)
- [soldering tools and supplies](../../../../collins-lab-soldering)
- sewing tools and supplies
- [electronics tweezers](https://www.adafruit.com/product/421)
- [foam head](http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=foam+head)
- [multimeter](../../../../multimeters)

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

![](https://cdn-learn.adafruit.com/assets/assets/000/026/077/medium800thumb/braincrafts_brain-cap-15.jpg?1448318311)

# EEG Costume Cap

## Pattern

Download and tile-print the pattern's three pieces, joining the long center piece with a piece of tape.

[Brain Cap Pattern PDF](https://learn.adafruit.com/system/assets/assets/000/026/078/original/brain_cap_pattern.pdf?1434567466)
![](https://cdn-learn.adafruit.com/assets/assets/000/026/059/medium800/led_pixels_brain-cap-01.jpg?1434554512)

Pin in place atop doubled fabric, so you're cutting two of each piece. If your fabric has a front and back, make sure the fabric is doubled with fronts together or backs together (to create mirror image pieces).

![](https://cdn-learn.adafruit.com/assets/assets/000/026/060/medium800/led_pixels_brain-cap-02.jpg?1434554531)

The starting point for this pattern was based on an&nbsp;[aviator cap pattern on DeviantArt](http://vladrozgozo.deviantart.com/art/Sam-0563-383572107)!

Use scissors or a rotaty cutter and mat to cut around your pattern pieces. Use tailor's chalk or a water-soluble marking pen to mark the hash lines that are useful for alignment later.

To assemble the cap, first sew the side panels together, then the center piece, then join the center piece to the side panels. Optionally top stitch your seam allowances, and stitch a folded over edge all around.

Add another rectangle of material for a chin strap, if desired.

# EEG Costume Cap

## Create NeoPixel Strips

![](https://cdn-learn.adafruit.com/assets/assets/000/026/061/medium800/led_pixels_brain-cap-03.jpg?1434554647)

Mark silicone coated wire every inch &nbsp;(or your desired spacing interval).

Trim wires to length and strip both ends.

![led_pixels_brain-cap-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/064/medium640/led_pixels_brain-cap-04.jpg?1434554724)

![led_pixels_brain-cap-13.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/065/medium640/led_pixels_brain-cap-13.jpg?1434554846)

![](https://cdn-learn.adafruit.com/assets/assets/000/026/067/medium800/led_pixels_brain-cap-05.jpg?1434554872)

Using a third hand tool, tin the pads on the pixels and use tweezers to solder bits of small wire in place.

Continue adding wires and NeoPixels to make strands of seven to eleven pixels.

Warning: 

# EEG Costume Cap

## Position and Join Strips

Once you have several strips soldered up, you can arrange them on your cap. A foam head is very handy for this!

Use pins to tack on the strips in your desired arrangement.

![led_pixels_brain-cap-06.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/062/medium640/led_pixels_brain-cap-06.jpg?1434554747)

![led_pixels_brain-cap-07.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/066/medium640/led_pixels_brain-cap-07.jpg?1434554842)

When you're happy with your design, use more wires to connect the strips in a U-turn.

&nbsp;

Adding additional power and ground connections is prudent for long runs of NeoPixels, and we think these extra white wires look nice in the design, too:

![led_pixels_brain-cap-08.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/068/medium640/led_pixels_brain-cap-08.jpg?1434554956)

![led_pixels_brain-cap-09.jpg](https://cdn-learn.adafruit.com/assets/assets/000/026/069/medium640/led_pixels_brain-cap-09.jpg?1434555032)

![](https://cdn-learn.adafruit.com/assets/assets/000/026/070/medium800/led_pixels_brain-cap-10.jpg?1434555056)

Solder the data input to pin 6 on FLORA, all power wires&nbsp;to VBATT, and all ground wires to GND.

![](https://cdn-learn.adafruit.com/assets/assets/000/026/071/medium800/led_pixels_brain-cap-11.jpg?1434555108)

Test that all your NeoPixels work using the library's sample code! If they don't all come on, double check your pixels' data arrows and that you don't have any short circuits.

![](https://cdn-learn.adafruit.com/assets/assets/000/026/073/medium800/led_pixels_brain-cap-12.jpg?1434555161)

When they're all working, it's time to sew them in place! Use clear or color-coordinating thread to stitch just before and just after each pixel, knotting off at each one for the most durable construction.

# EEG Costume Cap

## 3D Printed Diffusers

![](https://cdn-learn.adafruit.com/assets/assets/000/026/072/medium800/led_pixels_brain-cap-14.jpg?1434555136)

## Ninjaflex&nbsp;

Print a bunch of these "spool" shaped diffusers&nbsp;in white NinjaFlex flexible&nbsp;filament. The design is&nbsp;optimized to print with no support material.

## Slicer Settings

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

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

[Spool-Shaped NinjaFlex Diffuser](http://www.thingiverse.com/thing:894731)
![](https://cdn-learn.adafruit.com/assets/assets/000/026/076/medium800thumb/braincrafts_led_pixels_brain-cap-15.jpg?1448318293)

Each diffuser has three sew-tabs you can use to attach over a NeoPixel. Sewing them all on is quite time consuming, but we think it's worth it!

## Modify Design

The original solids where created in Autodesk 123D Design. You can&nbsp;customize the diffusers to match your project.

# EEG Costume Cap

## Code

Download the Arduino sketch for the EEG costume cap here:

[brain_cap.zip](https://learn.adafruit.com/system/assets/assets/000/026/541/original/brain_cap.zip?1437077031)
To create animating patterns for the cap, the pixels are&nbsp;organized into groups based on where they are on the cap, with a new array for each row, listing the pixels in order from front to back.

```auto
int R1[] = {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35};
int R2[] = {24, 23, 22, 21, 20, 19, 18, 17, 16, 15};
int R3[] = {7, 8, 9, 10, 11, 12, 13};
int R4[] = {6, 5, 4, 3, 2, 1, 0};
int L1[] = {46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36};
int L2[] = {47, 48, 49, 50, 51, 52, 53, 54, 55, 56};
int L3[] = {64, 63, 62, 61, 60, 59, 58, 57};
int L4[] = {65, 66, 67, 68, 69, 70, 71};
```

With each row in it’s own array, you can code up a for loop that steps through multiple arrays at once to create a racing stripe effect.

```auto
void flowingStripes(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<11; i++) {
      pixel.setPixelColor(R1[i], c);
      pixel.setPixelColor(R2[i], c);
      pixel.setPixelColor(R3[i], c);
      pixel.setPixelColor(R4[i], c);
      pixel.setPixelColor(L1[i], c);
      pixel.setPixelColor(L2[i], c);
      pixel.setPixelColor(L3[i], c);
      pixel.setPixelColor(L4[i], c);
      pixel.show();
      delay(30);
  }
}
```


## Featured Products

### NeoPixel Mini Button PCB - Pack of 5

[NeoPixel Mini Button PCB - Pack of 5](https://www.adafruit.com/product/1612)
These are the smallest NeoPixel breakouts around! Tiny, bright RGB pixels to your project. These little PCBs are only 8mm x 10mm and have two sets of three pads on the back for soldering wires. These ultra-bright LEDs have a constant-current driver cooked right into the LED package! The pixels...

In Stock
[Buy Now](https://www.adafruit.com/product/1612)
[Related Guides to the Product](https://learn.adafruit.com/products/1612/guides)
### Flora Wearable Bluefruit LE Module

[Flora Wearable Bluefruit LE Module](https://www.adafruit.com/product/2487)
Would you like to add powerful and easy-to-use Bluetooth Low Energy to your wearable FLORA project? Heck yeah! With BLE now included in modern smart phones and tablets, its fun to add wireless connectivity. So what you really need is the new Adafruit Flora Bluefruit LE!

The Flora...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2487)
[Related Guides to the Product](https://learn.adafruit.com/products/2487/guides)
### Silicone Cover Stranded-Core Wire - 2m 30AWG Black

[Silicone Cover Stranded-Core Wire - 2m 30AWG Black](https://www.adafruit.com/product/2003)
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/2003)
[Related Guides to the Product](https://learn.adafruit.com/products/2003/guides)
### Silicone Cover Stranded-Core Wire - 2m 30AWG White

[Silicone Cover Stranded-Core Wire - 2m 30AWG White](https://www.adafruit.com/product/2006)
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/2006)
[Related Guides to the Product](https://learn.adafruit.com/products/2006/guides)
### FLORA - Wearable electronic platform: Arduino-compatible

[FLORA - Wearable electronic platform: Arduino-compatible](https://www.adafruit.com/product/659)
FLORA is Adafruit's fully-featured wearable electronics platform. It's a round, sewable, Arduino-compatible microcontroller designed to empower amazing wearables projects.FLORA comes with Adafruit's support, [tutorials and...](http://learn.adafruit.com/category/flora)

Out of Stock
[Buy Now](https://www.adafruit.com/product/659)
[Related Guides to the Product](https://learn.adafruit.com/products/659/guides)
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/guides)
### JST-PH Battery Extension Cable - 500mm

[JST-PH Battery Extension Cable - 500mm](https://www.adafruit.com/product/1131)
By popular demand, we now have a handy extension cord for all of our JST PH-terminated battery packs (such as our LiIon/LiPoly and 3xAAA holders). One end has a JST-PH compatible socket, and the other end has a matching plug. Between the two, 500mm of color coded wire. Handy for wearable...

In Stock
[Buy Now](https://www.adafruit.com/product/1131)
[Related Guides to the Product](https://learn.adafruit.com/products/1131/guides)
### Needle set - 3/9 sizes - 20 needles

[Needle set - 3/9 sizes - 20 needles](https://www.adafruit.com/product/615)
Mighty needles, sew like the wind! This needle set is the only one you'll need for any sort of hand sewing, especially using our conductive thread and wearable electronics parts.  
  
Each pack contains 20 gold-eye sharps, with eye sizes ranging from #3 (1.75" long) to #9...

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

## Related Guides

- [Plush Game Controller](https://learn.adafruit.com/plush-game-controller.md)
- [Flora GPS Jacket](https://learn.adafruit.com/flora-gps-jacket.md)
- [Washing Wearable Electronics](https://learn.adafruit.com/washing-wearable-electronics.md)
- [Adafruit Arduino Selection Guide](https://learn.adafruit.com/adafruit-arduino-selection-guide.md)
- [SMSsenger Bag](https://learn.adafruit.com/smssenger-bag.md)
- [Capacitive Touch with Conductive Fabric & Flora](https://learn.adafruit.com/capacitive-touch-with-conductive-fabric-and-flora.md)
- [Flora Wearable GPS](https://learn.adafruit.com/flora-wearable-gps.md)
- [Flora Accelerometer](https://learn.adafruit.com/flora-accelerometer.md)
- [Zipper Switch](https://learn.adafruit.com/zipper-switch.md)
- [LED Ampli-Tie](https://learn.adafruit.com/led-ampli-tie.md)
- [Conductive Thread](https://learn.adafruit.com/conductive-thread.md)
- [FLORA TV-B-Gone](https://learn.adafruit.com/flora-tv-b-gone.md)
- [Glowing WhoVille Hat](https://learn.adafruit.com/glowing-whoville-hat.md)
- [Sound Reactive Rapunzel Hair](https://learn.adafruit.com/sound-reactive-rapunzel-hair.md)
- [Dragon Kite Poi with Animated Lights and WLED](https://learn.adafruit.com/dragon-kite-poi-with-animated-lights-and-wled.md)
