Skip to Content
All simulators

PLC Solution Library · Building zones simulator

Run the zones of a building: people, light, climate and alarms

A building zone needs light when someone is in it, the right temperature and fresh air, and an alarm that reaches the right people. In this simulator, one Raspberry PLC 57R runs four zones of an office floor: an open office, a meeting room, the reception and a rest room with a call button.

Choose a day, change the rules, open a window or walk in at night. Watch each zone, the energy, the comfort and every alert.

Choose your scenario

- - Simulated values
-zones in use
0lighting kWh (example)
0heating and cooling kWh (example)
0person-minutes out of comfort
-intrusion alarm
0alerts sent

-

Room temperatureHeating and cooling set pointsPeople in the zoneLights on

    Acknowledge stands for the guard or the facility manager on the dashboard: it silences the siren and clears the alerts that are no longer active.

    About this panel

    Example floor for you to test. Zone 1 is an open office for 12 people with large south windows. Zone 2 is a meeting room for 10. Zone 3 is the reception, with the access reader of the floor. Zone 4 is a rest room with a call button. Each zone has a presence sensor, a light sensor, a room sensor for temperature and CO2, a window contact, dimmable lights and a fan coil that heats or cools.

    One Raspberry PLC 57R runs the floor. It reads the presence, light, window and button signals on its inputs and the room sensors over RS-485, switches the lights, the fan coil valves and the fan coil fans with its relays, dims the lights with its 0-10 V outputs, asks the air handling unit for air over Modbus TCP and sends the alerts.

    Every person, temperature, level, time and energy value on this panel is a simulated example, not data from a real building. One second of your time is 10 minutes of the building at x1.

    Your design choices

    These are choices you make in your own building program. They are explained below. A change applies at once, also in the middle of a scenario.

    Example set points

    ModeHeat belowCool above
    Comfort21 °C24 °C
    Setback, zone empty17 °C28 °C
    Window openoff, frost guard at 8 °Coff

    Example values for this simulator. The fan coil switches with 0.5 °C of hysteresis around each set point. Lights: 500 lx on the desk, the EN 12464-1 value for office work. CO2: boost from 1,000 ppm, back to base under 800 ppm. Your values come from your building, its use and its local rules.

    Alerts and events

    timezoneeventdetailsent to

    One row per alert or event. The CSV has one row every 15 minutes with the temperature, the people, the light level and the CO2 of each zone, the state of the alarm and the energy so far.

    How does a PLC run the zones of a building?

    It treats each zone as a small loop with the same parts: someone is there or not, the light is enough or not, the air is warm, cold or stale, and something may be wrong. Every minute, the PLC runs these rules for each zone:

    1. Presence. A presence sensor on a digital input says if there is movement. The zone is in use until the off delay passes with no movement.
    2. Light. In use, the lights go on, and a light sensor measures the daylight on the desk. The PLC dims the lights with a 0-10 V output so the desk gets 500 lx, not more.
    3. Climate. In use, the comfort set points apply: heat below 21 °C, cool above 24 °C. Empty, the zone falls back to 17 and 28 °C. An open window stops the fan coil.
    4. Air. The room sensor measures CO2. Over 1,000 ppm, the PLC asks the air handling unit for more fresh air for that zone.
    5. Alarms. After hours, the floor arms by itself. Movement without a valid access starts the siren and an alert. The call button of the rest room calls the team at any time.

    The same rules repeat for each zone with its own sensors and set points, so a new zone is a new set of parameters, not a new program.

    Run the An office day scenario and follow the open office and the meeting room.

    When should the lights of a zone go off, and how much can daylight dimming save?

    A presence sensor does not count people. It sees movement. A person who reads or types without moving much can go unseen for a few minutes. That is why the lights stay on for an off delay after the last movement.

    A short delay saves energy in rooms that empty often, but it switches the lights off on people who sit still. Set Lights off after the last movement to 2 min and watch the events table: each Lights off with people inside is a person who has to wave an arm.

    Daylight dimming saves most where the daylight is strong. The open office has large south windows, so at noon on a sunny day its lights may need only a few percent. The reception and the rest room get little daylight and save little. The case of the smart office uses the same idea: lights by presence, dimmed by the light from outside.

    Why do set points change with presence?

    A zone that nobody uses does not need 21 °C. With setback set points, the fan coil works less in empty rooms. The price is time: when people come in, the zone needs a while to reach comfort again.

    A schedule keeps every zone in comfort from 07:00 to 19:00, used or not. A meeting room that stays empty all morning is heated all morning. Presence saves that energy, but the first minutes of a meeting may be cold. The stat person-minutes out of comfort counts it: one person for one minute outside 20 to 25 °C, 1 °C beyond the comfort set points, so the normal swing of the fan coil does not count. Compare both choices in the An office day scenario.

    A window contact stops the fan coil of that zone. Heating or cooling against an open window wastes energy. The PLC keeps a frost guard: if the room falls under 8 °C, it heats anyway.

    The fan coils need water from a plant, and the fresh air comes from an air handling unit. Here the PLC tells the unit if the floor is in use and when a zone needs more air, over Modbus TCP. The unit has its own controller for its fans, coils and dampers, as in our case of the HVAC OEM.

    Run the A full meeting room scenario and watch the CO2 of zone 2 and the window.

    How does a PLC arm and trigger an intrusion alarm?

    With the same presence sensors and the access reader. In this example, after 19:00 the PLC waits until no zone has seen movement for 30 minutes, then arms the floor. A valid badge or face at the reception disarms it. Movement with the floor armed starts the siren and sends an alert to the guards. The reception gets an entry delay of 30 seconds, so a person with a badge can disarm before the siren sounds. The other zones trigger at once.

    This is the logic of the smart office case: biometric access by day, an alarm fed by motion sensors at night. For an intrusion system that must meet EN 50131 or the rules of an insurer, use a certified alarm panel for the detection and let the PLC read its state and drive the lights and the messages. Fire detection belongs to its own system under EN 54. The PLC can read its alarm contact but does not replace it.

    Run the Night and intrusion scenario and look at the alarm state in the building panel.

    What happens when someone presses the call button?

    The rest room has a call button, like the one in our case of the hospital room alarm. One press turns on a buzzer and a light at the door and sends a message to the team on Telegram. A second press at the button silences the buzzer. The light stays on 2 more minutes, so people in the corridor see that the call was answered. If nobody answers in 5 minutes, the PLC sends a reminder.

    The buzzer and the light work in the PLC with no network. If the network is down, the messages wait in a queue and go out when the link is back. This is an assistance call for an office, not a certified nurse call system for a hospital (DIN VDE 0834, for example).

    A room sensor can fail too. The PLC polls each room sensor over Modbus RTU. After 3 polls with no answer, it marks the sensor as failed, stops the fan coil of that zone except the frost guard, boosts the fresh air of that zone to be safe and sends an alert.

    Run the Calls and faults scenario and follow the rest room and the network.

    Design choices you make

    1. The off delay of the lights

    Long enough that people who sit still keep their light, short enough that empty rooms go dark. Corridors and toilets take short delays, offices and meeting rooms longer ones.

    2. Presence or schedule for the climate

    Presence suits rooms with irregular use, like meeting rooms. A schedule suits open offices that are always used in working hours. Many buildings mix both: a schedule for the open areas and presence for the rooms that are booked.

    3. Fresh air on demand

    A fixed base rate is simple, but a full meeting room goes over 1,500 ppm of CO2. Asking for more air only where CO2 is high keeps the air fresh without ventilating every room at the peak rate.

    4. Where the logic lives

    Keep the zone rules, the alarm and the call in the PLC, so they work if the network or the dashboard stop. Put the screens, the history and the messages to the phones on top, on the same Raspberry PLC or on another computer.

    5. Relays and loads

    The relays of the Raspberry PLC 57R are rated 4 A at 230 Vac with a resistive load. LED drivers take a high inrush current when they switch on, so switch each lighting circuit through a contactor. Fan coil valves with thermal actuators are small loads and can go on the relays. A fan coil fan takes a small motor current: check its rating, or switch it through an interface relay.

    The case studies behind this simulator

    This simulator puts together three of our case studies in one floor. The values, zones, times and faults here are examples, not data from those projects.

    • Smart office. Raspberry PLCs control biometric access, lights by presence and daylight, the temperature from a mobile app and an intrusion alarm. Read the smart office case study
    • Hospital room alarm. A PLC turns on an audible and a visible alarm and sends the call to the nurses through a Telegram bot. Read the hospital room alarm case study
    • Air handling unit controller. An HVAC manufacturer builds an M-Duino 58 into its air handling units, with a Modbus TCP map for the building management system. Read the air handling unit case study

    To see how a PLC polls Modbus devices and serves a map to a building management system, try the Modbus Network simulator.

    Learn the building blocks

    These examples cover the parts of this floor on Industrial Shields hardware.

    More examples: PLC Solution Library · all simulators.

    Raspberry PLC 57R: the specs that matter here

    NameRASPBERRY PLC 57R FLEX
    ComputerRaspberry Pi 4, quad core 64-bit, 1.8 GHz, 2, 4 or 8 GB RAM
    SoftwareDebian 64-bit: Python, Node-RED, C/C++
    Inputs18: 12 analog/digital (0-10 V, 12-bit) and 6 digital optoisolated (5 to 24 Vdc)
    Outputs33: 24 relays (230 Vac 4 A / 24 Vdc 2 A, resistive) and 9 analog/digital/PWM (0-10 V)
    CommunicationGigabit and 10/100 Ethernet, 2 x RS-485, Wi-Fi, Bluetooth LE
    Built inUPS with supercapacitors for a safe shutdown, real-time clock with battery
    Power and mounting12 to 24 Vdc, DIN rail TS35, IP20, 0 to 50 °C

    Example I/O for this floor

    SignalPLC I/OCount
    Light sensors, one per zoneAnalog inputs, 0-10 V4
    Presence sensors and window contactsAnalog/digital inputs used as digital8
    Call button, access reader contactDigital inputs, optoisolated2
    Room sensors: temperature and CO2RS-485, Modbus RTU4
    Lighting circuits, through contactorsRelay outputs4
    Light dimming of each zoneAnalog outputs, 0-10 V4
    Fan coil valves, heat and cool for each zoneRelay outputs8
    Fan coil fan, on and off for each zoneRelay outputs4
    Siren, call buzzer, call light, door lockRelay outputs4
    Air handling unit: mode, air demand, statesEthernet, Modbus TCP1

    This example uses 14 of the 18 inputs, 20 of the 24 relays, 4 of the 9 analog outputs and one of the two RS-485 ports. The room sensors share one RS-485 bus, each with its own Modbus address. The UPS lets the PLC close its files when the power drops. For more zones, add a second PLC per floor and link them over Ethernet. Check your loads and levels against the Raspberry PLC family datasheet. Full specs: Raspberry PLC 57R FLEX.

    FAQ

    How does a PLC control the zones of a building?

    It runs the same small set of rules for each zone. A presence sensor says if the zone is in use. A light sensor and a dimming output keep the desk at its light level. A room sensor and the fan coil valves keep the temperature between a heating and a cooling set point, with lower comfort when the zone is empty. A CO2 reading asks for more fresh air when needed. The alarm, the call button and the alerts run in the same PLC.

    Why do lights switch off on people who are still in the room?

    Because a presence sensor sees movement, not people. Someone who reads or types without moving much can go unseen for several minutes. If the off delay is shorter than that, the lights go off. A longer delay in offices and meeting rooms, sensors placed to see the desks, or a sensor that also detects small movements avoid it.

    What is daylight harvesting in lighting control?

    The PLC measures the daylight that reaches the desk and dims the lamps so that daylight plus lamps give the target level, for example 500 lx for office work under EN 12464-1. Near large windows on a sunny day the lamps may need only a few percent. In rooms with little daylight, the saving is small.

    What is demand-controlled ventilation?

    Fresh air is given where and when people need it, measured by CO2. A room sensor reads the CO2 of each zone. Over a threshold, for example 1,000 ppm, the PLC asks the air handling unit or a zone damper for more fresh air, and goes back to the base rate when the CO2 falls. Rooms that are empty or lightly used do not get the peak airflow.

    Can a PLC be the intrusion alarm of a building?

    It can run the logic, as in our smart office case: arm after hours, read the motion sensors, start the siren and send an alert, and disarm with a valid access. Where the alarm must meet EN 50131 or the rules of an insurer, use a certified alarm panel for the detection and let the PLC read its state, switch the lights and send the messages. Fire detection stays in its own system under EN 54.

    Which Industrial Shields PLC fits a building with several zones?

    This simulator uses a Raspberry PLC 57R, the model shown in our smart office case. It has 24 relays for lights, valves, siren and lock, 12 analog inputs for light sensors and contacts, 9 analog outputs for dimming, two RS-485 ports for Modbus room sensors and Ethernet for the air handling unit and the dashboard. It runs Linux, so the same controller can send Telegram messages and serve the dashboard. For a smaller floor, the Raspberry PLC 38R has fewer relays and analog inputs.

    Send me this architecture

    Tell us how many zones you control, what each one needs and who must get the alerts. Our team replies with a proposed architecture for your building. Your simulator settings go with the request.