An Ethernet Relay Controller

As a recent project, I designed a cool relay controller that uses a state machine to control a set of relay outputs based on a user defined program.  The initial task is to operate a set of Christmas lights at Christmas time, but there is nothing stopping me using it for anything I like later on.

The device is configured via a web browser.  I had a lot of fun fitting the web pages into the AtMega368 chip that this device uses.  There is much I can learn about stack frames on tiny devices 🙂

The project is published as an instructable, at http://www.instructables.com/id/A-Remotely-Programable-Relay-Controller-Christmas/

I will put full design files up here once I get my head around WordPress.

My Relay controller that uses an Ethernet interface

8 Comments

  • By Mike Y, September 21, 2010 @ 12:10 am

    Excellent project – saw this on instructables.
    I can see the webpages would take up a lot of code/data space. Is the next stage to add a small flash drive?

    TNX also for turning up the DIP Packaged Ethernet controller – so much now is SMD and difficult to solder, and I can obtain this locally for around US$3.60

    73
    Mike Yancey
    KM5Z
    Dallas, Texas USA

  • By admin, September 21, 2010 @ 7:00 am

    Having now built a couple of projects that used the ENC28J60 with the AtMegs328, the big issue is actually string storage in RAM – The ATMega only has 2K of ram space, and once you start to do anything with strings, that gets exhausted rather quickly. The watering system controller has tons of flash left (I only used 16K of the 32K available), but adding functionality was tricky, as I kept running out of stack space as my strings were getting too big.

    I am not intending to add a flash drive, as this project is only really for simple embedded systems.

    I also understand about the SMD devices being tricky to solder – All I can say is to practice on some simple SMD projects. It is a really useful skill. I have even started repairing SMD based handhelds with an amazing degree of success.

  • By admin, June 27, 2011 @ 11:24 pm

    Hi Daro,

    This project uses the Arduino platform – there is no hex file.

  • By PaulVK, January 25, 2012 @ 9:49 am

    I have taken the AVR-ENC28J60 way beyond this using at present a M644P but will be going to a M1284P (has 16K of RAM) My project has dynamic pages, EEPROM storage of IP, MAC ect you can change everthing via web or serial command line and much more. Its not an Arduino project it is writen in Bascom from MCSelectronics, code is posted on their forum free for all to use and I or others could supply the HEX code if wanted still a work in progress but already has a lot of usefull code.

  • By admin, January 25, 2012 @ 10:40 am

    Thats amazing 🙂

  • By PaulVK, January 25, 2012 @ 11:15 am

    Also forgot to mention the language can be changed by changing the words in an included file of constants then re-compile using Bascom

  • By PaulVK, January 25, 2012 @ 3:55 pm

    Just to answer KM5Zs comments about web pages taking space. With dynamic pages I only have about 4K used by the pages and I have over 20 pages being displayed. You should be able to impliment it in your server Doug regards Paul..

  • By admin, January 25, 2012 @ 4:03 pm

    Thanks for that – in reflection (This is an old project) the biggest hastle was that the library I used was not happy about sending data that took multiple packets, so i was limited in responses to a single packet. When I pick this up to update it one day, I will need to re-visit the library to fix that limitation.

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes