Introduction: Woooshing Leds - Rotated Animation by Arduino

This project allows you draw in the air letters, symbols or other shapes - as you like.
Controlled by the Arduino, the 7 simple leds blinking on and off - creating the illusion of floating text in the air.
This combination of simple components with a unique program, allows to create  this instructable.

Step 1: Assembling the Electronics

Place the leds near the edge of the matrix, so the circle it draws will be as wide as possible.
Note the polarity of the leds to be oriented in the same direction.
(You can use leds in different colors as I did with the WOOOSH case).
Place the Arduino near the center of the matrix and mount it to the matrix.
I used simple wires for that.
Since the bottom part of the Arduino has some conductors - I used a piece of plastic sheet as an isolator from the matrix.
Connect one side of the leds to the IO of the arduino (ports 1-7, leaving port 0 for the trigger).
Use suitable resistors and connect the other leg of the leds to the ground.
I used the bottom rail of the matrix as a common ground.
I used 420 Ohm resistors.

Step 2: Installing the Platform on the Motor

Now that you have the main electronic installed, you can install it on the motor - that will rotate all the platform (the matrix).
What you need is a simple DC motor (preferable with a removable shaft adapter), a piece of wood and two small screws.
I marked on the wood the required width I needed, the location of the holes for the bolts and for the shaft from the motor.
Then I drilled and sawed upon the marks.
I used the holes in the matrix to attach the wood to the matrix - using the bolts.
Note that the bolts must be long enough to grab the matrix - without passing to the other side and damage the Arduino.
I have inserted the shaft adapter into the drilled hole  - using some force. The insertion planned to be "press fit" since the forces the shaft feels are not negligible.

Step 3: Installing the Battery Packs

Since the platform is turning, and the Arduino needs its food (power) - the simplest way was to install the batteries on the matrix itself - so they will rotate together.
For that, I used two identical battery packs and placed them on the opposite sides of the board - so they will balance each other.
I used simple zip ties to mount it to the matrix.
Try to install the batteries (additional weight) as closer as possible to the rotation center.
That way - the balancing problems you'll have to deal with will be smaller.
After mounting the battery packs, connect the wires so the batteries will be in row, to reach 6 volts to operate the Arduino.
Think about a way to switch the board on and off.
I used the power plug to the arduino as my power switch - and later (when I got lazy of plugging it in and out) I have simply pulled up one of the power chord from the board.

Step 4: Fixing the Motor to the World

For fixing the motor to a stationary object, you have to use a rigid base, so it will hold the small (or big) vibrations of the rotation - especially before the balancing was completed.
I used a nice piece of wood and a C-clamp - mounting the wood to a solid table.
Then, I used the lid of a door lock and zip ties to mount the motor to the wood.

Step 5: Powering the Motor

The power source I used for the motor was an old Nokia charger.
I have changed its connector to be as a 9 Volts battery connector.
I used this connector because it allows you to snap on one of the terminals and then -  by turning the two connectors - you can connect and disconnect the other terminal.

Step 6: Balancing the Rotating Platform

Once the system is installed and secured to the table, it can start turning.
In the beginning, allow the matrix to turn slowly, and see if everything is well muted and there is nothing loose.
When allowing to turn faster, be aware for any excessive vibrations (which will probably accrue in the beginning), caused by the weight being unbalanced around the turning center.
Try balancing the system by sliding the batteries to one way or another, until the vibrations decrease to minimal level.
You can also move the electric components for balancing - but it is more complicate and less efficient, since the mass of the batteries is significantly bigger (and simpler to move tham).

Step 7: Setting the Trigger - Where Everything Starts

The trigger is the sign sent to the Arduino to start the sequence of switching the leds on and off.
In order that the image created by the leds will be stable, the sequence must start at the same angle in the position of the matrix.
The trigger I made was two wires positioned close to each other - but not touching each other.
When the platform is turning, the tip of one of the wires collides with the C-clamp (which is Stationary). As a result, the wire moves a little and touches the other wire near it - closing a circuit and sending the trigger sign to the Arduino - starting the sequence.
Since the collision repeats in the same position of the matrix, the sequence will start every cycle in the same position, and the illumination of the lamps will repeat the trail of the previous round - creating a steady image.

Step 8: Programming the Arduino to Animate in the Air

The program for the Arduino can be found in the following attached text file (or at the bottom of the step).
I have attached both programs - for the FUFU, for the INSTRUCTABLES and for the WOOOSH thing.
The program is basically a procedure that scans a matrix of ones and zeros and turning the leds on and off  accordingly.
Each letter is coded as a matrix, and stringing the Matrices (to one long matrix) gives you the whole text.
Each column of the matrix represent one of the 7 leds mounted in row.
Each row of the matrix represents the momentary state of all the 7 leds.
Running over all the rows - gives you the final shape of the letter / symbol.
In this program, each letter has "height" of 7 leds, and "width" of 7 "micro periods" (the time the leds holding their state before next the update).
It is a little tricky to make the trial and error of the letters and fonts you want to write - but eventually you should very nice results.
The idea  is to think of each led as it was a pixel which is propagating with the time and by turning it on and off, you are drawing images along the circle it runs in.
Below is the text of the program for the Arduino to write the "instructables".
int timer = 1;                  // The higher the number, the slower the timing.
int pinCount = 7;           // the number of pins (i.e. the number of leds)
int arryMax = 727;          // Number of total bits in the whole string
int ltr8c1[] = {                //Decleration of the array - one long array of all the string
                                             // Writing "instructables"
// letter "i"  (4)                  //Looking at the matrix, top to bottom, you receive the F letter.
1,1,1,1,1,0,1 ,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0 ,                  //This line of zeroz separates the letter just completed fromt he next letter - by turning all the leds off.
0,0,0,0,0,0,0 ,  
// letter "n"   (8)
1,1,1,1,1,1,1  ,
0,0,0,0,1,1,0 ,
0,0,0,0,0,1,1 ,
0,0,0,0,0,0,1 ,
0,0,0,0,1,1,0 ,
1,1,1,1,1,0,0  ,
0,0,0,0,0,0,0  ,     
0,0,0,0,0,0,0 ,  
// letter "s"   (9)
0,1,0,0,1,1,0,
1,1,0,0,1,1,0,
1,0,0,1,0,0,1,
1,0,0,1,0,0,1,
1,0,0,1,0,0,1,
1,1,1,0,0,1,0,
0,1,1,0,0,1,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,  
// letter "t"   (9)
0,0,0,0,0,1,0,
0,0,0,0,0,1,0,
0,0,0,0,0,1,0,
0,1,1,1,1,1,1,
1,0,0,0,0,1,0,
1,0,0,0,0,1,0,
0,1,0,0,0,1,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,  
// letter "r"    (9)
1,1,1,1,1,1,1,
0,0,0,0,1,1,0,
0,0,0,0,0,1,1,
0,0,0,0,0,0,1,
0,0,0,0,0,0,1,
0,0,0,0,0,1,0,
0,0,0,0,1,1,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,  
// letter "u"    (8)
0,1,1,1,1,1,1  ,
1,1,0,0,0,0,0 ,
1,0,0,0,0,0,0 ,
1,0,0,0,0,0,0 ,
1,1,0,0,0,0,0 ,
0,1,1,1,1,1,1  ,
0,0,0,0,0,0,0  ,     
0,0,0,0,0,0,0 ,  
// letter "c"    (9)
0,0,1,1,1,0,0,
0,1,1,0,1,1,0,
1,1,0,0,0,1,1,
1,0,0,0,0,0,1,
1,0,0,0,0,0,1,
0,1,0,0,0,1,0,
0,1,0,0,0,1,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,  
// letter "t"    (9)
0,0,0,0,0,1,0,
0,0,0,0,0,1,0,
0,0,0,0,0,1,0,
0,1,1,1,1,1,1,
1,0,0,0,0,1,0,
1,0,0,0,0,1,0,
0,1,0,0,0,1,0,
0,0,0,0,0,0,0,  
0,0,0,0,0,0,0 ,  
// letter "a"    (9)
0,0,1,0,0,1,0,
0,1,0,1,0,0,1,
1,0,0,0,1,0,1,
1,0,0,0,1,0,1,
0,1,0,0,1,0,1,
0,1,1,0,1,0,1,
1,1,1,1,1,1,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,    
// letter "b"    (9)
1,1,1,1,1,1,1,
0,1,0,1,0,0,0,
1,0,0,0,1,0,0,
1,0,0,0,0,1,0,
1,0,0,0,0,1,0,
0,1,0,0,1,0,0,
0,0,1,1,0,0,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,   
// letter "l"   (4)
1,1,1,1,1,1,1 ,
0,0,0,0,0,0,0,  
0,0,0,0,0,0,0,   
0,0,0,0,0,0,0 ,  
// letter "e"    (9)
0,0,1,1,1,0,0,
0,1,0,1,0,1,0,
1,0,0,1,0,0,1,
1,0,0,1,0,0,1,
1,0,0,1,0,0,1,
1,0,0,1,0,1,0,
0,0,0,1,1,0,0,
0,0,0,0,0,0,0 ,  
0,0,0,0,0,0,0,  
// letter "s"   (8)
0,1,0,0,1,1,0,
1,1,0,0,1,1,0,
1,0,0,1,0,0,1,
1,0,0,1,0,0,1,
1,0,0,1,0,0,1,
1,1,1,0,0,1,0,
0,1,1,0,0,1,0,
0,0,0,0,0,0,0   };
int add = 0;
int inPin = 0;
int state = HIGH;         // the current state of the output pin
int reading;                  // the current reading from the input pin
int previous = LOW;    // the previous reading from the input pin
long time = 0;               // the last time the output pin was toggled
long safedelay = 50;   // A safety delay to avoid flickering due to multi triggering.
void setup() {                                                                                                   // Program for writing INSTRUCTABLES
  int thisPin;
  for (int thisPin = 0; thisPin < pinCount; thisPin++)  {                                          // use a for loop to initialize each pin as an output. The array elements are numbered from 0 to (pinCount - 1).
    pinMode(thisPin+1, OUTPUT);
   }
  pinMode(inPin, INPUT);                                                                                                          // initializesinitializes pin "0" as an input pin - used for the trigger pin.
}
void loop() {                                                                                                                                //Here starts the loop of the actual sequance
  reading = digitalRead(inPin);
  if (reading == HIGH && previous == LOW && millis() - time > safedelay) {      // Checking if there was a trigger. If yes and teh safety delay from the last trigger has passed, it starts the sequance.
    time = millis();                                                                                                                    // A time counter (miliseconds) - coults the safety delay time.
    for (int add = 0; add < arryMax; add=add+7) {                                                             //The "add" varible points at the relevant row - untill reaching the end of the matrix.
      for (int thisPin = 0; thisPin <= pinCount; thisPin++) {                                  //The varible "this pin"  points at the relevant column
        if (ltr8c1 [thisPin+add] ) {digitalWrite(thisPin+1, HIGH); } else {digitalWrite(thisPin+1,LOW);}  //if the relevant cell of the matix equals to 1, turn on the relevalnt led. Otherwise (if equals 0) - turn off led.
        }
     delay(timer);                                                                                                                       // Keep the current state for a while.
     for (int thisPin = 0; thisPin <= pinCount; thisPin++) {
       digitalWrite(thisPin+1,LOW);
       }
     }
   }
   previous = reading;
}

Step 9: Tips and Notes

Some points to think of...
Before you start to build the project, take a moment to think about the constrains and requirements of it so you'll get the best results.

For example:
- The system is turning so...
... how are you going to spread the components on the board?
... how will you bring the power to the rotating electronics?
... how will you balance the system and make it turn without vibrations?
how will you make the trigger to start the sequence in the same location?
In any case - wishing you good luck and enjoy the instructable :-)

Workshop Contest

Participated in the
Workshop Contest

Make It Glow Contest

Participated in the
Make It Glow Contest