Instructables

Star Wars Adafruit Flora Theremin LED Bra

Featured
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...

 
Remove these adsRemove these ads by Signing Up

Step 1: Look up here, not at the titles, no, look down...

Picture of Look up here, not at the titles, no, look down...
DSCF0098.JPG
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...

Picture of My cup runneth over...
DSCF0098.JPG
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 a perv."  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...

Picture of The right way, wrong way...
DSCF0106.JPG
DSCF0110.JPG
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...

Picture of Over the shoulder holster...
DSCF0115.JPG
DSCF0116.JPG
DSCF0120.JPG
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...

Picture of 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...



unlearny6 months ago
this would make a good heavy petting alarm system. "step away from the bra. You Have Fifteen Seconds To Comply!"
caitlinsdad (author)  unlearny6 months ago
Hmmm, the neighbor's alarm goes off all the time...or is that the car?
triumphman1 year ago
what does it do ?
caitlinsdad (author)  triumphman1 year ago
I believe it can do the Kessel run in less than twelve parsecs.

Gee, I don't know. You can just stare at it for the same price.
With so much awesome packed into the project title I had a suspicion it would be yours
caitlinsdad (author)  mikeasaurus1 year ago
Yes, if you have good fashion sense, it must be paired with these fabulous shoes. See what I did there?
Those aren't the droids you're looking for.
Jazhara71 year ago
I think this is a very nice idea, and a well done project. But I think it is a bit of a stretch to call it a "Theremin". Just because you don't have to touch it to cause sounds doesn't make something a Theremin. In that case any alarm that is activated by proximity could be called a Theremin.

Just to reassure you, I don't want to belittle your work. I see that a lot of thought went into it. I just like proper naming, and I really was curious how you'd apply a Theremin to a bra, just out of curiosity. I have played the Theremin myself, instructed by some professional players, and I have to say it is not easy. The biggest problem is not causing any outside movements apart from your hands to trigger the oscillators, which I imagine would be extra difficult to do if the thing was fixed to your breast. ;)
caitlinsdad (author)  Jazhara71 year ago
If you go by the definition of a theremin (in general terms, an electronic device producing sounds that can be modified without touching, specifically the pitch and volume), I submit that this "instrument" is a variation on that but still in the spirit of a theremin. The output from the sensors, (range distance or light brightness/darkness values) is used to map to a range of sound frequencies or musical pitch. The range sensor is pretty accurate and can sense minute movements. I do not have a proper amplifier circuit attached to this so I did not modify the volume. There may be a way to modify the amplitude of the sound output in Arduino though. There are other parameters of the sound generation that could be modified, including the duration of sound and interval or rest between notes making this an updated or evolved instrument. As I mentioned, your traditional theremin is the more continuous output tone unlike the robot droid staccato bleep-bleep appropriate for the Star Wars theme. I am not an electronics expert but I do instructables and put this out there to inspire others to create. It is fun and try not to get to hung up too much on semantics. Adding an antenna grid to the bra would not have been too difficult but the circuitry would be a little more complex. And then you would need bigger batteries and vacuum tubes...someone is gonna build it. And someone has to do a steampunk version. Thanks for commenting.

Can you make a nursing bra version of this?
caitlinsdad (author)  flyingpuppy1 year ago
It shouldn't be too difficult to extend and reroute the wires a bit but I think getting it UL approved and RoHS certified might be touchy. The panels could be velcroed to open and close.as flaps. I guess people would be itching to say "I am your mother" or "I am not your mother."
Certainly the mother would be itching.