handsanitizer otomatis menggunakan arduino UNO R3 CH340. baca deskripsi ya
Summary
TLDRThis tutorial demonstrates how to build a simple project using an Arduino R3, an HC-SR04 ultrasonic sensor, and a SG90 mini servo to create an automated bottle cap opening mechanism. The video walks through the process of wiring the components, including the sensor and servo connections to the Arduino. The tutorial also covers programming the Arduino to control the servo based on the sensor's distance readings. It's a hands-on guide suitable for beginners, with clear instructions on assembling the hardware and writing the code to make the servo motor open the bottle cap when an object is detected in front of the sensor.
Takeaways
- 😀 The first component needed is the Arduino R3 for the project.
- 😀 The second component is the HC-SR04 ultrasonic sensor for distance measurement.
- 😀 Jumper wires (5-10) and a USB cable are required for programming and powering the Arduino.
- 😀 The mini servo SG90 is used for the bottle cap mechanism, though beginners are advised to use a stronger servo due to the SG90's limited 9g pull strength.
- 😀 The ultrasonic sensor has four connections: VCC, Trigger, Echo, and Ground.
- 😀 The VCC pin of the ultrasonic sensor is connected to the 3.3V pin on the Arduino.
- 😀 The Trigger pin of the ultrasonic sensor is connected to digital pin 3 on the Arduino.
- 😀 The Echo pin is connected to digital pin 2 on the Arduino.
- 😀 The servo is connected with the yellow (data) wire to digital pin 4, red (power) to 5V, and brown (ground) to the Arduino's ground.
- 😀 The USB cable is used to both power the Arduino and upload the code from the laptop or PC.
- 😀 The servo's movement can be controlled by adjusting the code, with a delay setting (e.g., 1000 microseconds) to define how the servo moves based on the sensor's input.
Q & A
What components are needed for this Arduino project?
-The components required are an Arduino R3, an HC-SR04 ultrasonic sensor, two SG90 mini servos, jumper wires, a USB cable for programming, and a gasoline bottle mechanism.
Why is it recommended to use two SG90 servos instead of one?
-It is recommended to use two SG90 servos because each servo can only pull 9 grams of force, which might be insufficient for some tasks. Using two servos ensures better strength and performance in the mechanism.
How should the ultrasonic sensor HC-SR04 be connected to the Arduino?
-The HC-SR04 ultrasonic sensor should be connected as follows: VCC to 3.3V, Trigger to Pin 3, Echo to Pin 2, and Ground to any of the Arduino's ground pins.
What does the Arduino USB cable do in this project?
-The USB cable is used to program the Arduino and also serves as the power supply for the Arduino board.
What changes should be made to the code before uploading it to the Arduino?
-The most important edit is the delay time in the code, which is set to 1000 microseconds (1 second) for each servo movement. This can be adjusted based on personal preferences for timing and speed.
What is the purpose of the servo motors in this project?
-The servo motors are used to pull and release the bottle cap based on the input from the ultrasonic sensor, which detects an object in front of it.
How is the servo motor connected to the Arduino?
-The servo motor has three wires: the yellow wire (data) goes to Pin 4 on the Arduino, the red wire (positive) goes to the 5V pin, and the brown wire (ground) connects to a ground pin on the Arduino.
What is the role of the ultrasonic sensor in this project?
-The ultrasonic sensor detects objects placed in front of it. When an object is detected, it triggers the servo motor to pull the bottle cap.
Can the servo motors and sensor work without additional power sources?
-No, the Arduino provides power for the sensor and the servo motors via the USB cable. However, for more powerful motors or sensors, an external power supply might be necessary.
What should be done after the wiring and programming steps are completed?
-After wiring and uploading the code, test the mechanism by detecting an object in front of the ultrasonic sensor. The servo should pull the bottle cap when triggered by the sensor.
Outlines
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraMindmap
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraKeywords
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraHighlights
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraTranscripts
Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.
Mejorar ahoraVer Más Videos Relacionados
Simulasi kontrol gerakan servo dengan sensor ultrasonik | mikrokontroler arduino di wokwi.com
Dijamin Bisa | Membuat Kotak Sampah Otomatis
LPG gas leakage detection system with auto off regulator | Inspire Award Project 2023
DIY Pakan Kucing Otomatis sederhana dengan Arduino dan servo (Auto Feeder Sederhana)
How to Make a Radar with Arduino | Arduino Project | Indian LifeHacker
SIMULASI PALANG KERETA API OTOMATIS MENGGUNAKAN ARDUINO UNO DENGAN SIMULATOR WOKWI
5.0 / 5 (0 votes)