SIMULASI PALANG KERETA API OTOMATIS MENGGUNAKAN ARDUINO UNO DENGAN SIMULATOR WOKWI
Summary
TLDRThis video demonstrates the creation of an automatic railroad crossing simulation using an Arduino Uno and WorkView simulator. The project incorporates a buzzer for alerts, an ultrasonic sensor to detect approaching trains, and a servo motor to control the opening and closing of the gate. The system is programmed to activate the buzzer and open the gate when a train is detected within 100 meters. The simulation showcases how the gate responds dynamically to changes in train proximity, offering a practical example of using Arduino for automation in real-world applications.
Takeaways
- π The project involves creating an automatic railway crossing system using Arduino Uno and the Workview simulator.
- π The main components used are an Arduino Uno, ultrasonic sensor, servo motor, and buzzer.
- π The ultrasonic sensor detects the approaching train by measuring the distance using echo and trigger pins.
- π When the train is detected within 100 meters, the buzzer sounds and the barrier opens automatically.
- π The servo motor controls the movement of the railway crossing barrier, based on the sensor input.
- π The Arduino code includes functions to initialize pins, read sensor data, and control the servo motor and buzzer.
- π The `pinMode()` function sets up the sensor, motor, and buzzer pins for input and output.
- π The `digitalRead()` function is used to read the sensor data to determine if a train is within range.
- π The `servo.write()` function rotates the servo motor to open or close the barrier based on the sensor distance.
- π The `tone()` function is used to emit sound from the buzzer when the train is within the defined distance range.
- π The system is simulated in Workview before being implemented physically, and the simulation is saved for future reference.
Q & A
What is the purpose of this simulation project?
-The purpose of this simulation is to create an automatic railway gate system using Arduino Uno and Workview simulator, as part of a midterm project.
What components are used in the simulation?
-The simulation uses an Arduino Uno, an ultrasonic sensor (HC-SR04), a servo motor, and a buzzer.
Why is the ultrasonic sensor used in this project?
-The ultrasonic sensor is used to detect the distance of the approaching train. It sends out sound waves and measures the time it takes for the waves to return, which helps calculate the distance to the train.
How does the servo motor work in this simulation?
-The servo motor is used to open and close the railway gate based on the distance detected by the ultrasonic sensor. If the train is within a certain distance, the motor will rotate to open the gate.
What is the role of the buzzer in this project?
-The buzzer provides an audible signal when the train is approaching. It helps alert users or indicate that the gate is operating.
How is the sensor connected to the Arduino?
-The ultrasonic sensor is connected to the Arduino with the Echo pin on pin 3 and the Trigger pin on pin 2. These pins are used to send and receive signals from the sensor.
How does the Arduino control the gate and the buzzer?
-The Arduino reads the data from the ultrasonic sensor and based on the distance calculated, it sends signals to the servo motor to open or close the gate. If the train is detected within a specific range, the buzzer also sounds.
What programming functions are used to control the servo motor?
-The `servo.write()` function is used to set the position of the servo motor, controlling whether the gate is open or closed. The angle set by this function determines the position of the gate.
What happens when the distance measured by the ultrasonic sensor is less than 100 cm?
-When the distance is less than 100 cm, the Arduino triggers the servo motor to open the gate and activates the buzzer to signal the arrival of the train.
What is the significance of the interval in the program?
-The interval controls how quickly the system checks the sensor and adjusts the gate. The program increases the interval in each loop to regulate how often the gate opens and closes, ensuring the system works smoothly.
Outlines
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowMindmap
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowKeywords
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowHighlights
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowTranscripts
This section is available to paid users only. Please upgrade to access this part.
Upgrade NowBrowse More Related Video
Simulasi kontrol gerakan servo dengan sensor ultrasonik | mikrokontroler arduino di wokwi.com
Project Membuat Palang pintu otomatis Jalan tol
Dijamin Bisa | Membuat Kotak Sampah Otomatis
IoT Smart Gate Design for Smart Home | Arduino, Ultrasonic Sensor, Servo
HOW TO MAKE A TILT SENSOR ACTIVATED ALARM USING ARDUINO.
handsanitizer otomatis menggunakan arduino UNO R3 CH340. baca deskripsi ya
5.0 / 5 (0 votes)