Zeta Engineering Home Automation
Latest Posts
1/10/2010: HCS Sparkfun JPEG Camera running!
1/03/2010: Happy New Year! LCD DDA Line drawing (photos!)
12/27/2009: The new DDA line drawer (photo!)
12/23/2009: Merry Christmas! Netbook based host program
11/14/2009: Starting the new Host program that will run on a netbook
11/2/2009: Learning to use Apache
10/26/2009: DDR close to working
10/16/2009: More on the new HCS_X?
9/21/2009: Thinking about updating the HCS_C main board
7/20/2009: HCS_CAM sparkfun camera picture (photos)!
Currently HCS_C supports X10 and Insteon powerline control, HCS_NET RS485 networks, ethernet internet connectivity, analog and digital inputs and outputs, and relay switching of devices. Keyboards, LCD displays, touchscreen displays, video (LCD computer monitors) and other devices are supported both at the base station or can be connected to remote modules.
HCS_C operation is managed with a simple but very powerful command language called HCS_C Xpress. It permits easy time or date control of any sensor or any action for any length of time. Random actuation (for example of house lighting while on vacation) is easy to do.
If you want to bring your house safety and management into the 21st century, HCS_C is the only system that brings all home control functions into one integrated system under your control!

Here's some pictures. The main controller is mounted in the utility room on the wall, and has the RS485 ("HCSNET"") connection to sensor modules all over the house. It also hooks up to a netbook that provides diagnostic, networking, and other functions--you can view status at hcs-morrison.com (currently I'm redoing a lot of the webpages, so you may not be able to access this site while I'm doing that). On the right is one of the network modules that senses when our well pump is on and what our heat pump furnace is doing. To keep power low, the netbook display shuts off after a few minutes. This whole system is on a UPS, so if power goes out, this keeps running for a very long time!
Zeta Engineering HCS_C Status
8/29/2010: Couple of quick checkoffs: escape sequences now working, regression test now working, and checked the new (handy!) INLOW and INHIGH functions. Need to check HCSNet remote readback and Insteon readback. Once this is done, I'll do some work on the host to make it a little cleaner, and then 1.10 will finally release... yay...
8/29/2010: OK, I'm on the 1.10 countdown. I've got a list of chores to do, and just got an important one fixed--but it was painful. The software for building the HCS FPGA configuration device no longer works--the FPGA is almost 20 years old and I have kept the corresponding Altera SW around to make changes, but the subsequent revisions haven't supported this FPGA for 10 years or more. Unfortunately, something in my computing environment broke it, it took several exhausting days to find a workaround to build that EPROM, so guys--this is going to have to be the last revision, I've decided to release 1.10 and then go to the new HCS_X with a new FPGA. I did get the boot code fixed so now it's possible to program fw flash and web flash, but it's getting harder and harder to keep this old stuff running any more! So here's the checklist:
a: fix escape sequences in the new host program from the regression test
b: test readback of HCS_Mini, HCS_Cam, HCS_Combo cards. The old HCS_II DIO and TERM cards will no longer be supported (unless somebody yells really loud!!)
c: test insteon commands and readback
d: clean up host program. This first version is going to just be a simple text program with no flexibility--but the new host interface has a simple protocol that you can modify or easily create your own custom host program. You just have to be able to accept the serial port command syntax ("$<display cmd><params>") and send commands ("!<cmd><params>"), then display anything you want. I'll try to create a host interface user manual before too long. This frees you to create host any way you want--a visual basic app, write it in visual C, use MAX/MSP, whatever.
e: final round of testing
If no major hiccups, and this goes smoothly, 1.10 should be released in a month or so, I'm targeting before the holidays.
8/25/2010: Back from a nice photography trip. Ready to finish up HCS_Xpress 1.10, first priority is to do a pile of bug fixing. This release will be major and will require patience--it communicates in a different way to the console, so the feature set will be reduced for a while. You need to save your current host program, EPROM code, firmware, even the flash programs, they will all be updated. First priority is to fix the boot code, it no longer communicates correctly. Note that the video has been removed from the main board--I know, kind of a nuisance for me too--but there's not enough room for it and the packet buffering that HCSNet now uses. I will be providing video using one of the mini cards directly to HCSNet--one nice thing about the new version is it now supports all three HCSNet ports on the HCS_C main board, and runs at 115200 very reliably. Since RS485 requires an in-line topology, having three drivers on HCS_C main means you can create three point star configurations yet still support reliable highspeed HCSNet network topologies. The mini card can be added to any of the three ports without disrupting the RS485 inline topology--and it has a far better video module with full color graphics support, 70M lines per sec of variable width, lots more IOs, a camera interface, etc. Yes, I'm taking out HCS_C main video, but replacing it with something a whole lot better. The HCS_C main video was just a very simple character terminal display, and pretty slow to boot.
7/26/2010: I thought it would be simple to get the in-service HCS_C functioning with a camera. And it is functioning..., but it was anything but simple. First, the new HCS_C FPGA code has a 115200 baud connection for the host (to make it capable of much more update data to be sent to the host--but this breaks the flash fw programming capability. Fortunately, I saved the old EPROM and was (after some effort) able to program flash. But the in-service board, which has seen many, many years of service, is no longer connecting very well--need to find out what that is about, but for now, I eventually got it to program and run. I'll have to find out what is going on here.
But then a bunch of other issues surfaced with the camera sending data down--to make a long story short, it took an awful lot of work before I have one camera up and running. Now it works fairly well, it still hangs about once a day and I dont know yet why, so I added host debugging capability--the host is still absurdly primitive even compared to the old DOS host you all are used to, but I can't look back--HCS_C is no longer remotely compatible with that thing, which was horrid because of the 64K memory limit. No problems there, but just taking a while to get everything added. But it is really cool to have a 100' (roughly 30 meter) connection shipping down pictures that can be viewed on the web via my HCS. This allows me to control picture taking with the HCS_C, including motion control, door bell, etc, etc, and each camera card has the capacity to store many thousands of pictures, I can log activity for weeks at a time. It's still very primitive, and the camera interface still has at least one bug, although HCS_Xpress 1.10 is looking very robust.
I added a capability to HCS Xpress 1.10 that I really need--the ability to sense short pulses, either high or low, on the HCS_C main inputs. The doorbell and other sensors were often missed if the pulse was too short, now HCS_Xpress has a new operand called INLOW and INHIGH. It has the ability to capture short pulses of either level, and can be used to lengthen or debounce incoming signals.
7/19/2010: Got my first picture from the FPGA all the way to the HCS host. This version of the camera board doesn't use the embedded PC, which draws 1.5 amps not counting the display (almost another amp). Instead, it uses one of the HCS mini boards to connect to the camera. On the embedded PC, I just saved the camera output to a compact flash card, but this version is the real deal--the HCS Mini card receives an HCSNET command to take a picture. It does that, then formats the resulting image for HCSNET, sends it down to the HCS_C main board. The HCS_C main board saves the image in an image buffer, then waits for a timer tick and sends it to the host (a netbook). The netbook unpacks the image file format into a JPG file and saves it so that the Apache webserver can pick it up and display it on the web.
Yow. That has to be the hardest way to take a picture ever conceived--there's gotta be a better way. Nevertheless, here it is, below, the first usable image from an HCS_Mini board sent all the way to the host disk.
Still a lot of problems to solve--the file doesn't close properly, sometimes the camera wont come up, sometimes HCS_Xpress 1.10 gets confused.... But this was a big victory. As I had happen with the network card, sometimes huge efforts like this result with nothing to show for it--and the camera chip definitely has a bunch of undocumented requirements for syncing and other issues that I had to find by trial and error--the worst was its inability to auto find the working baud rate, and sometimes it just doesn't power up. Oh well--this is just the first step. I'll clean up some of these problems, then get the in-service HCS_C set up to do some duration testing.

7/5/2010: I had a nice little vacation over our holiday July 4th independence. Heres to freedom for every individual for every country on this earth, and appreciation for those who gave their lives or put their lives in service to freedom! Easy for me to say and not fully appreciate what it takes, though.
I got the JPEG camera interface working fairly reliably on the embedded PC, so I ported the architecture into the HCS_CAM remote module FPGA. Once I have that working, I'll start the final round of work on HCS_Xpress 1.10 that will accept the images and store them onto the host device using the new host program. Then my goal of remote visual monitoring will be finally achieved. However--bad news-- the Sparkfun JPEG camera that this design is based on is out of stock--no indication when they will have more. Not sure what I'm going to do about that, but the infrastructure is now in place for any of the camera solutions that are available. I'll get this finished for now, get HCS_Xpress out (and the board updates out for those of you waiting for that), then decide what to do.
6/14/2010: Here is my first pic from the JPEG cam on the HCS_EX (embedded PC remote module). Now that I have this working on the (easier to debug) embedded remote module, I have two more chores: get it operating on the HCS_CAM card, which is a whole lot cheaper, smaller, and lower power than the embedded PC remote module. Then I have to get a protocol set up to talk to HCS_Xpress on the HCS_C main board and to the new host program. This will allow the JPEG files to be displayed on the webserver. Still a lot of work ahead of me! So why did I go to all this trouble when I already had the old (non-JPEG) camera working? Because when I worked on the old camera, it took half an hour to get the multimegabyte image down to the HCS_C main board using HCSNet (9600 baud). I have upped the speed of the HCSNet interface to 115200, we'll see if that even works throughout the house... But these JPEG pics are around 20K bytes, or one 50th the size--should be very quick to send to HCS_C.

6/9/2010: I took a break from the new host program, and worked on a special new remote module, one based on a small embedded PC running Microsoft WinCE. The advantage of this module is a lot of functionality comes for free--audio for my intercom, mike input for listening to sounds in the room, support for USB devices and serial devices, LCD panel support, a large amount of memory, and so on. It's experimental--I don't know whether I will use this or one of my HCS camera boards. I'm developing the code for the Sparkfun JPEG camera, I'm talking to it already--now I just have to figure out how to transmit the image down HCSNET.


Pictures show in-wall mountable LCD display with built-in motion sensor, keyboard (plugged in), two USB ports, microphone and audio output that connects to the intercom. Note ethernet connection and touch panel interface.
6/2/2010: Working on HCS_Xpress 1.10. The biggest change here is the host program: HCS_C has been using the Borland 3.0 version C compiler with some embedded DOS windowing libraries. I had to use only that (ancient, DOS) compiler. Neither older and newer versions would work. That thing has been a giant boat anchor on HCS_C--too much legacy code, but kept running out of memory, couldn't do any graphics, slow, etc etc. Version 1.10 finally goes to Visual Studio 2008, a total rewrite of host. But--it's a big step backwards until I get all the old functionality back. Right now, it only updates time, uploads an events file, and displays the inputs and outputs--no remote cards!! Of course the remote card support will soon be added--but still will be very primitive. I'll try to get logging support in soon. Maybe even some diagnostic display to make it easier to debug your events programs! It already has simple webpage generation that will allow a webserver to show HCS_C status--but once again, it's still really primitive.
Please bear with me, it will be worth the turmoil. There's a huge increase in capability coming--one of the best will be it will now be easy for you to tweak the source to make your own custom host program. Note that I now run the console at 115200 (The old host program could only run at 9600 before losing characters). I spent the holiday weekend implementing the console display--this will be cool because now you'll have a large console display, be able to change colors, do cursor control, and other fun stuff that couldnt be done in the old host program. The new host program can display blocks of variables and timers and memory. Maybe I could implement some games!... well maybe not. But anyway, some short term primitiveness, long term big benefit. Unfortunately, 1.10 will not be backwards compatible with previous host programs--sorry!! I tried, but the old interface just had too many issues to try to support.
5/30/2010: In the USA, today (and every day, but especially tomorrow, Memorial Day) we remember and thank all those who served our country, and never forget those who gave their lives for a cause greater than themselves. I salute everyone who has served and acknowledge the debt that I owe for my freedom and safety.
5/29/2010: I worked on the HCS_C insteon read support. Looks like several things weren't set up correctly in the Insteon receive UART, got those fixed up and now can fill an array of insteon data. Question now is what to do with that data--I could just add an HCS_Xpress insteon read value and let the events program handle what it receives--but it would be nice to provide some filtering/sorting of the data. HCS_Xpress is really good at simple concurrent home control operations but a little clumsy and slow for data processing. I'll do a little thinking on this. I'll get this done and some more work on the camera card JPEG dump, then wind down the HCS_Xpress 1.10 effort and get it released. I also am rethinking how I did the RS485 receive data--very flexible and can handle a large array of various remote cards, putting each cards' data in an automagically managed dynamic array. But it is complex firmware and too hard to manage, meaning it never has quite worked right. Since HCS_C is a weekend project, I usually have to ditch big efforts and go with simple, so this is going to get redone.
5/15/2010: OK, I'm back (nothing to show for the Microsoft contest entry, that was a pretty big waste of time. I wont do that again...). I'm starting work now on HCSX which is the Stellaris (Cortex M3) implementation of HCS_C that will replace the ancient HCS_C boards. This will have some interesting changes in it: First, HCS_Xpress will now generate compiler output (ARM binary code) rather than a token file that is interpreted. Should make things a whole lot faster. Second, each remote module will have its own running copy of HCS_Xpress, thus making each module able to run independently, only using RS485 HCSNET to communicate. It's the world's first Home Automation Cloud computing environment :-D!! Seriously, one of the problems I had with the HCS_C master-slave environment was not only the increasing bandwidth load on the HCSNET bus, but the increasing complexity and difficulty of maintaining the central events file. Most of the time, I was working only with one new module on the system, yet was struggling to maintain the events file for all modules--which meant I would go for long periods of time where the whole system was down because I was bringing up just one module. This way, the rest of the system will operate normally even while sending updates to the new module. Note this means now that updates can be sent from any module to any other module. So lots of cool stuff coming down the pipe!
I also should finally get a new version of HCS_Xpress out. The network card ended up being discontinued--the Microchip ethernet device just had too many fatal bugs that forced detection and hard resets to recover--meaning that the network card would get into a locked up state that required an HCS_C reset or even power cycle. It was a bad device to use. Hopefully the Stellaris part will work a lot better.
1/10/2010: Got the JPEG camera connected and talking on the HCS_CAM board--but no pictures yet. Need to fix some things--the dump to memory sends two copies of each received byte from the camera, won't work for displaying as a JPEG! I also added the line continue with the no_plot option. Fixed several bugs in the line drawer, it's now working quite well. I also worked on a variety of timing issues within the FPGA--now the LVDS video seems rock solid output--pretty amazing considering that interface runs at 280Mhz! The generated signal has to be output on a 3.2ns cycle, which the FPGA is outputting quite well. The FPGA is about 2/3 full (and typically starts having timing issues at around 70-80%) so I won't be able to add much more to it. This is such a great little board that I'll make a bunch of them and I think I will relayout with a bigger FPGA so I can add more graphics features.
HCS_C INDEX
Ethernet_users_manual.htm (NEW!)
PC_BOARD A.02 to A.03 update list
Here are the various HCS_C pages.
HCS_C Main Board Block Diagram