element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Personal Blogs
  • Members
  • 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
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: neilk
  • Date Created: 14 Oct 2013 2:51 PM Date Created
  • Views 1002 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
  • neilk
    neilk over 8 years ago in reply to Former Member

    Hi hassanhabib145  Sounds like a very interesting project. You can find the code attached to my post No 4 on this thread:

     

    http://www.element14.com/community/thread/27515/l/arduino-data-logger-sending-data-to-excel-via-a-web-server-on-ethernet-shield

     

    I must confess, I haven't looked at this code for over 18 months now; I hope it's still OK with latest versions of Arduino IDE.

     

    Also, I have only ever used Excel 2003 with it - yes, would you believe I like Office 2003 so much, I have even installed it on to Windows 8.1!

     

    I hope you find it useful.

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 8 years ago

    Hallo Neil,
    I am working on a test system of fans. I have to place 32 fans in climate chamber in continuous running mode for some days meanwhile i also want to see the data of fans daily to see the trend in speed of fan. I wanted to see the data in excel from SD card using Arduin ethernet shield. I am interested in seeing your sketch and implementation for Excel.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 9 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
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 © 2023 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