Introduction: Arduino MEGA 2560 Home Automation With 8 Channel Relay

Picture of Arduino MEGA 2560 Home Automation With 8 Channel Relay

Check the next pages for the schematic and code.

Step 1: The Schematic

Picture of The Schematic

Here you see the schematic.

Should be very easy to understand.

Just connect it as the schematic shows.

Step 2: The Code

You need to include the SPI and Ethernet Libraries.


You probably need to change the IP Address and gateway. Subnet will be as it is in most cases.

You can find this below on the top of the code to change IP and gateway.

byte mac[] = { 0xAE, 0xFE, 0xDE, 0xEF, 0xFD, 0xFD }; //You can change the mac address to!

byte gateway[] = { 192, 168, *, *** }; //

byte subnet[] = { 255, 255, 255, 0 }; //

ip(192,168,*,**);

To find out what your gateway

Select Start > Run. Type command into the dialog box, then click OK.In the command line window, type ipconfig /all.

Here you will find your gateway.

To find the control panel. Just go to the IP adress you assigned to the Ethernet Shield in your browser, phone or tablets browser. From here you can Control each relay.

Good luck!

Comments

NirmithiC (author)2016-12-09

Thank you!

ViteshS (author)2016-07-19

great project

vandenbrande (author)ViteshS2016-07-19

Thank you!

iamGarcia (author)2016-05-27

Hi vanderbrande,

very great project...i try to make this project but got a little problem because i am using internet at my workplace that using proxy server.any suggestion to editing your code. Tqvm if u can help me out....

ShaddamH (author)2016-05-17

thank you so much for this easy implemented instructables

It's Great....

vandenbrande (author)ShaddamH2016-05-18

No problem!

About This Instructable

3,617views

38favorites

License:

Bio: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the ... More »
More by vandenbrande:Arduino & C# - RGB LED / LED STRIP CONTROL C# Application Arduino & C# - LM35 Temperature Sensor C# Application Arduino (OPEN SOURCE) Arduino & C# - HC SR04 Distance Meter C# App for Arduino
Add instructable to: