blog.hirnschall.net
home

Contents

Subscribe for New Projects

Introduction

Although a useless box might be pretty useless, I like the concept of a robot with multiple switches whose whole job is to "undo" every switch you flip.

I also want to build this project as a gift for someone I am sure will enjoy it.

Design considerations

As this project is quite simple, there are not many design considerations. We can use many of the DIY motorized Slider project concepts.

Multiple Switches, One moving arm

There are many useless box kits available for purchase online. However, most of them only have one switch or have one arm per switch if they have more than one. We will use multiple switches and a single moving arm to flip the switches back off to make this project more sophisticated and more enjoyable.

Moving gantry

As the box will be pretty small, I think we can get away with using a (usually quite expensive) linear guide rail and a stepper/timing-belt set up to move the arm from switch to switch.

Arm movement

To move the arm that pushes the switches, we will use a small 9g servo. Doing so might not be the best idea as the switches I use are hard to press, and the servos are relatively weak. However, they are small and easy to work with.

Lid movement

Most useless boxes I have seen online use the extending arm to open the lid. However, I have also seen some DIY useless boxes that use a second servo to open the box cover, resulting in a much more sophisticated operating mechanism. Especially once the arm starts moving between switches without fully retracting. If we have a spare PWM pin available, this should be easy to implement using a second 9g servo.

Arduino Compatible

As this project requires no special features, we will use the "standard" ATMega 328p chip. It is cheap, has enough IO pins, comes in an easy-to-solder DIP28 package, and as it is also used in the Arduino UNO boards, this project will be Arduino compatible, making it much more accessible to novice makers. We will also use an extra Arduino board as ICSP to program the chip once everything is assembled.

Motor Driver

We will use a standard a4988 stepper driver module used in most cheap 3d printers in combination with this stepper library to easily control the pancake stepper motor with our ATMega chip.

Motor Whine and Servo noise

Both the stepper motor and the servos we use make noise once powered on, so we will detach the servos and disable the stepper motor 30 seconds after the last button is pressed.

Building your own Useless Box

As (unfortunately) the wooden box is not perfect, we have to glue the 3d printed parts together such that the printed part touches not only the bottom of the box but also both sides—this way, the plastic parts can be mounted securely.

Note: try to buy components like a single resitor or capacitor locally as they can be rather expensive and only available in large quantities online.

We will use the following parts to assemble one box:

Component Quantity Where to buy
3d printed parts set × 1 Prusaprinters.org
PCB (optional) × 1
ATMega 328p × 1
A4988 module × 1
Nema 17 pancake stepper motor × 1
MGN12H linear rail × 1
9g Servo × 2
12V DC power supply × 1
12V to 5V DC converter × 1
10k resistor × 1
22pF or 20pF capacitor × 2
100nF capacitor (optional) × 1
  • See 22pF above
47μF capacitor (optional) × 1
16MHz oscillator × 1
switches × 6
endstop × 1
female-female jumper wires × 1
male pin headers × 1
Belt and pulley set × 1
Idler pulley × 1
Bearing 684ZZ (4x9x4mm) × 1
Box (21.5x13.8x10cm) × 1
#CommissionsEarned

Note: the box you use should not be smaller than 21.5x13.8x10cm (length,depth,height). If the box you use is wider of deeper than this, there is no problem. If your box is higher, you can use a 3d printed adapter or some pieces of wood as a spacer to fix the rail mount at the correct height.

Motion System

We will start with the motion system. Both the motor mount and the pulley mount have to be glued to the main rail mount. This ensures that the 3d printed part fits perfectly inside the box, touching the bottom and both sides of the box.

An easy way to glue the parts together:

  1. Screw the guide rail into the main rail mount and place it inside the box such that the rail is centered (left to right) inside the box.
  2. Without moving the rail mount, place the pulley mount inside the box and slide it along the rail mount until it touches the box wall. Glue it to the main rail mount using super glue.
  3. Do the same for the motor mount (mount the motor to the printed part before gluing)
  4. After the glue is hard, remove the plastic part from the box.
  5. Add more glue if necessary.

Next, assemble the moving gantry as seen in the two images (fig. 1.1 and 1.2) below. Mount the servos after the calibration step!

Note: The servo is not made to hold the forces applied to the moving arm when a button is pressed. Thus we need to insert a small 684ZZ bearing into the rail-block-mount.stl part. Furthermore, to strengthen the connection between the arm and the bearing, we will drill a small 1-2mm hole in the arm (where the arm is inserted into the bearing) and insert a metal pin (use an m2 screw, a dowel pin, or a nail).

diy useless box assembly, isometric view
(a) assembly without servo
diy useless box assembly, top view
(b) assembly with servo mounted
Figure 1.1: Useless Box motion system assembly drawing
diy useless box assembly, isometric view
(a) isometric view
diy useless box assembly, top view
(b) top view
Figure 1.2: Useless Box motion system assembly outside the box

Electronics/PCB

As this project is a present for a friend, I used a prototype board instead of a professional PCB to solder the circuit. However, I have designed a PCB you can order online to simplify the soldering process. Use the schematic down below to assemble your PCB.

Once the PCB is assembled, you can use the programming header and Arduino as ICSP to program the board.

diy useless box controller pcb, top view
(a) top view
diy useless box controller pcb, bottom view
(b) bottom view
Figure 1.3: Useless Box controller PCB top and bottom view

Calibration

Flash the calibration.ino file using the Arduino ide.
Once you connect the motor, both servos, and the 12V DC jack to your PCB, the calibration process begins.

Once powered on:

  1. The servo controlling the arm moves to the OFF position. The arm should be mounted such that it is fully retracted in this position.
  2. The servo opening the box lid will move to the CLOSED position. The lid has to be connected using a piece of wire such that it is closed in this position.
  3. Both servos will be deactivated after 10 seconds. This way, you can move them manually after the servo horn is fixed in place.
  4. The stepper motor will home and then visit each switch position from left to right with a 5 seconds delay after each switch. Configure the switchPositions[] array such that the arm lines up with each switch. Ensure the moving arm can reach each switch position before drilling the required holes!

Final assembly

Once everything is set up and works outside the box, it is time to glue the printed parts inside the box using epoxy resin. We will use glue to avoid visible screws from the outside.

  1. Place the rail mount inside the box.
  2. Temporarily mount the front box lid (with the switches mounted) to the rest of the box using painter's tape.
  3. Extend the arm such that it touches the far left switch.
  4. Position the rail mount so that the extended arm can move to the far right switch without hitting any switch in-between.
  5. Use a pencil to mark the rail mount position.
  6. Remove the box lid and glue the rail mount into place.
  7. Copy your calibration data to useless-box-firmware.ino
  8. Flash the useless-box-firmware.ino file using an ICSP.
  9. Fine adjust the servo/motor positions in the code once everything is working.

Résumé

All in all, I am pleased with how this project turned out, although I dislike the idea of gluing parts together without a straightforward way to line them up correctly.

Once the motors turn off, the box is completely silent and can stay powered on while on my desk. In my experience so far, it is a great piece to show off, as even non-tech-enthusiasts are curious what the switches are for and like playing with the box.

Get Notified of New Articles

Subscribe to get notified about new projects. Our Privacy Policy applies.

Downloads

Sebastian Hirnschall
Article by: Sebastian Hirnschall
Updated: 07.01.2022

License

The content published on this page (with exceptions) is published under the CC Attribution-NonCommercial 3.0 Unported License. You are free to share on commercial blogs/websites as long as you link to this page and do not sell material found on blog.hirnschall.net/* or products with said material.

Amazon Links

1: As an Amazon Associate I earn from qualifying purchases.