Introduction: Arduino Snapper Robot Made From a Recycled Easter Egg Box

About: Currently a Student studying Robotics at Uni.

Looking at the strange shape of my mid-sized Easter egg box, I was suddenly struck with a question; could I utilise the second almighty R and reuse the box to create a claw robot? I admit, that is a strange question to have while looking at an Easter box as the two topics are kind of unrelated. But the question struck me nonetheless, and I had a think. Here is the result:

Supplies

- Medium sized Easter egg box (Any of the ones with the funny shaped design) [x1]

- 9g SG90 Servo motor [x1]

- SR04 Ultrasonic sensor [x1]

- Arduino compatible UNO R3 board & its Connector Cable [x1]

- Solderless Breadboard [x1]

- Breadboard wires [M-M x5] [M-F x4]

- A 9V Battery & its Connector

- Paper fastener [x1]

- Tape

- Blue-tack (I cannot attest as to whether white tack will also work here)

- Scissors

Step 1: Assembling the Claw

The first step in making this robot is to construct the claw from your box. Everything was made from cardboard and by using an Easter egg box like the one I used, the basic geometry will already be laid out for you. If you do not have one of these boxes to hand, you can copy the folds on a piece of card around 16x11 cm (6.3 x 4.3 inches). A picture of the folds can be found on the pdf attached. Creating the claw was not hard, but it requires 8 short steps and so I documented the entire process using pictures. In the pdf attached you will find all the steps with some pictures to guide you. I attached the process as a pdf as there are quite a few pictures and it would be useful for you to see them next to their verbal instructions.

Step 2: Assembling the Base

The main aim of the base is to create a platform that is 11x7x2 cm (4.3 x 2.8 x 0.8 inches). This is to support the servo's end of the claw in order to keep the entire claw level as the dimensions of the claw are pretty big. I cut out the rectangle underneath the folding bit of the egg box and then made some triangular prisms by folding strips of card I got from the flaps at the top.

To make the prisms, simply get a 5 cm (2 inch) strip and make folds at 2 & 3 cm (0.8 & 1.2 inches) from one end. Wrap a strip of tape around the unconnected edge of the shape and you have a triangular prism. For reference, see the prism in the third image above. I made 4 of these and then stuck them to the underside of the base as shown above (image 4) using blu-tack.

The final part of the base is the support for the fixed side of the claw. The support needs to be an even height with the servo motor, so aim for 3.5 cm (1.4 inches) high. I made mine using a cardboard strip that I taped underneath the fixed side of the claw (image 5), then taped two support strips and another prism to it. The support strips I made are shown in image 6, the red lines show where to fold the cardboard.

When the base is made, you can stick the servo and support onto it using some blu-tack. I placed my support so that the servo was directly on the edge of the base. I recommend using tack for the servo as it can jerk around a bit and so must be securely placed.

*Note, this is the way I made my base with the materials at hand. It is a little bit excessive, but anything that is 2 cm high and can hold the servo and the support for the fixed claw will be fine. I just wanted to make sure that my base was sturdy enough to hold the weight of everything.*

Step 3: Programming the Board

To program the board, download the file attached at the bottom of this section. It is a .ino file with the code I wrote for this sketch inside. If you do not have the Arduino IDE, you can download the official version here. Just choose the version that best suits your device and OS (I use version 1.8.12 for Windows 7 and up).

Before uploading the program to your board, you need to also have the libraries that the Servo Motor and Ultrasonic Sensor use to run. If you do not already have these libraries to hand, I have attached links to the ones I used below. Simply download the .zip files and put them in the same folder as the arduino sketch. There is no need to unzip them. If the program does not run then here is the official arduino guide for installing and running libraries.

Ultrasonic Sensor Library. (I did not make this library, but it works well with the project. Simply go to the link and download version 1.1.0 from under the Downloads section. Full Credit goes to the Library's author, not me.)

Servo Motor Library. (I did not make this library, but it works well with the project. Simply go to the link and download version 1.1.6 from under the Downloads section. Full Credit goes to the Library's author, not me.)

Then, simply plug in your Arduino UNO and upload the program.

Step 4: Plugging in the Circuitry

Now that you have uploaded the program it is time to connect the hardware. Above is a circuit diagram of the connections needed. Note that the Servo uses M-M connectors and the US sensor uses the M-F connectors. The circuit diagram is not a very high resolution so I have listed the ports below as well:

Ultrasonic Sensor:

-Trig: 12

-Echo: ~11

-Gnd: The Ground strip on the breadboard (the one with a '-').

-Vcc: The Live strip on the breadboard (the one with a '+').

Servo Motor:

-Orange: ~9

-Red: The Live strip on the breadboard.

-Brown: The Ground strip on the breadboard.

UNO R3 Board:

-5V: The Live strip on the breadboard.

-GND: The Ground strip on the breadboard.

Step 5: Finalising the Project:

The last thing you need to do is to place the Ultrasonic Sensor in front of the claws, as shown in the GIF above. The sensor is designed to close on anything less than 8 cm above the top of it. I held the sensor down in my project by putting a little bit of tack under the wires to stick them to the table.

When you have finished aligning the components, plug in the battery and let the thing run!

After you have finished making this project, try adding more components to make the project more interesting. I added an RGB LED and made it change colour every time the claws snapped shut. Let me know what you tried down below and, as this is my first ever instructable, please let me know what you liked and what I could do to improve for my next one.

Thanks for Reading!

Cardboard Speed Challenge

Participated in the
Cardboard Speed Challenge