I've searched extensively for a way that I could plot my Arduino sensor reading in real time. Not only plot, but also display and store the data for further experimentation and corrections.

The simplest solution I’ve found was to use excel, but with a twist.

Also if you find this instructable interesting, perhaps you'll like another one I've made (about displaying live Arduino sensor readings on a Nokia 5110 LCD):


Step 1: What You'll Need

For this you will need:

-Windows (tested on xp)

-Arduino IDE

-Microsoft office (tested on 2010)

-PLX-DAQ (expansion for excel)

-Arduino (tested on UNO, but any board should work)

I am assuming that you’ve already got an Arduino, Windows, Arduino IDE and Excel. Here’s the link to download PLX-DAQ:


You only need to download and install it, it should work fine. After installation, it will automatically create a folder named PLX-DAQ on your Desktop in which you will find a shortcut named PLX-DAQ Spreadsheet.

When you want to use your Arduino to send data to excel, just open up the shortcut.

Step 2: Arduino Part

Now that we’ve got all that downloaded and installed, let’s start with the Arduino part.

Here’s a basic template I created that will display the time in column A and your sensor measurements in column B.

Of course, this is just a basic template, which is pretty straight forward and you can tweak it to suit your needs.

I’ve added explanations in the Arduino code so you (and I, after not working with it for a while) know which part of the code does what.

Here’s the sketch:

//always starts in line 0 and writes the thing written next to LABEL

