[otw_is sidebar=otw-sidebar-1]Arduino Ethernet,basics of Arduino Ethernet,Arduino Ethernet pinoutIn this post I will discuss about the Introduction to Arduino Ethernet. In the previous articles I have discussed different Arduino microcontroller development boards such as Arduino UNO, MEGA, NANO, PRO MINI, MICRO, Lilypad etcetera. All these Arduino boards resemble to each other in some of the specifications and also are unique in their applications and design. Arduino Ethernet is different from all these Arduino microcontroller boards. Although the microcontroller IC on which Arduino Ethernet is based is common to other Arduino boards mentioned but it has an added functionality of the Ethernet interface which makes it different from other Arduino microcontroller development boards.

After reading this post the reader will be able to learn about the basics of the Arduino Ethernet, schematics design of the Ethernet board, applications of the Arduino Ethernet and above all the Ethernet communication. So sit back, keep reading and enjoy the show!

Arduino Ethernet:

Arduino Ethernet like other Arduino microcontroller boards is the open microcontroller development board which is based on ATMEGA328. Note here that the microcontroller of Arduino Ethernet and Arduino UNO are same which implies that Arduino Ethernet has most of the features similar to the Arduino UNO but there are important differences as well. For example unlike the Arduino UNO the Arduino Ethernet does not have the USB to Serial data converter mounted on board that is Arduino Ethernet cannot communicate to the computer via USB port unless connected to USB to Serial breakout board. In addition Arduino Ethernet has Ethernet Bridge on board making it able to communicate to the Ethernet enabled devices. Arduino Ethernet also has the SD card the use of which will be discussed later in the article. Arduino Ethernet looks like one in the following image:

 

Arduino Ethernet

 

Notice that the Arduino Ethernet has no USB port but has FTDI connector to which USB to Serial breakout board is attached and thus program the Ethernet board. Arduino Ethernet has 14 Digital Input / Output pins out of which 6 are PWM (Pulse Width Modulation) enabled. Six analog pins are also available on Arduino Ethernet. We will see later that not all the Digital Input / Output pins are available for general purpose use due to the presence of Ethernet and SD card. In addition Arduino Ethernet has an ICSP header, 16 MHz crystal and a Reset button on board.

 

Ethernet Interface:

Before discussing the Arduino Ethernet in detail it is important to have an overview of the Ethernet interface of the Arduino Ethernet board. As mentioned earlier that Arduino Ethernet is based on the ATMEGA328 microcontroller IC which has built in SPI (Serial Peripheral Interface) computer bus and I2C (Inter-Integrated Circuit) computer bus but does not have Ethernet interface. Thus it follows that Ethernet interface on the Arduino Ethernet board is made available using another chip. This chip named as W5100 and along with other applications can be also used as SPI to Ethernet Bridge. The Arduino Ethernet exploits this SPI to Ethernet Bridge functionality of the W5100 chip. From the discussion it follows that W5100 is connected to the ATMEGA328 through the SPI (Serial Peripheral Interface) computer bus and thus convert the data available on the SPI computer bus to the Ethernet standard. It is worth noting here that other Arduino microcontroller development boards can also be connected to the Ethernet enabled devices using the Arduino Ethernet Shield but the Arduino Ethernet board act as the standalone device for applications where one need communication over Ethernet. The functional block diagram of the Ethernet chip is as shown in the following image:

 

 

functional block diagram of the Ethernet chip

The pinout of the W5100 chip is as shown in the following image.

 

pinout of the W5100 chip

 

Arduino Integrated Development Environment (IDE):

 

In the post on the Arduino UNO we learned that the Arduino UNO can easily be programmed using the Arduino IDE. The Arduino Ethernet can also be programmed in the similar way; that is the programming of the Arduino Ethernet is not different from that of the Arduino UNO, however it should be kept in mind that Arduino Ethernet has different number of pins and different pin configuration. The care should be taken while configuring the Arduino Ethernet pins. As most of you might have known that in order to program a microcontroller one need to write the code in the editor, and then compile that code in the compiler after which you get the HEX file of that code and later upload that HEX file in the microcontroller IC using another program. In case of Arduino all these steps are performed in single software which is called the Arduino IDE. By integrated Development Environment it means that all the steps that editor, compiler, burner are integrated in the same software. In short Arduino Ethernet is quite easy to program it is just a matter of few clicks. It is important to note here that the board type should be selected before uploading the code that is before uploading the code from Arduino IDE one need to select the board to which he / she is intended to burn the program. From tools select board as Arduino Ethernet otherwise the error will occur and your board would not get programmed .I will go through in detail about how to write a code and upload it in Arduino Ethernet later in the post Introduction to Arduino Ethernet.

Before concluding this section one point worth mentioning is that as Arduino Ethernet does not a USB port on board therefore the user has to buy a separate USB to Serial adapter in order to connect the Arduino Ethernet to the computer via USB port as shown in the following image:

Arduino IDE

 

Arduino Ethernet USB port

 

Arduino Ethernet Features:

Let us now learn some of the common specifications of the Arduino Ethernet microcontroller development board.

  • Microcontroller IC:                ATMEGA 328.
  • Operating Voltage:                5 Volts
  • Input Voltage:                          6 to 20 volts.
  • Digital I/O Pins:                       14 (of which 6 provide PWM (Pulse Width Modulation) output).

 

  • Analog Input Pins:                  6
  • DC Current per I/O Pin:           40 mA (This is the current that can be sourced or sink into and out of the Input / Output pins)
  • DC Current for 3.3V Pin:           50 mA
  • Flash Memory:                           32 kilo Bytes of which 0.5 kilo Bytes are used by the Bootloader.
  • SRAM:                                         2 kilo Bytes.
  • EEPROM:                                    1kilo Bytes.
  • Clock Speed:                              16 Mega Hertz.

Notice from the specifications of the Arduino Ethernet that it resemble a lot with the Arduino UNO.

Arduino Ethernet Pinout:

Let us now dive into the discussion about the pinout of the Arduino Ethernet. As described earlier that the Arduino Ethernet is based on the ATMEGA328 microcontroller IC so it follows that the pinout of the Arduino Ethernet is simply that of the ATMEGA328 microcontroller but note here that the Arduino Ethernet has its own nomenclature for its pins and here I will use the nomenclature used by the Arduino Ethernet for pin reference.

As pointed out earlier that the Arduino Ethernet has total 14 Digital Input / Output pins. The digital Input / Output pins can receive a digital signal or transfer a digital signal. Out of these 14 Digital Input / Output pins 6 are PWM (Pulse Width Modulation) enabled, the PWM phenomenon and its applications will be discussed later in the post and some digital pins can also be configured as SPI (Serial Peripheral Interface) computer bus. The Arduino Ethernet also has one UART with Rx and Tx signals on pin number 0 and 1 respectively that are used for serial communication. The headers on the other side of the Arduino Ethernet bear the voltage pins and the Analog pins. There are total 6 analog pins on the Arduino Ethernet. Unlike Digital pins these pins can just act as Input pins that are these pins can only receive signal and cannot provide signal or voltages that is why they are called Analog inputs. These analog inputs are actually the inputs of the Analog to Digital Converter inside the ATMEGA 328 microcontroller. These pins can be connected to the output of the analog sensors. Six different analog sensors can be connected to the Arduino Diecimila simultaneously. The analog pin number A4 and A5 can also act as the I2C (Inter-Integrated Circuit) computer bus with SDA (Serial Data) and SCK (Serial Clock) respectively.

The third header of the Arduino Ethernet bears the voltage pins that are used to power up the Arduino Ethernet board, these pins are also used to deliver power from the Arduino Ethernet board to other peripheral devices or the sensors attached to the Arduino Ethernet microcontroller development board.

Let us now discuss in detail the digital Input / Output pins, Analog input pins and Voltage pins of the Arduino Ethernet.

Arduino Ethernet Digital Input / Output Pins:

As described in the previous section that the Arduino Ethernet has total 14 digital input / output pins out of which 6 input / output pins are PWM enabled. Some of these Digital Input / Output pins can also serve as the SPI (Serial Peripheral Interface) computer bus. The detailed description is shown in the following figure:

The function that the digital input / output pins perform depends upon the coding of the Arduino Ethernet. That is the pin number 10 (SS), 11 (MOSI, Master out Slave In), 12 (MISO, Master in Slave Out), 13 (SCK, Serial Clock) constitute the SPI (Serial Peripheral Interface) computer bus and they function as the digital Input / output depending upon the programming. It is also important to note here that the Digital Input / Output pins are called as Input / Output because either they can be used as Input in which case they are intended to receive the signals from sensor or transducer (digital) or they can be used as Output in which case they drive the actuators such as relays.

