Paper Snowmen Lantern With Arduino

by chaitechraft in Craft > Paper

907 Views, 8 Favorites, 0 Comments

Paper Snowmen Lantern With Arduino

Snowmen Lantern with Arduino

I am living in Finland where Sun can be barely seen during the winter season. I am dedicate to decorate my room with warm and cute stuffs to overcome this challenging season. And this snowmen lantern was born. haha.

It is an interactive snowmen lantern. It reads motion of people and rotate with snowmen. It feels more cozy when you turn the light on in a dark place. :)

I recommend this project for Arduino beginner since it does not require any complicating circuit or programming.

Materials

IMG_1509.JPG

To make this snowmen lantern, we need...

1. Paper design - Lantern holder (check the attached file "snowmen lantern bottom")

2. Paper design - Snowmen (check the attached file "snowmen")

3. Cardboard (thickness 5mm) - Micro servo holder

(check the attached file "snowmen cardboard")

4. Cardboard (thickness 5mm) - lantern

(check the attached file "snowmen cardboard")

5. baking paper (80mm*120mm)

6. Micro servo MG90S http://amzn.to/2qbDeeP

7. PIR sensor http://amzn.to/2C7oDCE

8. Arduino Nano http://amzn.to/2zZ7E3J

9. Nano expansion board http://amzn.to/2q9yRRJ

10. Coin cell battery (CR 2032) http://amzn.to/2Cu7CGw

11. Yellow LED http://amzn.to/2DJHC6L

12. Coin cell battery holder (From Thingivere)

Tools which we might need...

1. Gluegun http://amzn.to/2DLfz79

2. Scissors

3. 3d printer (this is the printer I am using) http://amzn.to/2lBSEUo

Fix the Servo With Cardboard

IMG_1514.JPG
IMG_1518.JPG
IMG_1519.JPG

Put your micro servo into the square-shaped hole of the cardboard.

Then fix the servo, using a glue gun.

Glue the Cardboard Frame

IMG_1520.JPG

On the wing of the servo, glue the cardboard frame. The frame will be used for a plate to make snowmen rotate.

Make a Circuit and Download the Code

IMG_1522.JPG

1. Let's make the circuit. Pin 9 is for the servo and pin 2 is for PIR sensor.

2. After completing the circuit, copy and paste the code down below to your Arduino software.

================Snowmen Lantern ====================

#include
Servo myservo1; int pirPinNumber = 2; int currentPosition = 0;

void setup() { myservo1.attach(9); myservo1.write(0);

pinMode(pirPinNumber, INPUT); Serial.begin(9600); }

bool IsTherePeople() { if (digitalRead(pirPinNumber) == HIGH) { return true; }

else { return false; } }

void loop() { if (IsTherePeople() == true) { Serial.println("PEOPLE"); //myservo1.write(180); goPositionTime(180, 10000);

delay(1000); } else { Serial.println("No"); // myservo1.write(0); goPositionTime(0, 10000); delay(100); } }

void goPositionTime(int angle, int timeMS) { int angleDiff = currentPosition - angle; Serial.print("currentPosition"); Serial.println(currentPosition);

myservo1.attach(9); for (int temp = 0 ; temp < abs(angleDiff); temp ++) { //temp : 0~ angle - 1까지 움직임 myservo1.write(currentPosition - angleDiff * temp / abs(angleDiff)); delay(timeMS / abs(angleDiff)); } currentPosition = angle; myservo1.detach(); }

=====================================

Insert the PIR Sensor and Fix With the Paper Design

IMG_1525.JPG
IMG_1526.JPG
IMG_1527.JPG

1. Put glue around the edge of PIR sensor. Then insert the sensor through the hole of the lantern paper container.

2. After fixing the sensor, put the expansion board into the paper container.

Glue the Snowmen & LED

IMG_1529.JPG
IMG_1516.JPG
IMG_1517.JPG
IMG_1530.JPG

1. Glue the snowmen design around the cardboard table.

2. Insert the coin cell battery into the battery holder and put the LED between the holder and battery.

3. Glue the bottom of the battery holder and put it in the middle of the cardboard table.

Finalizing

IMG_1531.JPG
IMG_1533.JPG

1. Put the cardboard where the servo is fixed into the container. You don't need to glue it. The size of container is right to hold the cardboard tightly.

2. Make a cylinder with a baking paper and put it around the LED.

Decorate Your Room : )

IMG_1130.JPG
IMG_1131.JPG

We all done! When you move, the lantern will detect your motion and it will start to rotate. : )