Kit: Equalizer Lamp

()

The Equalizer Lamp

This is a lamp with a build-in Fast Fourier Transformer (created by Arduino). The lamp reacts on frequencies in music and has three layers. It is divided in different segments. The start color is green and turning into other colors, when it reacts on the frequencies in music. To see if it works or reacts on the music, you have to test it with a music player while you are testing the lamp.

First thing to do is getting our files here

Materials

Building the lamp

  • 2-3 people to assemble the lamp
  • Milky-white plexiplate (90x60 cm)
  • LED Band 1,5 m
  • Zip-tights
  • 3 Plastic tubes, 80 cm each
  • Glue gun
  • USB key
  • Laser cutter (for guide, click here)

The Arduino board

  • (Programs): Processing & Arduino
  • Arduino board Uno, 5V (SainSmart)
  • Regulated 5v 4-amp power supply
  • Wires for the LED-light and the Arduino board
  • Electret condenser microphone (with an amplifier)
  • A soldering iron
  • 2 splicing connectors with two holes
  • 1 cable gland
  • Pin headers
  • Electrical tape or isolate tape

The Construction

The lamp consists of three layers with eight triangles for each layer. The top is shaped as a pyramid which consist of four triangles. This construction is all together formed by 28 triangles, all in the same size.

Between each layer inside the lamp, there is a squared platform with four holes. The three holes fits the three plastic tubes while the fourth of the holes is for the LED Band. The squared platform creates the stability for the lamp. You can use the glue gun to adjust some smaller details, e.g. the Arduino Board in the bottom square and zip-tights for the LED Band. (Look at the pictures below).

The triangles and squares are made of plexiglas and are put together by zip-tights as well.

There is two PDFs to cut one with sqaures and one with triangles.

Squares:

Triangles:

Laser cutting

Guide to laser cutting, click here.

To avoid burned sides on the plexiplate, it is a good idea to put something under the plexiplate, that separates the plexiplate from the platform of the laser cutter. Remember to adjust the space between the laser cutter and the plexiplate when doing this.

Step 1:

At first you have to laser cut the 30 triangles from the PDF file called "Triangles RUC EQ Lamp 4.0mm". You only need 28 triangles and therefore you have two remaining triangles. Save the remaining triangles for later use if something goes wrong.

If you don't got a plate big enough for all the triangles, then delete some of the triangles in the laser cut programme and print the file twice instead.

alt

Step 2:

Laser cut the four squares from the PDF file. The PDF file contains the models of the bottom square and the three middle squares. There are to kinds of middle squares. The first and third middle square have the number 1, while the second square has the number 2.

When both the PDF files with the triangles and the squares have been laser cut, you move on to building the lamp.

Arduino

Step 1:

Download Arduino.
Download and open the dropbox folder with the Arduino code. You can choose to change the colours, number of pixels etc. or just run the code as we did.
Plug-in the Arduino board to the computer and upload the code to the Arduino board. Make sure you use the right port in Arduino.
(indsæt billede af upload-knap) (dropbox link)

Soldering the LED Band and the microphone into the Arduino

Step 1:

In this step you have to use the LED Band, the microphone, the soldering iron, some pin headers and the regulated 5v 4 amp power supply to connect them with the Arduino board.

alt

Step 2:

Solder the wires into the pin headers and then it will be possible to put them into the Arduino board. Put the wires with the pin headers into the board. Connect the DIN wire to pin 7 on the Arduino board and then connect the other wires in this following order:

The LED Band to the Arduino Board

LED Band, 5V —> 5V on the Arduino
LED Band, GRN -> GRN on the

alt

You need to connect the microphone and the Arduino Board with three different wires.

Microphone, A0 —> S, A0
Microphone, G —> G, A0
Microphone, + —> V, A0

alr

Step 3:

To connect the regulated 5v 4 amp power supply into the Arduino board, you need to cut over the originally stick and solder the positive and negative on the back of the Arduino board. The positive wire needs to be connected with the 5V in the back of the Arduino board, while the negative wire needs to be connected with the GND back on the board. Make sure that the wires DOES NOT touch each other and then put some electrical tape on that wire which doesn't have a cable cover around it.

Step 4:

Place the equipment (Arduino Board, microphone and the LED Band) inside the lamp and mount the cable gland on the hole in the triangle, before you solder the wires on.

We forgot to place our Arduino in the lamp before we soldered the wires, witch made the process more complicated. We made a second cut in the middle of the wire and separated the positive and negative again and inserted the separate wires in two splicing connectors with two holes and inserted the separated wires into the splicing connectors. Remember to put the two positive wires in the same splicing connector and the two negative wires in the other splicing connector as well. Then you are able to place the Arduino board inside lamp after you solder the wires on.

Make sure the LED light is right connected, before you continue building the lamp.

alt

Building the lamp

alt

Step 1 - Creating the first layer of triangles:

Please start from the bottom of the lamp.
The bottom square is the bigger one of the squares, and doesn't have any holes in the middle.

Zip-tight the one triangle with a round hole in the corner of the triangle, which is for the cable gland, to one of the sides on the bottom square.

Then connect one triangle in the opposite way (with the tip facing down - upwards and downwards) beside the first connected triangle and then the rest of the triangles in the first layer. Now the bottom square is zip-tighten with eight triangles on the fourth sides.

It is important to tighten the zip-tights as much as possible and at the same time make sure that there aren't any big gaps between the plexiglas elements.

alt

Step 2 - Cutting tubes:

Cut each of the three tubes in a length of 80 centimetres and round of the ends with sandpaper. Make sure the tubes is the right size and fit in to the holes in the middle square.

Step 3 - Adding the Arduino Board, etc.:

When you have gathered the first layer of the lamp with triangles, you can zip-tight or glue the Arduino Board on the bottom square, because of the tubes, choose one of the sides. Make sure you have fastened the LED Band, the microphone and the wires to the bottom.

alt

Step 4 - Adding a squared platform:

The squared platform that has to be connected to the first layer of triangles, is a square that is smaller than the bottom square. You have to zip-tight the first middle square (number 1) to the triangles in the first layer. Make sure the three tubes fits into the holes and that the LED Band can come through the fourth hole. Remember to make a kind of a spiral with the LED Band, around the tubes.

Do the same with the two other middle squares. After number one, add number 2, and after the second middle square (number 2), add the other number 1 middle square in the final top (before/under the pyramid top).

Continue building the lamp.

Step 1:

Finish the first layer with the middle layer square number one. Place each tube and the LED band in the holes of the middle layer. Build next layer with the triangles, the zip-tights and finish this layer with the middle layer square number two. Continue building the next layer, witch should be finished with the middle layer, square number one. The last layer is a bit different, and formed as a pyramid. For the top use four triangles and the zip-tights.
Remember to twirl the LED band around the tubes in each layer, to make the spiral effect.
It is a good idea, to zip-tight the LED-band to the tubes.

alt

In this guide we will try to describe the project in a way we think is quite easier than we first anticipated. We had a lot of complications how to build the exact lamp because we from the start were not thinking of the smaller details.

At first, its important to think about the size of the lamp and then choose your material after that.

The length of the LED-band can be modified by the height og the structure.

Laser cutting:

Programs and Files

  • Arduino
  • The code for the LED-light
  • Convert the file to PDF for the lasercutter

The Code

Sound and Light code

We made our arduino code with a NeoPixel Ring Sketch from Shae Ericson. To use this code you need to include the libraries ("FastLED-3.1.0" and "ArduinoFFT2") from the folder given earlier in this guide.

You include the libraries to Arduino by clicking sketch->include library->Add ZIP.Library and choose the libraries.

