Arduino Controlled by PC

by ΒαγγέληςΑ1 in Circuits > Arduino

2542 Views, 25 Favorites, 0 Comments

Arduino Controlled by PC

rfewr.PNG

I have always wanted to create a home automation system around sensors to make more easy process like see temperature , humidity or if there was some movement in the room, to I switch the lights without having to enter blindly searching the switch to turn on.

So I've decided to start a basic project. The project consists of a temperature sensor and LED which simulate the relay to switch the lights of the room on/off.

The sensor and led communicate with an arduino mega and then the Ethernet shield get the info and send using UDP packet to Java program i wrote.

Sorry for the quality of video i have not a good equipment

[Video]

Step1 : What We Need for the Project ?

64-02.jpg
ethernet_shield-arduino-1.jpg
LEDs-2.jpg
Arduino-Mega-2560-Pinout.jpg
sku_151396_2.jpg
sku_142221_2.jpg
Resistore_strato_metallico.gif

Hardware:

1x Arduino Mega (can use arduino uno too)

1x Ethernet Shield

3x Leds different color

3x 220 Ω resistor

1x breadboard

1x DHT21/AM2301 Capacitive Digital Temperature & Humidity Sensor

Some wires

Software:

Library for DHT21/AM2301

Arduino Ide

Java ide i use netbeans

Step2 : Connecting the HardWare

Capture1.PNG

First we connect the temperature sensor in A3 analog pin.

  1. The red cable is need to connect in 3.3volt pin, caution not 5volt pin
  2. The black in GND pin
  3. The yellow in A3 analog pin.

Then set in breadboard the led with the resistors and connect them in the pins 13,12,11 Pins.

Sorry i cant find image for the DHT21/AM2301 sensor and put another

Step3 : Download the SoftWare

First download the DHT library from hear [Download]

Download Java files from hear[Download][Download]

Arduino files from hear [Download]

Step5 : Upload the Arduino and Java SoftWare

Capture.PNG
2.PNG
3.PNG

Open the sketch UDPClient. put the mac of Ethernet shield an IP Andress and a port

Upload the sketch to the arduino.

Make a project name UDPClient in netbeans or any of the IDE you know to use.

Then copy the two Java files in the Java project you make. In Java class Panel set the Arduino IP address and the port of arduino

Step 9: Launch

rfewr.PNG

Now youare ready to run the Java program you can open the led1 led2 and led3 and for temperature is the analog button :)

If you liked my project, please vote for me :)

I try to make an automation room with android phone and arduino, An excerpt from one of the project prepare you can see in the video.

[Video]