Friday, December 12, 2014

THE FINAL POST!


Finally, after weeks worth of excitement and fun we had making working this project, it has come to an end. Unfortunately the project didn't end up as we wanted it to be.

The Board and the LEDs (Assembly #2) which were suppose to go on top of the laser - cutted plate and 3D printed motor cylinder (Assembly #1), didn't end up as a stable assembly, the board was just too heavy for the cardboard plate which was originally supposed to be made out of 1/8inch acrylic. Due to the heavy weight and a small motor, when the board with the LEDs were placed on top of the plate, motor didn't move.

This was a partially successful project, we got two parts of the project working correctly but the assembly couldn't be complete because the entire object wasn't in a "static equilibrium."

Miscellaneous: -
The box was unable to be 3D printed, because of its design, and after we learned that the setup isn't in a static equilibrium we decided not to make the box.

To make this project working, we would like to do couple things : -

1) Make the motor cylinder, which handles the motor, better adjusted for the wiring thus it isn't bent (as seen in pictures before).
2) Use a better motor which is able to move the entire setup.
3) Use better material than cardboard for plate, which is more rigid.

Special thanks to Professor Sullivan and Jonathan helping us getting parts fabricated in time.

If you have any questions or suggestions for improvements, contact us at teamfrequency1@gmail.com 

Thank you

Team Frequency 


Assembly #2 Sparkfun RedBoard Setup

View of Circuit Setup for Assembly #2


This is the setup that is going to be used to light up the LEDs, the code is already posted. 

This following video shows how the LEDs are blinking.












The final, completed, tested Code!

/* Team Frequency Design Lab 1 Final POV Display final Code 12/12/2014 This code is designed to illuminate the LEDs on an arduino breadboard mounted on a rotating disc spinning at a known RPM. Ideally, the only variable that needs to be modified is the value of period, which represents the period of rotation of the disc. The delay values may also need to be modified slightly, or alternatively, the n value and corrosponding length of the lines of text in the message array may be increased to provide a longer delay if the message is repeating itself or illegibly compact. Requires a separate arduino running the motor attachment. */ //-----------------------Variable Declaration---------------------------------------------------- long period = 400; int ledPins[] = {13, 12, 11, 10, 9, 8, 7}; int n = 128; char *message[7] = { "11111111110001111111111000011111111100011111111110000000000000000000000000000000000000000000000000000000000000000000000000000000", "00001100000001100000000000111000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000", "00001100000001111111000000011111111000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000", "00001100000001100000000000000000011100000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000", "00001100000001111111111000111111111000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }; /* //This is an attempt to create the team name on the display. Will be completed if the display proves functional. char *messageB[6] = { "1111111111000111111111100000011110000001110000001110000000000000000111111111100011111110000001111111111000011111111000011000000001100011111111110001110000011000000111111100011100001110000000000", "000011000000011000000000000011001100000111110011111000000000000000011000000000001100001100 "000011000000011111110000000110000110000110011110011000000000000000011111110000001100011000 "000011000000011000000000001111111111000110001100011000000000000000011000000000001111110000 "000011000000011111111110001100000011000110000000011000000000000000011000000000001100011000 */ //--------------------------------Setup Function--------------------------------------- void setup() { for (int led = 0; led < 7; led ++) { pinMode(ledPins[led], OUTPUT); } } //--------------------------------Main Loop-------------------------------------------- void loop() { for (int col = 0; col < n; col++) // This code divides the char array message into columns using nested for-loops. { for (int row = 0; row < 7; row++) // The LEDs in each column light for 1/1000th of the period, shown by the delayMicrosecond(period) function, before turning off. { int value = (int)message[row][col]-'0'; if(value == 1){ setLed(row); } } delayMicroseconds(period); // The delay values may need to be adjusted if the timing of the system is too far off. Microseconds may be too short to effectively work. allOff(); delayMicroseconds(period / 16); } /*for( int x=0; x<7; x++){ setLed(x); delay(1000); } allOff(); delay(1000);*/ } //-----------------------------Additional Functions----------------------------------- void setLed(int led) { digitalWrite(ledPins[led], HIGH); // Turns on the LED chosen by the main loop. } void allOff() { for (int led = 0; led < 7; led ++) // Resets all LEDs to the LOW position after the delay. { digitalWrite(ledPins[led], LOW); } }

