GirlsGoIT - 3D Printed LED Cloud Lamp - Anastasia & Ana Maria

by anastasia_21 in Workshop > 3D Printing

120 Views, 0 Favorites, 0 Comments

GirlsGoIT - 3D Printed LED Cloud Lamp - Anastasia & Ana Maria

20.jpg
21.jpg

As soon as we saw cloud-like lamps online, we decided to give it a go and create a similar model, considering its minimalistic and cute appearance and also its low difficulty factor.

Below are the main steps we followed in creating this cloud lamp.

Also, the lamp was created during GirlsGoIT summer camp.

Enjoy!

Supplies

• Laptop with Fusion 360

• 3D Printer

• 12 colored LEDs (red, green, white)

• Arduino UNO

• Breadboard

• Dupont cables

• Touch button module (capacitative) TTP223

• 220 Ohm resistors (12)

Sketch (designing the Model on Paper)

Captură de ecran 2021-08-12 211707.png

First and foremost, we started sketching our idea on paper, based on some inspiration we saw online. We decided on the sizes of the cloud and on the aproximate placements of the LEDs.

Designing on Fusion 360

Captură de ecran 2021-08-12 212311.png
Captură de ecran 2021-08-12 212320.png
Captură de ecran 2021-08-12 212336.png
12.png

The second step consisted of designing the cloud in Fusion 360 with the following dimensions: 5 cm width, 25 cm length and 18 cm height.

The Wiring Diagram

Captură de ecran 2021-08-12 212628.png

This is a photo of the wiring diagram of the lamp.

Instead of using only white (which seems as the ideal color for a cloud) we went for something a little bit more creative and created a 3-coloured-pattern (red,white,green), with more red on the left, white in the center and green on the right. We also programmed the LEDs to light in different interesting ways, the regime being changed every time we pressed the touch button.

The Code

The entire code is written below, but you can also use the link to the code and the wiring in tinkercad: https://www.tinkercad.com/things/7ej1J8ZwiS1-fina...

#define rosu1 13
#define rosu2 12
#define rosu3 11
#define rosu4 10
#define alb1 9
#define alb2 8
#define alb3 7
#define alb4 6
#define verde1 4
#define verde2 3
#define verde3 2
#define verde4 5
#define buton 0

int stare = 0;

