Using Ethernet Shield to Send ARDUINO Sensors Data to a MySQL Database and Display It on a Website With PHP, HTML & CSS

by EdrisaT1 in Circuits > Microcontrollers

12162 Views, 28 Favorites, 0 Comments

Using Ethernet Shield to Send ARDUINO Sensors Data to a MySQL Database and Display It on a Website With PHP, HTML & CSS

walpaper.jpg

For this, you will need to have basic knowledge on Arduino Programming, MySQL, PHP, HTML & CSS (optional)...

Things You Will Need

Indicators-on-HUAWEI-B683-WIRELESS-ROUTER.jpg
dht22.jpg
lcd16x2blue_front.jpg
bb.jpg
ethernet shield.jpg
cable-mess1.jpg
main.jpeg
dupmf-1.jpg
0J3807.1200.jpg

Arduino Development Board (Arduino Mega 2560 Recommended)

Arduino Ethernet Shield

A Wireless Router with Internet Connection

Cat 5 RJ 45 Connector Network Cable (any other can work) (check the images and pick one)

3 Male - Female Jumper Wires and some Male To Male Jumper Wires

A Web Hosting Account (get a fee one at 000webhost.com or 0fees.us, i used 000webhost.com)

DHT 11 / 22 Temperature Sensor

LCD 16X2 LCD Display

A Breadboard

MySQL Connector Library (Download from github Thanks to ChuckBell)

I got the hardware from amazon and I am sure they still have some more... :-)

Connecting Things Together

IMG-20170208-WA0036.jpg
IMG-20170208-WA0019.jpg
IMG-20170208-WA0016.jpg
IMG-20170209-WA0007.jpg
IMG-20170209-WA0008.jpg
IMG-20170209-WA0004.jpg
IMG-20170209-WA0005.jpg
IMG-20170209-WA0006.jpg

The Ethernet Shield

Stack The Ethernet Shield over the Arduino Mega Board. (make sure all the pins are in their respective holes)

The DHT 22 Sensor

Connect the +pin (left most) to the +line(red Line) at the edge of the breadboard

Connect the -pin / Ground pin(right most) to the -line (Blue line) at the edge of the breadboard

Connect the out pin to digital pin 2 of the Arduino

The LCD

Connect as follows

Pin 1 (VSS) -> Pin 16(K) To the ground of the breadboard

Pin 2(VDD) -> Pin 15(A) To the +line of the breadboard

pin 3(VO) Through a 1kohm resistor to the ground

Pin 4 (ES) To the Arduino 32

Pin 5 (RW) To the Ground

Pin 6 (E) to the Arduino 30

Pin 11 (D4) to the Arduino 28

Pin 12 (D5) To the Arduino 26

Pin 13 (D6) To the Arduino 24

Pin 14 (D7) To the Arduino 22

The Breadboard

Connect the Red Line of the breadboard to the 5V of the Arduino

The Blue Line to the Ground

Deploying

setup.png
Screenshot from 2017-02-08 20-18-42.png
table212.png
Test.png

Download the zip file and extract it

copy the ev folder into the htdocs directory of your web server

goto the browser and type in localhost/ev/setup.php

the script will setup the sql database and tables

goto the codes folder and

open the ev.ino file in arduino and upload to the arduino mega board

set the baud rate to 115200

when it is done uploading and everything is connected properly

you

Downloads

The Working

fjtPeeU.jpg
Arduino + Ethernet Shield + MySQL & PHP

If you like this project please vote me up and hit the like button...