Performance Anxiety Container

by Vincenzo_Caraballo in Circuits > Arduino

128 Views, 0 Favorites, 0 Comments

Performance Anxiety Container

Render 4.png

Technology is commodifying our daily tasks from automatic parking to intelligent curtains that close and open depending on the light available. The 


This useless machine is meant to “help” its user with the labor of safeguarding snacks and granting access when needed by opening the lid when grabbed. 


Nevertheless, because of a severe case of Performance Anxiety, this device ends up preventing the user from grabbing anything from the inside. This works with a pair of tilt sensors that detect the movement of the container and closes the lid automatically until no interaction is detected. 


This project was designed and executed as part of the Computational Design and Digital Fabrication Seminar in the International Master of Science Programme: ITECH.


By Roberto Caraballo

Supplies

Components.png
Materials.png
Materials.png

COMPONENTS:

  • 1 Arduino UNO board
  • DuPont Cables
  • 1 micro servo Motor SG90
  • Breadboard
  • 1 9V Battery 6F22
  • 2 Tilt Ball Switches
  • Resistors 10Ohms
  • 1 Capacitor 100uF


For the components both an Arduino Starter Kit and a Elegoo Mega Kit were purchased. The final model uses just 1 motor due to component restraints.

However, after testing, and for the original instructions to be followed, a pair of servo motors with at least 200gr of torque is recommended, such as the DS3218.


TOOLS:

  • Original Prusa i3 MK3S
  • Cutter
  • Scissors


MATERIALS:

  • PLA Filament
  • 1-liter container
  • Surface Contact glue
  • Electrical Tape

SETTING UP THE ELECTRONICS

IMG_4065 (1).JPG
Board.jpg
Electronics.jpg

In terms of hardware, this setup is fairly simple, the basic concept is to have a current flow that is interrupted when the ball tilt sensors are moved, so the servo motor shuts the container until no alteration is detected. A button is added as a control for function testing.


And for the board connections… 


  • We’ll start by connecting the Arduino UNO board to the breadboard’s power outlet lines, 5V to the positive line, and GND to the negative on the breadboard


  • Next up, the 9V battery will be connected the same wise on the opposite side of the breadboard (positive to positive and negative to negative) to supply extra power to the motors and permit the system to work without being connected to a USB charging port. To close the system we just need to link both positive and negative outlets of the breadboard with two cables.


  • Afterward, we set the motor by assigning one digital pin with which to communicate, the remaining two cables are connected parallel to the positive and negative connections in the breadboard.

 

  • The Arduino board is not designed to provide enough current supply to make the servo motor work, so we need to add a Capacitor in between the positive and negative connections of the motor to elevate the current inflow.


  • The original model consists of two servo motors: one for opening and closing the lid on command and the other as a locking mechanism. For the second motor setup, the same connection is needed, but instead of linking the power outlet to the Arduino board, the cables can be but parallel to the positive and negative poles of the 5V battery directly.


  • Now, for setting up the sensors, we will link one end of it to both a PWM number in the Arduino board and to the negative outlet line of the breadboard via a 10Ohm resistance, so the sensor receives just enough power to work, and the other the positive outlet of the breadboard; this to let and interrupt the current flow when tilt. 


  • Now, to finish this section, we add a button as a control to check if the system is working. We link one set of legs of the button to the same PWM number the tilt sensors are connected and the other set to the positive current outlet line.


CODING

Code.jpg

It’s recommended to download the library <Servo.H> before starting coding, this is available on the Arduino Main Page


The code works based on a changing input read. When this input changes values, it triggers the loop to change. There are 3 variables: the Tilt Sensor (TS), the change in Position of the motor (pos), and the initial value of the servo motors (InPin)


The first section is used to name the different components of the code as well as define the type of the component (integers, booleans, libraries, constants, etc…). Here we will add the <Servo.h> library which contains the basic setup for using a servo in Arduino. Also, we will link the InPin variable reader to the 7th PWM (which detects the tilt sensor variations), the pos integer variable to a base value of 0, and the TS variable as a Boolean in false (binary; True/False). Lastly, the Lid and Lock servo variables will be attached to the servo library, in order to set the basic configuration and values for them. 

The second section: void setup gives a set of instructions to the Arduino UNO in order to set the base configuration and read the variables present in the code. Here we will ask the Arduino to set the base value as well as assign our PWM inputs to the variables which will represent them; in this case, the Lid and Lock servo variables to pins 3 and 4 respectively, and the InPin variable will be stated as an Input. 


The last section is called “void loop” and is a repeating set of instructions the Arduino will follow in the order in a repeating manner. Here we will divide it into two sections, depending on the read of the InPin readings: if the InPin Boolean stays on a 0 signal output, the position of both servos will change from 0 to 91 degrees with a delay of 600 milliseconds in between them. If the InPin signal changes, the pos variable will revert to the 0-degree base value of both servos until the base value is restored. 


TO THE 3D PRINTERS

423ED81A-0849-4E9E-A53A-4DC8998FB2E9 (1).JPG
6DB5ED8A-BE5D-41FF-A897-E0F035A01D5C (1).JPG
Printing Process 1
PrusaSlicer SS 1.jpg
PrusaSlicer SS 2.jpg
PrusaSlicer SS 3.jpg

The 3D files are listed below in .STL Format 

There are 5 printed parts that compose this build. These were designed and tested on SolidWorks. 

Next to it, the parts were printed using the PrusaSlicer Setup. The bigger parts were printed in the Prusa… 6mm, and the Lid and lateral supports were printed on the Prusa… 35mm


JOINING AND SETUP

5877DB77-F935-4A04-A7E1-59A40D14107D (1).JPG
IMG_4066 (1).JPG
66ABF567-2F02-4F0D-B8CC-37CA00A7F9A7 (1).JPG
Circuits Testing

FINAL MODEL Y TESTING

Testing 1