VACS:Projects:Software:Ebcs
(→EBCS Simulator) |
(→EBCS Simulator) |
||
Line 214: | Line 214: | ||
</ul> | </ul> | ||
− | [[image:ebcs-design]] | + | [[image:ebcs-design.jpg]] |
The Gtk frontend and the 68HC11 simulator communicate and synchronize | The Gtk frontend and the 68HC11 simulator communicate and synchronize |
Revision as of 22:50, 1 June 2006
Project | Embedded Bathroom Control System |
Date | 2001 - 2004 |
Goals | Control the fan, light, radio in a bathroom based on presence, temperature and humidity |
Dependencies | GNU 68HC1x |
Contents |
Overview
The Embedded Bathroom Control System is a small system based on a 68HC11 and designed to:
- Control the bathroom fan,
- Control the light,
- Control the radio (ie, music),
- Display the temperature, humidity, ...
This system has several hardware components:
- A 68hc11 board with 32Kb of ROM and 32Kb of RAM. This board runs the EBCS software.
- An LCD board which provides a 2x16 LCD display with 4 buttons.
- A Power Control board which has a transformer and 2 triacs (one for fan and one for light).
- A Sensor module which provides temperature, humidity and presence detection.
- A I/O board connected to the CPU board. This is the interface with the sensors, the power control board and the LCD panel.
EBCS Components
IO Board
The IO board:
Documentation on the chips used by EBCS IO board.
Documentation (1) | |
---|---|
Hex schmitt triggers | |
Low Noise Single J-FET operational amplifiers | |
Positive voltage regulator (7805, 7812, 7815, ...). | |
PNP Silicon Transistor | |
NPN Epitaxial Silicon Transistor | |
PNP Epitaxial Silicon Transistor | |
Low Noise J-FET Operational Amplifier |
(1) Documentation publicly available on various constructor web sites and copied here for archiving.
Power Supply and Triacs Board
The power control board:
Documentation on the chips used by EBCS Power board.
Documentation (1) | |
---|---|
Triacs (I've used a BT137-600). | |
6-Pin DIP Zero-Cross Optoisolators Triac Driver Output | |
NPN Silicon Transistor | |
Transformer (http://www.myrra.fr: Myrra ). | |
Optocoupler with Phototransistor Output |
(1) Documentation publicly available on various constructor web sites and copied here for archiving.
LCD Board
The LCD panel with 4 optical buttons.
Documentation on the parts used by EBCS LCD board.
Documentation (1) | |
---|---|
Dot Matrix Liquid Crystal Display Controller/Driver | |
Quad NOR gate | |
Quad AND gate | |
Low Noise J-FET Operational Amplifier | |
8 Bit Sipo Shift Register | |
Octal D Type Flip Flop With Clear | |
N-channel vertical D-MOS transistor | |
Reflective Optical Sensor with Transistor Output |
(1) Documentation publicly available on various constructor web sites and copied here for archiving.
68HC11 Board
EBCS Simulator
Since EBCS is installed in the bathroom, and to help in the development of the software, I wrote a simulator program that simulate EBCS completely. The simulator is composed of two parts:
- A graphical part based on GNU Gtk is the simulator interface. It simulates the LCD panel, the optical keyboard buttons, the temperature and humidity sensors and show the status of the fan and light controlled by the system. The Gtk tool only simulates the I/O boards. It does not simulate the 68HC11.
- A 68HC11 simulator which is part of GNU GDB. The GDB's simulator is very complete because it simulates all 68HC11 instructions and most of the 68HC11 IO devices (interrupts, I/O ports, timer, SPI, SCI, input/output compare, Analog inputs, eeprom, nvram). It is also accurate in the sense that it takes into account the CPU cycles taken by each instruction.
The Gtk frontend and the 68HC11 simulator communicate and synchronize themselves using two mechanisms:
- A shared memory segment is used to represent the I/O ports
- A TCP/IP connection is used to synchronize the CPU with the frontend when the CPU writes on an output port.
The CPU always reads input ports in an asynchronous manner, that is, it never waits for the frontend to give the information. Synchronisation only occurs when the CPU changes an output port.
The screen shot below shows the simulator window with EBCS 0.6 running.
The Gtk frontend was designed using Glade, the Gtk window editor.
Date | File | Description |
2002-03-09 | [ebcssim-0.2.tar.gz] | Add light simulation, fix some problems, includes gdb-5.2
patch for Ebcs<->Gdb HC11 simulator connection |
2001-10-15 | [ebcssim-0.1.tar.gz] | First version; simulate LCD, buttons, fan and connects to
GDB-68HC11 simulator |
Resources
- http://gel.sourceforge.net: GEL main site