Assembly - Traffic Light DT18-TL
Assembly - Traffic Light
What you will need
DT18-TLTraffic light components (can be sourced from the Duckietown project shop)
An appropriately configured SD-card.
Tools: wood glue or hot glue gun.
What you will get
Traffic light in configuration
Traffic lights can be used to coordinate traffic at three or four way intersections in Duckietown. Hardware wise, traffic lights are essentially “Duckiebots without wheels”, and a beautiful different chassis.
For traffic lights to be recognized by Duckiebots, appropriate signage must be placed at intersections (traffic light traffic sign instead of stop sign).
This section describes the physical assembly and installation of traffic lights.
Traffic lights are crucial parts in modern cities. We rely on them to have well-organized traffic. In Duckietown, traffic lights serve the same purpose.
They are composed of two supports connected by an overhanging tube. They are intended to be placed on the diagonal direction of an intersection. One of the supports is equipped with the computational stack and an overseeing camera.
Traffic lights can double-up as watchtowers when upgrading a Duckietown to Duckietown Autolab.
Assembly of the traffic light parts#
This section shows how to assemble the components from the laser cut traffic light parts.
The small parts with the hole in the middle, i.e., the ones in the left of Fig. 57, are not all equal. Some have a round hole, others a polygonal hole. Double check you are using the right ones in the process (compare with the pics).
All parts should be glued together as showed in the pictures for enhanced structural stability.
Tube holder with big ground plate#
Tube holder with small ground plate#
Traffic light LED housing#
Ground module cover#
Components of the traffic light#
Now that you have assembled the traffic light chassis, you are ready to add the electronics.
These components are needed for one traffic light:
Tube holder with big ground plate
Tube holder with small ground plate (Duckietown)
Cable with soldered LED strip
Joint module (2x)
Traffic light LED housing
Raspberry Pi base plate
Ground module cover (Duckietown)
Camera mount cover
Medium tube (2x)
Long tube with hole at the side
Raspberry Pi shield
M2.5x10 MF Nylon spacers (8x)
M2.5x8 Nylon screws (4x)
SD card with Duckietown software
Additionally, the traffic light structure can host:
Traffic sign stands (4x)
Traffic sign stand supports (4x).
Assembling the Traffic Light#
Put the LEDs into the housing#
Bend the LED strip at an angle to reduce the chance that the exposed soldered wires short. The exposed part of the wires should not be in contact, especially when turning on the power.
The actual traffic light in your hands might vary slightly from the pictures above. In particular, the electrical cables could have different colors or be soldered in different positions. Take note of what each color cable is soldered to, as same will go go with same on the other end.
Carefully push the LEDs into the designated holes.
Fix the LEDs with some tape, don’t use glue.
Connect the tubes#
Stick the tubes into the sides of the LED housing and pull the cable through one side.
Add the joint modules on the side of the tube without the cable.
Mount the other joint module on the long tube, such that it aligns with the hole.
You can add additional tape under the joint modules to prevent them to slip down.
Pull the cable through longer tube and stick the tube into the joint module.
Put the tubes into the tube holders.
Connect the Raspberry Pi#
Use the spacers and the screws to mount the Raspberry Pi on the Raspberry Pi ground plate as shown in Fig. 64.
Plug the shield on top of the Raspberry Pi.
Insert the SD card.
Connect the LED cable to the shield.
Connect the Ethernet cable.
Connect the USB cable.
If done correctly the LEDs should be on.
Close the ground module with the case.
Add traffic sign stands#
Fully assembled traffic light#
Place the traffic light at an intersection such that the LEDs are exactly in the middle and are facing each incoming lane perpendicularly.
You can verify the position is correct by verifying that Duckiebots at the red stop lines can see only one light blinking, and no reflections of LEDs facing other directions.
You can finally use the provided double-sided tape pads to fix the traffic light to the tiles.
SD-card image Preparation#
At hardware and software level, traffic lights are Duckiebots without wheels. In initializing the SD-card of your
traffic light, follow the instructions here, with the extra step of using the
--type traffic_light. Also, WiFi configuration for traffic lights by default is not set. You can add it
--wifi option as specified int the instructions.
An example flashing command for a Wi-Fi connected traffic light can be:
dts init_sd_card --hostname watchtower![XX] --country ![COUNTRY] --type traffic_light --configuration TL19 --wifi duckietown:quackquack
For Autolab users: since traffic lights are coupled to watchtowers, please use the watchtower setup:
However, if you just want to use it as a traffic light, use the trafficlight setup:
The default username and password are all the same:
For autolab users, do not change the username and password.
Launch Traffic Lights#
By choosing the
robot_type to be
traffic_light, the blinking behaviour should happen as soon as you boot your device.
If you need to manually restart the behaviour inside the
duckiebot-interface container, you can restart the traffic light behaviour by running, inside the container:
roslaunch duckiebot_interface all_drivers.launch veh:=![NAME] robot_type:=traffic_light