0

members

Easy Basics: Project 062b Arduino W5100 Ethernet Shield, LM335Z, photocell - Datalogger

of Lex C. in UNO

Basics: Project 062b

Project name: Arduino W5100 Ethernet Shield, LM335Z, photocell - Datalogger

Tags: Arduino Uno, Arduino, Ethernet Shield, Arduino W5100, Datalogger, Micro SD card with adapter, Micro SD card, Temperature sensor, LM335Z, photocell, photoresistor

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.  Photoresistor (Photocell) 1 pc

7. Temperature sensor LM335Z 1 pc

8. Resistor 2 pcs (1pc 1 KOhm, 1 pc 10 KOhm)

9. Micro SD card with adapter 1 pc

General

We will learn how to connect Arduino W5100 Ethernet Shield to Arduino board and use it as datalogger. You can attach any sensor to Arduino W5100 Ethernet Shield and monitor readings (in our project we will use photocell and temperature sensor).

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..)

Understanding the temperature sensor LM335Z

The LM335 is an easy to use, relatively precise temperature sensor. It is great for things like temperature loggers and temperature controllers. This sensor is much easier to use than thermocouples, because it does not require any additional interface circuitry. It is also easier than thermistors or other resistive temperature sensors, since it requires no calibration, and has a linear response.

When connected the sensor acts much like a Zener diode. Regardless what current is flowing through it, it will drop the same amount of voltage. The voltage at the output will be 10 millivolts per kelvin temperature. This means at a comfortable room temperature it will output about 2.93 V. This is close enough to the middle of our measurement range of 0-5V to allow a wide range of measurement with the Arduino.

You can find the datasheet here.

Understanding the Photocell (Photoresistor)

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.

Signals and connections of the temperature sensor LM335Z

The ADJ pin is for calibration, and can safely be left disconnected. We can do any calibration using the arduino sketch. Put the sensor in the breadboard as shown. Flat side toward you.

Signals and connections of photocell

Attach one end of photoresistor to power. On the otherside, attach a 10 KOhm resistor to ground. This resistor is in series with the photoresistor, and together they form a voltage divider. The voltage at the point where they meet is proportional to the ratio of their resistances, according to Ohm’s Law. 

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. You can use Micro SD card(<=2G) or Mirco SDHC card (<=32G) with this module.
  2. Most SD cards work right out of the box, but it's possible you have one that was used in a computer or camera and it cannot be read by the SD library. Formatting the card will create a file system that the Arduino can read and write to. It's not desirable to format SD cards frequently, as it shortens their life span. You’ll need a SD card reader or micro SD card adapter and computer to format your card. The library supports the FAT16 and FAT32 filesystems, but use FAT16 when possible. See additional info here.
  3. Format the SD card as FAT16 or FAT32. Insert the SD card in your computer. Go to My Computer and right click on the SD card. Select Format...  
  4. A new window pops up. Select FAT32, press Start to initialize the formatting process and follow the onscreen instructions.
  5. Insert the formatted micro SD card in the TF card socket on the Arduino W5100 Ethernet Shield.
  6. Do wiring.
  7. Open Arduino IDE.
  8. Plug your Adruino Uno board into your PC and select the correct board and com port
  9. Verify and upload the sketch to your Adruino Uno.
  10. Open the Serial Monitor and check if everything is working properly.
  11. Let this project run for a few hours to gather a decent amount of data, and when you’re happy with the data logging period, shut down the Arduino and remove the micro SD card from the Arduino W5100 Ethernet Shield.
  12. Insert the SD card to a SD card reader connected to your computer (PC), open it, and you should have a datalogger.txt file with the collected data.
  13. You can open the data with a text editor, or use a spreadsheet to analyse and process your data.

Summary

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

Library

  • All libraries attached on the begining of the project description
  • SD 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: 400 times