Pages: [1]   Go Down
Author Topic: Arduino + Ethernet Shield + X10 =\ Home Automation  (Read 7711 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 1
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys, here's my home theater / home automation project...

I'll edit this main post with new videos, work logs, and all that goodies.

So far, here's the project layout and progress:

This is just the beginning of the write up and project... Already have parts and plans for a lot more... that's why I got a Seeeduino Mega... lots of extra memory and pins.

Plans:

Internet Controllable Thermostat that records and log temp (theory and implementation researched, harvesting parts)
Temp sensors for all my pet pythons and other reptiles (pending wiring)
Complete movie theater control with IR blaster and other curtains and lighting (in progress):
Multi-zoned speaker set up, using relays to switch power on/off to different AMPs. (two zone completed, pending parts)
Security System w/ Email Alert and Video Tracking (theory and implementation researched, pending wiring).


Youtube Video Progress:

Light Control and Movie Theater Curtains Automated Video
« Last Edit: April 28, 2011, 12:07:28 am by vinhtvu2 » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 89
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi! Very interesting your project!
Have you thought about a software to control all functions?
Logged

Freedomotic Domotica Open Source
http://freedomotic.com
We need your help. Please contact us for contributing

0
Offline Offline
Full Member
***
Karma: 1
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No software required. That's the beauty of it... I'm running it all on HTML using the ethernet shield to host the web browser...

Ofcourse if I want to further the features, I'll re-visit PHP and MySQL server on my homeserver... then I can have a database that keep record of temperatures and all that... that's the next step, to add the AC control and central heat and air directly into the system and bypassing the thermostat.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool, Looks great.

What is the Arduino board you are using?
More to the point, I guess I'm asking how big does the AVR need to be for the Ethernet/Web page side of things?
Mega328, Mega128 ????

Also, how are you interfacing the Arduino to the X10 powerline stuff? Via a serial connection?

Neil.
Logged

New Jersey
Online Online
Faraday Member
**
Karma: 67
Posts: 3678
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

that's the next step, to add the AC control and central heat and air directly into the system and bypassing the thermostat.
Make sure you test the heck out of this - I'd hate to pay the power bill for a couple of days where the heating and AC were fighting with each other  smiley-wink
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Haha, it's been in the testing phase for three months!!!
Still trying to find the appropriate relays to work for the 220v wall unit for the movie theater room... but the central heat/air is working pretty smoothly.

As for the Microcontroller, I'm running a Seeeduino Mega, which is pretty much the same as a Arduino Mega 1280. I will probably upgrade to the Mega 2560 soon since I will need more memory. I'm already using up 13K of memory on the Mega with just 4 lights and the code for the curtains. Ofcourse, it's not optimized, a lot of redundant coding that could be broken up into functions. But the project is growing and HTML takes a lot of room... Hopefully the 1280 will be enough once I optimize the codes.

I originally planned to use the mega because of the extra pins since I was going to use solid-state-relays to control the lights. Bought 40 of them too... expensive. But it was SUCH a pain to wire them in... and how to run them parallel with switches so the switch can still be used... couldn't figure out the implementation. So I switched to X10 and never looked back. It was much simpler, and easier to configure and no wiring required. It work with very small delay, and is pretty reliable with a repeater and a 2-phase bridge. The X10 transceiver I'm using is http://www.x10.com/products/x10_tw523.htm. Now I just need to buy more X10 modules.
Logged

Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's a very nice project indeed! I have a similar project running (just some leds on a breadboard though) but i cant get the HTML to work neatly. I have similar functionalities to you project but it seems that you're able to display the state of the lamps before the page refreshes. Do you use a get command for the radiobutton like 'www.[host].[domain]/80' or something alike? When I push the buttons used for controlling the leds, I need to meta refresh the page to redirect it to '/' root. Else the page won't display the actual states of the leds.

Could you maybe post or mail me the code you used for the project?

I'm looking forward to you reply!
Best regards,
BoomTakZaag
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 111
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What I did, is use a boolean value as a flag for each of the light. Depending on the state of the boolean value for the light, it displays different color for the button, making it the status. Ofcourse this is only in the Arduino and does not reflect the actual reading in the light itself. Because X10 receiving is pretty slow,  I didn't want the website to wait for the arduino to read all the X10 state first before opening up the page. Since using the interface is the ONLY way to turn on/off the light, it'll always be in sync with the boolean value.
If I use the hardwired X10 remote control to turn on/off the light, then the light will be out of sync. The work-around I used for this is to use designated control for turning on/off the light instead of "toggle" it on/off. This way, if the light is OFF, but the Arduino thinks it's on... all I have to do is turn it "off" on the interface, then the arduino will issue X10 command for off... which the light will ignore since it's already off. Then it'll be back in sync, so the next time I press the button, it'll turn on. This way, if it ever get out of sync, I press the button twice, and it'll sync itself back up again.

As I add more lights, I'll create an Array instead of different booleans... that way I can save more light, and simplify my codes. Also need to create a method that will generate the buttons and another method to take in the toggle commands so I dont use up so much memory of the Arduino.

My sketch is on my FTP server:
ftp://vinnievu.com
Username: User
Password: Password
Logged

Pages: [1]   Go Up
Jump to: