3D&Arduino Moon Jellyfish

by Sabina Ceresco in Circuits > Arduino

217 Views, 0 Favorites, 0 Comments

3D&Arduino Moon Jellyfish

2021-08-14_09-15-35.png

This prototype was made in the program GirlsGoIT, implemented by TEKEDU, sponsored by Lichtenstein Development Service with the support of LED Foundation Moldova, Crunchyroll Moldova, SlovakAid, FRIDA | The Young Feminist Fund, Atelier 99.

Arduino-Ceresco Sabina

3D-Haret Camelia

This is the first project for both of us in Arduino and 3D modelling, therefore we are just beginners and our original idea was to make a lamp in the form of an animal who emanates natural light so the options were a firefly or a jellyfish and we went with the second idea. We chose a jellyfish to embody the model of our decorative lamp because it's a beautiful little creature that naturally glows

Supplies

1. Computer with Fusion 360

2. 3D printer

3. 4 RGB leds

4. 1 Arduino Uno

5. A breadboard (cut in half)

6. A pushbutton

7. 4 200 Ω Resistors

8. Cables

The Sketch

MoonJellyfish.png

So, as you can see the sketch that was made first has more nature-like forms and it could be quite inconvinient to recreate it in Fusion so we modified it later for it to fit the electronics but still keep its jelly fish form.

The Process

2021-08-14_14-43-15.png
2021-08-14_14-43-39.png
2021-08-14_14-43-58.png
2021-08-14_14-44-15.png
2021-08-14_14-50-19.png

The lamp itself is made out of 3 main bodies. The bottom one has a suport system represented by 4 constructions in the shape of "tentacles" as well as the inferior part of the "bell" that holds the Arduino and Breadbord. The middle body has the LEDs integrated and connects with the other two through box like features. The top body serves as a cover, while it's transparent quality allows the shine from the LEDs to get through and fulfill it's decorative lamp porpuse.

NOTE: It is important to know the exact measurements for the components so that you dont encounter any errors in the building after the model has been printed, so always do your research.

3D Model Render

2021-08-14_09-15-35.png
2021-08-14_09-25-34.png
2021-08-14_09-25-02.png
2021-08-14_09-26-00.png

Arduino-Scheme

2021-08-11_16-59-13.png

Simulator: Tinkercad

I used 4 RGB leds for this and each led goes in the 4 circles at the top of the jelly-fish model. The scheme is stored in the wider space above the tentacles. Each led is connected to a 200Ω resistor, this would be the average resistence for such leds, this step is very important so make sure you got your resistors on, otherwise you might burn the leds. Another important step is connecting the RGB leds only to the analog pins (the ones who have ~ near them), of course this does not apply if you are using normal colored leds. I used a normal push button that will control all the leds, the idea is for the light functions to change everytime the button is pushed (basically like some christmas lights do) and it succeded, code on the next step.

NOTE: The color of the cables I used is just for representation and each color is connected to the respective colored led, for reference.

Coding

NOTE: Rosu=red, Albastru=Blue, Verde=Green. The numbers near the names (ledRosu13) are the leds, in this case it's led 1 and 3

#define ledRosu13 11<br>#define ledAlbastru13 10
#define ledVerde13 9
#define ledRosu24 6
#define ledAlbastru24 5
#define ledVerde24 3
#define timp 10
#define timp1 150
#define B1 2

int state = 0;
<br>
 void setup()
{<br> pinMode(ledRosu13,OUTPUT);
  pinMode(ledAlbastru13,OUTPUT);
  pinMode(ledVerde13,OUTPUT);
  pinMode(ledRosu24,OUTPUT);
  pinMode(ledAlbastru24,OUTPUT);
  pinMode(ledVerde24,OUTPUT);
  pinMode(B1,INPUT_PULLUP);
  Serial.begin(9600);
}
void loop()
{
if(digitalRead(B1) == LOW){
    state++;
    Serial.println(state);
    delay(200);
    if(state == 10){
      state = 0;
    }
}
  if(state==1){
    ONB();
  }
  if(state==2){
    ONW();
  }
  if(state==3){
    OFF();
  }
  if(state==4){
    ONM();
  }
  if(state==5){
    MB();
  }
  if(state==6){
    BLINK();
  }
  if(state==7){
    BF();
  }
  if(state==8){
    OFF();
  }
   if(state==9){
    DF();
  }
}
void ONB(){
  digitalWrite(ledAlbastru13,HIGH);
  digitalWrite(ledAlbastru24,HIGH);
}
void ONW(){
  digitalWrite(ledRosu13,     HIGH);
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledVerde13,    HIGH);
  digitalWrite(ledRosu24,     HIGH);
  digitalWrite(ledAlbastru24, HIGH);
  digitalWrite(ledVerde24,    HIGH);
}
void ONM(){
  digitalWrite(ledRosu13,     HIGH);
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledRosu24,     HIGH);
  digitalWrite(ledAlbastru24, HIGH);
}
  
