Arduino-Ethernet Datalogger

details

Arduino-Ethernet Datalogger

by Marco Guardigli


This reference is implemented on Arduino Ethernet which is integrated with Arduino Ethernet shield.

He said that

For a customer project I needed to build a datalogger that had to be periodically and asynchronously polled via ethernet. Main task of the datalogger was counting raising pulses from an external sensor outputting a TTL 0-5v signal.

Customer requirements were to have it simple, reliable, and tolerant of possible ethernet network disconnections.

I decided to work using the new Arduino Ethernet, which integrates the wiznet ethernet shield, and also has the sdcard slot.
I made this with Arduino022 software version.

I needed to perform accurate timestamping in the logs, so I decided to use NTP protocol to periodically sync a local clock built via the DS1307RTC time library.
Given the nature of the pulses I had to count, I decided to simply connect the counter line using the interrupt feature, and so decoupling the pulse detection from all the other code.

After initializing network, sdcard, synchronizing time with NTP server, and setting up the interrupt pulsereading line, the main loop just cycles waiting for browser to connect, then checking if it is time to log on the sdcard, and checking if it is time to resync clock with NTP to avoid excessive drift.

To test it, I built a simple random pulse generator and run it on another arduino 2009, feeding its digital output to the Arduino ethernet pulsecounter in.

I used just the external timekeeping library


Code

Goto Original site


TAG : 201111, W5100, Arduino Ethernet, Sensing&Gathering, Web Server, NTP, Data Logger

COMMENTS

Please Login to comment
  Subscribe  
Notify of