Why I designed yet another useless box? Because I can! Because I did not find on Thingiverse any design that I was fully satisfied. Some of them use motors, while I had only servos. Others supposed to use direct motor connection, while I wanted to program several scenarios with Arduino. Finally some of the designs I just did not like. Moreover I wanted to practice in creating complex mechanisms with moving parts as well as Arduino programming.
So my design supposed to:
- Be tiny if possible
- No screws on visible panels
- Use 5g servo
- Use Arduino Nano
- Powered by 9V battery block
- Hidden power switch
There are 2 playing modes. One is normal - player clicks the switch and box switches it back. When player bothers the box too much (at least 4 clicks with less than 2 seconds between them) the box starts to tease the player.
See the https://youtu.be/XJRB2Mc1x-I how does it look like
Unfortunately I failed with the first attempt. It was too complex (or even impossible) to assembly. This is the second design, but still it has number of annoyance in assembly. There are too much screws that are hard to access. So I am attaching solidworks file so you are welcome to remix and fix the issues.
Note: use alkaline batteries. Arduino often hangs and reboot on cheap batteries (you may notise hangs on the video)
UPDATE: in order to fix Arduino hang issue when working on battery, I added a MC34063-based step down coverter. I used self-made one, but you can order factory produced board on ebay/aliexpress. In my case it improved things a little bit. Voltage still drops down to 4V when servo is switches the lever, but at lease this does not reboot arduino. Of course the converter output should be conected to +5V pin, not to VIN
Basically I think using 9V block is not the best idea for driving the servo. It is better to use LiPo 7.4V 300mAh battery
0.3mm nozzle, 0.2mm layer
The assembly may be a little sophisticated. Here is the algorithm.
- Print everything. Drill screw holes with 1.5mm drill.
- Mount ‘cap mount’ part with a piece of 1.5mm rod.
- Glue Cap to Cap mount
- Add a small spring, one end mount at the special hook on the cap’s bottom. As for other – find a place to secure it with a screw on a wall. I used a small screw at the servo pylon.
- Mount Arm on the servo. You may need to cut native servo arm a little bit so that it fits to the printed one.
- Cut the servo wire, leaving about 10cm. Do not solder it for now
- Pass wire through the hole in servo mount, then mount the servo. You may need to cut another wire hole in the servo shell so that wire goes right way. Do not screw servo right now, since you may need to remove it few times to adjust the arm
- Now you may solder servo wires to Arduino – black (brown) wire to the GND pin, red to 5V pin, yellow to D2
- Solder wires to the switch. Solder other ends to Arduino's GND and D4 pins.
- Solder power wires from the battery connector (I used one from other battery). Minus wire goes directly to Arduino’s GND pin, Plus wire goes through power switch, then to VIN pin.
- Upload firmware and try it working. At this point you may consider adjusting servo arm position, or even correct moving bounds in the firmware (max_pos and min_pos constants)
- Now you may secure servo parts (arm and servo itself) with screws
- Mount switch on the top plate
- Mount the top plate on the main box and secure with 4 tiny screws (I used 5x2 screws)
- Mount Arduino. I used just 2 screws – one underneath power switch, other diagonal for the first one
- Mount power switch (mine has screwless mount)
- Glue 4 battery hooks to the bottom plate
- Place battery between hooks, connect it to the power connector
- Now you may screw the bottom panel to the main box shell
- Mount false panel (so people do not see electronic guts). This part is not precisely designed, so you may need to cut it a little bit where needed. Screw the panel with 3 screws.