Thursday, December 11, 2014

Pretty close to the final code for the LED display!

This is an adaptation of the code that was posted on the blog earlier, that has been made to work for our setup. it should work for us, but it hasn't been tested yet and will need some minor tweaks.

/*
Team Frequency
Design Lab 1 Final
POV Display final Code
12/12/2014

This code is designed to illuminate the LEDs on an arduino breadboard mounted on a rotating disc spinning at a known RPM. Ideally, the
only variable that needs to be modified is the value of period, which represents the period of rotation of the disc. The delay values may
also need to be modified slightly, or alternatively, the n value and corrosponding length of the lines of text in the message array may be
increased to provide a longer delay if the message is repeating itself or illegibly compact. Requires a separate arduino running the motor
attachment.

*/

//-----------------------Variable Declaration----------------------------------------------------
long period = 400;
int ledPins[] = {12, 11, 10, 9, 8, 7};
int n = 128;
char *message[6] = {
"11111111110001111111111000011111111100011111111110000000000000000000000000000000000000000000000000000000000000000000000000000000",
"00001100000001100000000000111000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"00001100000001111111000000011111111000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"00001100000001100000000000000000011100000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"00001100000001111111111000111111111000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
};


/*
//This is an attempt to create the team name on the display. Will be completed if the display proves functional.

char *messageB[6] = {
"1111111111000111111111100000011110000001110000001110000000000000000111111111100011111110000001111111111000011111111000011000000001100011111111110001110000011000000111111100011100001110000000000",
"000011000000011000000000000011001100000111110011111000000000000000011000000000001100001100
"000011000000011111110000000110000110000110011110011000000000000000011111110000001100011000
"000011000000011000000000001111111111000110001100011000000000000000011000000000001111110000
"000011000000011111111110001100000011000110000000011000000000000000011000000000001100011000
*/

//--------------------------------Setup Function---------------------------------------
void setup()
{
 for (int led = 0; led < 6; led ++)
 {
   pinMode(ledPins[led], OUTPUT);
 }
}

//--------------------------------Main Loop--------------------------------------------

void loop()
{
  for (int col = 0; col < n; col++)                // This code divides the char array message into columns using nested for-loops.
  {
    for (int row = 0; row < 6; row++)              // The LEDs in each column light for 1/1000th of the period, shown by the delayMicrosecond(period) function, before turning off.
    {
      if(message[5-row][col] != 0){
        setLed(row);
      }
    }
    delayMicroseconds(period);                     // The delay values may need to be adjusted if the timing of the system is too far off. Microseconds may be too short to effectively work.
    allOff();
    delayMicroseconds(period / 16);
  }
}

//-----------------------------Additional Functions-----------------------------------

void setLed(int led)
{
 digitalWrite(ledPins[led], HIGH);                  // Turns on the LED chosen by the main loop.

}

void allOff()
{
   for (int led = 0; led < 6; led ++)                // Resets all LEDs to the LOW position after the delay.
 {
    digitalWrite(ledPins[led], LOW);
 }
}

Circuit Setup for Motor

Circuit Diagram



Key for the Circuit Pictures

This pictures from the SIK guide that came with the spark fun inventors kit, helped setup the circuit necessary for the motor to operate.

Priyank



Video! @60fps


This shows how the bottom section rotates, as you can also see it rotates on an angle which is a small problem and can be fixed by making the next part considering the fact that extra space needed for the motor. 

Priyank


Bottom Setup Complete



Priyank

Power Equipment



