loading

I started this little project the other day when I saw that Instructables had posted a competition for the use of Sensors, however its turning out to be a bit more interesting.

My original idea was to take a very simple project (examples in one form or another are available all over the web) add a sensor and reprogram it in a way that would allow the sensor (a Light Dependent Resistor) to control the lights.

After all a lot of the wiring on projects can be the same its the programming that changes the way it works.

Anyway - I put it all together, got it to work and realised that it was quite a sad effort. so I decided to try to link the serial port back to the computer to send real time data to a graphing package.

You could use this as a diagnostic tool to monitor and display results from your robotic sensors to ensure that they perform as required on your projects. Yes you can do this in the monitor window of the Arduino software, but you cannot save or trend the data in that application.

More interesting uses for this type of project would be to monitor how light levels change throughout the day comparing things like cloudy days to brilliantly sunny days.

Another option is as security sensor to track entrances into a room.

Once I had captured the data I used excel 2013 to chart it, but also later on you can see that I have had a go with Plotly as well and found it to be a really good tool for creating quick and simple representations

If this interests you then please read on - if not then please take a look at some of my other projects, but I hope you enjoy all of them.

Step 1: Parts list and software

PARTS

onearduino
Variousjumper wires
TenLight Emitting Diodes
TenResistors
OnePotentiometer
OneLight Dependant Resistor

The Arduino is an UNO, the LED's are low values and the Pot is one I had laying around.

The LDR is one salvaged from my Cybot which was modified in a previous guide see

http://www.instructables.com/id/Scratch-4-Arduino-...

I found a good site for calculating the values for resistors - see the first picture on this guide, the link to which is just below here. I used 33 ohm resistors - these where considerably smaller than my first attempt using some a rescued from an old alarm system - they where way too big leaving me wondering why nothing worked when I switched the "finished thing on"?.

http://www.dannyg.com/examples/res2/resistor.htm

SOFTWARE

There are two bits of software and one addon required for this project to work:

The Arduino IDE is free to download from the following location and comes as either an install of zip file - I like the Zip (easier to use and and be run from a flash drive for portability)

http://arduino.cc/en/main/software

MICROSOFT EXCEL - unfortunately not free - I have office 2013 on a windows 7 computer

Finally the most important bit is the addon - this is for Excel and comes from a site called PRALAX

http://www.parallax.com/downloads/plx-daq

The file you want is PLX-DAQ and runs as a macro from inside Excel. This is a great little file as it can be used to monitor any serial port and gather the resultant data sent through it. All that is required is some specific lines of code in the Arduino sketch to tell it the send data to specific cells in Excel.

You also need to specify the port speed and ensure that the Arduino is set to the same speed - initially I tried 9600, but although this worked for the test spreadsheet that only sent text to excel from the Arduino, I needed to set it to 128000 for the final project as I would be monitoring the response times for the LED's dependent upon the resistance of the LDR at any given time.

<p>can we give excel data as input to arduino</p>
<p>Hi I believe yes - I have been playing with a few add-on's that claim to allow serial communication but as yet have not been able to get them to work once I doe I will post an ible.</p>
<p>Nicely documented instrucatable. Unfortunately, PLX-DAQ.xls doesn't appear to want to run on Excel 2002 under Win 8.1. Everything appears to be set and enabled per all directions but on spreadsheet startup, I &quot;Enable macros&quot; but an error box pops up saying &quot;Error accessing file. Network connections may have been lost&quot;. I have a good network so something else is wrong here. Can anyone provide any guidance?</p><p>Thanks - Grant</p>
<p>Hi gmartin2000</p><p>I have check on the Paralax web site the system requirements are</p><p> <br></p> <br><ul> <br><li>Microsoft Windows 98 or higher<li> Microsoft Office/Excel 2000 or higher</ul><p>So it should run fine on most if not all computers around today. Its possible to corrupt the zip file on download - Ive had that happen on other files I've downloaded. - Might be worth downloading a fresh zip file of the PLX-DAQ add in and trying again.</p><p><a href="http://www.parallax.com/downloads/plx-daq" rel="nofollow">http://www.parallax.com/downloads/plx-daq</a></p>
Hi sorry to hear that you are having trouble with plx,I think it is possible due to plx being developed at around 2007 so after 2002 it may no be backwards compatable. The version of excel I used was 2013.<br><br>I shall have a look to see if there are any potential solutions other than upgrading the version of excel<br>Thanks
Hi sorry to hear that you are having trouble with plx,I think it is possible due to plx being developed at around 2007 so after 2002 it may no be backwards compatable. The version of excel I used was 2013.<br><br>I shall have a look to see if there are any potential solutions other than upgrading the version of excel<br>Thanks
Good instructable! Another option for you if you don't want to use Excel is to use MySQL and pyserial to log Arduino data to a database.
<p>OO I will have to have a look for that thank you for the suggestion - glad you liked it</p>

About This Instructable

52,834views

274favorites

License:

Bio: Hi I like to have a go at anything that's interesting, from CNC to toy making, recently I have been dismantling an old Cybot ... More »
More by HUKBMBEAR:Life Hack - repair using a 3D printer LinkIt One - 3d Printed Case Linkit - One Basic fix 
Add instructable to: