loading

An aurora is a natural light display in the sky, mostly seen in the Arctic and Antarctic regions. They are caused by the solar wind disturbing the magnetospere.

This Instructable is about creating your own aurora LED lamp. The effect is generated by a combination of colored LEDs and an unequally colored rotating disc. Both, the LEDs and the motor, are driven by a single microcontroller.


Step 1: Materials

This aurora light is a mixture of a digital and an 'analog' light effect. It requires some electronic parts and colored glass or plastic.

Electronic parts

Rotating Disc:

  • Transparent colored glass and/or plastic
  • Transparent plate
  • Transparent glue
  • Old lens / Google Cardboard (optionally)
  • Plastic lid (jar, about 3,5 inch)

Housing:

Other parts:

  • Some small LEGO parts for the shaft.

Some caution is required when breaking glass or plastic. Place it in a cloth or plastic bag to prevent splinters from jumping away. And wear safety goggles.

Step 2: Digital Light Effect

The first light effect uses a WS2812 LED ring with 16 LEDs. These are controlled by an Arduino.

The initial code for this part has been made on 'Circuits.io'. And you can simulate an Arduino, with this circuit, directly from their webpage (takes some time to open).

The main loop provides 3 (Red, Green and Blue) values for the LEDs. The values differ each step by using a different cosinus-funtion for each color. I've choosen for a cosinus funtion, in stead of a random, function to allow for smooth color changes.

#include <Adafruit_NeoPixel.h>

#define NUM_PIXELS 16
Adafruit_NeoPixel pixels(NUM_PIXELS, 8, NEO_GRB | NEO_KHZ800);

int lednum = 0;
float R, G, B;
float Gplus = 60;
float Bplus = 90;

void setColor(int R, int G, int B) 
{
   R = max (min (R, 255), 0);
   G = max (min (G, 255), 0);
   B = max (min (B, 255), 0);

   pixels.setPixelColor (lednum, R, G, B);
   pixels.show();

   lednum++;
   lednum = lednum%NUM_PIXELS;
}

void setup() 
{
   pixels.begin();
   pixels.show();
}

void loop() 
{    
   for (int j = 0; j < 3599; j++) 
   {
      R = abs(cos( j          * 0.0174532925) * 255);
      G = abs(cos((j + Gplus) * 0.0174532925) * 255);
      B = abs(cos((j + Bplus) * 0.0174532925) * 255);
      setColor (R, G, B);

      Gplus++; 
      Bplus++; Bplus++;
      if (Gplus >= 3600) {Gplus = 0;}
      if (Bplus >= 3600) {Bplus = 0;}
     
      delay (100);
   }
}

The value of 0.0174532925 translates the degrees to radians.

Step 3: 'Analog' Light Effect

The second light effect is caused by a rotating disc. It is made from a transparent disc combined with transparent colored materials.

Start with a plastic lid. Carefully remove the inner side. And replace this with a transparent plastic disc. I've used a fretsaw to create a plastic circle out of a plate of polycarbonate (4mm).
Place different pieces of glass on the plastic disc. Irregular pieces of glass give different refractive angles, and increase the aurora effect. I've also used some parts of a lens. The centre part is a LEGO brick (Round 2 x 2 with Axle Hole).

Glue all parts together with transparent glue. You can use plenty, the glue becomes a part of the light effect. Make sure the axle has an angle of 90 degree.


My first prototype used an upper part of a cd spindle.
The sides of the plastic lid make it impossible to touch the sharp parts of the glass after assembling.

Step 4: Variable Speed Motor

There are 3 types of motors which can be used: DC geared motors, servo motors and stepper motors.

I've chosen a 28YBJ-48 stepper motor with an ULN2003 Driver Board. They are easy to control. And have 2 mounting holes. Which have been placed on a different location than the connectors of the LED ring.

This project uses the standard Arduino stepper library. This library contains 3 functions:

  • Stepper(steps, pin1, pin2, pin3, pin4)
  • setSpeed(rpm)
  • step(steps)

The stepper function returns a new instance of the Stepper motor class. This requires the number of steps in one revolution of your motor and the connected pins on the Arduino. The 28YBJ-48 stepper moves 11.25 degrees per step in full step mode. Or 360/11.25 = 32 steps per single revolution of the internal motor shaft. There is an internal gear with a reduction ratio of 1/64. Resulting in 32 x 64 =2.048 steps per revolution (0.1758 degree per step).

The setSpeed function is used to adjust the motor speed. The input value is defined as rpm (rotations per minute). This value must be adjusted with the gear ratio, because the stepper library doesn't know the motor type. The value of 1 x 64 gives a speed of one revolution per minute.

The following example code controls the stepper motor. The motor speed is adjusted every 100 steps (about 20 speed changes per rotation). The speed is slowly adjusted between 0,5 and 1,5 rpm (the values 32 and 96).

#include <Stepper.h>

#define STEPS_MOTOR  32   
#define STEPS_OUTPUT 32 * 64  

Stepper BY48stepper(STEPS_MOTOR, 8, 10, 9, 11);

int Steps = 100;
int Speed;

void setup()  
{
}

void loop()
{
  for (int j = 0; j < 359; j++) 
  { 
      Speed = 64 + (cos (j*0.0174532925) * 32);  
      BY48stepper.setSpeed (Speed);
      BY48stepper.step (Steps);
  }
}

Connect the stepper motor to the ULN2003 board. The Arduino pins 8-11 are used to control the stepper. Don't forget to connect the power (5 Volt) and Ground wires. Pin 12 is used for the LED ring.

Step 5: Housing

