Butterfly Effect

While preparing for the graduation work, we watched various websites and videos while meeting with each other about what kind of work to make, and we saw a model butterfly made by a developer like a butterfly and we think.

" It is a model butterfly, but it will be interesting if butterfly wings like a real butterfly by communicating with human! "


So we started "butterfly effect". It is a work expressing the fun that comes out of the flying butterfly and human sympathy. It is a project that conveys the feeling when I meet the actual butterfly from the many butterflies coming back and coming down from the reflection of the human body through the interaction.

( 졸업작품을 준비하면서, 어떤 작품을 만들어야 할지 회의를 하면서 각종 웹사이트와 영상을 찾아보는 중에, 한 개발자가 만든 모형나비가 실제 나비 처럼 날고있는 영상을 보면서 저희는 생각했습니다. " 모형 나비지만, 실제 나비처럼 날면서 사람과 교감하면 재밌지 않을까 ? " 그래서 저희는 " butterfly effect " 를 시작하게 되었습니다. 이 프로젝트는 사람과 나비의 교감을 통한 재미를 주고자 하는 목적이며, 인간의 접근에 반사작용하여 날아오르는 여러 마리의 나비에게서 실제 나비를 마주쳤을 때와 같은 느낌을 인터랙션을 통해 전달하고자 하였습니다.

Step 1: What You Will Need

The project is made up of three parts, each of which requires material according to each part.

( 이 프로젝트는 3가지의 부분으로 이루어져 있고, 각 부분에 따른 재료들이 필요합니다. )

First, the body of the butterfly, the second, the support for the butterfly's wings, and the materials needed to construct the electronic circuit for driving are required.

( 첫번째로 나비의 몸통, 두번째로 날갯짓을 위한 구조, 그리고 구동을 위한 전자 회로에 쓰이는 재료들이 필요합니다. )

- Based on one butterfly -

( 한마리 기준 )

1. Body of the butterfly :

  • Left, right paper wings of butterfly ( The width of one wing 4~6 cm )
  • 2 piece of straw ( The diameter of the hole 0.5 cm )
  • Acrylic piece ( 2 T )

( 나비의 몸통 / 1. 종이로 된 나비의 양쪽 날개 ( 한쪽 날개의 가로폭이 4~6 cm ), 2. 빨대 조각 2개 ( 구멍의 지름이 0.5 cm ) , 3. 아크릴 조각 ( 2 T )

2. The support for the butterfly's wings :

  • Transparent elastic yarn ( diameter 0.8 mm )
  • Fishing line
  • Acrylic piece ( 2 T )

( 나비의 날갯짓을 위한 구조 / 1. 투명하고 탄력있는 실 ( 지름 0.8 mm ), 2. 낚시줄, 3. 아크릴 조각 ( 2 T )

3. Electronic circuit :

  • Arduino nano
  • Infrared sensor ( GP2Y0A21YK )
  • Motor driver ( L298N )
  • DC geard motor ( MEC - 16629 )x2
  • Jumper cables
  • Long radio cables ( red / black )
  • SMPS 5V


( 전자 회로 / 1. 아두이노 나노, 2. 적외선 센서, 3. 모터드라이버, 4. DC 기어드 모터 2개, 5. 점퍼 케이블, 6. 긴 라디오 선 ( 빨강 / 검정 ), 7. SMPS 5V

Step 2: Making Body

First cut two straws with a length of 1.5 cm. Then attach the tip of the wing to the straw using glue.

( It should be attached to the end of the wing, not the middle part.)

( 먼저, 빨대를 1.5 cm의 길이로 두조각 잘라낸 후, 각 날개의 끝쪽을 접착제로 붙여줍니다. )

( 반드시 날개의 중간부분이 아닌, 끝쪽 부분에 붙여주어야 합니다. )

And cut it with a knife like a picture on a glued straw.

If you connect the straw without cutting it with the knife, there is a danger that the piece of acrylic will be broken and the straw may be crushed in the process.

( 그리고 사진과 같이 접착된 빨대에 칼집을 내어줍니다. 만약 칼집을 내지 않고 그대로 빨대를 연결하면 아크릴 조각이 부서질 위험이 있고, 빨대 또한 찌그러질 수 있습니다.)

If bonded part is dry, attach the straw to the acrylic piece as shown in the picture.

( 접착된 부분이 마르면, 아크릴조각에 빨대를 사진과 같이 연결해줍니다. )



Step 3: Structural Design

  • Fixing device for rolling yarn to motor

The movement of the butterfly is the principle that the motor fixed up and down works by winding and loosening the thread. A device that keeps the yarn from going out or kinking is fixed to the motor to make it stable.

First, make a fixing device for bonded acrylic pieces like the picture.

When the bonded area dries, wind the fishing line ( 1 m ) around the device. Before winding the fishing line, attach the tip to the device and wind it.

( Wind the fishing lines in opposite directions on the upper and lower devices.)

( 모터에 실 고정장치 달아주기 - 나비의 움직임은 모터에 감겨있는 실이 잡고 풀어주면서 생기는 원리입니다. 모터에 고정된 장치는 실이 밖으로 엇나가거나 꼬이지 않게 해주어 안정적인 구동을 하게 도와줍니다.

먼저, 아크릴 조각들을 사진과 같이 서로 접착하여 고정 장치를 만들어줍니다. 그리고 접착된 부분이 마르면 약 1m길이의 낚시줄을 장치에 감아줍니다. 감아주기 전에, 실이 빠지지 않게 먼저 끝부분을 붙여준 후 감아줍니다. ( 단 위아래 장치에는 서로 반대방향으로 감아줍니다. ))

  • Connecting threads for wings

When the upper motor winds the fishing line, the yarn connected to the wings helps the wings to move up and down while repeating contraction and relaxation.

Cut the elastic yarn into three pieces with a length of 5cm and attach it to the middle of the acrylic piece and the middle of both wings like the picture.

And the upper end of the yarn connect with one using glue.

( 날갯짓을 위한 실 연결 - 상단의 모터가 낚시줄을 감았을때, 날개에 연결된 실이 수축과 이완을 반복하면서 날개가 위아래로 움직이게 도와줍니다.

탄력있는 실을 5cm의 길이로 3조각 잘라 낸 후 각 끝부분을 몸통 아크릴 조각의 가운데, 양쪽 날개의 가운데에 접착해줍니다. 그리고 연결된 실의 위쪽 끝부분은 접착제를 이용하여 하나로 모아줍니다. )

  • Connecting Butterfly and Fishing Line

The two holes in the acrylic piece of butterfly body, the two pass through the thread to secure the butterfly to keep it steady. The thread wound on the upper side connect to the thread gathered on one side, and the thread wound on the lower side bond to the underside of the butterfly body.

Then, tie the fishing line tightly to the hole at the end of the upper motor, pass through the hole of the butterfly body, and tie it to the hole at the bottom of the motor.

( 나비와 낚시줄 연결 - 나비 몸통의 아크릴 조각에 뚫린 2개의 구멍은, 나비가 움직이면서 흔들리지 않게 고정해주는 실이 통과 합니다. 먼저 위쪽모터에 감긴 실의 끝부분은 나비쪽에 하나로 모아진 실 부분에 연결해주고, 아래쪽 모터에 감긴 실은 나비 몸통 밑부분에 붙여줍니다.

그리고, 위쪽모터 양 끝의 구멍에 낚시줄을 단단히 묶고, 나비 몸통의 구멍을 통과하여 그대로 아래쪽 모터의 양 끝부분 구멍에 단단히 묶어줍니다. )

Step 4: Electric Circuit

We used the Arduino Nano board. Make sure that the 6 terminals of the L298N motor driver are connected properly to the terminal board, and that the red and black wires of the motor are connected properly.

Step 5: Coding

The overall structure of the code is

* Motor connection pin and speed control pin declaration / Infrared sensor default distance value setting

* setup

- Infrared sensor output and mapping

- Serial monitor distance value output setting

- Stop when the sensor does not recognize the object / As the sensor recognizes the object, up and down.

* Motor 1 forward, reverse / Motor 2 forward, reverse / Motor stop

* Up & down


int MOT1A = 2;

int MOT1B = 3; int SpeedPin_A = 6; // Declares the pin numbers of both A and B of motor 1 and the PWM signal pin number for speed control.

int MOT2A = 4; int MOT2B = 5; int SpeedPin_B = 7; // Declares the pin numbers of both A and B of motor 2 and the PWM signal pin number for speed control.

int distance = 0; // Sets the default value of the infrared sensor distance to zero.

void setup() {

Serial.begin(9600); //Allows you to output to the serial monitor to check the distance value.

pinMode(MOT1A, OUTPUT); pinMode(MOT1B, OUTPUT); pinMode(MOT2A, OUTPUT); pinMode(MOT2B, OUTPUT); pinMode(SpeedPin_A, OUTPUT); pinMode(SpeedPin_B, OUTPUT); // It outputs two pins of upper and lower motor and speed control pin.

}

void loop() { int volt = map(analogRead(A0), 0, 1023, 0, 5000); distance = (27.61 / (volt - 0.1696)) * 1000; // It outputs the pin of the infrared sensor and maps it

Serial.print(distance); Serial.println(" cm"); Serial.println(" "); // Set the unit distance in cm on the serial monitor.

if (distance > 20) { // When the sensor does not recognize objects within 20cm

motor_stop(); // The motor is stopped.

delay(100); } else { // When the sensor recognizes objects within 20 cm

motor_up(); // After the butterfly goes up,

motor_down(); // Butterfly goes down. // Adding more up and down movements can make the butterfly go longer.

} }

// butterfly down
void motor_down() { motorA_Reverse(); // After the lower motor rotates and winds the thread

delay(350); motor_stop(); // After the motor stops for a while

delay(200); motorB_Reverse(); // The motor will drop the thread again and the butterfly will come down.

// One set of the above is a set that constitutes a wing.

// You can set the elevation down by repeating the above set

motorA_Reverse(); delay(350); motor_stop(); // butterfly stop delay(200); motorB_Reverse(); delay(100); motorA_Reverse(); delay(350); motor_stop(); delay(200); motorB_Reverse(); delay(100); motorA_Reverse(); delay(350); motor_stop(); delay(200); motorB_Reverse(); delay(100); motorA_Reverse(); delay(350); motor_stop(); delay(200); motorB_Reverse(); delay(100); motorA_Reverse(); delay(350); motor_stop(); delay(200); motorB_Reverse(); delay(100); motorA_Reverse(); delay(350); motor_stop(); delay(200); motorB_Reverse(); delay(100);

}

// butterfly up

void motor_up() { motorA_Rotation(); // When the upper motor rotates and winds the yarn, the wing will rise.

delay(100); motor_stop(); // After the motor stops for a while

delay(200); motorB_Rotation(); // The lower motor releases the yarn and the butterfly moves up.

delay(150);

motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); motorB_Rotation(); delay(150); motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); motorB_Rotation(); delay(150); motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); motorB_Rotation(); delay(150); motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); motorB_Rotation(); delay(150); motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); motorB_Rotation(); delay(150); motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); motorB_Rotation(); delay(150); motorA_Rotation(); delay(100); motor_stop(); // 모터정지 delay(200); }

// motor stop
// If both pins of the motor are set to LOW, the motor will stop.

void motor_stop() { digitalWrite(MOT1A, LOW); digitalWrite(MOT1B, LOW); analogWrite(SpeedPin_A, 130); digitalWrite(MOT2A, LOW); digitalWrite(MOT2B, LOW); analogWrite(SpeedPin_B, 130); }

// motor move // Motor forward rotation Reverse rotation speed setting

void motorB_Reverse() // motor B reverse { digitalWrite(MOT1A, LOW); digitalWrite(MOT1B, LOW); analogWrite(SpeedPin_A, 128); digitalWrite(MOT2A, LOW); digitalWrite(MOT2B, HIGH); // Only the direction of return to reverse rotation is set to HIGH.

analogWrite(SpeedPin_B, 128); // The speed can be set from 128 to 255.

}

void motorA_Reverse() // motor A reverse { digitalWrite(MOT1A, LOW); digitalWrite(MOT1B, HIGH); // Only the direction of return to reverse rotation is set to HIGH.

analogWrite(SpeedPin_A, 128); // The speed can be set from 128 to 255.

digitalWrite(MOT2A, LOW); digitalWrite(MOT2B, LOW); analogWrite(SpeedPin_B, 128); }

void motorB_Rotation() // motor B forward { digitalWrite(MOT1A, LOW); digitalWrite(MOT1B, LOW); analogWrite(SpeedPin_A, 128); digitalWrite(MOT2A, HIGH); // Only the direction of return to forward rotation is set to HIGH.

digitalWrite(MOT2B, LOW); analogWrite(SpeedPin_B, 128); }

void motorA_Rotation() // motor A forward { digitalWrite(MOT1A, HIGH); // Only the direction of return to forward rotation is set to HIGH.

digitalWrite(MOT1B, LOW); analogWrite(SpeedPin_A, 128); digitalWrite(MOT2A, LOW); digitalWrite(MOT2B, LOW); analogWrite(SpeedPin_B, 128); }

Share

    Recommendations

    • PCB Contest

      PCB Contest
    • Big and Small Contest

      Big and Small Contest
    • Toys Contest

      Toys Contest

    2 Discussions

    0
    None
    tomatoskins

    14 days ago

    Beautiful butterflies! Thanks for sharing your project!