Embedded networking using microcontrollers in an hotel room control system

November '99 Access Control & Identity Management

Networked control systems are no stranger to industrial applications for remote control of machinery and status monitoring. Because of their low cost, embedded microcontrollers (MCUs) have found their way into almost every electronic device. Combined with a networking protocol, the role of the embedded MCU can be expanded to implement low-cost network systems in many arenas. One arena that could benefit from an embedded network would be the hotel room control.

Networked control systems are no stranger to industrial applications for remote control of machinery and status monitoring. Because of their low cost, embedded microcontrollers (MCUs) have found their way into almost every electronic device. Combined with a networking protocol, the role of the embedded MCU can be expanded to implement low-cost network systems in many arenas. One arena that could benefit from an embedded network would be the hotel room control.

A single MCU could provide control of door access, HVAC, smoke, motion and lighting for each room. Each room is linked to the host computer via an RS485 network. The desk clerk can then assign the key to the room, turn on the courtesy light and set the HVAC system temperature when a person checks in. In addition, the host computer can keep track of room access from maids to bell hops to maintenance personnel. This article will explain the caveats to creating a hotel embedded control based on highly integrated MCUs.

The main control node

The main control node is a host computer (PC or MAC) with an RS485 interface card inside. As shown in Figure 1, all room nodes attach to the host computer indirectly through repeater nodes. The type of network chosen is RS485 because of the excellent noise rejection and capability to transmit over long distances.

It was also chosen because the related hardware required to implement an RS485 interface is relatively low cost. RS485 requires only a single twisted pair of wires for the transmission medium which contributes to the overall low cost of the network and ease of installation.

Transmission protocol

The transmission protocol for RS485 contains two types of transmissions: control and data. Control bytes are differentiated from data bytes by the state of the ninth data bit. When set, the ninth data bit indicates that the byte of data is a control byte and all receivers must accept. When clear, the ninth data bit indicates that the data byte is data and a receiver may optionally accept it. Other than this standard, a designer is left to define the transmission protocol for the network.

In the case of the hotel room control network, the first control byte should be a sync byte indicating that a data packet would follow. This byte is arbitrary. The second control byte indicates the floor number 1 to 255 (which provides plenty of room for upward expansion). If this byte is a 0, then the data packet was sent to the host computer. The next two control bytes are the room number for the specified floor giving up to 64K rooms per floor. Again, there is plenty of room for future expansion.

At this point, each receiver would be able to determine if the packet of information was directed to itself or another receiver. If the packet does not match the floor/room numbers, then the following data bytes with the ninth bit cleared will be ignored by the receiver.

At this point, the designer needs to make a choice to ensure that transmitted data is received correctly. Two methods that make the network more robust are to provide a byte counter for the packet and a packet checksum. Using this method, the first byte with the ninth data bit clear will be the byte count for the packet. The next byte will be a command for the operation that needs to take place. Some of the operations that could be executed are:

p Assign a room key number.

p Turn on HVAC.

p Turn on courtesy lights.

p Control television/cable box operation.

p Room status, ie, temperature, motion etc.

Depending on the operation, there will be 0 to 252 bytes. The limitation on 252 bytes is due to the byte counter being only 8 bits (255 - <ByteCount> - <Command> - <Checksum>).

Clear advantages

One clear advantage of using a network in an hotel environment is to be able to monitor access to the room. Not only do the guests have room access keys but also maids, bellhops and maintenance personnel. These individuals need to have access to all rooms and therefore have individually coded room access keys.

Each time the room is opened, the time and access card number is reported to the host computer. This information can in turn be used by the desk clerk to check which rooms are available by seeing if a maid has accessed the room. The manager can check to see if scheduled maintenance has been performed by checking access numbers. Any unauthorised access to the room can also immediately set off an alarm by sensing a forced entrance or simply the presence of someone in the room when it was not expected. The room control node also reports the time every occurrence of the door is opening. In most cases the access card report and the opening report can establish who has entered the room and for how long.

When checking into an hotel, the desk clerk performs many operations. First, rooms are checked for availability. Once a room is found, keys are assigned and the guest is off to the room. Upon opening the door to the room, the guest usually finds the courtesy lights on and the HVAC turned on to provide a comfortable temperature.

