How we constructed a very Good Workplace system based mostly on Raspberry Pi

Final 12 months, when Monterail determined to alter their office to be a bigger and better-designed place , they determined that it also needs to be smarter. I used to be launched to the crew as an individual who may make this occur. I collaborated with Monterail throughout the renovation of their new residence after which lastly joined the crew.

The Good half

Such an enormous undertaking can't begin with out a good, lengthy workshop about our wants and necessities. After a radical workshop we determined to have the next options:

  • gentle management,
  • convention and name room occupancy signalization,
  • particular person entry codes for the primary doorways for every crew member in a centralized database,
  • audio system with a wi-fi music streaming possibility,
  • separate, manageable audio expertise within the restroom,
  • 5 TVs with the flexibility to handle the content material displayed on them,
  • kitchen LED lamp shade administration,
  • means to manage every thing through an internet software (desktop, cellular, cellphone and panels mounted on the partitions).

After that, the automation system undertaking was achieved and the entire workplace idea was able to be applied in actual life. Your entire {hardware} facet of the good workplace had taken place throughout the development work achieved by the renovation crew. In fact, there have been some small issues throughout entire enterprise, however every thing in the end ended up as we wished.

Considering of an IoT improvement?

Work with JavaScript consultants who will push exhausting to know your enterprise and meet sure deadlines.

See what we can build together


Technical selections and reliability dangers

Most automation techniques we discovered had been constructed based mostly on PLCs – as a result of their reliability and strict manufacturing restrictions.

“Let’s do one thing new, one thing that we haven’t seen on the Web earlier than.”

After some consideration we put our guess on Raspberry Pi. We debated about reliability as we couldn’t discover a undertaking based mostly on RaspberryPi that massive. We wished to search out out if it’s doable. And we did.

Coronary heart of the system

There's one grasp Raspberry Pi which controls the entire low-level {hardware}. To perform this we needed to create two sorts of {custom} units:

  • The primary one we known as the “distribution board”: distribute energy and supply connectors that connects all peripherals: the RPi itself, motion sensors, door lock, and many others.

photo of the power distribution board

  • The second system is a relay driver board. Relay is sort of a wall swap however as a substitute of turning it on and off by hand you place voltage onto it. There's one relay for every gentle group which makes over 30 items to deal with all the Monterail workplace.

photo of a relay driver board

The primary unit additionally runs an internet server with a Internet Utility that permits to manage the entire options.

Occupancy signalization

This operate is achieved by a daily motion sensor mounted in every room. Indicators are gathered within the system described above.

TV panels administration

There are 5 extra Raspberry Pis linked to separate TVs. They're all impartial displaying largely humorous memes or web sites with significant data.

This was achieved by merely working Chrome in kiosk mode on every system. Chrome Debugging Protocol is used management it from the online (that's the most important Raspberry Pi).

On some events (e.g. keynotes throughout occasions out there to the general public) we knew we would have liked a picture from the projector to be proven on the TVs. As an alternative of rewiring the entire system, we made a easy hack: a bunch of HDMI switches and splitters linked collectively created the flexibility to alter the TV supply from Raspberry Pis. We will now use the Internet Utility to manage if we show the projector on every TV independently.

photo of the TVs showing an image from the projector

Audio workplace system

We ended up having prime quality audio system throughout the workplace mounted within the ceiling. The proprietor of the constructing gave us them at no cost as our workplace area used be procuring space earlier than we took all of the partitions down.

We divided them in a number of sections and linked to a broadcasting amplifier. Two of the Raspberry Pis are linked to the amplifier and run DLNA and AirPlay servers. Due to this, everybody linked to our WiFi can stream music wirelessly to a particular audio part. It really works nice after-hours.

Moreover, we have now exterior audio system with a separate RPi within the restroom. It has an Web radio participant put in and a easy API uncovered which permits to manage it with our good workplace Internet Utility. A pleasant contact to stroll right into a restroom and listen to radio taking part in. The alternative of Web radio performed in restroom is meticulously managed by individuals on #music Slack channel.

photo of a radio

Manageable door entry

When somebody joins Monterail it's required that they've a separate entry card to workplace doorways. Including a brand new card by hand could be annoying, however since there's a chance to attach a card reader to an exterior system…

We hooked it up with our most important Raspberry Pi and arrange a database with each worker matched with their card quantity and entry code. This setup permits us to add new playing cards just by inserting it into the database.

Kitchen LED lamp

We now have a custom-made RGB LED lamp within the kitchen fashioned in form of the Monterail brand. It got here with an IR distant to manage it the color palette.

Distant? We use Raspberry Pi to exactly management the color it through our Internet App, too. Connecting wires immediately into an IR socket and emulating the distant with ready-to-go libraries was simpler that you simply would possibly suppose.

photo of the Monterail logo-shaped lamp

Context-Primarily based Tablets

Controlling entire workplace from a pc or cell phone could be very helpful, however what if we don’t have any of those units with us? Lights will be managed in an analog method, however we wished to have the entire system inside attain.

We got here up with the thought of Android-driven tablets on the partitions close to strategic rooms. Every is working the identical app that you simply’d discover on the desktops. They'll additionally show a room occupancy calendar so everybody can see the closest availability of the room.

photo of a tablet on the wall near a conference room

Closing notes

  • The gentle management arrange is fail-safe. If one thing with the RPi goes terribly improper, we may nonetheless function the lights within the “traditional” analog method.
  • Your entire {hardware} setup had taken place throughout the development work. I labored facet by facet the renovation crew and it was enjoyable. In fact there have been some small issues throughout entire enterprise however every thing in the end ended up as we wished.

Conclusion: We ♥️ RPi

Individuals would suppose that utilizing Raspberry Pi in a system of that scale is loopy. They're too many issues that will go improper.

Now, after a 12 months from launching our good workplace system based mostly on 7 Raspberry Pis we all know there may be nothing to be afraid of!

This technique is, for positive, not able to be mass-produced and applied. Modules will must be standardized and the RPi must be utilized in a “Computed Module” model. However it proves a degree. An RPi can be utilized for far more sophisticated duties than blinking LEDs or streaming video. It will possibly handle your total workplace!

Do you've related experiences with Raspberry Pi or different techniques? Or do you've unhealthy ones? Be happy to ping me within the feedback!

Technical addon

Lots of you requested for some technicalities within the feedback, so we current some particulars about our good workplace system.

Mild management

We now have about 27 gentle zones in the entire workplace. Every zone is managed independently by separate circuit. Cabling from each gentle set and each gentle swap is delivered to the primary automation cupboard.

Inside cupboard, each gentle zone is linked in a multiway switching configuration with Finder relay module. This configuration was chosen as a failsafe answer for the long run as it's experimental, {custom} set up. I am fairly satisfied that it will not be utilized in close to time.

configuration of a Finder relay module

For relays, it's required to have some IO growth interface to deal with them with required currents. As I could not discover any applicable module we created a {custom} one, particularly to our good workplace. For addition we would have liked to have a suggestions from the lamp, as it may be switched independently from the wall swap. To attain that purpose I used ISP814 AC optical isolator with some RC filter on the output transistor. The working precept of this configuration is fairly easy. In a standard state, when there isn't any voltage at optoisolator enter, the output pin is in fixed HIGH state. If you apply an enter voltage the output transistor is conducting for a small period of time in a 50Hz interval as AC wave crosses the zero degree. The RC values are chosen to keep up round 0.1V degree on the output, which implicates to be designated as LOW logic degree.

The entire module is pushed by well-liked MCP23017 which is dealing with each relay outputs and light-weight detection inputs. The module is linked by way of I2C interface to the Raspberry Pi. We thought of industrial Modbus interface, however for the aim of this set up, it was omitted.

The module connected through I2C interface to the Raspberry Pi

Occupancy signalization

We created raspberry pi convention rooms by inserting motion sensors in every convention room. The sensors have easy, shorting outputs. They're linked by way of optoisolators to the Raspberry Pi enter header.

LED lamp

It was a reasonably good hack as DMX driver delivered by the exterior contractor was with none community interface. It had an IR enter terminals, although. The only answer was to immediately join the terminals to RPi, and emulate IR codes by way of lirc.


Foremost door RFID receiver is configured as read-only system and linked by way of Wiegand interface to Raspberry Pi. It reads all enter codes and after validation permits the electromagnet in most important doorways by way of a relay.

Audio and video

Every display screen is linked by way of an HDMI cable on to RPi. Every RPi has auto-booting Chromium with debugger mode enabled, so it could actually obtain exterior instructions. Two of them additionally has audio servers put in and every one in all them is linked to the primary amplifier by way of the audio cable.

HDMI switching from the online is achieved by connecting a bunch of HDMI switches and splitters collectively. HDMI switches had been {custom} modded to interface them to the primary Raspberry Pi.

model shows connections of HDMI switches and splitters together

Software program

Mainly, software program is split into 4 elements. 3 decrease ranges are written in python, the online software is written in Angular JS.

the 4 parts of software written in Angular JS and python

Backend HAL and logic code.

HAL interfaces all {hardware} and offers an entry to it into larger logic code. Mainly, it makes use of pigpio and a few libraries for MCP23017.

Logic half is split into courses, each supervising explicit a part of the system (ex. relays). In every class, there may be applied a management interface together with collision detection system. Every class exists as a singleton in the primary software. It was required to implement some safety for forbidden states of the system.

Backend API code.

There are two sorts of APIs for controlling the system. REST API is used for consumer actions (ex. turning the lights on/off). It was constructed with Bottle Python framework. All callbacks (ex. gentle state change, motion sensor detection) is interfaced by way of WebSockets with geventwebsocket module.

Frontend Angular.js SPA.

I wrote a fast proof-of-concept app to make the entire system usable. Monterail is at the moment creating a brand new model of the workplace managing software program with a crew devoted to it.

proof-of-concept app for office management

Might our good workplace be smarter?

What do you consider our good workplace system? What would you alter? What may have been achieved higher? Be happy to share your concepts within the remark part beneath.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *