This is a project inspired by Derek Low's work on the Berkeley Ridiculously Automated Dorm (BRAD).
I have designed a network of three NRF24L0+ radios (attached to two arduino nanos and one raspberry pi), which coordinate communication between the three types of nodes in my system:
- Actuation Nodes: A microcontroller which can switch relays or other external actuators (perhaps solenoids).
- Sensory Nodes: Microcontroller which measures and reports room brightness, temperature, and PIR motion detection.
- Hub Nodes: Raspberry Pi which hosts the control panel website, and runs the NodeJS program which coordinates the information between the sensory/actuation nodes, records room data in a MongoDB, and provides a socket for live update of sensory information to web or mobile clients.
I have also designed a set of tasker automations (android) which enable me to quickly control the room based on phone-based triggers.
Components
2×
Arduino Nano
1×
Raspberry Pi B
3×
NRF24L01+ Radios
1×
OLED
2×
PIR Sensors
Motion Detectors on either side of room
I’ve posted the first in a series of articles regarding work on the latest version of my project (using voice-recognition for dorm room control). Hope you check it out:
Hello Anyone Who's Reading, This project is not dead! On the contrary, I am currently working on a new rendition of my automation system, this time utilizing voice recognition. I began by experimenting with offline voice recognition; I leveraged the free PocketSphinx Speech-to-Text engine provided by CMU, but found that it was not sufficiently accurate or easy to train. I am now working on a system which uses offline recognition for simple tasks and for keyword recognition. The latter will trigger online speech recognition via wit.ai, a free cloud voice recognition service.
I may have found a fix to the radio issue I mentioned in my last post! Turns out that an error in either the RasPi or Arduino libraries caused communication to break during the autoAck transmission, so for now I have disabled the autoAck feature. I shall wait and see if any further instability presents itself.
In anticipation of the hot and humid Houston summer, I have added a feature to the arduino node and base station allowing for measurement (using a DHT11 temp + humidity sensor), transmission and recording+display of humidity information.
In the past few days, I have uploaded all of the project's code to github. There are two separate repositories, one containing the code running the Raspberry Pi radio and associated web server, and another containing the code for the Arduino nodes. They are linked on the main project page. In addition, I have done a bit more work on the mobile interface, and I have built a small HTML scene in tasker to handle control of the room lighting color, and toggling of the system's sleep mode.
A tasker script will also automatically turn the lights to red at a designated sleep time, if the phone is in the room, in order to allow adjustment to lower light in the interest of good sleep hygiene.
With regard to the radio communication issues, I have adjusted the time between failed transmission attempts, so we will see if this fixes the issue. More advanced radio error handling may be required.
For some time now, the system has been running in a fairly stable state. However, I have recently noticed that the system's NRF24L01+ radios - required for wireless communication between the base station and the actuator node responsible for displaying room data on an OLED screen and switching the lights - has been crashing at odd times, disabling smartphone control functions. I am currently debugging the issue, but I am yet unsure whether these issues are the result of troubles with the Arduino or Raspberry Pi libraries. I will keep y'all updated with any progress I make!
It's been a number of months since I first started this project, but now I've decided to go about talking about it on the internet.
For some context, I started the project at the beginning of this school year, when I decided I wanted to class up my dorm room with some home-made electronics, and some pretty lighting.
While it would have been nice to control the lighting in the room directly, Rice housing would not have been very pleased with me tampering with their wiring in order to insert relays and whatnot. Instead, this project is interesting, because I have to work around all of the issues that come with trying to improve a room you do not own, and therefore cannot easily modify. Herein lies the utility of the LED strip-lights. By placing the adhesive strips around the top of the room, I have been able to incorporate (non-destructively) a controllable set of lights in the room.
What libraries are you using on the Arduinos? I'd suggest http://tmrh20.github.io/RF24Mesh/ library.