technology workshop living food play outside Arduino Useless Box by Vagelis Chantzis on March 21, 2015 Table of Contents Arduino Useless Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: Arduino Useless Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: How it works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 2: List of components and tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 3: Building the box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Step 4: Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 5: Final Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Step 6: Arduino code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Step 7: Problems and thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 http://www.instructables.com/id/Arduino-Useless-Box/ Intro: Arduino Useless Box What's in the box??? Is it doing something??? Is it going to hurt me??? Just hit the switch guys!!! Nothing will hurt you, maybe... Really now, this project is about a box with an Arduino in it. It does nothing. Literally. It is in a bad mood and all it wants is to be left alone. Can you make it happy? Try your luck with the switch!! Step 1: How it works The switch is connected to the Arduino and is monitored by it. When you push the switch the state of it changes and is set to ON position. Then the Arduino activates the two servos, one for the lid and one for the finger, the finger comes out and hits the switch so it goes back in OFF position. After that, the finger goes back in the box and the lid closes. Step 2: List of components and tools Components Arduino board (i used Arduino Nano 3 5V, you can use whichever you like) Breadboard 2 x Micro generic Servo 2 x 100?F electrolytic capacitors 1 x 10k? resistor 1 x small SPDT switch 1 x simple ON/OFF switch Hook up wires 9V battery Balsa wood (or any other material you like for the box) Wood glue and nails Small hinge Spray paint in any color you like (optional) Tools Screwdriver Wire cutter Duct or electrical tape Soldering iron Dremel tool or slitter Hammer Sand paper http://www.instructables.com/id/Arduino-Useless-Box/ Step 3: Building the box In order to build the box i used 6mm balsa wood. The dimensions are 23 x 11 x 11 (w, d, h). The top lids are made from 4mm balsa wood. You can cut the wood with a dremel or a simple cutter/slitter, it is a soft and light wood. I glued all the pieces together and also nailed the frame parts. The hinge was screwed in the lid and in the inner side of the box so it will be hidden. It was tricky to screw it in place and you must be careful to not damage the box. Next you must make a hole for the switch in the top lid (the one that will not move). Then screw the switch in place. Also, in this lid you will place the case for the finger servo. In order to make the case, glue together wood parts. Make sure to make the case sturdy and durable. My micro servo is really strong, it broke the first case i made! I reinforced it and i put nails along with the glue in order to handle the servo power. Now it is time to make the finger. Many ideas here about the design, the right angle, the dimensions, the curves. I tried several designs but the only one that works just fine is the classic one with the L shape. It was the only that did not break when it came in contact with the switch. You must make it buffy and fat, otherwise it will bend on the side when it hits the switch. Don't worry for the weight, balsa is super light. I glued together five 3mm pieces L shaped. It may not be pretty but it does the job right. I also glued the servo connector on the finger. Be creative and make your own as you like! The next thing you have to do is to make the stick that will be connected to the door servo and will be pushing the lid up so the finger can come out. Just glue two pieces of balsa in the right dimensions and put it on the servo. Piece of cake. The only thing you have to consider is the right height that the srvo must be in order to open the lid. You can place the servo in the right height by putting balsa pieces underneath, making a base for it. Don't spend too much time here, just glue some remaining pieces together. The final step is to put an external ON/OFF switch to power the arduino and save your battery. Open a hole carefully in the side of the box and glue the switch. Solder the cables and the switch is ready. The box is ready! If you want to paint it, do it now, before putting the electronics inside. During the building process, especially while building the finger, i thought that a 3d printer would made the whole process so much easier. Dealing with balsa wood is fun, but 3d printing the parts you want exactly how you want them is just more efficient and the parts will be more beautiful. The downside is the cost.. Your choice.. http://www.instructables.com/id/Arduino-Useless-Box/ http://www.instructables.com/id/Arduino-Useless-Box/ http://www.instructables.com/id/Arduino-Useless-Box/ http://www.instructables.com/id/Arduino-Useless-Box/ Step 4: Wiring Wiring the circuit is very easy as you can see. The finger servo goes to pin 10 and the door servo goes to pin 9. One pin of the SPDT switch goes to ground, the other to 5V and the third goes to Arduino pin 2 through a 10k? resistor. Don't forget to connect the capacitors and be careful with the polarity! http://www.instructables.com/id/Arduino-Useless-Box/ Step 5: Final Assembly Now you can put everything inside the box and connect the battery to the Arduino. The anode goes to Vin pin and the ground to the GND pin. Pay attention so you don't damage the box while you put the electronics inside. I made my box narrow and had a hard time putting them all together. http://www.instructables.com/id/Arduino-Useless-Box/ Step 6: Arduino code The code for the useless box is very simple. First of all you must include the servo library, then create two servo objects (one for the door and one for the finger) and attach them to Arduino's pins in the void setup function. The void loop is just an if statement that checks if the switch is ON. If it is ON, the servos must move and close it. I made some different moves for the servos in order to be funny. Feel free to add your moves too!! It is very simple, just look at the code and follow the pattern!! Here is the link to the code on GitHub, so you can copy/paste and use it easily. Link Step 7: Problems and thoughts During the process of making the box, I came across some problems and I would like to share them with you. The most annoying problem was about the batteries and powering the circuit. For some reason, the circuit would not work on a 9V alkaline battery no matter what. The servos were not doing what they were supposed to do and sometimes they were not moving at all. So, I started the troubleshooting process by powering the servos and the Arduino separately. I tried 9V to the servos and 6V (4 AA batteries) to the Arduino. Nothing changed. Tried with Arduino UNO, nothing again. After several tries, I found out that the problem is solved if I use a 9V battery in combination with the USB cable plugged in the Arduino. Crazy, huh? However, it works like a charm like this. The thing is that I don't want to have the box with a USB cable hanging out and to have to plug it in the PC every time I want to play with it. After several discussions with some people who have more experience than me in electronics and Arduino, we concluded that I should use LiPo batteries because of the fast discharge and high current capability they have. Finally, during the Arduino Day 15 event in my town, I was able to try a 6600 mAh power bank (used to charge smartphones) and it worked perfectly!! So, if you have the same problem, give it a try! The second thing I want to say is about the material of the box. Balsa is a very good material, light, durable if thick, but it can be a pain when you want to make really detailed work with it. You can even destroy your whole project. The box would be perfect if it was 3d printed. The finger that closes the switch at least. Think about it. That's all!! Hope you enjoy this Instructables!! Post your creations in the comments below!! Related Instructables Arduino Most Useless Machine Ever project by rsucgang Interactive useless box by All_be Super Simple Super Useless Super Amazing Button by thinksecretly Sinnlosbox (useless box) by ossilampe The Most Useless Yellow Box (video) by macobt USELESS MACHINE (Photos) by ric12335 Advertisements Comments 4 comments Add Comment Saiyam says: Mar 30, 2015. 10:29 AM REPLY Nice project. You can use attiny 85 to save space and money and instead of using two servos you can make a simple mechanism that can open the lid as well as put the finger out at the same time. Vagelis Chantzis says: Mar 30, 2015. 11:59 AM REPLY Thanks for the comment! Nice idea of using the attiny, it would really save space. I don't think i could use only one servo because the door does different moves, not only open and close. paulindallas says: Mar 30, 2015. 4:53 AM REPLY Very useless!!!... and a lot of fun!!!! Thanks for sharing Vagelis Chantzis says: Thanks!! http://www.instructables.com/id/Arduino-Useless-Box/ Mar 30, 2015. 7:07 AM REPLY