The code you need to upload to the Arduino board is called "MusicTreshholdLEDPixels". You can read the code here (// is comments from the authors):

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson // released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library #include "FastLED.h" #include #include

  #ifdef __AVR__
  #include <avr/power.h>
  #endif

  #define  IR_AUDIO  0 // ADC channel to capture


  volatile  byte  position = 0;
  volatile  long  zero = 0;

  int16_t capture[FFT_N];       /* Wave captureing buffer */
  complex_t bfly_buff[FFT_N];   /* FFT buffer */
  uint16_t spektrum[FFT_N/2];   /* Spectrum output buffer */


  // Which pin on the Arduino is connected to the NeoPixels?
  // On a Trinket or Gemma we suggest changing this to 1
  #define PIN            7

  // How many NeoPixels are attached to the Arduino?
  #define NUMPIXELS      88

  // When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
  // Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
  // example for more information on possible values.

  CRGB leds[NUMPIXELS];

  int change = 0 ;



  void setup() {
    Serial.begin(57600);
    adcInit();
    adcCalb();

    LEDS.addLeds<WS2812,PIN,GRB>(leds,NUMPIXELS); 

  }

  //We are going to use two frequency classes - lows and highs to represent the color
  int low = 0;
  int high = 0;

  void loop() {
    //Using two other variables to map the color from an audio frequency to a color frequency
    byte uppercolor, bottomcolor;
    low = 0;
    high = 0;

    //This part takes in the sound and is processing it into spektrum[i] as 64 bins of different frequencies
     if (position == FFT_N)
    {
      fft_input(capture, bfly_buff);
      fft_execute(bfly_buff);
      fft_output(bfly_buff, spektrum);

      //freq is the threshold between low and high frequencies. We then add them up to have a value we can map to color.
      int freq = 12; 
      for (byte i = 0; i < freq; i++){
       low = low + spektrum[i];   
      }
      for (byte i = freq; i<64;i++){
        high = high + spektrum[i];  
      }
     position = 0;
    }
    Serial.print("lower frequencies : ");
    Serial.println(low);
    Serial.print("higher frequencies: ");
    Serial.println(high);

    delay (30) ;
    //Mapping the sound frequencies to the color
    bottomcolor = map(low,10,120,0,255);
    uppercolor = map(high,10,120,0,255);

    FastLED.clear();

    //Here we set the sound frequencies to the colors. We use a threshold that sets the limit between background noise and louder sound
    int threshold  = 115;
    if(low+high < threshold){
     for (int i = 0 ; i < NUMPIXELS ; i = i + 1 )
      {
        leds[i] = CRGB::Green;
      }
    }
    else{
      FastLED.clear();
      for (int i = 0 ; i < NUMPIXELS ; i = i + 1 )
      {  

        //The strip is split in four parts for the sake of variety
        // the first and third part are mapped to the low frequencies, just with different rates of changing the color or hue
        //the second and fourth part are mapped to the high frequencies, also with different rates of changing the color or hue
        if(i <= NUMPIXELS/4)
          leds[i] = CHSV(bottomcolor,200,105);
        else if(i > NUMPIXELS/4 && i<= NUMPIXELS/2)
          leds[i] = CHSV(uppercolor,200,105); 
        else if( i > NUMPIXELS/2 && i<=(NUMPIXELS/4*3))
          leds[i] = CHSV(bottomcolor*2,200,105);
        else if( i >(NUMPIXELS/4*3))
          leds[i] = CHSV(uppercolor*2,200,105);  
      }
    }
    FastLED.show();
  }

  // free running ADC fills capture buffer
  ISR(ADC_vect)
  {
    if (position >= FFT_N)
      return;
    capture[position] = ADC + zero;
    if (capture[position] == -1 || capture[position] == 1)
      capture[position] = 0;
    position++;
  }
  void adcInit(){
    /*  REFS0 : VCC use as a ref, IR_AUDIO : channel selection, ADEN : ADC Enable, ADSC : ADC Start, ADATE : ADC Auto Trigger Enable, ADIE : ADC Interrupt Enable,  ADPS : ADC Prescaler  */
    // free running ADC mode, f = ( 16MHz / prescaler ) / 13 cycles per conversion 
    ADMUX = _BV(REFS0) | IR_AUDIO; // | _BV(ADLAR); 
  //ADCSRA = _BV(ADSC) | _BV(ADEN) | _BV(ADATE) | _BV(ADIE) | _BV(ADPS2) | _BV(ADPS1) //prescaler 64 : 19231 Hz - 300Hz per 64 divisions
    ADCSRA = _BV(ADSC) | _BV(ADEN) | _BV(ADATE) | _BV(ADIE) | _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0); // prescaler 128 : 9615 Hz - 150 Hz per 64 divisions, better for most music
    sei();
  }
  void adcCalb(){
    Serial.println("Start to calc zero");
    long midl = 0;
    // get 2 meashurment at 2 sec
    // on ADC input must be NO SIGNAL!!!
    for (byte i = 0; i < 2; i++)
    {
      position = 0;
      delay(100);
      midl += capture[0];
      delay(900);
    }
    zero = -midl/2;
    Serial.println("Done.");
Construction

We made our figures with a generic build interface from FabLAB RUC. The program is furtherly explained in this guide.

Square code

Our square code defines 3 different squares with rectangles and holes for the construction.

Our square code is (// Are comments from the authors):

  void setupElements()
  {
  mfab rectangle1 = canvas.addRectPiece(10, 10,    canvas.toGrid(189), canvas.toGrid(189),"MiddleLayerNumber 2"); // defining the rectangle called "MiddleLayerNumber 2" 

    rectangle1.left.addRect(rectangle1.left.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to left side of the rectangle
    rectangle1.right.addRect(rectangle1.right.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to right side of the rectangle
    rectangle1.top.addRect(rectangle1.top.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to top of the rectangle
    rectangle1.bottom.addRect(rectangle1.bottom.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to bottom of the rectangle
    mfab cont =rectangle1.addContainer(0,0); // add a group/container to the rectangle
    cont.addCircle(canvas.toGrid(-189/3),canvas.toGrid(-189/3),canvas.toGrid(16.5)); // add a circle in the container
    cont.addCircle(canvas.toGrid(0),canvas.toGrid(-189/3),canvas.toGrid(16.5)); // add a circle in the container
    cont.addCircle(canvas.toGrid(0),canvas.toGrid(0),canvas.toGrid(16.5)); // add a circle in the container
    cont.addCircle(canvas.toGrid(-189/3),canvas.toGrid(0),canvas.toGrid(16.5)); // add a circle in the container
    cont.rotation=45; //rotates the container
    cont.x = canvas.toGrid(189/2); // set the containers x-axis in the rectangle
    cont.y = canvas.toGrid(189/4*3);  // set the containers y-axis in the rectangle


    mfab rectangle2 = canvas.addRectPiece(10, 60, canvas.toGrid(210), canvas.toGrid(210),"BottomSquare"); // defining the rectangle called "MiddleLayerNumber 2"
    rectangle2.left.addRect(rectangle2.left.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to left side of the rectangle
    rectangle2.right.addRect(rectangle2.right.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to right side of the rectangle
    rectangle2.top.addRect(rectangle2.top.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to top of the rectangle
    rectangle2.bottom.addRect(rectangle2.bottom.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to bottom of the rectangle


    for (int y = 0; y < 2; y = y +1)
      {
    mfab rectangle3 = canvas.addRectPiece(65, 10+y*55, canvas.toGrid(189), canvas.toGrid(189),"MiddleLayerNumber1"); // defining the rectangle called "MiddleLayerNumber 2"
    rectangle3.left.addRect(rectangle3.left.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to left side of the rectangle
    rectangle3.right.addRect(rectangle3.right.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to right side of the rectangle
    rectangle3.top.addRect(rectangle3.top.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to top of the rectangle
    rectangle3.bottom.addRect(rectangle3.bottom.length/2-1, 1, 2, 1); //add a rectangle hole for a zip-tight to bottom of the rectangle
    rectangle3.addCircle(canvas.toGrid(189/3),canvas.toGrid(189/3),canvas.toGrid(16.5)); // add a circle
    rectangle3.addCircle(canvas.toGrid(189/3*2),canvas.toGrid(189/3),canvas.toGrid(16.5)); // add a circle
    rectangle3.addCircle(canvas.toGrid(189/3*2),canvas.toGrid(189/3*2),canvas.toGrid(16.5)); // add a circle
    rectangle3.addCircle(canvas.toGrid(189/3),canvas.toGrid(189/3*2),canvas.toGrid(16.5)); // add a circle
     }
  }
Triangle code

Our triangle code defines our triangles with rectangles and holes for the construction.

Our triangle code is (// Are comments from the authors):

  void setupElements()
  {
    canvas.x =2;
    canvas.y =2;
    canvas.addCircle(9,25, canvas.toGrid(16)); //Adds a single circle for electronic devices

    for (int y = 0; y < 3; y = y +1) // Loopcode: the code will repeat the triangles on the y-axis three times
       {
         for (int x = 0; x < 3; x = x +1) // Loopcode: the code will repeat the triangles on the x-axis three times 
          {
            //Programming for all triangles placed upwards
            mfab triangle1 = canvas.addIsoTriangle(x*50, 20+y*65, canvas.toGrid(195), canvas.toGrid(225), 0); //programming that defines the placement, size and rotation of the triangles.(x,y,width,height,rotation)
            triangle1.left.addRect(triangle1.left.length/3-1, -2, 2, 1); //add hole for zip-tight 1 in the left side of the triangle
            triangle1.left.addRect(triangle1.left.length/3*2-1, -2, 2, 1);//add hole for zip-tight 2 in the left side of the triangle
            triangle1.right.addRect(triangle1.right.length/3-1, 1, 2, 1);//add hole for zip-tight 3 in the right side of the triangle
            triangle1.right.addRect(triangle1.right.length/3*2-1, 1, 2, 1);//add hole for zip-tight 4 in the right side of the triangle
            triangle1.top.addRect(triangle1.top.length/2-1, 1, 2, 1);//add hole for zip-tight 5 in the bottom of the triangle

            //Programming for all triangles placed downwards 
            mfab triangle3 = canvas.addIsoTriangle(74+x*50, 77+y*65, canvas.toGrid(195), canvas.toGrid(225), 180);//programming that defines the placement, size and rotation of the triangles.(x,y,width,height,rotation)
            triangle3.left.addRect(triangle3.left.length/3-1, -2, 2, 1);//add hole for zip-tight 1 in the left side of the triangle
            triangle3.left.addRect(triangle3.left.length/3*2-1, -2, 2, 1);//add hole for zip-tight 2 in the left side of the triangle
            triangle3.right.addRect(triangle3.right.length/3-1, 1, 2, 1);//add hole for zip-tight 3 in the right side of the triangle
            triangle3.right.addRect(triangle3.right.length/3*2-1, 1, 2, 1);//add hole for zip-tight 4 in the right side of the triangle
            triangle3.top.addRect(triangle3.top.length/2-1, 1, 2, 1);//add hole for zip-tight 5 in the bottom of the triangle

            }
          }
        }

Made by

Juliane Engelbrecht

Maria Holmgaard Meyer

Natalie Roosta

Kasper Fraenkel

Jakob Hastrup

Stephanie Phuong Lam

Thanks to Mads Hobye, Julian and HUMTEK Workshop 8, Roskilde University

Share on : Twitter, Facebook or Google+