> Room Engine
> Room Engine Controller Board
Room Engine Controller Board
The Room Engine controller board
Throughout this page, the Controller Board is dubbed, the 'REBoard'. At the heart of the REBoard, is an Atmel microcontroller. In my experiments, this has been an Atmel ATMEGA8515, although most other ATMega chips should work fine (with recompilation of firmware). The job of the REBoard is to interpret commands from the host computer, and translate these to inputs/outputs. Connected to the microcontroller, is some misc components including a transistor array, resistors and relays. This allows you to connect mains devices to the REBoard. Also connected to the micocontroller, is a MAX232 line driver, which translates the USART TTL signals from the microcontroller to RS232 Serial. This can be replaced with a USB to TTL adaptor, which allows you to connect the whole thing to a USB port.
Note: This circuit hasn't been tested. The circuit takes a 12V regulated power supply. The 12V input can be wired straight to the relays. A zener diode is used to fix the 12v to around 4.7v to power the microcontroller.
As said before, you have the choice of a USB to TTL converter, or a MAX232 to connect the microcontroller to the computer. The USB to TTL converter must be capable of emulating a standard serial port on the host operating system in order to work with the REServer component.
If you're cheeky, you can run the whole thing off your STK500 board, if you have one.
Just to demo the system to my computing teacher, I made a demo board with LEDs (the school would never let me play with their mains). The interface to the computer is provided by a UB232R USB to Serial TTL converter:
The firmware running on the microcontroller is currently quite simple. It requires AVR Studio/WinAVR/AVR GCC to compile. Note, this code is intended for the ATMEGA8515, although it may be possible to recompile it without any modification to work on other microcontrollers.