These settings are most likely the same configuration that the maid left them in when finished cleaning the room. This is an opportunity for the hotel to save money. The room can be left dark until the guest checks in at which time the courtesy lights are turned on.

It was previously mentioned that all floors have repeater nodes. Sometimes the distance between the host computer and the room control nodes on each floor becomes too long. The repeater node is used to bridge this long distance. This device can be an analog module that simply amplifies the detected signal or a digital module that actually has two RS485 ports that transmit and receive messages from the room nodes and the host computer.

Night lights and fire alarm

Most floors have night lights and fire alarms placed along the hallways. These too can be connected to the hotel network. A considerable amount of money could be saved by just controlling when night lights are turned on and off.

If on a network, these lights could automatically be controlled by the host computer. Also the detection of a fire could immediately trigger the host computer to call 911 and trigger the rest of the fire alarms.

The operation of the main control node is very simple when the room control nodes have a minimal level of intelligence. Since most of the work is performed at the room node, the controller must be capable of processing many different input signals and controlling many different output devices. This device is the critical link in the processing chain of an hotel embedded network.

The hotel room control node

A block diagram showing a possible implementation of the room control node is shown in Figure 3. This example integrates many functions commonly found in security and automation systems. Some of these functions include:

p Door access control.

p Motion sensing.

p Panic button notification.

p Smoke/fire protection and alert.

p HVAC smart thermostat.

p Light control.

Microchip's versatile PIC18C452

The MCU in the room control node has two functions. First, the MCU has to continuously monitor the sensors and controls located in the hotel room. Any room status changes are sent to the host computer. Second, the MCU must monitor incoming control bytes on the RS485 network. If the floor and room data match, the MCU must process the following data bytes and execute the command or request for data. A Microchip Technology PIC18C452 8-bit MCU has been used in the design. This MCU has the bandwidth required to simultaneously handle communication on the RS485 network and perform the room functions.

Furthermore, the MCU has many peripherals that allow simple implementation of the room control node. For example, the USART on the PIC18C452 has an address detect feature that makes it well suited for RS485 applications. The A/D converter can be used for temperature and smoke sensor inputs. The two available PWM modules can be used to generate analog voltage outputs for light dimmers. The on-chip master synchronous serial port (MSSP) module provides an easy interface to a serial EEPROM device. Finally, the device has plenty of general-purpose I/O for connecting keypads, displays and logic-activated devices.

The presence of the MCU in the room control node allows it to make decisions based on sensor input without intervention from the host computer. For example, the MCU can use motion sensor, temperature sensor and door access information to provide automatic energy savings. One possible action is to automatically set the HVAC thermostat for lower energy consumption if the room has been unoccupied for an extended amount of time.

The heart of the system

The heart of the room control node is a control panel located near the entrance door of the hotel room. The primary components of this panel include the MCU, a status display and a keypad. The RS485 twisted-pair network is connected to the MCU through a low-cost transceiver IC. The other sensors and output devices are located throughout the hotel room and connected to the control panel. Most of the connections are simple logic inputs or outputs, so the system wiring is simple.

The status display and keypad on the control panel can be used as a generic interface in the hotel room that can access a variety of functions. Common functions in the room include setting the light levels and room temperature.

As mentioned earlier, the lighting and temperature settings can also be controlled and monitored by the host computer. The control panel also provides a 'terminal' that accesses the hotel's front desk. For example, the hotel guest could request a particular time for maid service or check billing information. Additionally, hotel employees can use the room control panel to indicate when certain tasks have been completed. For example, the maid can enter a code on the control panel to indicate that the room has been cleaned.

Electronic locking

Most hotels today already have electronic door lock systems installed with a magnetic card reader mounted on the door of each room. The function of the electronic door lock is enhanced when connected to the room control node.

The interface is simple to implement since most card readers output a serial data stream that is easily interpreted by a MCU. As discussed earlier, the room control node forwards any access codes received by the card reader to the host computer. In a similar fashion, the MCU can store valid access code data received from the host computer in nonvolatile EEPROM memory. This increases security benefits because access privileges to the hotel room can be changed instantly from the host computer.

