Semáforo con Arduino
Innovative Traffic Light Model Using Arduino
Introduction to the Project
- The project presents an innovative double intersection traffic light model designed to realistically simulate traffic control at a road crossing using Arduino technology.
- This educational and functional model is ideal for learning about electronics, programming, and traffic control systems.
- The Arduino serves as the central processing unit that controls the sequence of the traffic lights.
Materials Required
- The project utilizes 24 LEDs distributed in three colors: red, yellow, and green to represent traffic signals.
- Eight LEDs of each color (red, yellow, green) are needed; positive leads are longer than negative leads.
Assembly Steps
Preparing the Base
- Cardboard pieces measuring 3x9 cm are marked and divided into three sections for LED placement.
- A parallel connection is made with each group of LEDs using wires or by bending their legs; excess legs are trimmed.
Wiring and Soldering
- After soldering all connections with tin and soldering iron, a 30 Ohm protection resistor is added to each LED group.
- Various cardboard pieces (30x7 mm, 90x7 mm, etc.) are assembled into a box shape using hot glue.
Connecting Components
- Wires from the LEDs are connected to specific pins on the Arduino for functionality testing.
Testing Functionality
Initial Tests
- Each wire's connection is documented before closing the box; a dome or hat for each traffic light is created from cardboard.
Final Assembly Steps
- A base made from 32x32 cm cardboard is prepared with markings for intersections; it’s painted in preferred colors along with the traffic lights.
Integration with Arduino
Wiring Connections
- The first set of LED negatives connects to one of Arduino's negatives while corresponding colors connect to designated pins (green - pin 4, yellow - pin 3, red - pin 2).
Code Uploading
- The second set follows similar wiring principles connecting its LEDs to different pins on the Arduino (green - pin 13, yellow - pin 12, red - pin 11).
Observations During Testing
Cycle Simulation
- Upon uploading code to Arduino, a cycle begins where one side shows green while another displays red; this alternates continuously simulating real-life traffic light behavior.
Enhancements and Realism
Final Touches
- Additional features like holes for cable management improve aesthetics; wooden sticks provide support at corners enhancing stability.
Adding Details
- Decorative elements such as trees and houses can be added for realism.
Conclusion