Skip to Content
All case studies

Case study · Public street lighting

Street lighting you can see from the office. One controller in each cabinet.

Switching, three-phase metering and alarms, from cabinet to web over GPRS.

300,000+luminaires managed with Smart Light Controllers in Spain
2022first city council on the system, still growing
1SIM per cabinet, no concentrators to install
60 minwithout data and the platform marks the cabinet not reachable

Switch on time, measure the energy, warn on every fault.

The controller in the cabinet switches, measures and reports.

The Smart Light Controller (SLC19R) is a controller that Industrial Shields designs and builds in Sant Fruitós de Bages, close to Barcelona, for public lighting cabinets. Since 2022, city councils and provincial governments in Spain use it to manage their street lighting. Today it runs more than 300,000 luminaires. This page explains the pattern: what the controller does in one cabinet, how it talks to the platform, and which hardware you can use for a similar project.

The cabinet

One cabinet, three parts, ready to wire.

Photos from the product documentation: a reference lighting cabinet with the Smart Light Controller, the network analyzer and the power supply, and the wiring diagram of the original case.

Reference lighting cabinet with a power supply U1, a Circutor CEM-C21 network analyzer C1 and a Smart Light Controller A1 above the terminal blocks
The reference cabinet: power supply (U1), network analyzer (C1) and Smart Light Controller (A1). The input, output and digital I/O terminals are below.
Circutor CEM-C21 network analyzer with three-phase inputs and an RS-485 port
The Circutor CEM-C21 network analyzer measures the cabinet. It talks to the controller over Modbus RS-485.
Smart Light Controller SLC19R by Industrial Shields with a GPRS antenna mounted on a DIN rail
The Smart Light Controller with its GPRS antenna. The SIM card is inside the controller.
Wiring diagram: power analyzer on L1, L2, L3 and N, RS-485 with a ferrite to a GPRS/GSM Arduino based controller, relays R1 to R3 to three contactors, a cable theft detector on In2 and an open door sensor on In1
Wiring diagram of the original case: the power analyzer reads L1, L2, L3 and N and sends the data over RS-485. Relays R1 to R3 drive three contactors. In1 reads an open door sensor and In2 a cable theft detector. Open the diagram at full size

The challenge

Light when it is needed. Know when it fails.

The lights must switch on and off at accurate times for the location and the calendar. The council needs the consumption of each cabinet, and an alarm when a lamp group fails, a door opens or a cable is cut. Each lighting cabinet needed a controller that does four jobs and reports to one platform.

01

Switch at the right time

On and off follow the sunset and sunrise of the town, with an offset in minutes if the council wants one.

02

See the faults

A failed lamp group or a tripped protection must raise an alarm on the platform.

03

Protect the cabinet

Open doors and cable theft are real risks for an outdoor cabinet. Both must raise an alarm.

04

Measure the real consumption

Voltage, current, power and power factor per phase. Real data per cabinet is the base for an energy audit.

One cabinet or a whole province

Each cabinet talks straight to the platform over the mobile network, with its own SIM. There are no concentrators and no private radio network to build.

How it works

Three loops: switch, measure, keep going.

The controller runs three loops in each cabinet: switch the circuits on an astronomical schedule, measure the three phases and raise alarms, and keep working when the link drops. The functions come from the product documentation. The values and the timing in the panels are an illustrative simulation.

Loop 1 · Switch

On at sunset, off at sunrise, dim at night

The controller runs the on and off schedule by itself. The schedule can use fixed times or, as usual in street lighting, the sunrise and sunset times of the town, moved earlier or later by a number of minutes. A schedule can apply between two dates or stay permanent. Where the luminaires allow it, the platform also sends dimming profiles and a midnight point.

  • Relay outputs drive the contactors of each circuit
  • Astronomical schedule with an offset in minutes
  • Dimming over U6Me2 (Tridonic) or CodedMains (Philips), where the installation allows it
  • Remote on and off of one circuit or the whole cabinet
12:0000:0012:00
0 min
Circuits ON-
Circuits OFF-
Dim from-
Dim level (example)50 %

Example sunrise and sunset times. In the real system the controller stores the sunrise and sunset times of the town. Illustrative simulation. Example values and scaled times. No program or data from a real installation.

DALI with an Arduino based PLC

Loop 2 · Measure and alarm

Three phases measured, every alarm on the map

A Circutor CEM-C21 network analyzer in the cabinet measures voltage, current, active power and power factor. The controller reads it over Modbus RS-485 and sends the values over GPRS. Digital inputs watch the cabinet: an open door, cable theft, a phase failure or a tripped protection. Each input is declared in the platform with its own description and its alarm state.

  • Voltage, current, active power and power factor per phase
  • Alarm on a sudden change in consumption
  • Door and cable theft inputs, NO or NC wiring
  • History with minimum, mean and maximum per phase and per day
L1Voltage-Current-Power-PF-
L2Voltage-Current-Power-PF-
L3Voltage-Current-Power-PF-
IN1 Door: Door closedIN2 Cable theft: Cable OK

Messages to the platform (example)

    Example values and threshold. The real alarm thresholds are set per installation and are not published.

    Example: Modbus RTU master over RS-485

    Loop 3 · Keep going

    The link drops. The street stays lit.

    Each cabinet works on its own. If the mobile link drops, the controller keeps its schedule and keeps switching the lights. It also keeps records on a microSD card. The platform marks a cabinet as not reachable when it gets no data from it for 60 minutes.

    • Schedule stored in the controller, time from its real time clock
    • Local records on a microSD card
    • Not reachable after 60 minutes without data
    • Remote software updates, no trip to the cabinet
    CabinetGPRSPlatform
    Time20:00
    No data for0 min
    Platform viewReachable
    CabinetSchedule running

      Illustrative simulation. Example values and scaled times. No program or data from a real installation.

      System architecture

      How does one controller manage a street lighting cabinet?

      The network analyzer measures the three phases and talks to the Smart Light Controller over Modbus RS-485. The controller drives the contactors with its relays and reads the alarm inputs. It sends measurements, states and alarms over GPRS/GSM to the platform, and receives on and off orders, schedules and dimming set points. The platform has a web app and a mobile app with NFC tags on the lamp posts.

      Three-phase supplyL1 · L2 · L3 · NCEM-C21network analyzerModbus RS-485Door sensorCable theftProtection contactsProtection contacts: exampleSmart LightControllerSLC19R · in the cabinetPower supply24 Vdc 31 WmicroSDRTCRelaysContactorsLighting circuitsDriversU6Me2 · CodedMainswiring not publishedDataOrdersGPRS/GSMSIM in the controllerPlatformserver · databaseWeb appMobile appNFC tags on lamp postsBased on the product technical report. The dimming wiring and the server software are not published.Three-phase supplyL1 · L2 · L3 · NCEM-C21network analyzerModbus RS-485Smart Light ControllerSLC19R · in the cabinetPower supply24 Vdc 31 WmicroSDRTCDoor sensorCable theftProtection contacts (example)RelaysContactorsDriversU6Me2 · CodedMainswiring not publishedLighting circuitsDataOrdersGPRS/GSMSIM in the controllerPlatformserver · databaseWeb appMobile appNFC tags on lamp postsBased on the product technical report.Dimming wiring is not published.
      Data from the cabinetOrders to the cabinetExample or detail not published
      Signals and data
      FlowBetweenTypePurpose
      Phase measurementBetweenCEM-C21 → controllerTypeModbus RS-485PurposeVoltage, current, active power and power factor of the cabinet
      Circuit switchingBetweenController → contactorsTypeRelay outputsPurposeOn and off of each lighting circuit, or of the whole cabinet
      Door alarmBetweenDoor sensor → controllerTypeDigital inputPurposeDetects an open cabinet door
      Cable theft alarmBetweenTheft detector → controllerTypeDigital inputPurposeRaises an alarm when a cable is cut
      Other alarmsBetweenProtection contacts → controllerTypeDigital inputPurposeFor example a phase failure or a tripped protection
      DimmingBetweenController → luminaire driversTypeU6Me2 or CodedMainsPurposeDimming profiles and midnight point, where the installation allows it
      Data upBetweenController → platformTypeGPRS/GSMPurposeMeasurements, states and alarms
      Orders downBetweenPlatform → controllerTypeGPRS/GSMPurposeOn and off orders, schedules and dimming set points
      Local recordsBetweenController → microSDTypeLocal storagePurposeKeeps records in the cabinet

      Why it works

      Why this pattern fits public lighting.

      Built for the cabinet

      The controller mounts on a DIN rail, runs from 12 to 24 Vdc, works from 0 to 60 °C and carries the CE marking. It acts on the contactors already in the cabinet, so it can live with the manual control.

      No network to build

      Each cabinet has its own SIM and talks straight to the platform. A town does not need concentrators or its own radio network.

      Same tools, two generations

      The first systems run on M-Duino PLCs. New deployments use the ESP32 PLC. Both are programmed with the Arduino IDE, so the code and the skills move from one to the other.

      Hardware

      The Smart Light Controller, and the PLCs behind it.

      Smart Light Controller SLC19R by Industrial Shields with GPRS antenna

      Smart Light Controller SLC19R

      The controller of this case. It is supplied as a full kit, ready for the cabinet: the controller with a GPRS/GSM modem and a microSIM built in, a CEM-C21 network analyzer, a 24 Vdc 31 W power supply, the RS-485 cable and a microSD card. An outdoor kit adds the enclosure and an external antenna.

      Inputs
      6 digital, 5 to 24 Vdc, galvanic isolation, 4 also analog 0-10 V (10-bit)
      Outputs
      8 relays, 3 digital or analog 0-10 V (8-bit) with PWM
      Comms
      GPRS/GSM with built-in microSIM, RS-485, Ethernet, RS-232, I2C, SPI, USB
      Built in
      Real time clock, microSD slot
      Power supply
      12 to 24 Vdc, 30 VA max
      Environment
      0 to 60 °C, 10 to 90 % RH, DIN rail, CE marking

      The Smart Light Controller is not sold in the online shop. Ask an engineer for the kit and the platform. The datasheet and the installation documents are in Spanish.

      M-Duino Ethernet PLC Arduino 19R, industrial PLC with 8 relay outputs

      M-Duino Ethernet PLC Arduino 19R

      The first Smart Light Controllers were built on M-Duino PLCs with an original Arduino Mega 2560 and the same 17 I/O layout. For your own lighting cabinet, the M-Duino 19R switches contactors with its relays and reads a network analyzer over RS-485.

      Inputs
      6: 4 analog/digital (0-10 V, 10-bit) and 2 digital optoisolated, 5 to 24 Vdc, 2 with interrupt
      Outputs
      11: 3 analog/digital/PWM (0-10 V, 8-bit), 8 relays (230 Vac 4 A / 24 Vdc 2 A, resistive)
      Comms
      Ethernet, RS-485, RS-232, TTL serial, I2C, SPI
      Built in
      Real time clock, microSD slot
      Power supply
      12 to 24 Vdc
      Mounting
      DIN rail TS35, IP20

      GPRS/GSM versions are described in the M-Duino GPRS family datasheet.

      ESP32 PLC 19R, industrial controller based on ESP32 with 8 relay outputs

      ESP32 PLC 19R

      New Smart Light Controller deployments use the ESP32 PLC. One core can run the I/O and the lighting logic while the other handles communications. The ESP32 PLC 19R has the same 17 I/O layout and is programmed with the Arduino IDE.

      Processor
      ESP32 dual core, up to 240 MHz
      Inputs
      6: 4 analog/digital (0-10 V, 11-bit) and 2 digital optoisolated, 5 to 24 Vdc
      Outputs
      11: 3 analog/digital/PWM (0-10 V, 12-bit), 8 relays (230 Vac 4 A / 24 Vdc 2 A, resistive)
      Comms
      Ethernet, Wi-Fi, Bluetooth LE, RS-485, RS-232, I2C, SPI
      Options
      One communication board: 4G LTE-M/NB-IoT, LoRa or CAN
      Power supply
      12 to 24 Vdc, DIN rail TS35, IP20

      The ESP32 PLC 19R has the same 17 I/O layout as the first controllers, so it is the natural starting point for a similar cabinet.

      Questions about this case

      What does the Smart Light Controller do in a lighting cabinet?

      It does three jobs at the same time. It switches the lighting circuits through the cabinet contactors, on a schedule based on sunrise and sunset. It measures the electrical values of the cabinet through a network analyzer. And it watches the cabinet with alarm inputs, such as an open door or cable theft. It sends everything to a web and mobile platform over GPRS/GSM.

      How does it measure the energy consumption?

      A Circutor CEM-C21 network analyzer in the cabinet measures voltage, current, active power and power factor. The controller reads it over Modbus RS-485. The platform keeps the history, with minimum, mean and maximum values per phase and per day. Together with the data of each street (type of road and lighting class), the platform calculates the energy rating under the Spanish regulation on energy efficiency in outdoor lighting (RD 1890/2008, ITC EA-01 to EA-07) and the IDAE audit protocol of October 2018. The measured consumption per cabinet is the base for an energy audit.

      What happens if the GPRS link drops?

      The cabinet keeps working. The controller keeps its schedule and keeps switching the lights, and it stores records on a microSD card. The platform marks the cabinet as not reachable when it gets no data for 60 minutes.

      Does it work with DALI?

      The product pages name DALI and 12-24 V control for drivers, power supplies and dimmable ballasts. The technical report names the dimming protocols that the platform supports: Tridonic (U6Me2) and Philips CodedMains. For a DALI bus in your own project, Industrial Shields also makes DALI versions of its M-Duino PLCs.

      Is "PLC" here power line communication?

      No. Here PLC means programmable logic controller. In street lighting, PLC can also mean power line communication, with concentrators and mesh nodes at lamp level. The Smart Light Controller works at cabinet level and reaches the platform over GPRS/GSM, with no concentrators.

      Can I build a similar system with a standard PLC?

      Yes, as a pattern. An M-Duino 19R or an ESP32 PLC 19R has 8 relays for the contactors, digital inputs for the alarms and RS-485 for a Modbus network analyzer. Add a cellular link and a server or SCADA for the data. The PLC Solution Library has a Modbus RTU master example over RS-485 to start from.

      Download the case study

      4-page PDF with the challenge, the logic, the architecture and the hardware. No form required.

      Lighting project?

      Tell us about your cabinets. An engineer will answer.

      Tell us how many lighting cabinets you manage, how many circuits each one has, and how the luminaires dim. We will tell you if the Smart Light Controller fits, or which PLC to use for your own system.

      • You get an answer from our technical team
      • Smart Light Controller kit and platform, or your own design
      • Arduino, ESP32 or Raspberry Pi based PLCs