void setup()
{
  pinMode(rosu1, OUTPUT);
  pinMode(rosu2, OUTPUT);
   pinMode(rosu3, OUTPUT);
   pinMode(rosu4, OUTPUT);
   pinMode(alb1, OUTPUT);
   pinMode(alb2, OUTPUT);
   pinMode(alb3, OUTPUT);
   pinMode(alb4, OUTPUT);
   pinMode(verde1, OUTPUT);
   pinMode(verde2, OUTPUT);
  pinMode(verde3, OUTPUT);
  pinMode(verde4, OUTPUT);
  
   pinMode(buton, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop()
{
  if (digitalRead(buton) == LOW) {
  stare++;
    Serial.println(stare);
    delay(1000);
  if (stare == 6) {
     stare = 0;}
  }
  
  if (stare == 1) {
    regim1();
  }
  
  if (stare == 2) {
    regim2();
  } 
  
  if (stare == 3) {
    regim3();
  }
  
  if (stare == 4) {
    regim4();
  }
  
  if (stare == 5) {
    regim5();
  } 
}

void regim1 () {
  digitalWrite (rosu1, HIGH);
  digitalWrite (rosu2, HIGH);
  digitalWrite (rosu3, HIGH);
  digitalWrite (rosu4, HIGH);
  digitalWrite (alb1, HIGH);
  digitalWrite (alb2, HIGH);
  digitalWrite (alb3, HIGH);
  digitalWrite (alb4, HIGH);
  digitalWrite (verde1, HIGH);
  digitalWrite (verde2, HIGH);
  digitalWrite (verde3, HIGH);
  digitalWrite (verde4, HIGH);
}

void regim2 () {
   digitalWrite(rosu1, HIGH);
  digitalWrite(alb1, HIGH);
  digitalWrite(verde1, HIGH);
  delay(1000); 
  digitalWrite(rosu1, LOW);
  digitalWrite(alb1, LOW);
 digitalWrite(verde1, LOW);
  
  digitalWrite(rosu2, HIGH);
  digitalWrite(alb2, HIGH);
  digitalWrite(verde2, HIGH);
  delay(1000); 
  digitalWrite(rosu2, LOW);
  digitalWrite(alb2, LOW);
 digitalWrite(verde2, LOW);
  
  digitalWrite(rosu3, HIGH);
  digitalWrite(alb3, HIGH);
  digitalWrite(verde3, HIGH);
  delay(1000); 
  digitalWrite(rosu3, LOW);
  digitalWrite(alb3, LOW);
 digitalWrite(verde3, LOW);
  
  digitalWrite(rosu4, HIGH);
  digitalWrite(alb4, HIGH);
  digitalWrite(verde4, HIGH);
  delay(1000); 
  digitalWrite(rosu4, LOW);
  digitalWrite(alb4, LOW);
 digitalWrite(verde4, LOW);
  delay (1000);
  }

void regim3 () {
   digitalWrite(rosu1, HIGH);
  digitalWrite(alb1, HIGH);
  digitalWrite(verde1, HIGH);
  delay(350); 
  digitalWrite(rosu1, LOW);
  digitalWrite(alb1, LOW);
 digitalWrite(verde1, LOW);
  
  digitalWrite(rosu2, HIGH);
  digitalWrite(alb2, HIGH);
  digitalWrite(verde2, HIGH);
  delay(350); 
  digitalWrite(rosu2, LOW);
  digitalWrite(alb2, LOW);
 digitalWrite(verde2, LOW);
  
  digitalWrite(rosu3, HIGH);
  digitalWrite(alb3, HIGH);
  digitalWrite(verde3, HIGH);
  delay(350); 
  digitalWrite(rosu3, LOW);
  digitalWrite(alb3, LOW);
 digitalWrite(verde3, LOW);
  
  digitalWrite(rosu4, HIGH);
  digitalWrite(alb4, HIGH);
  digitalWrite(verde4, HIGH);
  delay(350); 
  digitalWrite(rosu4, LOW);
  digitalWrite(alb4, LOW);
 digitalWrite(verde4, LOW);
  delay (1000);
  }

void regim4 () {
  digitalWrite(rosu1, HIGH);
  delay(500);
  digitalWrite(rosu2, HIGH);
   delay(500);
  digitalWrite(rosu3, HIGH);
   delay(500);
  digitalWrite(rosu4, HIGH);
   delay(500);
  digitalWrite(alb1, HIGH);
   delay(500);
  digitalWrite(alb2, HIGH);
   delay(500);
   digitalWrite(alb3, HIGH);
  delay(500);
  digitalWrite(alb4, HIGH);
   delay(500);
  digitalWrite(verde1, HIGH);
   delay(500);
  digitalWrite(verde2, HIGH);
   delay(500);
  digitalWrite(verde3, HIGH);
   delay(500);
  digitalWrite(verde4, HIGH);
   delay(500);
  
  for (int i=0; i<3; i++){
   digitalWrite (rosu1, LOW);
  digitalWrite (rosu2, LOW);
  digitalWrite (rosu3, LOW);
  digitalWrite (rosu4, LOW);
  digitalWrite (alb1, LOW);
  digitalWrite (alb2, LOW);
  digitalWrite (alb3, LOW);
  digitalWrite (alb4, LOW);
  digitalWrite (verde1, LOW);
  digitalWrite (verde2, LOW);
  digitalWrite (verde3, LOW);
  digitalWrite (verde4, LOW);
    
    delay(700);
    
    digitalWrite (rosu1, HIGH);
  digitalWrite (rosu2, HIGH);
  digitalWrite (rosu3, HIGH);
  digitalWrite (rosu4, HIGH);
  digitalWrite (alb1, HIGH);
  digitalWrite (alb2, HIGH);
  digitalWrite (alb3, HIGH);
  digitalWrite (alb4, HIGH);
  digitalWrite (verde1, HIGH);
  digitalWrite (verde2, HIGH);
  digitalWrite (verde3, HIGH);
  digitalWrite (verde4, HIGH);
    delay(200);
  
  digitalWrite (rosu1, LOW);
  digitalWrite (rosu2, LOW);
  digitalWrite (rosu3, LOW);
  digitalWrite (rosu4, LOW);
  digitalWrite (alb1, LOW);
  digitalWrite (alb2, LOW);
  digitalWrite (alb3, LOW);
  digitalWrite (alb4, LOW);
  digitalWrite (verde1, LOW);
  digitalWrite (verde2, LOW);
  digitalWrite (verde3, LOW);
  digitalWrite (verde4, LOW);
    delay(200);
     digitalWrite (rosu1, HIGH);
  digitalWrite (rosu2, HIGH);
  digitalWrite (rosu3, HIGH);
  digitalWrite (rosu4, HIGH);
  digitalWrite (alb1, HIGH);
  digitalWrite (alb2, HIGH);
  digitalWrite (alb3, HIGH);
  digitalWrite (alb4, HIGH);
  digitalWrite (verde1, HIGH);
  digitalWrite (verde2, HIGH);
  digitalWrite (verde3, HIGH);
  digitalWrite (verde4, HIGH);;
  delay(700);
  }
  
digitalWrite (rosu1, LOW);
  digitalWrite (rosu2, LOW);
  digitalWrite (rosu3, LOW);
  digitalWrite (rosu4, LOW);
  digitalWrite (alb1, LOW);
  digitalWrite (alb2, LOW);
  digitalWrite (alb3, LOW);
  digitalWrite (alb4, LOW);
  digitalWrite (verde1, LOW);
  digitalWrite (verde2, LOW);
  digitalWrite (verde3, LOW);
  digitalWrite (verde4, LOW);
}

void regim5 (){
  digitalWrite(rosu1, HIGH);
  digitalWrite(verde4, HIGH);
  delay(500);
  digitalWrite(rosu2, HIGH);
  digitalWrite(verde3, HIGH);
  delay(500);
  digitalWrite(rosu3, HIGH);
  digitalWrite(verde2, HIGH);
  delay(500);
  digitalWrite(rosu4, HIGH);
  digitalWrite(verde1, HIGH);
  delay(500);
  digitalWrite(alb1, HIGH);
  digitalWrite(alb4, HIGH);
  delay(500);
  digitalWrite(alb2, HIGH);
  digitalWrite(alb3, HIGH);
  delay(500);
  
    
  digitalWrite(alb2, LOW);
  digitalWrite(alb3, LOW);
  delay(500);
  digitalWrite(alb1, LOW);
  digitalWrite(alb4, LOW);
  delay(500);
  digitalWrite(rosu4, LOW);
  digitalWrite(verde1, LOW);
  delay(500);
  digitalWrite(rosu3, LOW);
  digitalWrite(verde2, LOW);
  delay(500);
  digitalWrite(rosu2, LOW);
  digitalWrite(verde3, LOW);
  delay(500);
  digitalWrite(rosu1, LOW);
  digitalWrite(verde4, LOW);
  delay(1000);
} <br>