Project tutorial
Automated Clothes & Shoes Donation Machine

Automated Clothes & Shoes Donation Machine © CC BY-NC-SA

The machine will sense if you donated with something and will ask you if you want to share your photo on the machine's twitter account

  • 2,890 views
  • 3 comments
  • 25 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Screen shot 2019 03 20 at 2 38 27 pm fqndazqcx1
1Sheeld
×1
Power Supply 12V/ 5A
×1
Fan 12V
×1
LED strips
×1
Push Button
×1
Android Smartphone
×1
Relay Module 5V
×1

Apps and online services

About this project

Q : Do you have clothes, shoes, books and ...etc that you no longer want ?
A : Sure!

Q : What happens to these things? Stored for along time in your closet?
A : Yes :(

Now, pick these things you no longer want, and take them to the nearest donation machine :)

Simply, the machine will sense if you donated with something and will ask you if you want to share your photo on the machine's twitter account to encourage your friends to donate and know more about the machine. Also when filled the machine will send a SMS message to a charity association representative to ask him to empties the machine.
This machine is totally open source so you can build your own machine at your district :) and i will be pleased if you shared your kindly feedback to enhance the second version.You can download all the needed files starting from the CAD files to the Arduino code, Enjoy :D
By the way, the machine was featured in a national TV show that discuss out of the box solutions for enhancing our community.

Step 1: What you will need?

Materials:

1. MDF (8mm) Sheets

2. MDF (5mm) Sheets

3. Knotty pine wood

4. Stickers for the outer finish
5. Black Paint
6. Primer paint
7. Aluminum Bars

8. Hinge L3899-2B

Tools:>1. Screwdrivers>

2. Hammer

3. Pliers

4. Flush cutter

5. Wire Stripper
6. Soldering Iron

7. Soldering Iron Stand

8. Solder
9. De-soldering pump

10. Digital Multimeter
11. Double Sided Glue Tape.
12. Nails and adhesive

13. Screws & Nuts

14. M4 Bolts x 20mm

15. Copper spacers ( To fix the Arduino Board)
16. Nylon Cable Tie Belt
17. Stainless steel angle brackets
18. 3" Rubber Caster Wheels

19. Paint brush

20. Circular saw

21 Table saw
22. Jig Saw
23. Drill and bits

24. Laser cutter
25. CNC

26. Wood files

27. Sand paper
28. Air compressor with nail gun

Electronics:>1. Arduino UNO

2. 1Sheeld

3. Power Supply 12V/ 5A
4. Fan 12v

5. LED strips
6. Bush button
7. Android Smart Phone
8. Relay module 5V

Step 2: Building The Machine Frame


https://www.youtube.com/embed/Eu4tEww3dzw?feature=oembed

1. We used the pine wood to build the machine's frame then we used MDF sheets to cover the machine's frame, we used nails and screws to fix the MDF sheets to cover the machine's frame.Machine's dimensions is : 170 * 100 * 80 cm

2. We used aluminum sections to create the machine's door and we covered it using MDF sheets. we used laser cutter machine to cut the machine's door.

3. We used 3 hinges(L3899-2B) to fix the machine's door to the machine's body.

4. We used 4 x 3" Rubber Caster Wheels to make it movable.

5. We added a lock to secure the machine.

6. Then we started to prepare the machine for painting, we can't paint MDF directly you should coat the machine with primer then we used black paint for the final layer.

7. After the machine has dried we used the designed stickers to give the machine the final finish and we used aluminum angels in the corners to support the machine and protect the stickers.

Step 3: The Machine's Exterior Design

We used some Islamic patterns such as the Islamic star pattern to design the exterior stickers for the machine, you can download the design files and translate it into your language and we will be happy if you shared your design with us.

Step 4: Electronics & Control System

Simply, the machine will sense if you donated with something and will ask you if you want to share your photo on the machine's Twitter account to encourage your friends to donate and know more about the machine. Also when filled the machine will send a SMS message to a charity association representative to ask him to empties the machine.

Q: How the machine will sense if i donated with something?A: Using the first ultrasonic sensor fixed above the machine's door.Q: How the machine will interact with me ?A: Using Text to Speech Shield in 1Sheeld App, you need to write some statements at the Arduino sketch such as :

TextToSpeech.say("Please stand in front of the camera After Your donation");<br>OneSheeld.delay(5500);
TextToSpeech.say("If you want to share you photo with community please long press the Bush button");
OneSheeld.delay(7500);

Q: How the machine will sense it was filled?
A: I fixed two ultrasonic sensors in the internal top side of the machine, if the two sensor's values are less than 40 cm this means that the machine was filled so it will send a SMS message to a charity association representative to ask him to empties the machine.
Q: How the machine will send a SMS message?
A: Using SMS Shield in 1Sheeld App, all you need yo do is to write the message body and the mobile number.SMS.send("123456789", "Message body");
Q: What should i do to let the machine take a photo for me and share it on it's Twitter account?
A: The machine will ask you to press a bush button to take the photo, then the LED strips will toggle 3 times to give you the chance to say cheese :D, then it will upload the photo to its Twitter account.
For more information about how to getting started with 1Sheeld you can visit this website.
If you still have any questions, please don't hesitate to ask me in comment :)

Code

Donation Machine CodePlain text
///////////////////////////////////////////////////////////////////////////
//                                                                       //
//                    Developed by : Eng. Mahmoud Tolba                  //
//                       Last modify : 26 / 5 / 2015                     //  
//                                                                       //
///////////////////////////////////////////////////////////////////////////

#define CUSTOM_SETTINGS
#define INCLUDE_TERMINAL_SHIELD
#define INCLUDE_SMS_SHIELD
#define INCLUDE_TWITTER_SHIELD
#define INCLUDE_CAMERA_SHIELD
#define INCLUDE_TEXT_TO_SPEECH_SHIELD

// Include 1Sheeld library.
#include <OneSheeld.h>

const int trigPin1 = 2;
const int echoPin1 = 3;

const int trigPin2 = 7;
const int echoPin2 = 8;

// Define a boolean flag.
boolean isMessageSent = false;

const int buttonPin = 12;     // the number of the pushbutton pin
int buttonState = 0;         // variable for reading the pushbutton status

const int ledPin = 13;       // the number of the led pin


//--------------------------------------------------------------------------------------

void setup() {
  // Start communication
  OneSheeld.begin();

  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);

  pinMode(trigPin1, OUTPUT);
  pinMode(echoPin1, INPUT);

  pinMode(echoPin2, INPUT);
  pinMode(trigPin2, OUTPUT);

}

void loop()
{
  long duration1, distance1, duration2, distance2;

  digitalWrite(trigPin1, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin1, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin1, LOW);

  duration1 = pulseIn(echoPin1, HIGH);
  // convert the time into a distance1
  distance1 = duration1 / 29 / 2;

  digitalWrite(trigPin2, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin2, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin2, LOW);

  duration2 = pulseIn(echoPin2, HIGH);
  distance2 = duration2 / 29 / 2;

  Terminal.print("Ultrasonic1 = ");
  Terminal.print(distance1);
  Terminal.println(" cm");

  Terminal.print("Ultrasonic2 = ");
  Terminal.print(distance2);
  Terminal.println(" cm");

  // Ultrasonic sensor measeures the depth of the machine if this distance1 increased above 100 cm this means that the door is opened
  // The machine will tell the user to stand in front of the camera then the machine will take a photo for him and uplaoad it on twitter

  if (distance1 < 40) {

    // ------------------------- Chack if the machine is filled --------------------------------
    if (distance1 <= 60 && distance2 <= 60) {
      if (!isMessageSent)
      {
        // Send the SMS.

        SMS.send("+201222326539  ", "         ");

        Terminal.println("Sending SMS done");

        Terminal.println("Machine is filled");

        // Set the flag.
        isMessageSent = true;
      }
    }// if machine is filled

    else
    {
      // Reset the flag
      isMessageSent = false;

      Terminal.println("Some one donated with something");

      // Wait for 5 seconds while the user stand in front of the camera
      TextToSpeech.say("Please stand in front of the camera After Your donation");
      OneSheeld.delay(5500);
      TextToSpeech.say("If you want to share you photo with community please long press the Bush button");
      OneSheeld.delay(7500);

      // read the state of the pushbutton value:
      buttonState = digitalRead(buttonPin);

      if (buttonState == HIGH) {

        TextToSpeech.say("You have pressed the push button Please stand behind the red line");
        OneSheeld.delay(6000);

        Terminal.println("Bush Button is pressed");

        for (int i = 1; i <= 3; i++) {
          digitalWrite(ledPin, HIGH);             // turn the LED on (HIGH is the voltage level)
          OneSheeld.delay(1000);                  // wait for a second
          digitalWrite(ledPin, LOW);              // turn the LED off by making the voltage LOW
          OneSheeld.delay(1000);                  // wait for a second
        }//for

        Camera.setFlash(ON);
        // Take the picture.
        Camera.rearCapture();

        Terminal.println("Photo taken");
        
        OneSheeld.delay(3000);
        TextToSpeech.say("Yor photo has been taken");
        OneSheeld.delay(7000);

        // Post the picture on Twitter.
        Twitter.tweetLastPicture("               ");

        Terminal.println("Uploading");

        TextToSpeech.say("Uploading your image");
        OneSheeld.delay(4000);
        TextToSpeech.say("Thank you");

        // Wait for 5 seconds.
        OneSheeld.delay(5000);

      }// if button si pressed
      else {
        TextToSpeech.say("You didn't press the push button, Thank you sir");
        OneSheeld.delay(6000);
      }//Push button isn't pressed
    }//Machine wasn't filled 

  }// if distance1 < 40 cm
}//void loop

Custom parts and enclosures

I7san.zip
I7san.zip

Schematics

Donation Machine Fritizing File
Circuit bb

Comments

Similar projects you might like

DIY Vending Machine using Arduino & 1Sheeld

Project tutorial by Mahmoud Ahmed

  • 6,990 views
  • 7 comments
  • 32 respects

Automated Photo Booth using Arduino and 1Sheeld

Project in progress by Ashraf Nabil

  • 3,462 views
  • 0 comments
  • 11 respects

Capture and Tweet

Project showcase by tesla nerd

  • 943 views
  • 0 comments
  • 8 respects

LCD display distance of an ultrasonic sensor

Project tutorial by adam johns

  • 5,938 views
  • 0 comments
  • 8 respects

Control your light system with your voice

Project tutorial by Maha Raafat

  • 33,109 views
  • 22 comments
  • 147 respects

4x4x4 LED cube with Arduino Uno and 1sheeld

Project tutorial by Hassan Ibrahim

  • 29,726 views
  • 6 comments
  • 60 respects
Add projectSign up / Login