|
|
CAN
Remote
Automation
and Control
with the AVR
The free home automation
project
|
CARACA
|
|
|
|
|
|
Application Software |
|
|
|
|
|
FAQ
|
Licenses
|
|
PROJECTS |
PonyProg
serial device programmer |
CARACA
free home automation project
|
|
|
|
|
|
This page is still
under construction
Last update
21 March 2000
Hosted by:
|
|
Introduction |
|
CARACA is a home automation project based on a net of interconnected programmable
circuits suited to perform different tasks like switch on/off appliances,
decode commands from Ir remote control units, control thermostats, measure
temperature and more. Every node of the net communicate each other through
a robust protocol (CANBus), and the status can be monitored by a PC possibly
connected to the Internet.
I started CARACA some months ago for my house, but I received a lot of
e-mail from people interested in home automation, so I decided to start
the CARACA project to join all efforts into one direction. I know there
are already home automation projects, but they aren't as "open"
as I would they be. CARACA is yet in first development stage, so you can
join to the project and actively participate to the
discussion and development. With the help of other interested people I
hope to complete CARACA soon.
CARACA software is distributed with sources under the GPL, while hardware
schematics and PCB are copyrighted by the author and you can reproduce
it only for personal use; see more details in CARACA hardware license.
|
|
Documentation
|
|
The following items make up a typical CARACA network
all connected to the bus.
Look at CARACA Bus topology (PDF) for details
on a possible bus connection.
Let analyze all the elements in detail.
|
|
THE NODE
|
|
The photo shows a CARACA node (back side). Note how much small it is
compared to standard cigarette box. It fits in a standard domestic socket
and can measure temperature, switch on/off appliances and receive commands
from buttons and Ir remote control units.
It features:
- 5 darlington outputs
- 4 logic level digital inputs
- 1 Ir decoder (RC5)
- 1 temperature sensor/thermostat (0.5 resolution)
- 1 LED
The core of the NODE is the AVR AT90S4433 micro controller provided by
Atmel.
The AVR is surrounded by the CANBus driver PCA82C250, the relay driver
ULN2003, the Ir receiver TSOP1836 and the temperature sensor/thermostat
DS1621.
The node is powered by a 12V dc from the bus.
NODE Schematics
Firmware
The AVR run a nanokernel with four threads:
- CANBus thread: it implements the CANBus in software
- EventDispatcher: dispatch events* and actions* between
the other threads
- RC5 decoder: decode RC5 codes from Ir receiver and check for input
state changes
- Read the temperature and set the thermostat
The NODE is a "stupid" hardware that translate every event
into a CAN message to transmit and every CAN message received into action.
The STAR then associates every event to action.
* To know about events and actions refer to the high
layer protocol.
|
|
THE STAR
|
|
The photo shows a CARACA star. It powers and connect up to 7 NODES to
the bus. Furthermore it features 7 relays (16A NC) to switch on/off high
current load and a RealTimeClock with a 32KHz xtal. You need at least
one STAR every 7 NODEs.
STAR features:
- 7 high current relays
- 8 DB9 sockets to connect up to 7 NODEs + 1 uplink
- 1 RTC with clock/calendar and several alarms
- 1 LED
The core of the STAR is the AVR AT90S4433 micro controller provided by
Atmel.
The AVR is surrounded by the CANBus driver PCA82C250, the relay driver
ULN2003 and RTC PCF8583.
The STAR is powered by 230V ac.
NODE Schematics
Firmware
The AVR run a nanokernel with three threads:
- CANBus thread: it implements the CANBus in software
- EventDispatcher: dispatch events* and actions* between
the other threads
- RTC: read and set the clock calendar and manage the alarms
The STAR use a lookup table in EEPROM to link events, actions and alarms.
* To know about events and actions refer to the high
layer protocol.
|
|
High
Layer Protocol |
|
High Layer Protocol provide a powerful way to assign CANBus msgID to events
and actions. Furthermore it provide a way to read/write action and event
table stored in the EEPROM of every STAR and NODE via CANBus by a PC.
Let start with an example. Someone press button 1 in NODE A and he expects
that NODE B switch on the light 2, then after 5 seconds the light 2 switch
off again.
When the button 1 is pressed an event is raised in NODE A. NODE A look
up in event table for the correct message to send on the bus. NODE B listen
to the bus and it raise an action when it receive the message. It looks
up the action table and switch the light 2 on. Even STAR listen to the
bus, so it receive the message, look up to the alarm table, find an entry
that match and set the alarm to 5 seconds. After the 5 seconds elapsed
it send another message on the bus that tell to NODE B to switch off the
light 2.
|
|
Join
to CARACA |
|
If you want to contribute to CARACA you have to join to SourceForge
(the site that hosts CARACA and other open source projects) first, it's
free. After you got a userID you can ask Konrad or LancOS
to add you to the developer list.
To get access to source repository you need CVS installed in your computer.
If you use Linux you can find cvs in all common Linux distributions, if
you use Windows you can download and install the free WinCVS software.
Windows users will need also the ssh client.
|
|
Download
|
|
If you just want to look at the source code you can browse
the CVS repository.
If you want to try the firmware and/or software download the latest release
from the release page... But we haven't released anything yet :(
Additional schematics and layout files can be found in our download section
To
build the firmware you need AVA
free assembler v0.3b 0815-E by Paulo Soares and Uros Platise.
To program the AT90S4433 you can use PonyProg.
To build the software you need GCC.
|
|
|
|
|