News for hackers. Stuff that matters.

g_hajdukiewicz

Re:How we built a Smart Office system based on Raspberry Pi on Sunday October 23, 2016 @01:49PM (#12774526)
Many thanks! It's always good to design your system like that. The same with software :) Makes it easier to maintain.
Re:How we built a Smart Office system based on Raspberry Pi on Sunday October 23, 2016 @07:11AM (#12773006)
We designed our own, simple ones having MCP23017 (https://goo.gl/S4i9Gw) as the GPIO expanders and some popular optocouplers to provide proper isolation level. I can't remember which exact part was chosen for the isolator, but this one should work like a charm https://goo.gl/GS6twt.
Re:How we built a Smart Office system based on Raspberry Pi on Sunday October 23, 2016 @07:04AM (#12772989)
Hey, you're totally right. Actually we would normally use some embedded solution for that (preferably STM32 or ESP8266 if wireless was needed), however, in this case we were focusing on designing it in a way so that it's easy to maintain by web-development agency, which we are. Not everyone here knows how to change and flash low-level code into a uC but almost everyone would be able to fix a bug in python code on the RPi :)
Re:How we built a Smart Office system based on Raspberry Pi on Sunday October 23, 2016 @06:59AM (#12772972)
Thanks for asking! I can explain you how the lighting unit works since I was taking part in designing it (better than nothing :) ). Since we didn't have enough GPIOs on the Raspberry which is controlling the lights, we used a GPIO expanders (MCP23017 https://goo.gl/S4i9Gw). RPi sends commands over I2C interface to switch their outputs on and off. MCPs outputs are driving optocouplers (on the same PCBs designed by us) to provide a proper level of isolation. Then the optocouplers' outputs drive the relays working in a "stair case" configuration with analog switches on the walls (see a my comment above and here https://goo.gl/sJw9F1). All the "low-level" software is written in python using ready to go libraries and exposing API to a web-app which is basically a user interface for the system. If you need more details, just shoot!
Re:How we built a Smart Office system based on Raspberry Pi on Sunday October 23, 2016 @06:46AM (#12772938)
Hey! I was happy to be designing this beauty (and using it everyday in our office). It's nothing more than just a "stair switch" configuration, where one of the manual switches was substituted with a relay. So we have all SPDT manual switches on the walls, and SPDT relays connected with them in our control cabinet. Every switch/relay can change state of the receiver (in this case a LED lamp) at any time. So even if relays or RPIs fail we can still be using manual switches. More info here https://goo.gl/sJw9F1 .