View on GitHub

Useless-box

A simple arduino based useless box with "surprises"

download .ZIPdownload .TGZ

Useless Box

A useless box is basically a machine which turns itself off. However, with a few additional servos, and a little programming, you're able to blow some live into it and give it some "character" - as well as adding a few surprises for the user...

TL;DR

A demo video of the box. Because of randomization the video doesn't include all different behavior patterns - there are more...

Demo Video

Features / Surprises

I've used software debouncing of the switch because it's much easier than including additional wiring and parts. Although the MotorShield is clearly overkill for this project it reduces the complexity of the required electronics knowledge (and soldering) quite a bit.

Hardware

Electronics - Parts List

The following parts were used:

Amount Part Type Properties
1 Arduino Uno
1 MotorShield Rev3
2 Basic Servo You should use a high-torque servo for the arm
1 Micro Servo
1 Infrared Proximity Sensor Sharp GP2Y0A21YK0F 10 - 80 cm
1 DC Motor geared
1 Metallic Toggle Switch
1 Plastic Power Switch
1 LIPO Battery 11.1v 1200mAh
1 Resistor 10kΩ Pull-down for switch
2 NeoPixel
1 5V UBEC DC-DC Converter UBEC 5A Dynam DY-1016-5A

Circuit

Circuit Diagram

Material

Tools

Operation

My useless box fulfills of course the basic functionality of turning itself off. But using a few additional pieces of equipment it can:

Software

The box has basically a fixed set of "moves" it can do to turn of the switch after it has been turned on. To make things a little more interesting, the moves are randomly used to surprise the operator.

The whole code is quite easy - there's nothing special about it. I've created a few bases classes to control every peripheral and another class "Moves" to implement the patterns. This is mainly because the basic Arduino way of programming leads to lots of code duplication and unreadable code.