The functionality of the Digital Input / Output pins as either Input or Output is determined by the code also. It is important to realize here that digital input / output pins can only supply a limited amount of current which is not sufficient to drive the motors or relays therefore we need to use drivers such as stepper motor driver or L298 DC motor driver. I will come to the coding of the Arduino Ethernet later in this post. Another point worth mentioning is that seven out of the 14 digital input / output pins 6 are PWM enabled pins that is these pins can provide PWM (Pulse Width Modulation) signal as output. These PWM pins find applications in which we need to regulate something for example the speed of the motor or brightness of the lamp.

Before concluding this section it is important to note that SPI interface is present on the ICSP header and has no connection on the Digital Input / Output pins as in the case of the Arduino UNO. In addition note that while using the Ethernet communication one has to use the SPI library in order configure the input / output pins, in this case the number of available I / Os will be reduced to 9 as pin number 4 will be used as chip select (SS) for the SD card. Out of these available I/Os 4 will be used as PWM outputs.

Arduino Ethernet Analog Pins:

As pointed earlier that the Arduino Ethernet has 6 analog pins which are actually the inputs of the ADC (analog to digital converter). These analog pins are input only that is they can only be used to read the analog signal or voltage and cannot drive the signal outwards. With the help of these pins the Arduino Ethernet can read analog signals from six different analog sensors. A variety of analog sensors are available in the markets which are used to measure different physical phenomenon for example LDR (Light Dependent resistor), Flex sensor etcetera.

Arduino Ethernet PWM Pins:

Let us now discuss the PWM pins of the Arduino Ethernet in some detail. As mentioned in the previous section that the Arduino Diecimila has 6 PWM pins which are numbered as 3, 5, 6, 9, 10 and 11. These digital pins can deliver the PWM signal as output. The PWM is the abbreviation of the Pulse Width Modulation and it is a phenomenon in which we adjust the width of the pulse according to the requirement of the applications. For example if one needs to regulate the speed of the motor or the brightness of the lamp this can be achieved by varying the width of the PWM signal. The power delivered by the PWM signal is the average of the signal for which it is zero and for which it is maximum. If the width of the PWM signal for which the signal remains HIGH is greater than more power will be delivered and thus reducing the width will cause the reduction in the power delivered. The width of the PWM signal for which the signal remains HIGH during its time period is referred to as the Duty Cycle of the PWM signal. The PWM pins are also used to control the angular position of the Servo motors. When using the Ethernet communication only the pin number 3, 5, 6 and 9 will be available for PWM output pins.
[otw_is sidebar=otw-sidebar-2] Arduino Ethernet PWM Pins

 

Arduino Ethernet Schematics:

The schematic design of the Arduino Ethernet has many similarities with the Arduino UNO but of course is unique as it has added functionality of the Ethernet communication and lacks the USB to Serial converter chip. The schematic of the Arduino Ethernet is as shown in the following figure:
[otw_is sidebar=otw-sidebar-3] Arduino Ethernet Schematics

Note in the schematics that the Ethernet chip w5100 is connected to the ATMEGA328 through its SPI interface. One thing note mentioned earlier is that Ethernet chip can also be used as bridge between parallel data and Ethernet since parallel interface is not used in this thus all the pins are shorted together and grounded.

Arduino Ethernet Applications:

Before discussing the programming language of the Arduino Ethernet let us first know the applications of the Arduino Ethernet for motivation.  So basically the Arduino Ethernet can be used in any system that requires the microcontroller. Some of the embedded systems in which the Arduino Ethernet can be used are listed below:

  • IR remote based Home Automation System.
  • Bluetooth controlled Home Automation System.
  • IoT enabled Home Automation System.
  • Auto Intensity Control of Street Lights.
  • Mobile lifter.
  • Hurdle Avoiding Vehicle.
  • Wall climbing vehicle.
  • Autonomous vehicle.
  • Robotic arm.
  • Parking lot Counter System.
  • Emergency Lighting.
  • Ethernet based web automation.
  • Ethernet based RFID reader and many more.

Arduino Ethernet programming language:
[otw_is sidebar=otw-sidebar-2] One of the perks that make Arduino Ethernet quite popular among the hobbyists and beginners is it’s easy to use programming language and programming. The programming language used by the Arduino Ethernet is the C++. The Arduino Ethernet IDE has a well-defined function for each task that is easy to remember. As an example the function that specifies the Arduino Ethernet digital Input / Output pin to work as input is:

pinMode(12,INPUT);

Here in this function there are two arguments. First argument is the pin number which we want to make input or output and second argument specifies the property that is input or output to the pin number used. The detailed discussion on programming the Arduino Ethernet will come later in the next posts.

That is all for now I hope this post would be helpful for you. In the next post I will come up with more interesting topics. Till then stay connected, keep reading and enjoy learning.