void DF(){
  for(int i = 0; i<255; i++){
    analogWrite(ledVerde13, i);
    delay(timp);
    }
  for(int i = 0; i<255; i++){
    analogWrite(ledVerde24, i);
    delay(timp);
    }
   for(int i = 0; i<255; i++){
    analogWrite(ledAlbastru13, i);
     delay(timp);
    }
  for(int i = 0; i<255; i++){
    analogWrite(ledAlbastru24, i);
    delay(timp);
  }
  for(int i = 0; i<255; i++){
    analogWrite(ledRosu13, i);
    delay(timp);
   }
  for(int i = 0; i<255; i++){
    analogWrite(ledRosu24, i);
    delay(timp);
  }
    for(int i = 255; i<0; i--){
    analogWrite(ledVerde13, i);
    delay(timp);
    }
  for(int i = 255; i<0; i--){
    analogWrite(ledVerde24, i);
    delay(timp);
    }
   for(int i = 255; i<0; i--){
    analogWrite(ledAlbastru13, i);
    delay(timp);
    }
  for(int i = 255; i<0; i--){
    analogWrite(ledAlbastru24, i);
    delay(timp);
    }
   for(int i = 255; i<0; i--){
    analogWrite(ledRosu13, i);
    delay(timp);
    }
  for(int i = 255; i<0; i--){
    analogWrite(ledRosu24, i);
    delay(timp);
    }
}
void BF(){
  for(int i = 0; i<255; i++){
    analogWrite(ledAlbastru13, i);
     delay(100);
    }
  for(int i = 0; i<255; i++){
    analogWrite(ledAlbastru24, i);
    delay(100);
  }
for(int i = 255; i<0; i--){
    analogWrite(ledAlbastru13, i);
    delay(100);
    }
  for(int i = 255; i<0; i--){
    analogWrite(ledAlbastru24, i);
    delay(100);
    }
  delay(100);
}
void MB(){
  digitalWrite(ledRosu13,     HIGH);
  digitalWrite(ledRosu24,     HIGH);
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledAlbastru24, HIGH);
  delay(5000);
  digitalWrite(ledRosu13,     LOW);
  digitalWrite(ledRosu24,     LOW);
  digitalWrite(ledAlbastru13, LOW);
  digitalWrite(ledAlbastru24, LOW);
  delay(1000);
  digitalWrite(ledVerde13,    HIGH);
  digitalWrite(ledVerde24,    HIGH);
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledAlbastru24, HIGH);
  delay(5000);
  digitalWrite(ledVerde13,    LOW);
  digitalWrite(ledVerde24,    LOW);
  digitalWrite(ledAlbastru13, LOW);
  digitalWrite(ledAlbastru24, LOW);
  delay(1000);
}
  
void BLINK(){
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledAlbastru24, HIGH);
  delay(timp1);
  digitalWrite(ledAlbastru13, LOW);
  digitalWrite(ledAlbastru24, LOW);
  delay(timp1);
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledAlbastru24, HIGH);
  digitalWrite(ledVerde13,    HIGH);
  digitalWrite(ledVerde24,    HIGH);
  delay(timp1);
  digitalWrite(ledAlbastru13, LOW);
  digitalWrite(ledAlbastru24, LOW);
  digitalWrite(ledVerde13,    LOW);
  digitalWrite(ledVerde24,    LOW);
  delay(timp1);  
  digitalWrite(ledVerde13,    HIGH);
  digitalWrite(ledVerde24,    HIGH);
  delay(timp1);
  digitalWrite(ledVerde13,    LOW);
  digitalWrite(ledVerde24,    LOW);
  delay(timp1);
  digitalWrite(ledVerde13,    HIGH);
  digitalWrite(ledVerde24,    HIGH);
  digitalWrite(ledRosu13,     HIGH);
  digitalWrite(ledRosu24,     HIGH);
  delay(timp1);
  digitalWrite(ledVerde13,    LOW);
  digitalWrite(ledVerde24,    LOW);
  digitalWrite(ledRosu13,     LOW);
  digitalWrite(ledRosu24,     LOW);
  delay(timp1);
  digitalWrite(ledRosu13,     HIGH);
  digitalWrite(ledRosu24,     HIGH);
  delay(timp1);
  digitalWrite(ledRosu13,     LOW);
  digitalWrite(ledRosu24,     LOW);
  delay(timp1);
  digitalWrite(ledRosu13,     HIGH);
  digitalWrite(ledRosu24,     HIGH);
  digitalWrite(ledAlbastru13, HIGH);
  digitalWrite(ledAlbastru24, HIGH);
  delay(timp1);
  digitalWrite(ledRosu13,     LOW);
  digitalWrite(ledRosu24,     LOW);
  digitalWrite(ledAlbastru13, LOW);
  digitalWrite(ledAlbastru24, LOW);
  delay(timp1);
}
void OFF(){
  digitalWrite(ledRosu13,     LOW);
  digitalWrite(ledAlbastru13, LOW);
  digitalWrite(ledVerde13,    LOW);
  digitalWrite(ledRosu24,     LOW);
  digitalWrite(ledAlbastru24, LOW);
  digitalWrite(ledVerde24,    LOW);
}

Now a little bit about the functions:

'ON BLUE'(ONB)-all the leds turn blue simultaniously and stay on until the next function;

'ON WHITE'(ONW)-same as the previous one but in white;

'ON MAGENTA'(ONM)-same as the previous one but magenta;

'MAGENTA BLUE'(MB)-the leds turn on in a magenta color, stay on 5 seconds, turn off for 1 second, then turn on again in a cyan/light blue color and the process repeats;

'BLINK'-all the colors turn on and off very fast one after another (blue->cyan->green->yellow->red->magenta);

'BLUE FADE'(BF)-self explanatory, the leds turn on blue slowly and also slowly turn off and so on;

'DIFFERENT COLORS'(DF)-also fade but with each color, the colors slowly fall into one another;

'OFF'-all the leds turn off.

Video Animation

Outroduction

We had a lot of fun working on this project and hope that someone can be inspired from it. Thank you to GGIT for guiding us troughout the process, we learned a lot :)

And if someone wants to try and re-create this project, you can always add or take out stuff, nothing is set in stone, get creative!