No Touch Lid
With this project, we made a "No Touch Lid," which is a type of lid that can be opened or closed without the need for direct physical contact. For this project, I did the idea of a "No Touch Lid" for a trash can. We used sensors and other tools that detected any motion which allowed the lid to be opened or closed automatically when it felt something close to the senor.
Supplies
The supplies used for this project included
- Arduino Uno R3 Board
- Breadboard
- Duct Tape
- X-acto knife
- Hot Glue Gun
- Cardboard
- Female-to-Male Dupont Wires
- Ultrasonic sensor
- Servo Motor
- Breadboard Jumper Wires
Upload Arduino Code
- First, install the Arduino app on your computer and then use the blue thick wire to connect your Arduino board to your computer and upload the code on Chat GPT stating"Write me a code for Arduino IDE using a SOR4 ultrasonic detector and a UNO microcontroller with an SG90 servo motor. Have it rotate 90 degrees when an object is detected less than 5 inches when the object disappears the servo should rotate back to 0"
Assemble the Circuit Onto Breadboard
Next, we had to assemble the wires on to the circuit board, as I asked Chat it stated,
- SOR4 Ultrasonic Sensor:
- VCC: Connect to Arduino 5V pin.
- GND: Connect to Arduino GND pin.
- TRIG: Connect to Arduino digital pin 7.
- ECHO: Connect to Arduino digital pin 6.
- SG90 Servo Motor:
- VCC (Red Wire): Connect to Arduino 5V pin.
- GND (Brown/Black Wire): Connect to Arduino GND pin.
- Control (Yellow/Orange Wire): Connect to Arduino digital pin 9
Power Supply:
- Connect Battery: Positive terminal to Arduino's 5V.
- Negative terminal to Arduino's GND.
Assemble Your Trash Can
Having to assemble our trash can was the hardest part we had to,
Cut the Cardboard:
- Cut the cardboard sheet into smaller pieces as needed to create a base and walls for your "no-touch lid" enclosure. For a 5x5 inch lid, you might need a larger piece of cardboard for the base and four smaller pieces for the walls.
Prepare Openings:
- Decide where you want to place the ultrasonic sensor and servo motor. Cut appropriate openings in the cardboard to accommodate these components. Ensure the ultrasonic sensor's opening allows it to "see" out, and the servo motor's opening allows its shaft to rotate freely.
Mount the Components:
- Use hot glue or adhesive tape to securely mount the SOR4 ultrasonic sensor and SG90 servo motor into their respective openings. Ensure they are positioned correctly and securely attached to the cardboard.
Connect Wiring:
- Connect the components to the Arduino UNO using jumper wires: Connect the SOR4 ultrasonic sensor's TRIG pin to Arduino digital pin 7 and ECHO pin to digital pin 6.
- Connect the SG90 servo motor's control pin to Arduino digital pin 9.
- Connect the VCC and GND pins of both the ultrasonic sensor and servo motor to the appropriate power sources (5V and GND) on the Arduino.
Secure Arduino:
- Attach the Arduino UNO to the cardboard base using adhesive or mounting brackets. Ensure it is positioned securely and does not obstruct the movement of the servo motor.
Wire Management:
- Organize and secure the jumper wires to prevent tangling and ensure a neat appearance. You can use adhesive tape or cable ties to keep the wires tidy.
Test the Prototype:
- Upload the Arduino code provided earlier to your Arduino UNO.
- Power up the Arduino either through a USB cable connected to your computer or using a USB power bank.
- Test the functionality of your "no-touch lid" prototype by placing objects within range of the ultrasonic sensor and observing the servo motor's response.
Refine and Adjust:
- Fine-tune the positioning of the components and make any necessary adjustments to improve the performance and appearance of your prototype.