Room Control project
Room Control is a Java desktop application that I've wanted to do for a long time. The essence of the project is to sense to environment via analog sensors and interact upon those values using logic and relays, i.e. controlling a heater using temperature sensor(s).
- Live Video Streaming (for demonstration)
The current application is split in two sections; a control section to change the state of the light and heat relays, and an informational section that provide the current temperature and light values.
- Change the relay state for 5 relays
- Read the current tempeature and light values
- History view of recent changes
- Change GUI language: English, Norwegian, German
The remote control part of the application ca be used by using netcat (command nc on Linux/OSX).
nc -u <host> 9000
- st - status
- lt1 - toggle light #1
- lt2 - toggle light #2
- lt3 - toggle light #3
- ht1 - toggle heat #1
- ht2 - toggle heat #2
I made a small and quick web application to use with the iPhone as a remote control.
The layout for the controllers and relays are split in two sections. A north part and a south part. Each with a separate controller.
Not the best drawing, but it does the job.
Controllers are use to manage the different inputs and outputs. The applications talks to the USB controllers via an API (Application Programming Interface), or JAR-class in Java.
Each controller has 8 analog inputs, 8 analog outputs, and 8 digital inputs. The digital inputs provide 5v power to the relays.
The sensors are connected to the digital inputs and the relays to the analog output.
Relays are used to control the power supply to external devices and essentially acts as a remote switch. A relay can do two operations, either open circuit or close circuit.
Picture below shows a fully connected relay: two relays (black squares), 2x2 AC lines (blue/brown), two sockets, two analog control inputs (yellow), and 5v / ground (red/black) to hold the relay state.
LCD Text Panel
The LCD panel is just a cool addition to the project. It can display 2 rows and 20 characters per row. The panel is mounted on the back of a controller but appears as a individual unit when programming to it.
Each time the light brightness or temperature changes, the display is updated.
These sensors are pretty precise and accurate. There are numerous sensors available, but only the light, temperature, and touch sensors are currently being used in this project.
Everything is connected to and controlled via a Mac Mini.
The total cost of the project is around 277USD. Including:
- 2x Controllers - 80USD per - 160USD
- 4x Relays - 19USD per - 76USD
- 2x Temperature sensors - 15USD per - 30USD
- 1x Light sensor - 11 USD per - 11USD
- Total: 277USD