The Haunted Book

by annagagi6 in Circuits > Arduino

741 Views, 5 Favorites, 0 Comments

The Haunted Book

WhatsApp Image 2022-11-01 at 18.53.13-2.jpeg
WhatsApp Image 2022-11-01 at 18.53.13-4.jpeg
Haunted Book
WhatsApp Image 2022-11-01 at 18.53.13.jpeg

In this project we are creating a Halloween decoration gadget, a book, but not a regular book, a haunted book. It contains dark mischievous things inside, you can tell just looking at the cover. Do you dare to open it?


The idea is relatively simple, a book shaped box with a mechanism to be opened and with some spooky objects inside. It can be adapted to any other festivity such as Christmas, Easter, Thanksgiving, a birthday, Valentine’s Day… This time we are doing Halloween. We are going to list down below all the materials and tools we used in our book, feel free to change or substitute the shape or the contents of the box.

The book opens when approaching the hand showing Jamie the skeleton resting inside. When barely touching the photoresistor on his hand, his eyes turn red. The book can be closed when approaching the hand to the top part once again.

Supplies

Materials:

  • Wooden book shaped box with a hinge
  • Wooden 10x10cm plank to make pieces for the opening mechanism
  • Fake skeleton toy
  • Fake cobweb with little spiders
  • Acrylic paints
  • Newspaper or tissue paper
  • 1 3 cm metallic fastener

Electronic components:

  • Arduino UNO
  • Long and short wires for the Arduino pins
  • Arduino shield
  • 2 red LEDs
  • 1 Photoresistor
  • 1 HCSR04 Ultrasonic sensor
  • 1 Servo motor
  • 1 9V Battery
  • 1 Battery adapter for the Arduino
  • 3 Resistors (2 for the LEDs, 1 for the photoresistor)

Tools:

  • Thermo-glue
  • Cutter
  • Drill
  • Soldering iron
  • White glue
  • Paint brush
  • Little bowl with water
  • Pencil and eraser
  • Ruler

Coding Process

  1. Get the Arduino app in your laptop.
  2. Download the code you see down below.
  3. Open this link and download the ultrasonic sensor library. Install it on the program.
  4. Store the two files in the same folder and open the Halloween one.
  5. Connect the Arduino UNO to your computer and upload the code to it.
  6. You can close the program, turn off your laptop and leave the Arduino aside for later.

Downloads

The Wooden Box and the Opening Mechanism

IMG_2271.jpg
IMG_2272.jpg
IMG_2273.jpg
IMG_2280.jpg
IMG_2281.jpg
1.PNG
2.PNG
5d5488ca-9d9d-4719-b4b1-5824528a546a.JPG
mecanisme.jpeg

Make sure the lid or the cover of your book box does not weigh more than 100g. Otherwise the servo will not have enough power to move it. 

Also make sure you have enough space inside the box to fit the Arduino with the shield, the wires, the servo and the skeleton. If the skeleton does not fit entirely once everything else is inside, you can use the cutter to remove some parts and make space. In our case, we cut half skull and half body. Also, drill two holes on the eyes of the skeleton to locate the LEDs.


Depending on the box you have chosen, the location of the servo will vary. Make sure its rotating centre is as close as possible to the hinge rotation centre. Adapt the collocation of the wooden pieces and the servo to your box as shown above and fix it with thermo-glue.


Opening and closing mechanism:

  • Using the ruler and the pencil, draw the following shapes on the wooden plank and cut them out (you can see the measures in the pictures above):
  • One 10x1cm bar
  • Two guides for the fastener
  • Stick with thermo-glue one end of the long bar to the servo horn and make a little hole in the other end to put the fastener.

Placing the Battery and Ultrasonic Sensor

f6a7a205-69fb-429d-a13e-9bdbc6315db1.JPG
IMG_2277.jpg
01504692-64fa-4d41-8003-cc718b714002.JPG
9c69c9e3-003f-4b9d-83a8-ebfdde2bc445.JPG
a9798a81-e52f-4d51-a372-a450aa0b8fdc.JPG
c5b0c99e-b254-4449-a5b6-fdbeb3627446.JPG

Put the battery inside the adapter and choose a place to store it suitable for your box. In our case, we will keep it outside the box, so we made a hole in the lower side of the box for the wire to enter it. We also made a little storage cage to cover it.


To put the ultrasonic sensor we have to drill once again two holes in the top side of the box to fit the sensor as shown in the picture.

The Artistic Part

4fcad6f7-5485-4c54-af3d-4109537de864.JPG
IMG_2326.jpg
IMG_2327.jpg
IMG_2387.jpg
IMG_2378.jpg

Once all the holes are made and every part has its space in the box, remove everything and decorate the box as you want. The idea is to make it look spooky and mysterious. We used kitchen towels and an old newspaper to create texture and stuck them using a mixture of white glue and water in a bowl.


Add some colour to it! Light brown wooden boxes are everything but terrifying, so we used black paint to assure a dark look. You can either use acrylic or tempera. Let it dry. Then add spider web, fake blood or whatever you feel like using.

Electronic Hardware

Captura de Pantalla 2022-10-31 a les 20.10.40.png
4e3350a8-5d81-446e-aaf5-20419bff32c8.JPG
4ad01d93-53d6-479a-9c88-5577ca9e3676.JPG
5cdba5d7-2a44-4fdf-a651-444d0f5f6c52.JPG

Grab a bunch of arduino cables, get your shield and plug the soldering iron, here comes the electronic hardware part.


Recreate the circuit of the Tinkercad picture.

First make the circuit on a breadboard to test it and verify its functioning. Once the circuit is working correctly, we will use the shield instead of the breadboard, as we will reduce the space required and also the wires could be easily disconnected on the breadboard.

Apply the necessary jumpers and connections to have all the required GND and 5V inputs, and solder the connections in the image using the necessary wires.


Note: Use short or long cables depending on the location you chose for the LEDs and the photoresistor.

Putting Everything in Place

1759215e-92ca-4964-85dc-cbd8f050b371.JPG
8f7adffa-8639-4f80-8ccd-6c9cc36dd600.JPG
d1884716-ff05-4ae9-8159-c2f2335d1a9e.JPG
baafc57b-4f42-4e46-8bdb-cd6813664810.JPG

Once the circuit is ready it's time to put everything in place.

Using thermo-glue, stick the LEDs on the skeleton's eyes from the inside, where we previously made a hole.

Put the ultrasonic sensor in place and add thermo-glue to keep it fixed.

Do the same with the photoresistor.

Final Touch

IMG_2376.jpg
IMG_2375.jpg
IMG_2374.jpg

Now that everything is prepared we can proceed to the final decorations. As we can see, inside the box we have the Arduino with the shield and the wires, all connected to our Jamie skeleton and the sensor. It's time to cover this so it is not visible.

We are going to use mainly fake spider web with some little spiders. You can put some candy in it as well. Accommodate everything inside the book covering the system well.

Finished!

IMG_2386.jpg
IMG_2385.jpg
IMG_2384.jpg

Close the book and connect the battery. The Halloween gadget is ready to impress your friends, there you go!

Conclusions

It is always more fun to learn new things if you do it in an interactive way. This project has allowed us to put into practice everything we learned about programming with Arduino and electronic components and also to make a fun and functional object. Now we know the purpose of each component used and we can make more complex and laborious projects.