element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Arduino Data Logger, sending data to Excel via a Web Server on Ethernet Shield
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: neilk
  • Date Created: 14 Oct 2013 2:51 PM Date Created
  • Views 2077 views
  • Likes 2 likes
  • Comments 3 comments
  • microsoft_excel
  • arduino_sd_card
  • arduino_projects
  • arduino_uno
  • data_logger
  • arduino_ethernet_shield
Related
Recommended

Arduino Data Logger, sending data to Excel via a Web Server on Ethernet Shield

neilk
neilk
14 Oct 2013

I recently adapted my 2 channel temperature datalogger to record temperatures in my household heating system. I wasn't satisfied with reading back a file from the SD card in order to analyse the data; I wanted a near real-time graph in Excel, on my PC. I could have used gobetwino - see my previous post, but it is a bit tortuous.

 

I invested in an Ethernet Shield and added a webserver to my data logger. Each time a web client requests data, the SD card file is opened and the data streamed out to the web client. In between client requests, the SD card file continues to be updated, so each time the client makes a request, there is more data to send to the client..........eventually, this causes timing problems which get progressively worse. However, fo my purposes, that doesn't matter.

 

My next step was to get this into Excel using a web query; I am using Office 2003 on a W7 PC; it was no problem, once I understood that my data had to be served out to the client in an HTML table structure........I now know a bit more raw HTML than I did before!

 

Once the data is flowing to the web client on the PC and being queried automatically by Excel, it is a simple matter to display a graph which is updated regularly.

 

Of course, all of this was happening on my desk, with the Ethernet shield connected by cable to an ethernet switch on my home network. The final step was to take the Arduino rig and a PSU to the remote location and set it up. I forgot to say that the basic datalogger includes an LCD display which shows elapsed time and the 2 temperature readings, so I can see that it is working. I then plugged in a Netgear powerline adapter nearby and connected the shield up to it. I ran back to my PC and started the web browser, connecting to my server - and there it was, working happily over my house wiring!

 

The bones my sketch are as follows:

 

1 Simon Monk's Timer library is used to generate 1 second and 15 second events.

2 The 1 second event maintains a digital clock, displayed on the LCD.

3 The 15 second event controls the analog reads to measure the temperatures, which are written, separated by semicolons, along with the current time, to the SD card file

4. Every time the main Loop of the sketch is executed, the timer events are checked and updated; then the web server listens for a client request. If no request is waiting, the lopp goes round again.

5. If a client request has been received, the SD card file is opened and the data read out and sent to the client as cells in a 3 column, N rows table.

 

Part of the webserver/client initialisation process sets the client to automatically request a data refresh - in my case, every 30 seconds.

The Excell Web query refreshes itself every minute (shortest interval).

 

Most of the code is taken directly or adapted from example code published in support of the Arduino standard libraries.

The only piece of genuinely original code is that which reads the data from the SD card file, parses it into the 3 data items and then packages them up as cells in an HTML table.

 

I will be happy to publish the sketch, or any part of it, if anyone is interested

  • Sign in to reply
Parents
  • DAB
    DAB over 12 years ago

    Hi Neil,

     

    I would be interested in seeing your sketch and your implementation for Excel.

     

    Thanks

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • DAB
    DAB over 12 years ago

    Hi Neil,

     

    I would be interested in seeing your sketch and your implementation for Excel.

     

    Thanks

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube