A Belly Dancer Bonanza
We've all seen a belly dancer perform for us at a Mediterranean restaurant or at an entertainment show. As entertainers, belly dancers are at the risk of being taken advantage of, as they flaunt their dance and their style. To help belly dancers feel a sense of safety and protection, this Citywide Costume works for just that. Belly dancers are prone to touching from their audience.
There are times when this touching may be considered inappropriate and the dancer is not comfortable with this behavior and wants some bodily protection from it.
The Bellly Dancer Bonanza (BDB) costume aims to not only appease the audience and the dancer with her attractive garb, but also works to make sure that if she is touched inappropriately, she is heard.
How will you go about doing this? Well, there are two parts to this costume that you need focus on: the top and the bottom. The top will be lit up with blinking LEDs as she starts her dance while the bottom will incorporate an alarm system that wiill go off if the dancer is touched inappropriately at her waist.
The breakdown of both electrical systems in the dancer's costume:
For the top of the costume: there will be blinking LEDs inside the dancer's top and they will start blinking once she starts her dance. She will have a switch attached that she can turn on and off based on when she starts/stops dancing.
For the bottom of the costume: there will be resistive foam around the dancer's waist, and when it is touched it will change the voltage that it outputs to an Arduino Uno micro-controller. That change in voltage, if it is big enough (i.e., the dancer was firmly grabbed around the waist), a speaker attached to the bottom will sound a siren sound. This should startle the audience member and warn him/her to back off.
As another mechanism, I’d like to make her top cooler to watch, meaning surrounding it with LEDs that will blink out of phase with each other and in a pattern. I am keen to use Lilypad arduinos for this part.
There are times when this touching may be considered inappropriate and the dancer is not comfortable with this behavior and wants some bodily protection from it.
The Bellly Dancer Bonanza (BDB) costume aims to not only appease the audience and the dancer with her attractive garb, but also works to make sure that if she is touched inappropriately, she is heard.
How will you go about doing this? Well, there are two parts to this costume that you need focus on: the top and the bottom. The top will be lit up with blinking LEDs as she starts her dance while the bottom will incorporate an alarm system that wiill go off if the dancer is touched inappropriately at her waist.
The breakdown of both electrical systems in the dancer's costume:
For the top of the costume: there will be blinking LEDs inside the dancer's top and they will start blinking once she starts her dance. She will have a switch attached that she can turn on and off based on when she starts/stops dancing.
For the bottom of the costume: there will be resistive foam around the dancer's waist, and when it is touched it will change the voltage that it outputs to an Arduino Uno micro-controller. That change in voltage, if it is big enough (i.e., the dancer was firmly grabbed around the waist), a speaker attached to the bottom will sound a siren sound. This should startle the audience member and warn him/her to back off.
As another mechanism, I’d like to make her top cooler to watch, meaning surrounding it with LEDs that will blink out of phase with each other and in a pattern. I am keen to use Lilypad arduinos for this part.
Materials You Will Need
-A belly dancer’s costume (can be replaced via an undergarment bra and a pair of shorts)
- Flowy fabric (to stitch to the bottom)
- sewing needle and thread
- 2 Lilypad Arduinos (with software)
- 2 Lilypad USB cables
- 8 LEDs
- 8 330 Ohm resistors
- 22K Ohm resistor
- speaker
- electrical wires
- breadboard
- soldering iron & solder wire
- hot glue
- resistive foam
- switch button
- Flowy fabric (to stitch to the bottom)
- sewing needle and thread
- 2 Lilypad Arduinos (with software)
- 2 Lilypad USB cables
- 8 LEDs
- 8 330 Ohm resistors
- 22K Ohm resistor
- speaker
- electrical wires
- breadboard
- soldering iron & solder wire
- hot glue
- resistive foam
- switch button
Getting the Blinky Top Into Shape
1. Take your 8 LEDs and your 8 330 Ohm resistors and for a pair of each, connect the LED-resistor circuit in the manner
showed in Figure II, on a breadboard. Remember that the LED is a diode, and the longer end of the LED should be connected
to the resistor. which is connected to 5V power. The shorter end of the LED must be connected to ground. Make sure to run
5V of power through the LED-resistor, as to check that all LEDs are in working order.
2. Next, take each of your LED-resistor connections and lay them on the backside of the belly dancer’s top. Now, connect
together all of the resistor-ends of the LEDs by sewing into the fabric with one long section of conductive thread. Make sure
to have the thread start on one end of the top and end at the other end. It needs to be tied into one of the leads of the arduino
which we will consider soon. The LEDs can have their leads wound into little loops that the conductive thread can go through,
fixing them onto the back of the bra. Figure II shows the sewing of the LEDs onto the backside of the top. Then take another
piece of conductive thread and sew it through the negative (shorter) end of the LED (that was connected to ground on the
breadboard). Make sure to sew such that two ends of one LED are not touching nor are two opposite -ve/+ve ends of
two LEDs are touching.
3. Now, take one of your LilyPad arduinos and sew the a0-a5 inputs into the side of the bra so as to position the arduino
firmly in the cloth. Attach the conductive string that was connected to the +ve ends of all the LEDs to digital pin 2 on the
arduino. Attach the conductive string connected to all the -ve ends of the LEDs to the ground pin on the arduino.
Next, build a switch circuit like the one shown in the Figure shown, and connect it to arduino pin 7.
4. The two circuits (of the LEDs and the switch) should look like in the figure with the bra once they are set in place.
showed in Figure II, on a breadboard. Remember that the LED is a diode, and the longer end of the LED should be connected
to the resistor. which is connected to 5V power. The shorter end of the LED must be connected to ground. Make sure to run
5V of power through the LED-resistor, as to check that all LEDs are in working order.
2. Next, take each of your LED-resistor connections and lay them on the backside of the belly dancer’s top. Now, connect
together all of the resistor-ends of the LEDs by sewing into the fabric with one long section of conductive thread. Make sure
to have the thread start on one end of the top and end at the other end. It needs to be tied into one of the leads of the arduino
which we will consider soon. The LEDs can have their leads wound into little loops that the conductive thread can go through,
fixing them onto the back of the bra. Figure II shows the sewing of the LEDs onto the backside of the top. Then take another
piece of conductive thread and sew it through the negative (shorter) end of the LED (that was connected to ground on the
breadboard). Make sure to sew such that two ends of one LED are not touching nor are two opposite -ve/+ve ends of
two LEDs are touching.
3. Now, take one of your LilyPad arduinos and sew the a0-a5 inputs into the side of the bra so as to position the arduino
firmly in the cloth. Attach the conductive string that was connected to the +ve ends of all the LEDs to digital pin 2 on the
arduino. Attach the conductive string connected to all the -ve ends of the LEDs to the ground pin on the arduino.
Next, build a switch circuit like the one shown in the Figure shown, and connect it to arduino pin 7.
4. The two circuits (of the LEDs and the switch) should look like in the figure with the bra once they are set in place.
Program the Top's Arduino
Now connect the arduino to a computer using the USB connector cable, install Arduino Uno, and paste the following code
into a sketch. Make sure to ’upload’ the code to the device selected as ’Arduino Lilypad’.
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
int switchPin = 7;
int led1 = 2;
int switchState = 0;
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(led1, OUTPUT);
pinMode(switchPin,INPUT);
}
void loop() {
while(1){
switchState = digitalRead(switchPin);
if (switchState ==HIGH){
digitalWrite(led1, HIGH); // set the LED on
delay(800); // wait for a second
}
digitalWrite(led1, LOW);
delay(800);
}
}
Once this uploading of code is done, you should see that when the switch on the top is turned ’on’, the LEDs on the top
start blinking on/off. When the switch is turned ’off’, the LEDs should stop blinking. Your top at the end of this process
should look like the one in the figure above..
into a sketch. Make sure to ’upload’ the code to the device selected as ’Arduino Lilypad’.
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
int switchPin = 7;
int led1 = 2;
int switchState = 0;
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(led1, OUTPUT);
pinMode(switchPin,INPUT);
}
void loop() {
while(1){
switchState = digitalRead(switchPin);
if (switchState ==HIGH){
digitalWrite(led1, HIGH); // set the LED on
delay(800); // wait for a second
}
digitalWrite(led1, LOW);
delay(800);
}
}
Once this uploading of code is done, you should see that when the switch on the top is turned ’on’, the LEDs on the top
start blinking on/off. When the switch is turned ’off’, the LEDs should stop blinking. Your top at the end of this process
should look like the one in the figure above..
Making the Bottom Safe & Secure
Now to get to the bottom half of the belly dancer’s costume, we have an alarm sounding system that should go off if the
dancer is touched in appropriately on the sides of her waist. For this touch sensor, you can use resistive foam, which has a
resistance and when it feels a pressure, also feels a voltage change across.
Thus, the plan here is to attach the foam to the second Lilypad arduino and between 5V and ground, and measure the change
in voltage across the foam. If the voltage drop is significant, the speaker that is also connected to the arduino should sound
off a ’siren’ sound.
First, when the foam was tested, it was found to be measuring resistances in the range of 20-30K Ohms. This means that
to scale it down to a significant voltage, a voltage divider is used to connect the foam to the arduino. The changes in voltage
that were seen after this voltage divider was used, were from 3V (the foam was not touched) to less than 1V (when the foam
was pressed inwards). The Vout of this system is in Analog values, and thus this is connected to the A0 pin of the arduino.
To complete this alarm system, we also want a speaker attached to the arduino and to the bottom of the dancer’s costume,
that will go off when the voltage drops below a certain value on the dancer’s wasit foam. Thus, we attach a piezospeaker
between ground and Pin 12 of the arduino.
The final circuit should lead to what is shown in the second figure in this step. Make sure to now sew the foam down onto the waist of the
belly dancer’s bottom and sew all of the wires/threads down. Sew the arduino down onto the fabric (on pins that aren’t going
to be used!).
After sewing is done, the belly dancer’s bottom should look like it does in the last Figure of this step.
dancer is touched in appropriately on the sides of her waist. For this touch sensor, you can use resistive foam, which has a
resistance and when it feels a pressure, also feels a voltage change across.
Thus, the plan here is to attach the foam to the second Lilypad arduino and between 5V and ground, and measure the change
in voltage across the foam. If the voltage drop is significant, the speaker that is also connected to the arduino should sound
off a ’siren’ sound.
First, when the foam was tested, it was found to be measuring resistances in the range of 20-30K Ohms. This means that
to scale it down to a significant voltage, a voltage divider is used to connect the foam to the arduino. The changes in voltage
that were seen after this voltage divider was used, were from 3V (the foam was not touched) to less than 1V (when the foam
was pressed inwards). The Vout of this system is in Analog values, and thus this is connected to the A0 pin of the arduino.
To complete this alarm system, we also want a speaker attached to the arduino and to the bottom of the dancer’s costume,
that will go off when the voltage drops below a certain value on the dancer’s wasit foam. Thus, we attach a piezospeaker
between ground and Pin 12 of the arduino.
The final circuit should lead to what is shown in the second figure in this step. Make sure to now sew the foam down onto the waist of the
belly dancer’s bottom and sew all of the wires/threads down. Sew the arduino down onto the fabric (on pins that aren’t going
to be used!).
After sewing is done, the belly dancer’s bottom should look like it does in the last Figure of this step.
Program the Bottom's Arduino
Now connect the arduino to a computer using the USB connector cable, install Arduino Uno, and paste the following code into a sketch. Make sure to 'upload' the code to the device selected as 'Arduino Lilypad'.
int speakerPin = 12;
int buttonPin = A0;
int buttonState = 0;
int outputValue = 0;
int length = 15; // the number of notes
char notes[] = "gcgcgcg "; // a space represents a rest
int beats[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 4 };
int tempo = 300;
void playTone(int tone, int duration) {
for (long i = 0; i < duration * 1000L; i += tone * 2) {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);
digitalWrite(speakerPin, LOW);
delayMicroseconds(tone);
}
}
void playNote(char note, int duration) {
char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
// play the tone corresponding to the note name
for (int i = 0; i < 8; i++) {
if (names[i] == note) {
playTone(tones[i], duration);
}
}
}
void setup() {
pinMode(speakerPin, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(9600);
}
void loop() {
while(1){
buttonState = analogRead(buttonPin);
outputValue = map(buttonState, 0, 1023, 0, 500);
if(outputValue<100){
for (int i = 0; i < length; i++) {
if (notes[i] == ' ') {
delay(beats[i] * tempo); // rest
} else {
playNote(notes[i], beats[i] * tempo);
}
// pause between notes
delay(tempo / 2);
}
Serial.println(outputValue); // print potVAL in the arduino serial window);
}
if(outputValue>120)
{
digitalWrite(speakerPin,LOW);
Serial.println(outputValue);
}
}
}
Once this uploading of code is done, you should see that when the foam is pressed with some pressure on the bottom's side, the speaker should start giving off the siren sound. When the pressure is realeased, the speaker should no longer output any additional siren. Your bottom at the end of this process should look like the one in Figure \ref{bottomdone}. I added some long strips of fabric to the outter rim (via sewing) to give more of a belly dancing look to the cloth. (This picture shows the bottom still connected to an Arduino Uno, but if you are using a Lilypad, it is very easy to sew the Lilypad into the inside of the cloth and it will not be visible from the outside.
Have fun with this, and good luck!
int speakerPin = 12;
int buttonPin = A0;
int buttonState = 0;
int outputValue = 0;
int length = 15; // the number of notes
char notes[] = "gcgcgcg "; // a space represents a rest
int beats[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 4 };
int tempo = 300;
void playTone(int tone, int duration) {
for (long i = 0; i < duration * 1000L; i += tone * 2) {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);
digitalWrite(speakerPin, LOW);
delayMicroseconds(tone);
}
}
void playNote(char note, int duration) {
char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
// play the tone corresponding to the note name
for (int i = 0; i < 8; i++) {
if (names[i] == note) {
playTone(tones[i], duration);
}
}
}
void setup() {
pinMode(speakerPin, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(9600);
}
void loop() {
while(1){
buttonState = analogRead(buttonPin);
outputValue = map(buttonState, 0, 1023, 0, 500);
if(outputValue<100){
for (int i = 0; i < length; i++) {
if (notes[i] == ' ') {
delay(beats[i] * tempo); // rest
} else {
playNote(notes[i], beats[i] * tempo);
}
// pause between notes
delay(tempo / 2);
}
Serial.println(outputValue); // print potVAL in the arduino serial window);
}
if(outputValue>120)
{
digitalWrite(speakerPin,LOW);
Serial.println(outputValue);
}
}
}
Once this uploading of code is done, you should see that when the foam is pressed with some pressure on the bottom's side, the speaker should start giving off the siren sound. When the pressure is realeased, the speaker should no longer output any additional siren. Your bottom at the end of this process should look like the one in Figure \ref{bottomdone}. I added some long strips of fabric to the outter rim (via sewing) to give more of a belly dancing look to the cloth. (This picture shows the bottom still connected to an Arduino Uno, but if you are using a Lilypad, it is very easy to sew the Lilypad into the inside of the cloth and it will not be visible from the outside.
Have fun with this, and good luck!