The housing is made of a 4 inch diameter PVC drain pipe. The first idea was to use a straight tube. In the end this has become a 45 degree linkage.
In this a circular wooden triplex plank is placed. Drill 3 holes for the motor, and 3 holes for the LED ring.

It is posible to paint the PVC:

  1. Work in a well-ventilated or open space.
  2. Sand the outside and inside. Use fine sandpaper (220+ grit).
  3. Apply very little accetone on a cloth. And wipe over the PVC. This allows the paint to hold better.
  4. Place the wooden disc before painting the housing.
  5. Apply multiple coats of spray paint. Let the paint dry for 10 to 20 minutes between each layer.
  6. Allow the paint to dry. This takes a few hours.

Step 6: Electronics

The electronics schema is straightforward. The USB breakout board provides power to the Arduino, ULN2003 Stepper Driver and LED ring, using an external power supply. The stepper motor is directly connected to the driver board. And the driver board is connected to pin 8-11 of the Arduino.

The led ring is connected to pin 12 of the Arduino. Use a resistor between the Arduino and the LED ring data input, to protect the data pin. Place a capacitor between the power and ground (near the led ring). The current draw of the LEDS can vary, and the capacitor acts as a temporary power source.


The Arduino can be powered by the USB breadboard OR the Arduino USB port. Use the Arduino port only when updating the software.

Step 7: Arduino Code

The final code combines the WS2812 LEDs and the Stepper Motor examples. Both examples use a for-loop in the main part. And I've combined these pieces of code into a single program.

Some parts of the code can be adjusted to alter the light effect:

  • Motor speed: Current speed is between 1 and 1.5 rpm.
  • Minimum LED output: Increase the 0 value in the "max (n, 0)" inside the setColor function.
  • Maximum LED output: Decrease the 255 value in the "min (n, 255)" inside the setColor function.
  • Faster color change: Decrease the Steps value.
#include <stepper.h>
#include <Adafruit_NeoPixel.h>

#define NUM_PIXELS 16
Adafruit_NeoPixel pixels(NUM_PIXELS, 12, NEO_GRB | NEO_KHZ800);

#define STEPS_MOTOR  32   
#define STEPS_OUTPUT 32 * 64  
Stepper BY48stepper(STEPS_MOTOR, 8, 10, 9, 11);

int lednum = 0;
float R, G, B;
float Gplus = 60;
float Bplus = 90;

int Steps = -50;
int Speed;

void setColor(int R, int G, int B) 
{
   R = max(min (R, 255), 0);
   G = max(min (G, 255), 0);
   B = max(min (B, 255), 0);

   pixels.setPixelColor (lednum, R, G, B);
   pixels.show();

   lednum++;
   lednum = lednum%NUM_PIXELS;
}

void setup()  
{
   pixels.begin();
   pixels.show();
}

void loop()
{
  for (int j = 0; j < 359; j++) 
  { 
      R = abs(cos( j          * 0.0174532925) * 255);
      G = abs(cos((j + Gplus) * 0.0174532925) * 255);
      B = abs(cos((j + Bplus) * 0.0174532925) * 255);
      setColor (R, G, B);

      Gplus++; 
      Bplus++; Bplus++;
      if (Gplus >= 3600) {Gplus = 0;}
      if (Bplus >= 3600) {Bplus = 0;}

      Speed = 64 + (cos (j*0.0174532925) * 32);  
      BY48stepper.setSpeed(Speed);
      BY48stepper.step(Steps);
  }
}

Upload and test the code before assembling the Aurora LED lamp.

Step 8: Assembly

After painting the PVC housing, it's time to assemble the Aurora LED Lamp. Start with the stepper motor and the SW2812 LED ring. Attach the motor to the wooden plate inside the housing. Use 3 breadboard wires to connect the LED ring. I've drilled 3 small holes and fastened the breadboard connectors to the wooden plate.

Connect all electronics as mentioned in a previous step. You can solder the wires, use a screw terminal or use an Arduino prototype board (only $1 on aliexpress). It is posible to power al components from the Arduino. But it's better to bypass the Arduino for powering the LEDs and the stepper motor. This requires an altered USB cable or an USB breakout board.

Place all electronic components inside the housing. And attach them to the wooden plate.

Connect the colored disc to the motor shaft. I've used some LEGO parts (bricklink.com):

  • Technic, Axle 4 (3705)
  • Technic, Liftarm 1 x 3 Thick (32523)
  • Technic, Wedge Belt Wheel (4185)
  • Technic, Pin with Friction Ridges (2780)

But you can also use a shaft coupler.

Although the LEDs give quite a lot of light, it's hard to make a good quality video. But the Aurora effect is best shown in a dark environment on a light wall. Just like the real auroras, which are most clearly seen at night.

GosseAdema

<p>I'm not convinced, I'd like to see a video, would you post one please ?</p>
<p><iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/4_ACjpvFhR4" width="500"></iframe></p><p>There is a video in the last step. It's a little too dark, the LEDs give enough light. but it's hard to make a video under low light conditions. This video is taken with more light</p>
<p>Dear, please can you tell me what is the music in this clip? Thank you!</p>
<p>The music is from Youtube: Ambient, Reflections</p>
<p>Can you please be more specific?</p>
<p>Thank you!</p>
<p>fantastic!! :^D</p>
<p>Voted for this cool thing</p>
<p>Really nice lighting effects! Bravo!</p>
Quite beautiful, thank you! What is the cost for all the components?

About This Instructable

4,420views

75favorites

License:

More by Gosse Adema:Aurora LED Lamp Photo and Video Mosaic Lapidary Butterfly 
Add instructable to: