

The Traffic Light Module by Sam (Part ID: Sam) is an electronic component designed to simulate the operation of real-world traffic lights. It features three LEDs—red, yellow, and green—arranged in a vertical layout to mimic standard traffic light behavior. This module is ideal for educational purposes, prototyping, and projects requiring traffic control simulation.








The following table outlines the key technical details of the Traffic Light Module:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V - 5V |
| Current Consumption | ~20mA per LED (max) |
| LED Colors | Red, Yellow, Green |
| Dimensions | 30mm x 70mm x 10mm |
| Connector Type | 4-pin header (male) |
The module has a 4-pin header for easy interfacing. The pinout is as follows:
| Pin | Name | Description |
|---|---|---|
| 1 | GND | Ground connection |
| 2 | VCC | Power supply (3.3V - 5V) |
| 3 | Yellow | Control pin for the yellow LED |
| 4 | Green | Control pin for the green LED |
| 5 | Red | Control pin for the red LED |
VCC pin to a 3.3V or 5V power source and the GND pin to ground.Red, Yellow, and Green pins. Each pin can be connected to a digital output pin of the microcontroller.Below is an example Arduino sketch to control the Traffic Light Module:
// Pin definitions for the Traffic Light Module
const int redPin = 5; // Connect the red LED pin to digital pin 5
const int yellowPin = 6; // Connect the yellow LED pin to digital pin 6
const int greenPin = 7; // Connect the green LED pin to digital pin 7
void setup() {
// Set the LED pins as outputs
pinMode(redPin, OUTPUT);
pinMode(yellowPin, OUTPUT);
pinMode(greenPin, OUTPUT);
}
void loop() {
// Simulate traffic light sequence
// Turn on the red LED for 5 seconds
digitalWrite(redPin, HIGH);
digitalWrite(yellowPin, LOW);
digitalWrite(greenPin, LOW);
delay(5000); // Wait for 5 seconds
// Turn on the yellow LED for 2 seconds
digitalWrite(redPin, LOW);
digitalWrite(yellowPin, HIGH);
digitalWrite(greenPin, LOW);
delay(2000); // Wait for 2 seconds
// Turn on the green LED for 5 seconds
digitalWrite(redPin, LOW);
digitalWrite(yellowPin, LOW);
digitalWrite(greenPin, HIGH);
delay(5000); // Wait for 5 seconds
}
LEDs Not Lighting Up
LEDs Are Dim
Module Overheating
Incorrect LED Behavior
Q: Can I use this module with a 12V power supply?
A: No, the module is designed for 3.3V to 5V operation. Using a 12V supply may damage the LEDs.
Q: Does the module include built-in resistors?
A: This depends on the specific version of the module. Check the manufacturer's datasheet or test the module to confirm.
Q: Can I control the module without a microcontroller?
A: Yes, you can use simple switches or a 555 timer circuit to control the LEDs manually.
Q: Is the module compatible with Raspberry Pi?
A: Yes, the module can be controlled by a Raspberry Pi, but ensure you use appropriate GPIO voltage levels (3.3V).
This concludes the documentation for the Traffic Light Module by Sam.