Fire alarms and smoke detection

The smoke sensor and alarm siren connected to the room control node allow local smoke detection and also allow node response to emergencies that may occur elsewhere in the hotel building. As a further safety feature, panic buttons can be connected to the control panel which notify the front desk that immediate assistance is required. The panic buttons are particularly useful for elderly guests or persons with disabilities.

For the convenience of the hotel guest, the handheld remote control for the television set can be configured to access other room functions through the room control node. The room control node has an infrared (IR) receiver connected to it for this purpose. For example, it would be convenient for the handheld remote to control the light levels in the room.

Conclusion

Using highly integrated 8-bit MCUs can provide the necessary processing power and cost structure to build an efficient embedded network. These same networks that are often found in the industrial environment (such as machinery or process monitoring) can be applied to simpler applications such as the one presented here.

A hotel can control costs and provide better service to guests by using such a network that does not add a significant amount of infrastructure that is usually associated with Ethernet or other types of local area networks.

Remember the KISS principle.

For details contact Rodger Richey, Applications Project Manager, Microchip Technology on tel: (091) 480 786 7200 or fax: (091) 480 899 9210.





Share this article:
Share via emailShare via LinkedInPrint this page



Further reading:

Palm-vein biometric kiosks secure SAP at Transnet Engineering
Access Control & Identity Management Transport (Industry) Videos
Securing access to SAP is essential to avoid fraud or corruption. Ensuring that users can access the software quickly, easily, and conveniently to do their jobs is also essential.

Read more...
Empower individuals to control their biometric data
Information Security Access Control & Identity Management Security Services & Risk Management
What if your biometrics, now embedded in devices, workplaces, and airports, promising seamless access and enhanced security, was your greatest vulnerability in a cyberattack? Cybercriminals are focusing on knowing where biometric data is stored.

Read more...
Security industry embraces mobile credentials, biometrics and AI
AI & Data Analytics Access Control & Identity Management Integrated Solutions
As organisations navigate an increasingly complex threat landscape, security leaders are making strategic shifts toward unified platforms and emerging technologies, according to the newly released 2025 State of Security and Identity Report from HID.

Read more...
Nice launches DC Blue Astute garage door motor
Nice Group South Africa Technews Publishing News & Events Access Control & Identity Management Perimeter Security, Alarms & Intruder Detection
Nice Systems SA has launched the Nice DC Blue Astute, a garage door motor for the South African market featuring a pre-installed lithium-ion battery instead of traditional lead-acid batteries.

Read more...
Towards a global digital passport?
Access Control & Identity Management
In a world where borders are more connected and closely monitored, the idea of a universal digital passport could revolutionise how we travel, work, and even perceive citizenship.

Read more...
Empower individuals to control their biometric data
Information Security Access Control & Identity Management Security Services & Risk Management
What if your biometrics, now embedded in devices, workplaces, and airports, promising seamless access and enhanced security, was your greatest vulnerability in a cyberattack? Cybercriminals are focusing on knowing where biometric data is stored.

Read more...
A platform for access and identity at Securex 2025
Securex South Africa Access Control & Identity Management Facilities & Building Management
South African companies involved in supplying access control technology, security services, and data management are well-positioned to tap into the expanding access control market at Securex 2025.

Read more...
Background checks: risk levels and compliance
iFacts Access Control & Identity Management Security Services & Risk Management
Conducting background checks is a vital step in the hiring process for employers or when engaging service providers; however, it is crucial to understand the legal framework and regulations governing these checks.

Read more...
Insurance provider uses Net2 For access management
Paxton Access Control & Identity Management Integrated Solutions Healthcare (Industry)
BestMed selected Paxton Net2 for its access control requirements because of its simplicity of installation and ease of navigation for end users, as well as the 5-year warranty.

Read more...
Identity is a cyber issue
Access Control & Identity Management Information Security
Identity and access management telemetry has emerged as the most common source of early threat detection, responsible for seven of the top 10 indicators of compromise leading to security investigations.

Read more...