Don't Let Her Out!

by Lluc in Circuits > Arduino

242 Views, 2 Favorites, 0 Comments

Don't Let Her Out!

IMG_8771.jpeg

We are Maria, Albert and Lluc, three industrial design engineering students from Barcelona. We’re currently in our third year at the university of Elisava. As part of this year’s electronics project, we’ve been challenged to build a Halloween-themed prototype using electronic components and an Arduino. Our build consists of a wooden box, decorated as a flowerpot, that detects when somebody walks by and opens slightly to reveal a face with two red-lit eyes. You can also hear this person inside the box knocking on the walls wanting to escape… But don’t let her out!  

Happy Halloween! 🎃

Supplies

Electronic Components

Most components come included when buying this Arduino kit on amazon, nevertheless, below is the complete list of electronic components indicating which can be found when acquiring the kit and which aren’t included.

  • [x1] Arduino UNO (Included) 
  • [x1] Breadboard (Included) 
  • [x2] Red LEDs (Included) 
  • [x1] Resistor (Included) 
  • [x18] Jumper cables (Included) 
  • [x2] 180º Servo motors  
  • [x1] Ultrasonic sensor HC-SR04 (Amazon.com
  • [x1] 9V battery (Amazon.com


Decorative Components

We had the luck of finding an old wooden box in a hardware store in a shopping mall and were able to buy it for a 50% discount due to its condition. We had to build the top cover, so below are the box sizes for you to buy a pre-made box like ours or build it from scratch. 

  • [x1] Wooden box
  • [x1] Wooden cover 
  • [x1] Hollow Styrofoam ball (Servei Estació
  • [x1] Wig 
  • [x1] Black spray paint (hardware store)
  • [Many] Fake flowers 


Mechanical Components

These are the components that you’ll most likely find in a hardware store and most of them are used to build the connecting rod crank mechanism, that allows the head to go up and down and is needed for the conversion of the circular motion of the servo motor to the linear motion of the head. 

  • [x2] Hinge (Leroy Merlin
  • [x1] Aluminum tube (Leroy Merlin
  • [x1] Steel bar 
  • [x2] Union plate (Leroy Merlin
  • [x3] Nylon lock nut M5 (hardware store)
  • [x3] Bolt M5 (hardware store)
  • [x2] Nylon washer (hardware store)
  • [x4] Screw (hardware store)

Building the Box Cover

IMG_5839.JPG
IMG_5843.JPG

First, we need to build the wooden cover that will later be on top of the box. To do this, we'll need basic wood machinery and tools such as a hot glue gun, any type of saw, white glue, and a sanding machine (or sandpaper, if you don't have access to one). In this step, we will also use the screws to attach the hinges and complete the structure.

Flower Decoration

IMG_6118.JPG
IMG_6140.JPG

Once we have built the box, we're going to decorate the top to make it look like a flower pot. To do this, we just need to cut the stem off the fake flowers and glue them until it fills the area. To give the impression as if it was densely packed with flowers, you can add wood remnants underneath to make the flowers pop out.

Rod Crank Mechanism

IMG_5856.JPG
IMG_6149.JPG

During this step, we had to weld a nut to the side of the aluminium tube so that we could complete the mechanism. Surely, there will be more effective ways to do it, but since we had access to a MIG welding machine we took advantage of that. In the right-hand side picture above, you can see we used the two union plates to make the arms. The first one is glued directly to the rotating pin of the servo motor and works as the rotating arm. The bolts, together with the locking nuts and the nylon washers, were needed to make the joints to articulate the mechanism. The aluminium tube is held with a bolt that threads through the welded nut and holds the farthest side of the plate, securing it firmly with a nylon nut.

Making the Face

IMG_6116.JPG

To make the face, grab the Styrofoam half-sphere and spray one layer of black spray paint. Let it dry for about five minutes and you will see that, due to the high porosity of polystyrene, the dye is soaked up and it creates a really cool-looking distorted effect. Once completely dry, stick the two LEDs into the sphere until the four legs cross to the inner side, to make sure you're later able to solder the jumper cables. Lastly, grab the wig and stick it to the head with glue or any other kind of attaching technique.

Electronics Set Up

25dba563-d19f-4407-81cd-00f4f084ccba 2.jpg
circuit.png

The electronics used in this project – as listed above – consist of two servos, an ultrasonic distance sensor, two red LEDs, a resistor, and an Arduino UNO R3 microcontroller. Each component is wired in an independent closed circuit in the following manner:

  • The two servos are connected to digital pins 6 and 7, as well as to ground and 5V power.
  • The ultrasonic distance sensor is attached to digital pins 3 and 5, as well as to ground and 5V power.
  • The two LEDs and the resistor form a closed circuit which connects to digital pin 8 and to the ground pin.

All components are attached to a breadboard which will be set inside the box.

Use the diagram above to understand the circuit connections easily in order to replicate them.

Arranging the Inside

IMG_6130.JPG
IMG_6242.JPG

After drilling two holes for the distance sensor to stick out, we have to arrange the inside of the box so that everything has a particular position. That way, it's easier to understand the circuit's distribution and you don't create a mess with all the cables. It is also important because we have a moving mechanism, and we don't want it to tangle up with the jumpers and disconnect everything, breaking the motor. To secure the motors to the box floor, we're going to use zip ties, since glue may not be as strong. We also have to assemble the shaft in which the aluminium tube is going to slide and to do it we simply need to use white glue to stick a wood piece on the bottom centre of the crate and drill a hole in it. This hole needs to be the same diameter as your steel bar because it's going to fit tight and firm.

Flow Diagram and Code

Captura de pantalla 2022-11-01 a les 15.47.47.png

Here we can see the flow diagram, which is a graphical representation of the code we used to program the functions of each electronic component, but in a more visual and illustrative way. The oval shape is the start of the code, the rectangles are actions and the rhombus are used to refer to conditions. We can observe that the arrows show the path the Arduino has to follow, and go back to the start when all the actions have been executed.

Enjoy Your Halloween Project!

The final result is shown in the video above!

Having completed this Halloween robotics project we as a team can extract some important aspects to take care of when confronting a project of these characteristics and possible improvements to the end result.

The overall build process has been a success, using only reused and common materials, which makes the process easier to replicate. The main challenge in this project has been everything surrounding the servo motors, from choosing the right one for each specific task to coding the desired behaviour. Since the box lid is heavier than expected, the current motor does not have a sufficient amount of torque to lift both the monster and the lid due to the distance between the motor's axis and the objects. A stronger, more powerful motor will be fitted to the next iteration of the project.

All in all, the final result is satisfactory but there is room for improvement in the mechanical aspects of the build.