Introduction: Useless Box
Project: Useless Box
Date: March 2020 – April 2020
I decided to do this project due to two reasons, one to call a halt to a very much more complex project that I am currently working on, and secondly as something to do during the full lockdown we are having here in New Zealand. It was fortunate that I had sufficient components to complete this project as purchasing further components is not possible at this time due to the restrictions the government has placed on the purchase of “non-essential” items.
What is a “Useless Box”, well put simply it’s a box with a switch which is normally off, however it you switch it on the system inside will switch it off again. This repeats each time you switch the switch on with in the case of this box eight different formats of the lid opening and closing, the finger extending and withdrawing, and finally the movement of the eyes and which colour the eyes show.
A version of this system can be developed which is much simpler than that above. The eyes and their movement servo, and the lid lifting servo can both be removed. The lid then simply lifts due to the finger servo extending the finger which in turn lifts the lid.
1. Arduino Uno R3
2. 10K resistor
3. 330 Ohm resistor
4. Two pole switch
5. Yellow LED
6. 3 x Servo Motors
7. 2 x RGB Neopixel LEDs
8. 18650 battery holder
9. 2 x 18650 4200mAh, 3.7V
10. LM2596 Step-Down DC-DC power module
11. Power On/Off switch, single pole
12. Various Depont cables, fixings, and PCB board
13. Suitable wood for box
Step 1: Building It
The box is made from any suitable wood, with a simple hard board base and four rubber feet. The box’s dimensions again can be of almost any size providing the finger can reach the switch. This project’s box dimensions are 120mm wide, 245mm depth, and 90mm high. I added a power switch, power On/Off LED, and a small hole on one side. The Hole provides access to the Arduino Uno USB port for loading software, this I found made for setting and correcting the parameters of the servo movement much easier as it would require the removal of the outer case otherwise.
I have included a Fritzing diagram of the circuit used. I used an Arduino Uno simply because I had one available, a WEMOS D1 Mini, or Arduino Nano could also be used as the system only required 6 inputs. I also decided to make this system 18650 battery based rather than use a 12V power adapter as it makes the box more portable and safer to use. The 18650 batteries are held in a two-battery pack and have a voltage of 3.7V each and 4200mAh capacity. Getting to the batteries to re-charge them would require the base board to be removed and the lid raising arm to be disconnected.
The three servos used where simply the ones I had available; any standard servo can be used. Most servos come wired with three depont connectors and are coloured, Brown for GND, Red for power, anything between 4V and 7.8V, and finally Yellow for the signal line. I used two TowerPro MG995 servos for the lid and the finger and a CFsunbird SG90 for the eyes. The SG90 was only used as I was limited in the amount of space, I had available and would have otherwise used a third MG995.
The Box’s Off/On switch has a simple debounce circuit attached which includes a 10K resistor attached to GND and attached to the same point on the switch is a single wire attached to pin 12 of the Arduinio Uno. The other side of the switch is attached to the Arduino on-board 5V pin. I decided to use the Step-Down power module as the voltage I was getting from the two 18650 batteries was about 8.5V which was too high for the servos, 7.8V was the maximum voltage recommended by the TowerPro Datasheet. The Step-Down power module steps the voltage down to 6V which is used by the servos and is also used to power the Arduinio Uno by its GND and VIN pins. A simple 330Ohm resistor in series with a yellow LED is used to show if the box is active and is attached to the GND and 6V power rail. A single pole switch is used on the outside of the box to switch On/Off the two 18650 batteries.
The eyes use two 8mm Neopixel RGB LEDs, each wired to a 5V on-board Arduino power supply and GND pins on the Arduino Uno. They are wired in series and a single signal wire is attached to pin 11 on the Arduino Uno. The RBG LEDs have a flat side which determines the sequence of connectors, see attached photo for pinouts. These LEDs could be wired separately so that the Arduino Uno could control each eye via a separate signal wire. As with all projects the circuit was laid out on a breadboard and tested before being installed on the base board. It is recommended that all depont connectors are lightly glued to their pins on the Arduino as they have a tendency to work loose over time.
Step 2: The Software
I must at this point make my thanks to “labomat” and the Useless-Box example Arduino code held on the GitHub site for the basis of the software running on this system. As part of the project development I adjusted and added to the code in particular the servo movement, and colour of the eyes. In addition, it was necessary to make adjustments to all of the servo movement parameters to allow for the differences in their movement, and initial position.
You will need the latest version of Arduino IDE 1.8.12, and library files: Adafruit NeoPixel.h, and Servo.h. I have attached the test program for the eyes, and the main program for the box operation.
Step 3: In Conclusion
I found this project a pleasant distraction from the main project I am working on. While the version I have built and shown here is basic I have seen and admired many different versions of the same box on the internet and You Tube, all of which make use of interesting variations of the basic theme of a switch and a device to switch it off.