As I figured that I needed some bigger holes in the bottom of the cylinder, I had to take some help from the Powerful Craftsman 12V drill.

Priyank

Code #2 for DC Motor


int motorPin = 9;
void setup() {
 pinMode(motorPin, OUTPUT);
}
void loop() {
 digitalWrite(motorPin, HIGH);
 delay(1000);
 digitalWrite(motorPin, LOW);
 delay(1000);



This code will run and stop the motor after 1 second.


Thanks to http://www.dummies.com/how-to/content/how-to-spin-a-dc-motor-with-the-arduino.html

Priyank

Setup and Code for the DC Motor

 http://www.dummies.com/how-to/content/how-to-spin-a-dc-motor-with-the-arduino.html

This link is going to be how the motor circuit is going to be setup, and the given code is going to be used to get it up and running.

Thanks to http://www.dummies.com/

Priyank

2nd part was capture, we are on a roll

Unfortunately this plate is made out of 2 pieces of cardboard instead of 1/8inch acrylic since professor ran out of materials.




The plate is here! And it's sitting on top of the motor cylinder as of now.


Priyank


Part 1 was captured today

Finally the motor cylinder part was processed and obtained. 

Box can't be 3D printed so a cardboard one is going to be made

The plate is also be made out of cardboard (2sheets for proper thickness)

Priyank

Friday, December 5, 2014

Update on 3D printed parts

I have heard that the 3D printer has been broken and no more parts can be produced, however I will wait for the official word from Jonathan(TA) about that, 

If that's the case,

The box will have to be made out of cardboard with the help of human hands, (Yes no machines)

A replacement for the cylinder is not yet found. 

The plate, hopefully, still can be obtained since that is going to be laser- cut. However if that cant be accomplished, the project will take a stall since the plate is the important piece of the project. 

Priyank

Code #1

Possible code: -

long period = 400;

int ledPins[6][3] = {{4, 3, 2}, {7, 6, 5}, {10, 9, 8}, {13, 12, 11}, {16, 15, 14}, {19, 18, 17}};

int n = 128;
char *message[6] = {
"44000440011111110022000005500000066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"44000440011000000022000005500000660006600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"44444440011111000022000005500000660006600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"44000440011000000022000005500000660006600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"44000440011111110022222005555500066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
};

void setup()
{
 for (int led = 0; led < 6; led ++)
 {
   for (int color = 0; color < 3; color++)
   {
     pinMode(ledPins[led][color], OUTPUT);
   }
 }
}

void loop()
{
  for (int col = 0; col < n; col++)
  {
    for (int row = 0; row < 6; row++)
    {
      int color = (int)(message[5-row][col] - '0');
      setLed(row, color); 
    }
    delayMicroseconds(period);
    allOff();
    delayMicroseconds(period / 16);
  }
}

void setLed(int led, int color)
{
 digitalWrite(ledPins[led][0], !(color & 1));
 digitalWrite(ledPins[led][1], !(color & 2));
 digitalWrite(ledPins[led][2], !(color & 4)); 
}

void allOff()
{
   for (int led = 0; led < 6; led ++)
 {
   for (int color = 0; color < 3; color++)
   {
     digitalWrite(ledPins[led][color], HIGH);
   }
 }
}

Source: -
http://www.instructables.com/files/orig/FIB/8DN6/HHS9HC8T/FIB8DN6HHS9HC8T.txt

Priyank

Tuesday, December 2, 2014

Motor Info

The entire setup as shown before, is going to rotate with the help of a motor.

We are going to be using a sparkfun motor: https://www.sparkfun.com/products/11696

Here is some additional data regarding the motor: -

New Updated Parts

New parts were designed and are sent to be made/ processed.

Here are few pictures of the major components in the parts.



Here are the updated links to parts: - 
(Parts are subject to change if they cannot be processed.)
Priyank

3D Printing Problem

The box was sent to 3d print but it was pointed out that its too big to be 3d printed. So currently we are working on redesigning all the parts.

Priyank