STEP 1 / 6ELECTRONICS

Traffic Light Controller

This simple traffic controller can be used to teach youngsters the fundamentals of traffic laws. The circuit (illustrated in Fig. 1) makes use of components that are easily obtainable. It…

Traffic Light Controller - source illustration from page 298
PROJECT#156
TRACKElectronics
PARTS05
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

Traffic Light Controller is a electronics project. This simple traffic controller can be used to teach youngsters the fundamentals of traffic laws. The circuit (illustrated in Fig. 1) makes use of components that are easily obtainable. It…

Source pages
297-300
Named parts
5
Build goal
Working, tested prototype
02

Tools you need

  • Digital multimeter
  • Wire stripper and side cutters
  • Soldering iron with a fine tip
  • Current-limited bench supply

Use eye protection, good lighting, and a clean insulated surface throughout the build.

03

Safety precautions

  • Disconnect every power source before changing a connection.
  • Check component polarity, pinout, and supply voltage twice.
  • Use a current limit for the first power-up.
  • This project may involve hazardous voltage. Work only with qualified supervision and proper isolation.
Ready to continue?
STEP 2 / 6 · Parts library

Gather, identify, and understand every part.

Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.

NAMED PROJECT INVENTORY5 PART LINES
PARTTYPEQTYREADY
PPower supplyPOWER1
What's this?Image, role, pros, cons, handling & specifications
Traffic Light Controller - source illustration from page 298POWER LEARNING VIEW

Power supply

A power component supplies, converts, stores, or regulates energy for the project.

What it does here

It must provide the documented voltage, polarity, isolation, and sufficient current safely.

Buy / compare this part

Advantages

  • Stable power improves reliability
  • Current limiting protects first tests
  • Regulation reduces resets and noise

Limitations

  • Wrong polarity can cause immediate damage
  • Underrated parts overheat
  • Mains circuits require qualified supervision

Handling

  • Measure output before connection
  • Use a fuse or current limit
  • Insulate exposed conductors

Specifications to verify

  • Use the exact model, value, package, and rating listed for Power supply; similar-looking parts are not always interchangeable.
  • Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
PTransformerPOWER1
What's this?Image, role, pros, cons, handling & specifications
Traffic Light Controller - source illustration from page 298POWER LEARNING VIEW

Transformer

A power component supplies, converts, stores, or regulates energy for the project.

What it does here

It must provide the documented voltage, polarity, isolation, and sufficient current safely.

Buy / compare this part

Advantages

  • Stable power improves reliability
  • Current limiting protects first tests
  • Regulation reduces resets and noise

Limitations

  • Wrong polarity can cause immediate damage
  • Underrated parts overheat
  • Mains circuits require qualified supervision

Handling

  • Measure output before connection
  • Use a fuse or current limit
  • Insulate exposed conductors

Specifications to verify

  • Use the exact model, value, package, and rating listed for Transformer; similar-looking parts are not always interchangeable.
  • Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
P1N4001PASSIVE1
What's this?Image, role, pros, cons, handling & specifications
1N4001 rectifier diodePASSIVE LEARNING VIEW

1N4001

A passive component sets current, voltage, timing, filtering, or signal behaviour without adding gain.

What it does here

Its exact value and tolerance determine how the surrounding stage behaves.

Buy / compare this part

Advantages

  • Simple and dependable
  • Low cost
  • Easy to measure before installation

Limitations

  • A wrong value can stop or damage the circuit
  • Ratings must not be exceeded
  • Polarized parts require correct orientation

Handling

  • Measure unclear values
  • Observe capacitor polarity
  • Avoid overheating leads while soldering

Specifications to verify

  • Use the exact model, value, package, and rating listed for 1N4001; similar-looking parts are not always interchangeable.
  • Confirm value, tolerance, power or voltage rating, polarity, and package size.
P7805 - integrated circuitPOWER1
What's this?Image, role, pros, cons, handling & specifications
7805 voltage regulatorPOWER LEARNING VIEW

7805 - integrated circuit

A power component supplies, converts, stores, or regulates energy for the project.

What it does here

It must provide the documented voltage, polarity, isolation, and sufficient current safely.

Buy / compare this part

Advantages

  • Stable power improves reliability
  • Current limiting protects first tests
  • Regulation reduces resets and noise

Limitations

  • Wrong polarity can cause immediate damage
  • Underrated parts overheat
  • Mains circuits require qualified supervision

Handling

  • Measure output before connection
  • Use a fuse or current limit
  • Insulate exposed conductors

Specifications to verify

  • Use the exact model, value, package, and rating listed for 7805 - integrated circuit; similar-looking parts are not always interchangeable.
  • Confirm input/output voltage, current, polarity, connector, isolation, and thermal rating.
ST1, T2 - transistor stages identified in the circuitSEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
Traffic Light Controller - source illustration from page 298SEMICONDUCTOR LEARNING VIEW

T1, T2 - transistor stages identified in the circuit

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for T1, T2 - transistor stages identified in the circuit; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. Keep motors, relays, pumps, and other loads on a suitable driver and external supply.

Common mistakes

Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.

Troubleshoot

Disconnect loads, continuity-test one path at a time, then test with a current limit.

02

Software preparation

No IDE, board package, library, or firmware upload is required for this project.

If you add a programmable controller as an extension, document its pin map separately.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

Power up safely

  • Inspect unpowered continuity first
  • Apply the lowest safe current limit
  • Measure supply rails before signals
  • Add one load at a time
  • Record expected and actual results
TROUBLESHOOT

Work from simple to complex

  • Confirm power, ground, polarity, and orientation
  • Compare each pin with the source
  • Test inputs separately from outputs
  • Replace only one variable at a time
  • Power off before every correction
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

This simple traffic controller can be used to teach youngsters the fundamentals of traffic laws. The circuit (illustrated in Fig. 1) makes use of components that are easily obtainable. It is primarily composed of rectifier diodes (1N4001), a 5V regulator 7805, two timers IC 555, two relays (5V, single-changeover), three 15W, 230V bulbs, and various discrete components. Transformer X1 takes the mains electricity and steps it down to produce a secondary output of 9 volts and 300 milliamps. The output of the transformer is rectified by a full-wave bridge rectifier, which is comprised of the diodes D1 through D4, filtered by capacitor C1, and regulated by integrated circuit 7805. (IC1). IC2 is hooked up to function as a multivibrator, and its "on" and "off" periods, which each last about 30 seconds, are determined by the component values that are selected. The output of pin 3 of IC2 becomes high for a period of half a minute as soon as the

mains power is turned on. This, in turn, energizes relay RL1 through transistor T1, and as a result, the normally-open (N/O) contact on the relay causes the red light (B1) to illuminate. At the same time, the power from the mains is cut off to the pole where relay RL2 is located. Fig. 1: Traffic Controller Circuit System When the "on" time of IC2 comes to a conclusion, a high-to-low pulse is generated at its pin 3, which then triggers IC3 through C5. Because IC3 is programmed to operate as a monostable and has a "on" time of approximately 4 seconds, pin 3 of IC3 will maintain its high state for the duration of this time and will energize relay RL2 by means of driver transistor T2. Therefore, the amber lamp (B2) will light up for a total of four seconds. Following the expiration of the 4-second time period of timer IC3 at pin 3, the relay RL2 becomes de-energized, and the green lamp (B3) begins to glow for the duration of the remaining approximately 26-second 'off' period of IC2. The normally closed (N/C) contacts of relay RL2 are what are responsible for turning on the green bulb. Therefore, when the mains power is turned on, the red light will glow for 30 seconds, the amber light will glow for 4 seconds, and the green light will glow for 26 seconds. You can construct this circuit on a printed circuit board (PCB) designed for general use and then enclose it in an insulated box. In the box, there ought to be sufficient room for attaching both the X1 transformer and the two relays. Either it can be put on the PVC tube that was used in the building of the traffic signal container or it can be fixed close to a power supply that operates at 230V AC and 50Hz.

Figure 2 provides an illustration of the building of the traffic light container box. To house the lamps, you will need a sturdy cardboard box of 30 by 15 by 10 centimeters in volume. Use a piece of plywood with a surface area of 10 by 45 centimeters and a thickness of 1.5 centimeters. Place three light sockets and the box onto the plate, and then fasten them with nuts, bolts, or screws. Fig. 2: Construction of the traffic light container box Create three tubes out of the thin aluminum sheeting that can be found in most home improvement stores. It is recommended that the inner diameter of aluminum tubes be made to a size that allows them to fit securely on light sockets. Make holes carefully

on the other side of the sockets using a knife that is very sharp. Connect the wires to the sockets on the back, then thread them through the PVC tube to exit. Once that, you should press on the tubes after you have installed three 15W bulbs (B1 through B3). Place the remaining ends of the tubes in the holes that were cut out of the front panel of the cardboard box to provide support. Placing three sheets of colored gelatine paper between two pieces of cardboard and adhering them to the tubes will give you a rainbow effect. The mounting of the red, amber, and green lights on the tubular shape results in an improvement in the lights' visibility.

Ready to continue?
PROJECT ACHIEVED

You built Traffic Light Controller.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

Weather Station Using STM32 project thumbnail featuring STM32 (Blue Pill) (Blue Pill), DHT11 Sensor, Soil Moisture Sensor
NEXT ELECTRONICS ADVENTURE

Weather Station Using STM32

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects