IoT-Based Automatic Street Light Controller Using ESP32

by electronicsworkshop111 in Circuits > Arduino

5 Views, 0 Favorites, 0 Comments

IoT-Based Automatic Street Light Controller Using ESP32

Screenshot 2025-11-22 180056.png

This system uses ESP32 modules to control street lights through a centralized IoT server.

Each street light is equipped with an ESP32 which connects to the same Wi-Fi network.

A central server or cloud dashboard sends commands to all street light control unit.

Supplies

1) ESP32 (one per light or per group)

2) Wi-Fi router (for network)

3) LED driver / MOSFET controlled by ESP32 PWM pin

4) Server (local Node-RED / cloud MQTT / Firebase / custom backend

5) LED PWM controlled

PCB Manufacturer

PCBWAY is a highly skilled company specializing in PCB manufacturing. They offer their services at incredibly low prices, such as providing 10 PCBs for only $5. Additionally, new members receive a $5 bonus. The website allows customers to upload their Gerber Files and place orders.

ORDER LINK

PCBWAY is known for producing PCBs of exceptional quality and maintaining high standards, which is why many people trust them for their PCB and PCBA needs.

Below are some of my PCB’S manufactured by PCBWAY and I am fully satisfied by their Quality of service they provide

Working Principle

The IoT-based automatic street light controller using an ESP32 works by connecting each street light to a common Wi-Fi network, where a central server sends commands to control the lights. The ESP32 in each light receives these commands—such as ON, OFF, or brightness level—through MQTT or HTTP communication. Based on the command, the ESP32 activates its output pin to switch the light ON/OFF through a relay or MOSFET, and adjusts brightness using PWM signals to control dimming smoothly. This allows all street lights to be centrally managed in real time without any sensors, enabling efficient, remote, and programmable control of the entire lighting network.

24 volt Led Driver Circuit

This 24V LED driver circuit uses a MOSFET-based switching stage controlled by a dedicated LED driver IC (U1) to regulate current through the LED load. The 24V supply is filtered using multiple capacitors (C4, C5, C7, C9) for stability, while an inductor (L1) and Schottky diode (D3) form the buck-converter output stage that drives the LED string. The driver IC senses LED current through the low-value resistor R10 and adjusts the MOSFET (Q1) gate accordingly to maintain constant current. Additional components—including soft-start and enable pins, compensation capacitors, and input filters—ensure stable operation, controlled startup, and proper current regulation. The result is a smooth, efficient, and protected constant-current LED driver suitable for 24V lighting applications.

22 volt to 3.3 volt converter

This 22V-to-3.3V converter circuit uses the TPS54331 buck regulator (U2) to step the 22V input down to a stable 3.3V output. The input voltage is filtered by C13 and C18 before entering the regulator, while the high-frequency switching occurs at the PH pin, driving the inductor L1 to store and release energy for voltage conversion. The diode D1 provides a freewheeling path for inductor current during switching transitions. Output capacitors C10 and C11 smooth the 3.3V output, and the feedback divider formed by R4 and R5 sets the output voltage by feeding a scaled version of it into the VSENSE pin. The soft-start capacitor C12 controls the ramp-up speed of the regulator, and the compensation network (R7, C19, C20) connected to the COMP pin stabilizes the control loop. Overall, this circuit efficiently steps 22V down to 3.3V with good regulation and low ripple.

PCB Diagram


Order Directly From PCB WAY

Order Directly from PCB WAY

I have already uploaded all these required manufacturing files in PCBWAY website. You can easily go to the below link and place you order, and get your Own Home Automation PCB manufactured from one of the best pcb manufacturer PCBWAY

order now……….

Application

This project is used for smart street-light management in cities, highways, industrial zones, campuses, and residential communities where centralized and energy-efficient lighting control is required. By connecting every street light through Wi-Fi and controlling them from a server, it enables remote ON/OFF switching, scheduled operation, brightness dimming, and real-time monitoring, significantly reducing energy consumption and maintenance costs. It is ideal for modern smart-city infrastructure, solar street-light automation, industrial lighting networks, parking lots, and any outdoor lighting system that benefits from remote control, automation, and intelligent power management.

Conclusion

The IoT-based automatic street light controller using ESP32 provides an efficient, modern, and scalable solution for smart lighting management. By enabling centralized server-based control along with PWM brightness adjustment, the system eliminates the need for local sensors while ensuring precise and flexible operation. Its Wi-Fi connectivity allows real-time monitoring, scheduling, and remote command execution, making it suitable for large lighting networks. Overall, the project demonstrates a reliable, energy-saving, and technologically advanced approach to street light automation, contributing to improved urban infrastructure and smarter city development.