Overview of the AH2 project

Home | Pic Page | Projects Page ]

This project started with me playing around with some X10 products. I started with a lamp module, a HR12 palm remote, and an RF receiver.
Whilst the X10 products are very good, they are also quite expensive when you use the professional series.
Why use those? a good example is the lamp module (LM15). This runs inline with your light bulb; simply undo the bulb, connect the LM15, and reconnect the bulb. You have an X10 controllable light. Use the remote control to turn the light on and off.
Turn the light off using the existing light switch and
Nothing, nil, nada.
No power gets to the LM15, no light comes on. (Plenty of off though - and it's got to be cheaper on electircity - although a bit darker).
The solution is to use the pro series. These units replace the existing light switch, and have the X10 control circuits behind the switch cover.
They work brilliantly, but they cost a lot more to buy.
Enter AH2
Designed to replace the X10 professional series. I though I would be better starting with an X10 compatible controller. This is based around the PIC series of microcontrollers (as is the whole project).
The control unit main processor is a PIC16F877A attached to which is the X10 interface, the Slave PIC which handles the LCD, a keypad, status LEDs, Real time clock and a PC compatible Keyboard port.

Slave PIC overview
The LCD display is initialised, and the screen is cleared.
Internal eeprom location 0x00 is checked;
If it is set to 0xFF, the welcome message “Initialised.” is written.
Otherwise the welcome message is read from the eeprom up to either location 0x13 (20 character) or up to the first 0x00 whichever occurs first.
The slave then waits for a character from the serial port on port pin A0 (pin 17).

Characters are read into a buffer until either a carriage return (0x0D) or the end of the buffer is reached (20 characters).
The first character in the buffer will always be interpreted as the command and action taken according to table 1 below.

Unknown command strings are ignored.
MxxyyMove to LCD row xx, column yy
WxxyyWrite yy to eeprom location xx
RxxRead eeprom location xx and return result to serial port (pin A1)
DDisplay the on the LCD staring at the current location. Maximum length of the string is 16 characters.
XClear LCD screen, set pointers to line 1, column 1
ISet welcome message to .Maximum length of the string is 16 characters.
Z150163Set byte 0x00 of the eeprom to 0xFF. This signifies an uninitialised Slave. The welcome message will display as “Initialised.”
CUnused at this time.
All other characters are ignored.
Link to source and schematics for this project

page hits

since 26th Feb 04.