Trick or Treat
Our project consists of a black box with a built-in motion and proximity sensor.
At the bottom of the box there is an image that lights up showing a creepy face through a connection of led lights that will be behind it when the user approaches the point where the sensor is located.
Downloads
Supplies
FOR THE ARDUINO SETUP
- Super starter kit UNO R3 Project: This kit provides us all the electronic devices needed to carry out this project.
- HC-SR04 ultrasonic Sensor: An ultrasonic sensor emits sound waves toward an object and determines its distance by detecting reflected waves. The HC-SR04 sensor uses non-contact ultrasound sonar to measure the distance to an object, and consists of two ultrasonic transmitters (basically speakers), a receiver, and a control circuit.
- UV LED lights (12V): UV Light Emitting Diodes (LEDs) are a solid-state device that produces light when an electrical current is allowed to flow from the positive (p-type or anode) side of the circuit to the negative (n-type or cathode) side. We use these LEDs due to its ability to make certain materials or colors visible to the human eye.
- 830 Tie-points breadboard: BB830 is a solderless breadboard with connection tie-points and power rails. Solderless breadboards are great for building and testing new circuits because parts can be easily inserted and removed.
- 8 breadboard jumper wires: A jump wire is an electrical wire, or group of them in a cable, with a connector or pin at each end, which is normally used to interconnect the components of a breadboard.
- Transistor tip120: Transistors are a three terminal semiconductor device used to regulate current, or to amplify an input signal into a greater output signal. In our case we need to regulate the 12V of the LEDs.
- 220Ω resistance: Is a semiconductor component whose main function is to limit the passage of current in an electrical circuit
- Switching power supply: necessary to provide the voltage necessary for the system to function (it can change the voltage from 3V to 12V)
FOR THE FINAL PRODUCT
- 4mm Plywood
- 2 of 40x22,2 cm
- 2 of 40,3x30,4 cm
- 2 of 17x1,2 cm
- 1 of 30,4x22,2 cm
- 1 of 29,8x20 cm
- 1 of 30,4x5,2 cm
- Silicone
- Black spray print
- Scoth tape
- Acetate printed foil with the selected image
Schematic of the Electrical Connections
Made with Fritzing
Program Your Arduino
Use this code to program your Arduino:
Downloads
Build the Trick or Treat Project
The project consists in illuminating the face of a ghost with a random pattern of lights resembling the lightning lights.
- To do this, we first get all the tools we need and print our image on acetate. We use this material because it is easier for the light to go through. For the lights we have chosen ultraviolet lights as they better highlight the colors of the photograph.
- First we define by means of the program of arduino the commands that we would give to the sensor and the leds.
- Once we have the program we begin with the construction of the box where the board with the circuit will be, the lights and the acetate screen with the image.
- For the construction of the lid, we cut a 4mm plywood sheet and we paint it black. Then we join it to form a box deep enough to introduce all the material.
- We join all the plates and after the image we glue the LEDs to the walls to obtain better light.
- We secured the plate to the spaces that we had reserved for this function and finally, using a previously cut hole we put the proximity sensor.
- We made sure the arduino is reachable to connect the power jack by cutting a hole on the back of the box.
It only remains to connect the project to the current and come closer to take a good scare!
Conclusions
We have been able to use programming to create a physical project, under the halloween requirement we had well-defined guidelines and in this way the goal set became easier.
Applying the knowledge acquired in class we can create a final product that interacts with the user and meet the goal through simple commands.
It has been important for us to have a basic knowledge of both the programming language and access to the different items that have been made available to us throughout the practical sessions.
It has been interesting to combine manual work in the physical realization of the project and putting the theory into practice, it makes the project much more affordable and interesting.