void setup() {

Serial.begin(9600); // the bigger number the better

Serial.println("CLEARDATA"); //clears up any data left from previous projects

Serial.println("LABEL,Acolumn,Bcolumn,..."); //always write LABEL, so excel knows the next things will be the names of the columns (instead of Acolumn you could write Time for instance)

Serial.println("RESETTIMER"); //resets timer to 0


void loop() {

Serial.print("DATA,TIME,TIMER,"); //writes the time in the first column A and the time since the measurements started in column B



Serial.println(...); //be sure to add println to the last command so it knows to go into the next row on the second run

delay(100); //add a delay


Obviously if you upload this code, it won’t work on it’s own!

You need to add a formula for Adata, Bdata and … . This template is just for reference so you know how to use the program. Just add Serial.read() function, name it Adata, Bdata and … and it should work.

Step 3: Sending the Data to Excel

Of course PLX-DAQ has more functions, which you can explore on your own by reading the instructions in the rar folder that you downloaded.

If you want excel to graph your data but can’t be bothered to read the instructions, here’s a short version of what you can do:

-use the (modified) code from my instructable

-connect your Arduino as you normally would

-DO NOT OPEN THE SERIAL MONITOR in Arduino IDE, it will not work with excel if you do

-open the shortcut to your PLX-DAQ Spreadsheet

-excel will say “This application is about to initialize ActiveX…”, just click OK

-a new window named Data Acquisition for Excel will appear

-select the usb port your Arduino is connected to (if it doesn’t work at first, go through the list of ports)

-where it says Baud, just select the number you put in your code at Serial.begin(), in my case that would be 9600

-create an empty graph

-select which columns of data you want on the graph for the x and y axis (the way to do this is a little different depending on your version of excel, but it’s not too hard to figure out)

-click collect data on PLX-DAX and it should start collecting the data

-excel will plot the information as it gets sent from the Arduino to excel in real time

Depending on how precise you want your graph to be, you can change the characteristics of the graph. You can closely examine a section of the graph by shutting down data collecting, right click on the x or y axis and set it to a smaller frame. (normally it’s set to automatic)

You can also right click on the curve that connects the points on your chart and select the color and thickness of the curve.

That’s it for the basics. I hope I’ve helped a few of you out by writing this. I know it took me quite some time to find this and to get it working.

If you liked this instructable, perhaps you'll like another one I've made: https://www.instructables.com/id/Arduinonokia-lcd-d...

<p>Excel(2016) will stop working shortly after I connect. What can I do about this?</p>
<p>can i use it with windows 10 ?? I really need it.. huhu</p>
<p>Hi, did you ever find a solution for windows 10?</p>
<p><a href="https://forum.arduino.cc/index.php?topic=437398.0" rel="nofollow">https://forum.arduino.cc/index.php?topic=437398.0</a><br><br>there u go my friend, somebody on the arduino community modify it so it is compatible with 64 bit system and newer version of Windows/ms office</p>
<p>i have problem when i fixed the code the problem created the &quot;serial was decleaed a scope &quot; how should i fix it ? </p>
<p>The version from Parallax has been updated by a user in the Arduino forum</p><p><a href="http://forum.arduino.cc/index.php?topic=437398.0" rel="nofollow">http://forum.arduino.cc/index.php?topic=437398.0</a></p><p>It is easier and fixes the COM limitations of the Parallax version.. Took me about 15 minutes to get it running data into a live graph</p>
<p>I have that problem </p><p>when I open PLX-DAQ it error like pic</p><p>help please!!!</p>
<p>System Requirements</p><ul><br><li> Microsoft Windows 98<li> Microsoft Office/Excel 2000 to 2010<li> May not work with newer software; no longer supported</ul>
<p>when I open PLX-DAQ it error like pic</p><p>help please!!!</p>
<p>check your system </p><p>System Requirements</p><ul><br><li> Microsoft Windows 98<li> Microsoft Office/Excel 2000 to 2010<li> May not work with newer software; no longer supported</ul>
<p>I fixed this </p>
<p>how??? please help</p>
Use office in 32 bit
Office 32bit or windows 32 bit?
Office 32 bit
<p>I need some help! I'm making a temperature logger using an arduino yun board and the DS18B20 digital thermometer. I'm new to arduino so any help is greatly appreciated. The data doesn't seem to move over to the excel file, or if it does, it gets stuck on the first row.</p><p>#include &lt;OneWire.h&gt;</p><p>#include &lt;DallasTemperature.h&gt;</p><p>// Data wire is plugged into pin 2 on the Arduino</p><p>#define ONE_WIRE_BUS 2</p><p>// Setup a oneWire instance to communicate with any OneWire devices </p><p>// (not just Maxim/Dallas temperature ICs)</p><p>OneWire oneWire(ONE_WIRE_BUS);</p><p>// Pass our oneWire reference to Dallas Temperature.</p><p>DallasTemperature sensors(&amp;oneWire);</p><p>void setup(void)</p><p>{</p><p> // start serial port</p><p> Serial.begin(9600);</p><p> Serial.println(&quot;CLEARDATA&quot;);</p><p> Serial.println(&quot;LABEL,Current Time,Temp&quot;);</p><p> sensors.begin();</p><p>}</p><p>void loop(void)</p><p>{</p><p> // call sensors.requestTemperatures() to issue a global temperature</p><p> // request to all devices on the bus</p><p> Serial.print(&quot;DATA,TIME&quot;); //Capturing Local Time</p><p> int TempVal = sensors.getTempCByIndex(0);</p><p> sensors.requestTemperatures(); // Send the command to get temperatures</p><p> Serial.print(&quot;TempVal&quot;);</p><p> Serial.print(&quot;&quot;);</p><p> // You can have more than one IC on the same bus. </p><p> // 0 refers to the first IC on the wire</p><p> delay(1000);</p><p>} </p>
<p>I don't know how to modify my program ,so that i can get data on spreadsheet. ,please help me..../*</p><p> *</p><p> Ultrasonic sensor Pins:</p><p> VCC: +5VDC</p><p> Trig : Trigger (INPUT) - Pin11</p><p> Echo: Echo (OUTPUT) - Pin 12</p><p> GND: GND</p><p> */</p><p>int trigPin = 11; //Trig - green Jumper</p><p>int echoPin = 12; //Echo - yellow Jumper</p><p>int Object = 0;</p><p>long duration, cm ;</p><p>void setup() {</p><p> //Serial Port begin</p><p> Serial.begin (9600);</p><p> //Define inputs and outputs</p><p> pinMode(trigPin, OUTPUT);</p><p> pinMode(echoPin, INPUT);</p><p>}</p><p>void loop()</p><p>{</p><p> // The sensor is triggered by a HIGH pulse of 10 or more microseconds.</p><p> // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:</p><p> digitalWrite(trigPin, LOW);</p><p> delayMicroseconds(5);</p><p> digitalWrite(trigPin, HIGH);</p><p> delayMicroseconds(10);</p><p> digitalWrite(trigPin, LOW);</p><p> // Read the signal from the sensor: a HIGH pulse whose</p><p> // duration is the time (in microseconds) from the sending</p><p> // of the ping to the reception of its echo off of an object.</p><p> pinMode(echoPin, INPUT);</p><p> duration = pulseIn(echoPin, HIGH);</p><p> // convert the time into a distance</p><p> cm = (duration/2) / 29.1;</p><p> if (cm &lt; 10)</p><p> {</p><p> Serial.print(&quot;Object : &quot;);</p><p> Serial.print(Object++);</p><p> Serial.println(&quot; stk&quot;);</p><p> }</p><p> delay(20000);</p><p>}</p>
<p>Hi Ive done a number of instructables using PLX DAQ when I found it on their site in 2014, have you had a chance to look at these.</p><p><a href="https://www.instructables.com/id/Live-data-to-excel-from-an-Arduino-Light-Sensor/">https://www.instructables.com/id/Live-data-to-excel...</a></p><p><a href="https://www.instructables.com/id/Linkit-One-Live-data-monitored-in-Excel-and-displa/">https://www.instructables.com/id/Linkit-One-Live-da...</a></p><p><a href="https://www.instructables.com/id/Light-Spectrometer-from-a-head-inspection-lamp/">https://www.instructables.com/id/Light-Spectrometer...</a></p><p><a href="https://www.instructables.com/id/Linkit-One-Dual-beam-spectrometer/">https://www.instructables.com/id/Linkit-One-Dual-be...</a></p><p>Cheers</p>
<p>Would this work with an Arduino Microview?</p>
<p>Hey there.</p><p>I found out that the original PLX DAQ can only be used with Excel 32 bit versions. Error message is &quot;object not available on this machine&quot; due to selmaDAQ_Ver2.ocx that is not 64 bit compatible)</p><p>You can check out the new version I developed with full Office support (32 bit and 64 bit and versions up to Office 2016) on the official Arduino board here: https://forum.arduino.cc/index.php?topic=437398.0</p><p>If you have any questions I will try to answer them on the board of course :-)</p><p>The new module is now open code and can be enhanced if needed.</p><p>Greetings and don't be frustrated anymore! PLX DAQ is very cool and now works with all Office / Excel versions.</p><p>NetDevil</p><p>(I posted this to all &quot;first search site result&quot; websites I found with Google for PLX DAQ issues so the next users of PLX DAQ can find the new version as fast as possible :-) sorry for grave digging this thread)</p>
<p>Does the new version in the link use the same Arduino code as above?</p>
The code on your Arduino can still be used - no need to change anything. It is 100% compatible :-)<br><br>Only the code in the Excel VBA macro was changed but as a user you won't even recognize that. It's just working as usual but with all versions of Excel / Office now
<p>Had anybody done it with newer version and with arduino Mega?</p>
<p>Hi!</p><p>Thank you very much for your instructable, it's been really helpful and Ithink this way of connecting arduino with Excel is really interesting for the projects.</p><p>Anyway, I have tried communicating arduino with Mega with both arduino Uno and arduino Mega, but when I connect Mega, it doesn't work! Excel says me that connection is made, but nothing happens.</p><p>Does anyone know why this happens or if there is any solution?</p><p>Thank you!</p>
<p>I got error while pressing connect button on plx daq window &quot;Stamp DAQ could not connect.&quot; I have 64 bit windows 10 OS. I have separate Microsoft office 64 bit installed. Initially i thought that this micro was incompatible with office 2013 version. But when tried to run on office 2007 version but on Win 10 OS, i still got the same error. So i highly suspect that the micro is somehow incompatible with Win 10. </p>
<p>can i use it with windows 10 ?? I really need it.. huhu</p>
<p>can i use it with windows 10 ?? I really need it.. huhu</p>
<p>tyvm, just what I needed to log temperature data until I have the time to make another software :D</p>
<br> Thanks a lot! You are<br> really helpful! Guys you can also visit<br> <a href="https://plus.google.com/103156713044838092165/posts/gque7ErHCVY" rel="nofollow"> https://plus.google.com/103156713044838092165/pos...</a> to get<br> genuine and cheap windows keys to activate your windows.<br>
<p>i am getting error while pressing connect button on plx daq window &quot;Stamp DAQ could not connect. please check port setting&quot; what does this means. please help me.........</p>
<p>Mitesh, I have a similar problem, please update if you have been able to solve it.</p><p>Thanks !</p>
<p>I also have this problem, do you have solution?</p><p>Thanks. :)</p>
@pvashwin nope, its not solved yet.
<p>Hi, is it possible to create a solution using this product, and distribute it to others without they themselves having to have PLX-DAQ installed on their laptops? An example would be an excel addin that as soon as a user runs it, it starts plotting (assuming they have a board connected and all the other requirements).</p>
<p>Excellent instructable! I made it but I want to add more variables to Excel... I try it and I add the column name but I can&acute;t write de sensor value to the HT11 (Temperature and Humidity Sensor) and I want to add this variables to Excel and plot it in real time... Actually I print the HT11 sensor values in LCD... Somebody know how can I do it?</p>
<p><a href="http://robottini.altervista.org/arduino-and-real-time-charts-in-excel" rel="nofollow">http://robottini.altervista.org/arduino-and-real-t...</a></p><p>check that link</p>
<p>the following link helps for adding more data columns, by adding Serial.print(&quot;,&quot;) between each data variable</p><p>http://robottini.altervista.org/arduino-and-real-time-charts-in-excel</p>
<p>All the connections are fine. Have one to each and every comments listed hereby.</p><p>R &gt; is blinking to red and green. Tx pin on Arduino UNO is also blinking on the same time. BUT NOTHING IS ADDED TO EXCEL SHEET</p>
<p>everytime for the first click on the 'connect' i encounter '&quot;StampDAQ could not connect. please check port setting&quot; problem but then the connection button become green for the second time i click.... however, though connected already, excel still remain empty all the time while the 'R' keep flashing... </p><p>Do you know what is the problem? kind of very frustating....</p>
<p>great <a href="https://www.instructables.com/member/CrtSuznik/" rel="nofollow">CrtSuznik</a>! Very nice and useful instructable!!</p>
<p>it doesnt work, need to edit the script to suit your pc</p>
<p>So I am attempting to read in a voltage. I then want to log that voltage over time and graph the change. I am currently using excel 2003 and the voltage I am reading is coming from a circuit with a source, photo-resistor, and 10k resistor in series. I can read output in the serial monitor so I know the circuit is working. Please take a look at my Arduino code:</p><p>[code]int val = 0;</p><p>int row = 0;</p><p>void setup() {</p><p>Serial.begin(4800); // the bigger number the better</p><p>Serial.println(&quot;CLEARDATA&quot;); //clears up any data left from previous projects</p><p>Serial.println(&quot;LABEL,Time,Data&quot;); //always write LABEL, so excel knows the next things will be the names of the columns (instead of Acolumn you could write Time for instance)</p><p>Serial.println(&quot;RESETTIMER&quot;); //resets timer to 0</p><p>}</p><p>void loop() {</p><p>float value = analogRead(3);</p><p>float voltage = value * (5.0 / 1023.0);</p><p>Serial.print(&quot;DATA,TIME,TIMER,&quot;);//writes the time in the first column A and the time since the measurements started in column B</p><p>Serial.println(voltage);</p><p>row++;</p><p>if(row&gt;360){</p><p> row = 0;</p><p> Serial.println(&quot;ROW,SET,2&quot;);</p><p> }</p><p>Serial.println(); //be sure to add println to the last command so it knows to go into the next row on the second run</p><p>delay(750); //add a delay</p><p>}[/code]</p><p>I get the feeling my code should work. When I open PLX-DAQ three sheets open: Simple data, Simple data with plots, and Interactive bar graph, also, the active x program pops up and I am able to connect to the Arduino through port 3.. C is green R flashes red and T is green. However, when I do click connect nothing happens. I was under the impression that data should have started filling the first two coulombs, is this not correct? I also tried clicking new, three new sheets pop up, here I tried again to connect and no data started to flow in. I tried labeling coulomb a and b with Time and Data and then connecting but still no data.</p><p>So my question is this. Is there a problem with my code or is there some kind of data acquisition setup I have to go through in excel to get data coming in to new sheets or any sheet for that matter. Please help, been wrestling with this for a few days now...</p>
<p>Thanks for sharing this... I am trying to use this with UV and Ozone sensors via a radio transmitter into COM-4. I am testing with <strong>serial</strong> input first using the following code, but only one line of data appears next to the time and that doesn't seem to relate to the sensors... any help would be gratefully accepted :-)</p><p>//always starts in line 0 and writes the thing written next to LABEL<br>#define LDR_PIN A1<br>#define OZONE_PIN A3</p><p>void setup() {</p><p> Serial.begin(9600); // the bigger number the better</p><p> Serial.println(&quot;CLEARDATA&quot;); //clears up any data left from previous projects</p><p> Serial.println(&quot;LABEL,TIME,LDR,OZONE,...&quot;); //always write LABEL, so excel knows the next things will be the names of the columns (instead of Acolumn you could write Time for instance)</p><p> Serial.println(&quot;RESETTIMER&quot;); //resets timer to 0</p><p> pinMode (LDR_PIN, INPUT);<br> pinMode (OZONE_PIN, INPUT);</p><p>}</p><p>void loop() {</p><p> Serial.print(&quot;DATA,TIME,&quot;); //writes the time in the first column A and the time since the measurements started in column B </p><p> int LDR_VALUE = analogRead(LDR_PIN);<br> Serial.print(LDR_PIN, LDR_VALUE);<br> Serial.print(&quot;,&quot;);<br> int OZONE_PIN_VALUE = analogRead(OZONE_PIN);<br> Serial.print(OZONE_PIN, OZONE_PIN_VALUE);</p><p> Serial.println(&quot;&quot;); //be sure to add println to the last command so it knows to go into the next row on the second run </p><p> delay(1000); //add a delay</p><p>}</p>
<p>How do I use this for ADXL345 accelerometer? The code that I am using is this one.</p><p>https://gist.github.com/e-Gizmo/7818304</p>
<p>This works great. Thank you! I tested on office 2013, it worked perfectly. </p>
<p>hello</p><p>i can't make to works...</p><p>i want to measure more than 1 battery voltage and sending data to excell.My problem is that i can't sending data to 3 column...</p><p>void setup() {</p><p> Serial.begin(128000);</p><p> Serial.println(&quot;CLEARDATA&quot;);</p><p> Serial.println(&quot;LABEL,TIME,Battery1,Battery2&quot;);</p><p> }</p><p>void loop() {</p><p> Serial.print(&quot;DATA,TIME,&quot;);</p><p> int sensorValue = analogRead(A0);</p><p> float voltage = sensorValue * (5.0 / 1023.0);</p><p> Serial.println(voltage);</p><p> delay(1000);</p><p> sensorValue = analogRead(A1);</p><p> voltage = sensorValue * (5.0 / 1023.0);</p><p>Serial.println(voltage * 3 );</p><p> delay(1000);</p><p>}</p>
try using Serial.print(voltage) nstead of Serial.println(voltage)
<p>Superb! tried this at work, I'd like to readout flowmeters, the readout part works!(at least im getting some kind of value without the hookup of the meter) </p>
<p>Hello, </p><p>I am failing to understand how to make this sketch work, namely how to add the serial.write() function. Could someone please reply with an example sketch, preferably with the sensor input as a potentiometer?</p><p>Any help will sincerely be appreciated. </p>
<p>I just threw something into the comments that might be of help to you.</p>

About This Instructable




More by CrtSuznik:EASY Arduino OLED sensor data display Control ESP8266 over the internet (from anywhere) High voltage power supply 
Add instructable to: