Introduction: Star Wars Adafruit Flora Theremin LED Bra

Use the force, Luke. Close your eyes, hold on tight to your light saber and........


Don't touch that dial. No tweaking the knobs. Just wave your hands in front of the two sensitive sensors embedded in this bespoke piece of wearable tech.


The garment has an embedded Adafruit Flora wearable microprocessor to generate R2-D2 theremin like sounds.


And it comes in Adafruit black. Do not fear the dark side.


Can you save Alderaan from destruction by the Death Star? 


WARNING: Not TSA nor Taliban approved....wait, that's the other Evil Empire. And don't start cancelling your newsletter subscriptions, well, not just yet...



Step 1: Look Up Here, Not at the Titles, No, Look Down...

You need a few things to make this project.

I used an Adafruit Flora Arduino compatible wearable board as the core of the electronics.

I used an HC-SR04 Ultrasonic Range Sensor (generic from ebay - equivalent is Ping Ultrasonic Sensor)

A photocell detector sensor (from an assortment pack found at Radio Snacks, bigger sensor should be more sensitive)

Battery pack for the Flora (3 AA, 4.5v)

some resistors

a piezo buzzer to use as a speaker


A bra for the foundation...I made mine

If custom making your bra, you will need to know how to sew

I have a sewing machine and serger which makes it easy to construct such a garment

Black fabric

Various felt scraps for the other details

CAUTION: Soldering and sewing are inherently dangerous.  Use caution. Always learn from a certified Jedi Master before attempting to use a light saber.

Step 2: My Cup Runneth Over...

It would have been embarasking to go into a store to buy a woman's brassiere. The concept of this was probably to get the largest size available since it would offer the best opportunity to lay out my electronic components. And when I pay at the cashier, I would have to say "It's for an art project." They would still smirk, "Yup, he's odd." I have a reputation to uphold...wait


My only other option was to make it from scratch. We have the technology and the know-how. We can build it.


I had to borrow Caitlin's dressform to use as a model.


Designing a bra does encompass STEM concepts(static and dynamic loading, stress analysis, force feedback, motion control...) so for all the peeps out there, consider the engineering field as something you may want to get into. The research is hands-on can get quite intensive.


And be sure to look for the Union label or signs of the Rebel Alliance.



This is the first time I have made a bra so this is all prototype, just like the Death Star that is orbiting around Alderaan.


Start out with strips of cloth that you will make into straps and bands.


I used a serger to form cloth tubes which I flipped inside out to hide the seam.

Step 3: The Right Way, Wrong Way...

There are many instructables on making ladies brassieres.  Where else would you go first to find out how to make something.  I am not making some fine lingerie so I will embark on my own method.

Having a dress form iis essential to creating a fitted garment.  You can test fit and mark any alterations needed.

I started out with a bottom band.

I then did the "cross my heart" straps which go over the shoulders and down the back

Pin in place and remove to sew.

I switched over to the sewing machine to use a zigzag stitch to tack everything down.

Once you have the basic "harness" assembled, time to give it some support.

I placed another band on the side to conform to the cup.

This is the superstructure that defines the brassiere.


Step 4: Over the Shoulder Holster...

So  now it is beginning to look like a piece of tactical gear.

Cut out a piece of fabric to cover each of the openings for the bra cup.

You need to place a dart(seam to gather up excess fabric) so that it will form the cup shape.

Trim so that there is an allowance to sew the cup panel in place.

I serged around the cup panel so the fabric would not fray.

Use the sewing machine to attach the cup panels in place by following the outline defined by the support bands.

Step 5: A Notion of Detail...

I sewed on velcro to use as the fastening method to close the bra.

The Adafruit Flora arduino will be powered by a battery pack.  I made a pocket to hold the battery holder.  The power cable goes through the bottom.  The pocket has a velcroed flap so you can get to the on/off switch and remove the unit to change batteries.

Also fits a combat first aid dressing cause someone might get hurt using this thing.

Use felt to cut out shapes for the X-wing fighter and the Death Star.

The X-wing fighter is made on a layer of fabric so it would be easier to applique to the bra.

Use a satin stitch to add some details to the X-wing fighter.  I sewed on a small piece of felt to the nose of the X-wing fighter so the wires can pass through from the sensor.

Use a satin stitch to add some detail lines to the Death Star.

I had some fuzzy fabric and made a pouf for the planet Alderaan.  It is a pocket to house the piezo speaker and LED.

Step 6: Technical Details...

The Adafruit Flora is a wearable Arduino.  It is designed to be connected with conductive thread with it's large holes and pads to fit the conductive thread.

Well, I still have a bobbin of conductive thread to use.  It was just faster to wire this up with traditional methods.

Flora runs with 3.3v logic.

My HC-SR04 ultrasonic sensor runs on 5 volts and outputs the same.

So this is where Dangit Jim, I''m an artist, kinda, not an electrical engineer...

What this means is that you can fry your Flora if you use 5 volt logic devices.  Looking around someone had suggested a simple resistor voltage divider circuit(otherwise logic converter chip/circuit) to give you something good enough for government work.

So rummaging through my ebay resistor assortment, I came close to something that worked.  

For the sensor output, the ECHO line passes through a 12K ohm resistor to the data pin.  Also feeding the same data pin is a 22K ohm pullup resistor from ground.  I think the real values were supposed to be 15K and 27K ohms.  

The TRIG trigger on the ultrasonic sensor seemed to work fine on the unchanged signal from the Flora.

I did the same thing with the LDR or photocell since I was going to power that up with the raw voltage from the battery pack. 

The basic theremin sketch was modified to sound off based on the reading of the utrasonic sensor and then sound off again based on input from the photocell.

You could interface the theremin with any choice of sensors - stretch, pressure, capacitive touch, proximity sensors, anything.

Again, based on experience, I was able to wire up two LEDs with 130 ohm resistors for each output data pin to flash lights.

Of course, I could have thrown in a laser diode or two in the circuit for fun but you're gonna take an eye out.

Removing the serial print and adjusting all the delays would give a more continuous tone.

I just put default values instead of the system doing the ultrasonic sensor calibration.

Experiment with the values for the detection range of the sensors and the frequency range of the sound.

There are some sample sketches out there to map to established musical tones.

All of this was prototyped on the breadboard.

You can then transfer the circuit to the bra by creating the necessary cables depending on where each component is fastened on the bra.


Unoptimized code follows
===============================================================================
/* Ping))) Sensor

   This sketch reads a PING))) ultrasonic rangefinder and returns the
   distance to the closest object in range. To do this, it sends a pulse
   to the sensor to initiate a reading, then listens for a pulse
   to return.  The length of the returning pulse is proportional to
   the distance of the object from the sensor.

   The circuit:
* +V connection of the PING))) attached to +5V
* GND connection of the PING))) attached to ground
* SIG connection of the PING))) attached to digital pin 7

   http://www.arduino.cc/en/Tutorial/Ping

   created 3 Nov 2008
   by David A. Mellis
   modified 30 Aug 2011
   by Tom Igoe

   This example code is in the public domain.

*/
// mod for HC-SR04 ultrasonic sensor
// this constant won't change.  It's the pin number
// of the sensor's output:
const int echoPin = 9; // ECHO pin
const int pingPin = 10; // TRIG pin

// variable to hold sensor value
int sensorValue;
// variable to calibrate low value
int sensorLow = 12;
// variable to calibrate high value
int sensorHigh = 1;

int pdsPin = 11;        // select the input pin for the photocell
int pdsValue = 0;      // variable to store the value coming from the photocell


void setup() {
  // initialize serial communication:
  Serial.begin(9600);
pinMode(7,OUTPUT);
pinMode(3,OUTPUT);
pinMode(2,OUTPUT);


}

void loop()
{

    pdsValue = analogRead(pdsPin);  //get the voltage value from input pin
  Serial.println(pdsValue);    //print the value to Serial monitor


  // establish variables for duration of the ping,
  // and the distance result in inches and centimeters:
  long duration, inches, cm;

  // The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
  pinMode(pingPin, OUTPUT);
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);

  // The same pin is used to read the signal from the PING))): a HIGH
  // pulse whose duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  pinMode(echoPin, INPUT);
  duration = pulseIn(echoPin, HIGH);

  // convert the time into a distance
  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);

// Serial.print(inches);
// Serial.print("in, ");
// Serial.print(cm);
// Serial.print("cm");
// Serial.println();





//read the input from A0 and store it in a variable
  sensorValue = inches;

  // map the sensor values to a wide range of pitches

  int pitch = map(sensorValue, sensorLow, sensorHigh, 2000, 3500);

   int pitch2 = map(pdsValue, 200, 1023, 2400, 3500);


// play the tone for 20 ms on pin 8
  tone(6, pitch, 90);
//  delay(30);

  digitalWrite(7,HIGH);
  digitalWrite(3,HIGH);
  digitalWrite(2,HIGH);


  // wait for a moment
  delay(90);

  digitalWrite(7,LOW);
  digitalWrite(3,LOW);
  digitalWrite(2,LOW);
  tone(6, pitch2, 90);

   delay(90);

}

long microsecondsToInches(long microseconds)
{
  // According to Parallax's datasheet for the PING))), there are
  // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
  // second).  This gives the distance travelled by the ping, outbound
  // and return, so we divide by 2 to get the distance of the obstacle.
  // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
  return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds)
{
  // The speed of sound is 340 m/s or 29 microseconds per centimeter.
  // The ping travels out and back, so to find the distance of the
  // object we take half of the distance travelled.
  return microseconds / 29 / 2;
}


Step 7: A Wookie Good Time...

Finalize the theremin by attaching the electronics to the bra.

In hindsight I guess you could hide more of the cable runs or use conductive thread instead.

Sew the cable runs where they are loose.

Use fabric paint to add in the star field or draw additional spaceships.

So this might be the top secret wearable weapons platform that everyone has not heard about.

Then again, this might be like a Borg bra...



Craft Contest

Participated in the
Craft Contest

Arduino Contest

Participated in the
Arduino Contest

Musical Instruments Contest

Participated in the
Musical Instruments Contest