0

members

Easy Basics: Project 062a Arduino W5100 Ethernet Shield, LED and SG90 Micro Servo Motor - Webserver

of Lex C. in UNO

Basics: Project 062a

Project name: Arduino W5100 Ethernet Shield, LED and SG90 Micro Servo Motor - Webserver

Tags: Arduino Uno, Arduino, Ethernet Shield, Webserver, LED, SG90 Micro Servo Motor, SG90, Arduino W5100

Attachments: sketch1

In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):

1.Arduino Uno R3 (you can also use the other version of Arduino)

2. Arduino W5100 Ethernet Shield 1 pc

3.Arduino IDE ( you can download it from here  )

4.Jumper cables M-M

5. Breadboard 1 pc

6. Resistor 1 pc (220 Ohm)

7. LED 1 pc

8. SG90 Micro Servo Motor 1 pc

9. Capacitor 100 uF 1 pc

General

We will learn how to connect Arduino W5100 Ethernet Shield to Arduino board and use it to control one LED and SG90 Micro Servo Motor.

I'll be
controlling one LED and a servo, but you can apply this method to
control any electronic device you want. (such as DC motors, buzzers,
relays, stepper motors, etc..)

We will make the webserver together. Of course, you can use this project to control any electronic device you want (for example DC motors, active piezo buzzers, 5V relays, stepper motors and so on).

Understanding the servo motors

You can read more about them here.

Understanding the Arduino W5100 Ethernet Shield

The Arduino Ethernet Shield V1 allows an Arduino board to connect to the internet. It is based on the Wiznet W5100 ethernet chip (datasheet). The Wiznet W5100 provides a network (IP) stack capable of both TCP and UDP. It supports up to four simultaneous socket connections. The ethernet shield connects to an Arduino board using long wire-wrap headers which extend through the shield. This keeps the pin layout intact and allows another shield to be stacked on top. The most recent revision of the board exposes the 1.0 pinout on rev 3 of the Arduino UNO board. The Ethernet Shield V1 has a standard RJ-45 connection, with an integrated line transformer and Power over Ethernet enabled. There is an onboard micro-SD card slot, which can be used to store files for serving over the network. It is compatible with all the Arduino/Genuino boards. The on-board micro SD card reader is accessible through the SD Library. When working with this library, SS is on Pin 4. The original revision of the shield contained a full-size SD card slot; this is not supported. The shield also includes a reset controller, to ensure that the W5100 Ethernet module is properly reset on power-up. Previous revisions of the shield were not compatible with the Mega and need to be manually reset after power-up.

  • Requires an Arduino board (not included)
  • Operating voltage 5V (supplied from the Arduino Board)
  • Ethernet Controller: W5100 with internal 16K buffer
  • Connection speed: 10/100Mb
  • Connection with Arduino on SPI port

You can find some information about Arduino W5100 Ethernet Shield by using thee links: arduino-ethernet-shield-06-schematic.pdf, arduino-ethernet-shield-06-reference-design.zip

The current shield has a Power over Ethernet (PoE) module designed to extract power from a conventional twisted pair Category 5 Ethernet cable:

  • IEEE802.3af compliant
  • Low output ripple and noise (100mVpp)
  • Input voltage range 36V to 57V
  • Overload and short-circuit protection
  • 9V Output
  • High efficiency DC/DC converter: typ 75% @ 50% load
  • 1500V isolation (input to output)

NB: the Power over Ethernet module is proprietary hardware not made by Arduino, it is a third party accessory. For more information, see the datasheet. The shield does not come with the PoE module built in, it is a separate component that must be added on.

Arduino communicates with both the W5100 and SD card using the SPI bus (through the ICSP header). This is on digital pins 10, 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general I/O. On the Mega, the hardware SS pin, 53, is not used to select either the W5100 or the SD card, but it must be kept as an output or the SPI interface won't work.

Note that because the W5100 and SD card share the SPI bus, only one can be active at a time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. If you're not using one of the peripherals in your program, however, you'll need to explicitly deselect it. To do this with the SD card, set pin 4 as an output and write a high to it. For the W5100, set digital pin 10 as a high output.

The shield provides a standard RJ45 ethernet jack.

The reset button on the shield resets both the W5100 and the Arduino board.

The shield contains a number of informational LEDs:

PWR: indicates that the board and shield are powered

LINK: indicates the presence of a network link and flashes when the shield transmits or receives data

FULLD: indicates that the network connection is full duplex

100M: indicates the presence of a 100 Mb/s network connection (as opposed to 10 Mb/s)

RX: flashes when the shield receives data

TX: flashes when the shield sends data

COLL: flashes when network collisions are detected

The solder jumper marked "INT" can be connected to allow the Arduino board to receive interrupt-driven notification of events from the W5100, but this is not supported by the Ethernet library. The jumper connects the INT pin of the W5100 to digital pin 2 of the Arduino.

How it works

The sketch when uploaded and connected with LAN cable to the internet creates a webserver at specific IP address in your local computer network. You can use that IP address to access that webserver through your browser on your PC. By default the IP address is "192.168.1.178". That also can be found and changed in the sketch provided. The webserver shows a webpage where you will find 4 buttons. Two buttons to control LED and two buttons to control servo motor.

Signals and connections of the LED

The operating voltage of the LED is 1.8V and the operating current is 10mA-20mA. The Arduino Uno board can supply 5V or 3.3V power. We will use 5V for this project, so the minimum resistance of the current limiting resistor should be (5 V to 1.8 V)/20 = 160 Om. The 220 Om offered in the kit is suitable and you can also choose other resistors that meet the condition. The larger the resistance is, the dimmer the LED will get.

Signals and connections of the SG90 mini servo motor

Wiring

1. Insert Arduino W5100 Ethernet Shield to Arduino Uno board from the top.


2.The following picture shows the needed connections with the Arduino Uno 


Step by Step instruction  

  1. Do wiring.
  2. Open Arduino IDE.
  3. Plug your Adruino Uno board into your PC and select the correct board and com port
  4. Verify and upload the sketch to your Adruino Uno.
  5. Enter 192.168.1.178 in your browser on your PC.
  6. The webserver will show a webpage like that.
  7. You will see 4 buttons: two buttons to control LED and two buttons to control servo motor.

Summary

We learnt how to connect Arduino W5100 Ethernet Shield to Arduino board and use it.

Library

  • All libraries attached on the begining of the project description
  • Ethernet library included in Arduino IDE.You can read about it here.  
  • SPI library included in Arduino IDE.You can read about it here.  
  • Servo library included in Arduino IDE.You can read about it here.  

Sketch

  • See attachments on the begining of this project


Other projects of Lex C.

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 15-03-2018
Viewed: 515 times